mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Change rocket launch to cargo pod ascended
This commit is contained in:
@@ -13,12 +13,13 @@ local function add_log(data)
|
|||||||
write_file(config.file_name, "\n", true, 0)
|
write_file(config.file_name, "\n", true, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
Event.add(defines.events.on_rocket_launched, function(event)
|
Event.add(defines.events.on_cargo_pod_finished_ascending, function(event)
|
||||||
if event and event.rocket and event.rocket.force and event.rocket.force.rockets_launched then
|
if event and event.launched_by_rocket then
|
||||||
if event.rocket.force.rockets_launched >= config.rocket_launch_display_rate and event.rocket.force.rockets_launched % config.rocket_launch_display_rate == 0 then
|
local force = event.cargo_pod.force
|
||||||
add_log("[ROCKET] " .. event.rocket.force.rockets_launched .. " rockets launched")
|
if force.rockets_launched >= config.rocket_launch_display_rate and force.rockets_launched % config.rocket_launch_display_rate == 0 then
|
||||||
elseif config.rocket_launch_display[event.rocket.force.rockets_launched] then
|
add_log("[ROCKET] " .. force.rockets_launched .. " rockets launched")
|
||||||
add_log("[ROCKET] " .. event.rocket.force.rockets_launched .. " rockets launched")
|
elseif config.rocket_launch_display[force.rockets_launched] then
|
||||||
|
add_log("[ROCKET] " .. force.rockets_launched .. " rockets launched")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ function Rockets.get_rolling_average(force_name, count)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- Event used to update the stats and the hui when a rocket is launched
|
--- Event used to update the stats and the hui when a rocket is launched
|
||||||
Event.add(defines.events.on_rocket_launched, function(event)
|
Event.add(defines.events.on_cargo_pod_finished_ascending, function(event)
|
||||||
local entity = event.rocket_silo
|
local entity = event.rocket_silo
|
||||||
local silo_data = Rockets.get_silo_data(entity)
|
local silo_data = Rockets.get_silo_data(entity)
|
||||||
local force = event.rocket_silo.force
|
local force = event.rocket_silo.force
|
||||||
|
|||||||
Reference in New Issue
Block a user