Skip to content

Commit

Permalink
Factorio: Fix satellite goal (#4183)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaitSith2 authored Nov 13, 2024
1 parent 8b87e20 commit 85159a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion worlds/factorio/data/mod_template/control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,12 @@ script.on_event(defines.events.on_player_removed, on_player_removed)

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.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
dumpInfo(event.rocket.force)
game.set_game_state
Expand Down

0 comments on commit 85159a4

Please sign in to comment.