mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +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)
|
Event.add(defines.events.on_marked_for_deconstruction, function(event)
|
||||||
-- Check which type of decon a player is allowed
|
-- Check which type of decon a player is allowed
|
||||||
local index = event.player_index
|
local index = event.player_index
|
||||||
|
if not index then return end
|
||||||
if chache[index] == nil then
|
if chache[index] == nil then
|
||||||
local player = game.players[index]
|
local player = game.players[index]
|
||||||
if Roles.player_allowed(player, 'fast-tree-decon') then chache[index] = 'fast'
|
if Roles.player_allowed(player, 'fast-tree-decon') then chache[index] = 'fast'
|
||||||
|
|||||||
Reference in New Issue
Block a user