Fixed invalid compilatron bug

This commit is contained in:
Cooldude2606
2019-04-10 20:06:32 +01:00
parent d4f9161cdf
commit eaec5f438f

View File

@@ -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