mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Clear the last of the nil checks
Guards now cover the statements that follow them, and a couple of reads are restructured so the narrowing survives. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,7 +34,7 @@ for _, config_key in ipairs{ "always_protected_names", "always_protected_types",
|
||||
end
|
||||
|
||||
-- Require roles if a permission is assigned in the config
|
||||
local Roles
|
||||
local Roles --- @type table<string, any>
|
||||
if config.ignore_permission then
|
||||
Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ local Gui = require("modules/exp_gui")
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
|
||||
----- Locals -----
|
||||
local follow_label -- Gui constructor
|
||||
local follow_label --- @type ExpElement Gui constructor
|
||||
local following = {}
|
||||
local spectating = {}
|
||||
local Public = {}
|
||||
|
||||
@@ -673,7 +673,7 @@ warp_list_container = Gui.define("warp_list_container")
|
||||
-- Draw the scroll table for the warps
|
||||
local scroll_table = Gui.elements.scroll_table(container, 250, 3, "scroll")
|
||||
-- Set the scroll panel to always show the scrollbar (not doing this will result in a changing gui size)
|
||||
scroll_table.parent.vertical_scroll_policy = "always"
|
||||
assert(scroll_table.parent).vertical_scroll_policy = "always"
|
||||
|
||||
-- Change the style of the scroll table
|
||||
local scroll_table_style = scroll_table.style
|
||||
@@ -874,7 +874,7 @@ local function role_update_event(event)
|
||||
-- Check if user has permission to add warps
|
||||
local allow_add_warp = check_player_permissions(player, "allow_add_warp")
|
||||
-- Update container size depending on whether the player is allowed to add warps
|
||||
frame.parent.style.width = allow_add_warp and 268 or 220
|
||||
assert(frame.parent).style.width = allow_add_warp and 268 or 220
|
||||
|
||||
-- Update the warps, in case the user can now edit them
|
||||
local scroll_table = frame.scroll.table
|
||||
|
||||
Reference in New Issue
Block a user