mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 20:16:38 +09:00
Update all code styles
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user