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