diff --git a/modules/addons/compilatron.lua b/modules/addons/compilatron.lua index f7142b3d..f184baf5 100644 --- a/modules/addons/compilatron.lua +++ b/modules/addons/compilatron.lua @@ -20,6 +20,8 @@ Global.register( end ) +local Public = {} + --- This will re-create the speech bubble after it de-spawns called with set_timeout local callback = Token.register( @@ -38,6 +40,9 @@ local callback = --- This will move the messages onto the next message in the loop local function circle_messages() for name, ent in pairs(compilatrons) do + if not ent.valid then + Public.spawn_compilatron(game.players[1].surface,name) + end local current_message = current_messages[name] local msg_number local message @@ -58,8 +63,6 @@ end Event.on_nth_tick(config.message_cycle, circle_messages) -local Public = {} - --- This will add a compilatron to the global and start his message cycle -- @tparam entity LuaEntity the compilatron entity that moves around -- @tparam name string the name of the location that the complitron is at