Quality Heat Pipes


The reach of heat pipes is now affected by quality. +1 range per level.

Tweaks
14 days ago
2.0
2.20K
Logistics

g crash when building ghost

13 days ago

The mod Quality Heat Pipes (1.1.2) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event quality-heat-pipes :: on_robot_built_entity (ID 17)
Unknown entity name: rare-rare-heat-pipe
stack traceback:
[C]: in function 'create_entity'
quality-heat-pipes /control.lua:15: in function
< quality-heat-pipes /control.lua:1>

I think it was placing a ghost of an underground pipe from the other mod that was causing issues in 1.1.1, but am not 100% certain.

13 days ago

also, the forum ate some of the error messsage, because apparently two underscores in a row makes text bold...

13 days ago

Nah I think I already see the issue. A big oversight on my end. You likely clicked q on a rare heat pipe, and tried to place it as a ghost. With how the mod works, it tried to replace the ghost with a rare rare heat pipe. Not a typo, just a mistake on my end. I’ll have to fix it when I have time this week, but I work long hours so it likely will be a couple days.

In the meantime, avoid picking ghosts from existing quality pipes that are placed, and instead stick to your heat pipe items.

12 days ago

easy enough to avoid, thanks for tracking that down

12 days ago

If there are any extra crashes that you can replicate, please do share

8 days ago

Okay so I have time now, and I cannot seem to replicate the issue?

4 days ago

The problem seems to be that my mod (More Quality Scaling) replaces the rare heat-pipe with a rare-heat-pipe, and then the latter with a rare-rare-heatpipe since that also exists (the replacement logic only checks if a quality-prefixed version of an entity exists, and not if a replacement for a specific position/tick was already done).

Then your mod sees that a heat pipe was placed down, and tries to prepend a further rare- - which leads to the crash.
This could be prevented on your end by checking if the new destination entity name exists (check for prototype.entity[quality.."-"..name]) before placing it down, but I could also a) add an additional check when your mod is detected or b) generally only replace each entity once - the latter option having the downside that this may kill compatibility with mods that do their quality prefix replacement via a name whitelist (if I replace heat-pipe with rare-heat-pipe, they might not replace that with the rare-rare-heatpipe which is modified by both our mod).
Though data stage compatibility would be preferable anyway, since otherwise the number of created additional entities scales with the square of the available quality levels...

Maybe you could just check for the existence of quality-prefixed heat pipes, and prevent generating additional entities in that case (simply modifying them instead if necessary)? And in control.lua implement the prototype existence check?

4 days ago

Hell yeah thanks for the detailed response, I’ll have to look into that when the weekend rolls around

New response