mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 20:41:41 +09:00
@@ -140,12 +140,13 @@ local rocket_entry =
|
|||||||
-- Add the toggle auto launch if the player is allowed it
|
-- Add the toggle auto launch if the player is allowed it
|
||||||
-- Auto launch was removed from the api and no 2.0 equivalent was added
|
-- Auto launch was removed from the api and no 2.0 equivalent was added
|
||||||
-- https://forums.factorio.com/viewtopic.php?f=28&t=118065&p=656502
|
-- https://forums.factorio.com/viewtopic.php?f=28&t=118065&p=656502
|
||||||
--[[if check_player_permissions(player, "toggle_active") then
|
if check_player_permissions(player, "toggle_active") then
|
||||||
local flow = parent.add{ type = "flow", name = "toggle-" .. silo_name }
|
parent.add{ type = "flow" }
|
||||||
|
--[[local flow = parent.add{ type = "flow", name = "toggle-" .. silo_name }
|
||||||
local button = toggle_launch(flow)
|
local button = toggle_launch(flow)
|
||||||
button.tooltip = silo_data.toggle_tooltip
|
button.tooltip = silo_data.toggle_tooltip
|
||||||
button.sprite = silo_data.toggle_sprite
|
button.sprite = silo_data.toggle_sprite]]
|
||||||
end]]
|
end
|
||||||
|
|
||||||
-- Add the remote launch if the player is allowed it
|
-- Add the remote launch if the player is allowed it
|
||||||
if check_player_permissions(player, "remote_launch") then
|
if check_player_permissions(player, "remote_launch") then
|
||||||
@@ -544,9 +545,9 @@ local function update_rocket_gui_all(force_name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- Event used to update the stats when a rocket is launched
|
--- Event used to update the stats when a rocket is launched
|
||||||
Event.add(defines.events.on_rocket_launched, function(event)
|
--- @param event EventData.on_cargo_pod_finished_ascending
|
||||||
local force = event.rocket_silo.force
|
Event.add(defines.events.on_cargo_pod_finished_ascending, function(event)
|
||||||
update_rocket_gui_all(force.name)
|
update_rocket_gui_all(event.cargo_pod.force.name)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--- Update only the progress gui for a force
|
--- Update only the progress gui for a force
|
||||||
@@ -560,11 +561,9 @@ local function update_rocket_gui_progress(force_name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- Event used to set a rocket silo to be awaiting reset
|
--- Event used to set a rocket silo to be awaiting reset
|
||||||
|
--- @param event EventData.on_rocket_launch_ordered
|
||||||
Event.add(defines.events.on_rocket_launch_ordered, function(event)
|
Event.add(defines.events.on_rocket_launch_ordered, function(event)
|
||||||
local silo = event.rocket_silo
|
update_rocket_gui_progress(event.rocket_silo.force.name)
|
||||||
local silo_data = Rockets.get_silo_data(silo)
|
|
||||||
silo_data.awaiting_reset = true
|
|
||||||
update_rocket_gui_progress(silo.force.name)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Event.on_nth_tick(150, function()
|
Event.on_nth_tick(150, function()
|
||||||
|
|||||||
Reference in New Issue
Block a user