Heat Inserter

by Kryzeth

Adds an inserter variant that runs on heat instead of standard fuel. Also functions as a heat pipe for thawing adjacent machinery. Recommended for use alongside another mod that provides early heat pipes.

Content
a month ago
2.0
4.73K
Logistics

i [Fixed] Thawing

6 months ago

I assumed heat inserters would thaw adjacent machines, since they do contain a heat pipe, but apparently they can't. Could you add that capability, perhaps as a mod setting?

6 months ago

Sorry about this, I only tested the heat-carrying capacity and just assumed they would also thaw out buildings.

This should be fixed in v1.1.0, although if you are updating an existing save file, you will need to pick up and place back down any pre-existing heat inserters, since I couldn't think of a simple way to apply a migration script for it. No setting necessary, since I agree that is the implied functionality.

6 months ago
(updated 6 months ago)

Ah, I've just realized that v1.1.0 is going to be cause some issues with Even Picker Dollies.

Because of the way I implemented the heat pipe functionality to the inserters (by creating an invisible heat pipe in the same position as the heat inserter), moving them with EPD is going to desync the invisible heat pipes from the heat inserters.

EDIT: I was able to fix compatibility with EPD in v1.1.1 (at least as far as I can tell)

6 months ago

Newly placed down heat inserters transmit heat, but don't warm up themselves, preventing their function. Probably some issue with the connection between the hidden heatpipe and the inserter?

6 months ago

Hm, I'll have to do more testing; I only checked that the inserter worked on Aquilo when being placed next to a reactor, and that it thawed out the area around it. I suppose a heat pipe doesn't heat up its own tile, just the tiles around itself, so it wouldn't affect the inserter if it's on the same tile, though that's just speculation on my part, I'd need to see what conditions are causing that.

6 months ago
(updated 6 months ago)

The issue wasn't that it froze, but that the inserter itself stayed at 15° when connected to a >900° heat pipe, instead of reaching the >500° required for it to activate. Strangely, now that I tested it again with 1.1.2, it seems to work - so maybe the issue just occurred when a new inserter was placed next to an "unmigrated" one without the hidden heat pipe?

6 months ago

Nevermind, I figured it out: it depends on the placement order of inserter and surrounding heat pipes. Place heat pipes first, then inserter, and the inserter works. Place the inserter first, and then the heat pipes, and it stays at 15°.

6 months ago
(updated 6 months ago)

Hmm.. I'll admit I also didn't test pre-existing saves, though I find it unusual that the problem was fixed with the latest update, since I didn't actually change any usable code, all I did was remove an accidental forced dependency.

I don't know what mechanics are at play here, but I remember testing rows of newly placed heat inserters, and they all gained heat normally (in fact, I remember newly placed heat inserters being marginally more efficient at carrying heat because of the hidden heat pipes, so they must have been connecting in some way)

EDIT: Just saw the latest post, I'll check that later, doesn't sound like I'll be able to fix it from that description.

6 months ago

After some trial and error, I was able to figure it out.

The collision_box of the hidden heat pipes prevents heat inserters from connecting to adjacent heat pipes/sources (so they don't gain heat, despite being thawed), at least at the default copied dimensions from the standard heat pipe. Setting the collision_box to nil prevents the heat pipe from conducting heat at all, and disables the thawing ability, which was the whole point.

However! It appears that setting the collision_box to an arbitrarily small area (-0.1 to 0.1 in both directions) allows connections to both entities simultaneously, regardless of the placement order. I also confirmed that both entities still moved together with Even Pickier Dollies.

So should be hopefully be completely fixed in v1.1.3

2 months ago
(updated 2 months ago)

In the editor it appears that the inserts do not heat up (stuck at 15) if they are place down first and then heat pipes around them

Edit: Rotating them does appear to fix the issue

The issue exists outside the editor and bots or player do not change the issue it is entirely dependent on the placement order

2 months ago
(updated 2 months ago)

Hmm... a tricky issue. As you say, placing the heat pipes, then the inserter, allows both the inserter and the hidden heat pipe to conduct heat. Placing the inserter first, then heat pipes, only allows the hidden heat pipe to conduct heat; the inserter remains unconnected at 15 degrees. If I disable the control.lua that places the hidden heat pipe, then the heat inserter conducts heat and works perfectly in both situations.

I'm not entirely sure how to make sure it works both ways... the core issue appears to be the existence of the hidden heat pipe. Placing the inserter when heat pipes are already laid out, the heat inserter makes the initial connections, and then the script adds a hidden heat pipe underneath that also makes the connections.

But when the heat inserter is placed first, no initial connections are made, then the script adds the hidden heat pipe, which appears to override any future connections that would be made afterwards.

And of course, the entire reason that the hidden heat pipe was added, is because inserter-type entities can't thaw out buildings next to them. Tricky tricky...

EDIT: That being said, I'm not entirely sure why rotating the heat inserters fixes the connection issues; there's no script events tied to inserter rotation, at least on my end. I also tried playing with the collision boxes of both entities, and it didn't seem to make any difference in the connection logic.

2 months ago

I was able to figure out a relatively hacky solution that actually utilizes that rotate fix. When placing heat-pipes, runtime script checks the adjacent 4 tiles and filters for heat-inserter entities, then rotates them 360 degrees (so they end up back at the initial rotation). This should apply to the player, bots, and space platform placements, though I only personally tested the player part, then copied the script to the other two event types.

Btw, next time should open a new thread for this, since it's technically a different issue than the one in the title. Anyways, fixed as of v1.1.7

New response