Page 1 of 1

LuaEntity::secondary_rocket_parts RW

Posted: Tue Jul 07, 2026 12:10 am
by MeteorSwarm
LuaEntity::rocket_parts currently exists to allow reading/writing the current number of rocket parts in the rocket's first progress bar, but there appears to be no way of reading or writing the secondary rocket parts progress bar. This would benefit my entity replacement system for PlanetsLib, which seeks to make dynamic entity migration possible via runtime entity replacements and the transfer of all entity properties that can be transferred.

Re: LuaEntity::secondary_rocket_parts RW

Posted: Tue Jul 07, 2026 12:24 am
by Rseding91
I believe that is the single value. It’s just larger than “one workers worth” when it has one pre crafted.

Re: LuaEntity::secondary_rocket_parts RW

Posted: Tue Jul 07, 2026 8:40 am
by MeteorSwarm
https://github.com/danielmartin0/Planet ... t.lua#L167

I'm not sure my experience matches your claim. I've linked a function named Public.transfer_entity_state(entity,new_entity), which seeks to copy every single characteristic and value from one LuaEntity to another. One of many fields this function copies is rocket_parts. I'm not certain enough to definitively disagree with you, but I'll continue to investigate this issue to see if the problem is with my code.

Re: LuaEntity::secondary_rocket_parts RW

Posted: Tue Jul 07, 2026 12:46 pm
by Rseding91
The rocket itself counts as the first progress bar once it finishes crafting, and then the rocket_parts are the second progress bar.