mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Fixed bug with nil index for decon
This commit is contained in:
@@ -17,6 +17,7 @@ end)
|
||||
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 not index then return end
|
||||
if chache[index] == nil then
|
||||
local player = game.players[index]
|
||||
if Roles.player_allowed(player, 'fast-tree-decon') then chache[index] = 'fast'
|
||||
|
||||
Reference in New Issue
Block a user