QualityRockets


Rocket raising speed scales with rocket silo quality.

Tweaks
2 months ago
2.0
3.32K
Logistics

b Mod incompatibility

8 months ago

Your mod causes crashes together with eg. Circuit Launchable Rockets, since you don't notify other mods when replacing the silo entity.
To improve that, you should add raise_built = true in both surface.create_entity calls, and replace entity.destroy() with entity.destroy{raise_destroy=true} - that way, other mods can react to the replacement (eg. by updating their internal data structures)

8 months ago

I assumed the fast-replace would work well enough, but apparantly not. I am raising those events now.

Purely out of curiosity, did you look at older source code? .5 isnt using entity.destroy at all

8 months ago

If mods store unit_numbers or even entity objects, those are no longer valid after a fast replace. It would be possible to check .valid before each access and look for the replacement if false, but that would add both complexity and runtime.

You are right, I was looking at the .4 code when writing this, and only quickly checked the changelog for .5 when posting.

New response