Allow toolbar to be deleted from lib

This commit is contained in:
Cooldude2606
2025-01-30 00:24:59 +00:00
parent 6850cfa968
commit d5fd466246

View File

@@ -169,10 +169,13 @@ function ExpGui._ensure_consistency(event)
ensure_elements(player, ExpGui.left_elements, elements.left, ExpGui.get_left_flow(player))
ensure_elements(player, ExpGui.relative_elements, elements.relative, player.gui.relative)
--- @diagnostic disable-next-line invisible
ExpGui.toolbar._create_elements(player)
--- @diagnostic disable-next-line invisible
ExpGui.toolbar._ensure_consistency(player)
-- This check isn't needed, but allows the toolbar file to be deleted without modifying any lib code
if ExpGui.toolbar then
--- @diagnostic disable-next-line invisible
ExpGui.toolbar._create_elements(player)
--- @diagnostic disable-next-line invisible
ExpGui.toolbar._ensure_consistency(player)
end
end
--- Rerun the visible check for relative elements