Skip to content

Commit

Permalink
Raise revive for other mods
Browse files Browse the repository at this point in the history
As well as a debug command to try and figure out how structs even emptied itself.
  • Loading branch information
Quezler committed Dec 8, 2023
1 parent 8ed1d91 commit c312319
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ script.on_nth_tick(600, function(event) -- no_material_for_construction expires
end)

script.on_nth_tick(60 * 60 * 10, Handler.gc) -- every 10 minutes

commands.add_command('se-interstellar-construction-requests-fulfillment', nil, function(command)
game.print(serpent.block({
table_size(global.structs),
#global.deck,
#global.pile,
}))
end)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "se-interstellar-construction-requests-fulfillment",
"title": "Space Exploration - interstellar construction requests fulfillment",
"description": "Keeping building equipment stocked at every planet is tedious, just shoot it there from nauvis.",
"version": "1.0.0",
"version": "1.0.1",
"author": "Quezler",
"factorio_version": "1.1",
"dependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function Handler.on_created_entity(event)
proxy = nil, -- entity occupied if present and valid
updated_at = game.tick,
}

table.insert(global.pile, entity.unit_number)
end

Expand Down Expand Up @@ -201,7 +201,7 @@ function Handler.on_entity_destroyed(event)
if cargo then
cargo.remove(handled_alert.itemstack)
Handler.shoot(struct)
handled_alert.entity.revive()
handled_alert.entity.revive{raise_revive = true}
end

end
Expand Down

0 comments on commit c312319

Please sign in to comment.