mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Make the @as casts actually apply
emmylua only parses the inline cast as `--[[@as T]]`, the spaced form `--[[ @as T ]]` is treated as a plain comment, so all 149 of them were doing nothing. LuaGuiElement.style is a union because a style name can be assigned to it, so reading it back needs the cast. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ ToolbarState:on_load(function(player_name, value)
|
||||
|
||||
local decompressed = helpers.json_to_table(assert(helpers.decode_string(value), "Failed String Decode"))
|
||||
local player = assert(game.get_player(player_name))
|
||||
Gui.toolbar.set_state(player, decompressed --[[ @as Gui.ToolbarState ]])
|
||||
Gui.toolbar.set_state(player, decompressed --[[@as Gui.ToolbarState]])
|
||||
|
||||
return nil -- We don't save the state, use Gui.toolbar.get_state
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user