Merge branch 'explosivegaming:main' into aperx

This commit is contained in:
2025-03-07 23:45:09 +09:00
committed by GitHub
6 changed files with 6 additions and 7 deletions

View File

@@ -494,7 +494,7 @@ function Toolbar._ensure_consistency(player)
if type(allowed) == "function" then
allowed = allowed(player, element)
end
element.visible = allowed and element.visible or false
element.visible = allowed or false
list[button.name].visible = element.visible
-- Update the toggle state and hide the linked left element if the button is not allowed

View File

@@ -270,7 +270,7 @@ local default = Roles.new_role("Guest", "")
-- "command/tag",
-- "command/tag-clear",
"command/commands",
"command/get-role",
"command/get-roles",
"command/locate",
"command/create-report",
"command/ratio",

View File

@@ -115,7 +115,7 @@ local section = Gui.element("autofill_section")
return def:unlink_element(section_table)
end)
:on_click(function(def, player, element, event)
event.element = element.parent.alignment[toggle_section.name]
event.element = element.parent.flow[toggle_section.name]
toggle_section:raise_event(event)
end)

View File

@@ -443,7 +443,7 @@ local section = Gui.element("rocket_info_section")
return definition:unlink_element(scroll_table)
end)
:on_click(function(def, player, element, event)
event.element = element.parent.alignment[toggle_section.name]
event.element = element.parent.flow[toggle_section.name]
toggle_section:raise_event(event)
end)

View File

@@ -37,7 +37,7 @@ UsesServerUps:on_load(function(player_name, visible)
--- @diagnostic disable-next-line undefined-field
if not External.valid() or not storage.ext.var.server_ups then visible = false end
label.visible = visible
label.visible = visible or false
end)
--- Toggles if the server ups is visbile

View File

@@ -35,10 +35,9 @@ Commands.new("unassign-role", { "exp-commands_roles.description-unassign" })
end)
--- Lists all roles in they correct order
Commands.new("get-role", { "exp-commands_roles.description-get" })
Commands.new("get-roles", { "exp-commands_roles.description-get" })
:optional("player", { "exp-commands_roles.arg-player-get" }, Commands.types.player)
:add_aliases{ "roles" }
:add_flags{ "admin_only" }
:register(function(player, other_player)
--- @cast other_player LuaPlayer?
local roles = get_roles_ordered()