mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Fixed invalid compilatron bug
This commit is contained in:
@@ -20,6 +20,8 @@ Global.register(
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local Public = {}
|
||||||
|
|
||||||
--- This will re-create the speech bubble after it de-spawns called with set_timeout
|
--- This will re-create the speech bubble after it de-spawns called with set_timeout
|
||||||
local callback =
|
local callback =
|
||||||
Token.register(
|
Token.register(
|
||||||
@@ -38,6 +40,9 @@ local callback =
|
|||||||
--- This will move the messages onto the next message in the loop
|
--- This will move the messages onto the next message in the loop
|
||||||
local function circle_messages()
|
local function circle_messages()
|
||||||
for name, ent in pairs(compilatrons) do
|
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 current_message = current_messages[name]
|
||||||
local msg_number
|
local msg_number
|
||||||
local message
|
local message
|
||||||
@@ -58,8 +63,6 @@ end
|
|||||||
|
|
||||||
Event.on_nth_tick(config.message_cycle, circle_messages)
|
Event.on_nth_tick(config.message_cycle, circle_messages)
|
||||||
|
|
||||||
local Public = {}
|
|
||||||
|
|
||||||
--- This will add a compilatron to the global and start his message cycle
|
--- This will add a compilatron to the global and start his message cycle
|
||||||
-- @tparam entity LuaEntity the compilatron entity that moves around
|
-- @tparam entity LuaEntity the compilatron entity that moves around
|
||||||
-- @tparam name string the name of the location that the complitron is at
|
-- @tparam name string the name of the location that the complitron is at
|
||||||
|
|||||||
Reference in New Issue
Block a user