LuaEntity::secondary_rocket_parts RW

Things that already exist in the current mod API
MeteorSwarm
Inserter
Inserter
Posts: 27
Joined: Thu Sep 25, 2025 10:49 pm
Contact:

LuaEntity::secondary_rocket_parts RW

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17239
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity::secondary_rocket_parts RW

Post by Rseding91 »

I believe that is the single value. It’s just larger than “one workers worth” when it has one pre crafted.
If you want to get ahold of me I'm almost always on Discord.
MeteorSwarm
Inserter
Inserter
Posts: 27
Joined: Thu Sep 25, 2025 10:49 pm
Contact:

Re: LuaEntity::secondary_rocket_parts RW

Post 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 17239
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: LuaEntity::secondary_rocket_parts RW

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Already exists”