mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 04:06:39 +09:00
Cleaned up use of the Game module
This commit is contained in:
@@ -19,7 +19,7 @@ Event.add(defines.events.on_marked_for_deconstruction, function(event)
|
||||
-- Check which type of decon a player is allowed
|
||||
local index = event.player_index
|
||||
if chache[index] == nil then
|
||||
local player = Game.get_player_by_index(index)
|
||||
local player = game.players[index]
|
||||
if Roles.player_allowed(player, 'fast-tree-decon') then chache[index] = 'fast'
|
||||
elseif Roles.player_allowed(player, 'standard-decon') then chache[index] = 'standard'
|
||||
else chache[index] = player.force end
|
||||
|
||||
Reference in New Issue
Block a user