mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Refactor some of the Guis from the legacy plugin (#399)
* Fix bugs in core and add default args to Gui defs * Refactor production Gui * Refactor landfill blueprint button * Fix more bugs in core * Consistent naming of new guis * Refactor module inserter gui * Refactor surveillance gui * Add shorthand for data from arguments * Make element names consistent * Add types * Change how table rows work * Refactor player stats gui * Refactor quick actions gui * Refactor research milestones gui * Refactor player bonus gui * Refactor science production gui * Refactor autofill gui * Cleanup use of aligned flow * Rename "Gui.element" to "Gui.define" * Rename Gui types * Rename property_from_arg * Add guide for making guis * Add full reference document * Add condensed reference * Apply style guide to refactored guis * Bug fixes
This commit is contained in:
@@ -129,7 +129,6 @@ end)
|
||||
Event.add(defines.events.on_player_joined_game, function(event)
|
||||
local player = game.players[event.player_index]
|
||||
check_data_loaded_async:start_after(300, player)
|
||||
PlayerData:raw_set(player.name)
|
||||
PlayerData:request(player)
|
||||
end)
|
||||
|
||||
@@ -139,8 +138,6 @@ Event.add(defines.events.on_player_left_game, function(event)
|
||||
local player_data = PlayerData:get(player)
|
||||
if player_data and player_data.valid == true then
|
||||
PlayerData:unload(player)
|
||||
else
|
||||
PlayerData:raw_set(player.name)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -604,7 +604,6 @@ local has_flag = Roles.player_has_flag(game.player, 'is_donator')
|
||||
]]
|
||||
function Roles.player_allowed(player, action)
|
||||
local roles = Roles.get_player_roles(player)
|
||||
if not roles then return end
|
||||
for _, role in ipairs(roles) do
|
||||
if role:is_allowed(action) then
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user