Page 1 of 1

[1.1.61] Setting rocket_parts during rocket launch doesn't prep next rocket when launch completed

Posted: Tue Aug 23, 2022 2:09 am
by Silari
What I Did
I set the rocket_parts of a silo to enough to build a rocket ("silo.rocket_parts = silo.rocket_parts + silo.prototype.rocket_parts_required"), as the item that was launched wasn't valid for that surface in my mod. Since preventing the launch with the invalid item isn't possible, the closest thing I can do is refund the rocket parts to avoid that part of the expense for the player's mistake.
What Happened
The rocket parts were set correctly, but after the rocket silo finished the launch animations it went back to waiting for ingredients, despite having enough parts already to make another rocket.

Only after ingredients were provided to build a rocket part was the rocket prep started, with rocket parts going to 1/100 after rocket prep started.

Setting rocket_parts = 100 again after launch is complete is also enough to get the rocket prep stage to start immediately.
What I Expected
For the rocket silo to finish the current launch, then begin prepping the next rocket immediately if it already has enough parts.


Similarly, setting rocket parts to 200 while not during a launch will create one rocket and show 100/100 parts. After launching it, it'll complete the launch animation and again wait for ingredients and complete another part before prepping the next rocket. This can easily be tested by selecting a rocket silo and running

Code: Select all

/c game.player.selected.rocket_parts = 200
For vanilla rocket silos it's not too bad, as the new part would get to 101/100, prep the rocket, and be back down to 1/100. For modded silos, like those in SE where it only takes 1 rocket part, it leads to never being able to use the returned parts. It has to build a part to prep a rocket, so it's again stuck at 1/1.

Re: [1.1.61] Setting rocket_parts during rocket launch doesn't prep next rocket when launch completed

Posted: Thu Sep 08, 2022 6:08 am
by boskid
Thanks for the report. Issue is now fixed for 1.1.69.