diff --git a/exp_gui/module/toolbar.lua b/exp_gui/module/toolbar.lua index 9ffb4595..a0eaabc1 100644 --- a/exp_gui/module/toolbar.lua +++ b/exp_gui/module/toolbar.lua @@ -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 diff --git a/exp_legacy/module/config/expcore/roles.lua b/exp_legacy/module/config/expcore/roles.lua index f2053b3a..2aaa3528 100644 --- a/exp_legacy/module/config/expcore/roles.lua +++ b/exp_legacy/module/config/expcore/roles.lua @@ -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", diff --git a/exp_legacy/module/modules/gui/autofill.lua b/exp_legacy/module/modules/gui/autofill.lua index f0905230..afcbfe89 100644 --- a/exp_legacy/module/modules/gui/autofill.lua +++ b/exp_legacy/module/modules/gui/autofill.lua @@ -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) diff --git a/exp_legacy/module/modules/gui/rocket-info.lua b/exp_legacy/module/modules/gui/rocket-info.lua index 4f4dbb66..e47551cc 100644 --- a/exp_legacy/module/modules/gui/rocket-info.lua +++ b/exp_legacy/module/modules/gui/rocket-info.lua @@ -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) diff --git a/exp_legacy/module/modules/gui/server-ups.lua b/exp_legacy/module/modules/gui/server-ups.lua index 98a34cad..7635dfec 100644 --- a/exp_legacy/module/modules/gui/server-ups.lua +++ b/exp_legacy/module/modules/gui/server-ups.lua @@ -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 diff --git a/exp_scenario/module/commands/roles.lua b/exp_scenario/module/commands/roles.lua index 7f519bf3..7adbb3a1 100644 --- a/exp_scenario/module/commands/roles.lua +++ b/exp_scenario/module/commands/roles.lua @@ -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()