Update all code styles

This commit is contained in:
Cooldude2606
2024-09-28 01:56:54 +01:00
parent 5e2a62ab27
commit 292c1a1b68
194 changed files with 9817 additions and 9703 deletions

View File

@@ -1,14 +1,14 @@
--- Stores if you use alt mode or not and auto applies it
-- @data Alt-View
local Event = require("modules/exp_legacy/utils/event") ---@dep utils.event
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
--- Stores the visible state of alt mode
local PlayerData = require("modules.exp_legacy.expcore.player_data") --- @dep expcore.player_data
local UsesAlt = PlayerData.Settings:combine('UsesAlt')
local UsesAlt = PlayerData.Settings:combine("UsesAlt")
UsesAlt:set_default(false)
UsesAlt:set_metadata{
stringify = function(value) return value and 'Visible' or 'Hidden' end
stringify = function(value) return value and "Visible" or "Hidden" end,
}
--- When your data loads apply alt view if you have it enabled
@@ -21,4 +21,4 @@ end)
Event.add(defines.events.on_player_toggled_alt_mode, function(event)
local player = game.players[event.player_index]
UsesAlt:set(player, player.game_view_settings.show_entity_info)
end)
end)