Steamed


Production line and mining drills need steam instead of electric energy. / Must be compatible with all mods, UPS friendly, multiplayer friendly.

Content
3 years ago
0.16 - 1.1
475
Power

b Entities with small c_box

3 years ago

There seems to be a bug with the autoplacement when the entity has a very small cbox.
Ive tested this with an inserter because they have a handy direction indicator.
Setting it up like this
insert_pipe_connection(pipe_connections, prot, {x= x, y=y+2}, new_connections)
results in a connection facing to the north / pickup direction. When adding another connection at
{x= x, y=y-2}
it will be set to the east(?) instead of set it to the opposing / dropoff side.
Now let's use
{x=-x, y=y-2}
instead. Expected here is that it will set the output to the west which it does correctly.
{x=-x, y=y+2} should set south-east but both outputs now face north.

It seems that keeping y-2 lets me set the x position correctly while y+2 is a bit wonky.

Possible fix:
When a cbox is smaller than 1 just do y-1 before applying the insert logic. This won't fix anything at all but its output more reliable.
Like setting {x= x, y=y+1}
and then use {x=-x, y=y+1} or {x=-x, y=y-1} will result in the same output.
Also the second connection must have a negative x or it won't be set at all.

3 years ago

Can you please fix it? I've added you to collaborators.

3 years ago

I will look into it but im kinda busy atm. It works as is should right now as long as people don't mess with the code.

New response