mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 12:11:33 -06:00
Factorio: Fix satellite goal (#4183)
This commit is contained in:
@@ -310,7 +310,12 @@ script.on_event(defines.events.on_player_removed, on_player_removed)
|
|||||||
|
|
||||||
function on_rocket_launched(event)
|
function on_rocket_launched(event)
|
||||||
if event.rocket and event.rocket.valid and storage.forcedata[event.rocket.force.name]['victory'] == 0 then
|
if event.rocket and event.rocket.valid and storage.forcedata[event.rocket.force.name]['victory'] == 0 then
|
||||||
if event.rocket.get_item_count("satellite") > 0 or GOAL == 0 then
|
satellite_count = 0
|
||||||
|
cargo_pod = event.rocket.cargo_pod
|
||||||
|
if cargo_pod then
|
||||||
|
satellite_count = cargo_pod.get_item_count("satellite")
|
||||||
|
end
|
||||||
|
if satellite_count > 0 or GOAL == 0 then
|
||||||
storage.forcedata[event.rocket.force.name]['victory'] = 1
|
storage.forcedata[event.rocket.force.name]['victory'] = 1
|
||||||
dumpInfo(event.rocket.force)
|
dumpInfo(event.rocket.force)
|
||||||
game.set_game_state
|
game.set_game_state
|
||||||
|
Reference in New Issue
Block a user