Fluid connection from prototype

Place to get help with not working mods / modding interface.
Post Reply
Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Fluid connection from prototype

Post by Atria »

Does anyone knows if it's possible to get relative/absolute positions where a game entity could connect to pipe? Essentially get fluid_box.pipe_connections or fluid_boxes[1].pipe_connections from entity prototype?

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Fluid connection from prototype

Post by DaveMcW »

If a connected entity already exists on the map, you can do:

Code: Select all

for _,c in pairs(fluidbox.get_connections(1)) do
  game.print(c.owner.position)
end
I don't think it's possible to examine a connection that has not been placed yet. Fluid boxes are being reworked in 0.17, so put in a Modding interface request if you want it added.

Atria
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sat Jul 09, 2016 10:25 am
Contact:

Re: Fluid connection from prototype

Post by Atria »

I though so as well. I won't need it in 0.17 since my mod is trying to do the fluid optimalisation before 0.17 is released.

Post Reply

Return to “Modding help”