Rocket-Silo Construction


Building a Rocket Silo is now a 6 stages process. Each silo needs to be excavated, filled and built, while requiring a lot of power, materials and generating pollution. Custom Space Exploration, Bob&Angels, Industrial Revolution and Exotic Industries compatibility News: new graphics by snouz

Content
7 months ago
0.17 - 1.1
33.4K
Manufacturing

g React to script_raised_built

4 years ago

Could you add support to react to when a stage 1 silo is placed bu a mod and raise_built = true
https://lua-api.factorio.com/latest/events.html#script_raised_built

4 years ago

Sure. Please try the new version

4 years ago
(updated 4 years ago)

So it looks good on initial spawn (with the progress bar being shown), but when stage1 tries to complete it errors.
I created the rocket silo with:
/c game.surfaces[1].create_entity{name="rsc-silo-stage1", position = {x=10, y=10}, force=game.player.force, raise_built = true}
and just ran it on fast game speed unloading all the stone.

370.564 Error MainLoop.cpp:1184: Exception at tick 66102: The mod Rocket-Silo Construction caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Rocket-Silo-Construction::on_nth_tick(60)
Expected LuaPlayer, index, or name.
stack traceback:
Rocket-Silo-Construction/control.lua:108: in function 'upgrade_construction_site'
Rocket-Silo-Construction/control.lua:139: in function 'check_construction_site'
Rocket-Silo-Construction/control.lua:186: in function <Rocket-Silo-Construction/control.lua:181>
stack traceback:
[C]: in function 'newindex'
__Rocket-Silo-Construction
/control.lua:108: in function 'upgrade_construction_site'
Rocket-Silo-Construction/control.lua:139: in function 'check_construction_site'
Rocket-Silo-Construction/control.lua:186: in function <Rocket-Silo-Construction/control.lua:181
387.095 Loading map C:\FactorioModding\saves\aaa.zip: 2539500 bytes.
387.229 Loading level.dat: 4492722 bytes.
387.241 Info Scenario.cpp:187: Map version 0.17.56-3
387.343 Loading script.dat: 10489 bytes.
387.346 Checksum for script C:/FactorioModding/temp/currently-playing/control.lua: 1876143224
387.347 Checksum for script biter_extermination/control.lua: 3396975770
387.353 Checksum for script item_delivery_pod/control.lua: 3085661888
387.355 Checksum for script Rocket-Silo-Construction/control.lua: 1428430835
387.369 Checksum for script wills_spaceship_repair/control.lua: 3672349899
486.459 Info AppManagerStates.cpp:1754: Saving finished
492.974 Error MainLoop.cpp:1184: Exception at tick 44136: The mod Rocket-Silo Construction caused a non-recoverable error.
Please report this error to the mod author.

Error while running event Rocket-Silo-Construction::on_nth_tick(60)
Expected LuaPlayer, index, or name.
stack traceback:
Rocket-Silo-Construction/control.lua:108: in function 'upgrade_construction_site'
Rocket-Silo-Construction/control.lua:139: in function 'check_construction_site'
Rocket-Silo-Construction/control.lua:186: in function <Rocket-Silo-Construction/control.lua:181>
stack traceback:
[C]: in function 'newindex'
__Rocket-Silo-Construction
/control.lua:108: in function 'upgrade_construction_site'
Rocket-Silo-Construction/control.lua:139: in function 'check_construction_site'
Rocket-Silo-Construction/control.lua:186: in function <Rocket-Silo-Construction/control.lua:181

4 years ago

Fixed: had to change my raise on built event, as it requires a player
if there is no player (created by script), then I dont fire the default on_built_event.
Instead, if you need the get the stage built, you have to use the new custom event get_on_silo_stage_finished using interface.
This could create some problems with other mods: if a mod needs to know when the rocket silo is built, probably it is using deafult on_built event.
Anyway, I think it is working now. please try the new version.

4 years ago

All seems to be behaving itself.

New response