Factorio: Fix satellite goal (#4183)
This commit is contained in:
parent
8b87e20a96
commit
85159a4f1f
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue