It would be useful if we could check if two electric poles/ a pipe and a pump/ a pipe and a assembling machine (in the future next update? ) etc are connected.
I could make my boiler "problem" system less laggy, and I can think of more uses (mainly with the "liquid" update that im really looking forward to )
game.isconnected(ent1, ent2) / entity.isconected(ent)
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
It makes sense and is easy to do, so yes
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
Also, maybe a way to connect two poles ? like, ent1.connectTo(ent2) or something, will place a cable to connect them IF the distance is ok ?
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
Regarding this topic, could you also add a game.findentitiesinnetwork{entity, name, type} command? That returns a table with the entities in that network (maybe two commands, one filtered and one non filtered) (for pipes)
Last edited by ficolas on Wed Jan 29, 2014 2:58 pm, edited 1 time in total.
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
ent1.connectTo(ent2) would need to know the cable type - so ent1.connectTo(ent2, type) where type is "copper", "green" or "red".
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
Well, if we're talking about electricity, it's obvious it's a copper cable.immibis wrote:ent1.connectTo(ent2) would need to know the cable type - so ent1.connectTo(ent2, type) where type is "copper", "green" or "red".
Now there could be a method using the wire type.
Or another method, one to connect (electricity) and one to link (logic network) ?
Re: game.isconnected(ent1, ent2) / entity.isconected(ent)
Well, you need to specify copper cable, so the game knows you're talking about electricity.Nirahiel wrote:Well, if we're talking about electricity, it's obvious it's a copper cable.immibis wrote:ent1.connectTo(ent2) would need to know the cable type - so ent1.connectTo(ent2, type) where type is "copper", "green" or "red".
Now there could be a method using the wire type.
Or another method, one to connect (electricity) and one to link (logic network) ?
What's the difference between "linking" and "connecting"?