mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
@@ -549,7 +549,7 @@ Event.on_nth_tick(150, function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
--- Adds a silo to the list when it is built
|
--- Adds a silo to the list when it is built
|
||||||
--- @param event EventData.on_built_entity | EventData.on_robot_built_entity
|
--- @param event EventData.on_built_entity | EventData.on_robot_built_entity | EventData.script_raised_built | EventData.script_raised_revive
|
||||||
local function on_built(event)
|
local function on_built(event)
|
||||||
local entity = event.entity
|
local entity = event.entity
|
||||||
if entity.valid and entity.name == "rocket-silo" then
|
if entity.valid and entity.name == "rocket-silo" then
|
||||||
@@ -559,6 +559,8 @@ end
|
|||||||
|
|
||||||
Event.add(defines.events.on_built_entity, on_built)
|
Event.add(defines.events.on_built_entity, on_built)
|
||||||
Event.add(defines.events.on_robot_built_entity, on_built)
|
Event.add(defines.events.on_robot_built_entity, on_built)
|
||||||
|
Event.add(defines.events.script_raised_built, on_built)
|
||||||
|
Event.add(defines.events.script_raised_revive, on_built)
|
||||||
|
|
||||||
--- Redraw the progress section on role change
|
--- Redraw the progress section on role change
|
||||||
local function role_update_event(event)
|
local function role_update_event(event)
|
||||||
|
|||||||
@@ -24,11 +24,11 @@ Commands.new("repair", { "exp-commands_repair.description" })
|
|||||||
force = force,
|
force = force,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local param = { raise_revive = true } --- @type LuaEntity.silent_revive_param
|
||||||
for _, entity in ipairs(entities) do
|
for _, entity in ipairs(entities) do
|
||||||
-- TODO test for ghost not being a blueprint, https://forums.factorio.com/viewtopic.php?f=28&t=119736
|
if not config.disallow[entity.ghost_name] and (config.allow_blueprint_repair or entity.created_by_corpse) then
|
||||||
if not config.disallow[entity.ghost_name] and (config.allow_blueprint_repair or true) then
|
|
||||||
revive_count = revive_count + 1
|
revive_count = revive_count + 1
|
||||||
entity.silent_revive()
|
entity.silent_revive(param)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user