mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-02-07 13:31:54 +02:00
Debug removed
This commit is contained in:
parent
d6e37cdba7
commit
194efa3d40
@ -121,31 +121,18 @@ local on_built_token =
|
|||||||
name = entity.ghost_name
|
name = entity.ghost_name
|
||||||
ghost = true
|
ghost = true
|
||||||
end
|
end
|
||||||
game.print('-----------------------') -- debug
|
|
||||||
if allowed_entities[name] then
|
if allowed_entities[name] then
|
||||||
Debug.print(string.format('Allowed: %s', allowed_entities[name]))
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Takes the keep_alive_callback function and runs it with the entity as an argument
|
-- Takes the keep_alive_callback function and runs it with the entity as an argument
|
||||||
-- If true is returned, we exit. If false, we destroy the entity.
|
-- If true is returned, we exit. If false, we destroy the entity.
|
||||||
local keep_alive_callback = primitives.keep_alive_callback
|
local keep_alive_callback = primitives.keep_alive_callback
|
||||||
Debug.print(string.format('Banned: %s', banned_entities[name]))
|
|
||||||
local result -- debug
|
|
||||||
if keep_alive_callback then -- debug
|
|
||||||
result = keep_alive_callback(entity) -- debug
|
|
||||||
else -- debug
|
|
||||||
result = 'no function' -- debug
|
|
||||||
end -- debug
|
|
||||||
|
|
||||||
Debug.print(string.format('Function return: %s', result))
|
|
||||||
if not banned_entities[name] and keep_alive_callback and keep_alive_callback(entity) then
|
if not banned_entities[name] and keep_alive_callback and keep_alive_callback(entity) then
|
||||||
Debug.print('Entity was spared')
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
Debug.print('Entity was killed')
|
|
||||||
|
|
||||||
local p = Game.get_player_by_index(event.player_index)
|
local p = Game.get_player_by_index(event.player_index)
|
||||||
if not p or not p.valid then
|
if not p or not p.valid then
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user