.neighbours on ghost electric poles

Things that we aren't going to implement
Post Reply
lyvgbfh
Fast Inserter
Fast Inserter
Posts: 104
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

.neighbours on ghost electric poles

Post by lyvgbfh »

Currently, electric pole ghosts are listed as neighbours of regular poles, however I cannot ask them for their own neighbours, so recursively iterating electric networks by connection needs several type checks not to crash. Is this something that can be resolved relatively easily?
(☞゚ヮ゚)☞Electric Grid Enforcer║Custom Circuit Network Colors║Enable Steam Achievements w/ Mods☜(゚ヮ゚☜)

curiosity
Fast Inserter
Fast Inserter
Posts: 179
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: .neighbours on ghost electric poles

Post by curiosity »

Note that electric networks don't propagate through ghosts, so it doesn't make sense for you to visit them either way. To be clear, I'm all for this request, but your logic looks flawed.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 104
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: .neighbours on ghost electric poles

Post by lyvgbfh »

curiosity wrote: ↑
Mon Jan 31, 2022 5:24 pm
Note that electric networks don't propagate through ghosts, so it doesn't make sense for you to visit them either way. To be clear, I'm all for this request, but your logic looks flawed.
Good point, I think my wording could have been improved. In my case it would be more traversing copper cable networks, instead of electric networks.
(☞゚ヮ゚)☞Electric Grid Enforcer║Custom Circuit Network Colors║Enable Steam Achievements w/ Mods☜(゚ヮ゚☜)

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 104
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: .neighbours on ghost electric poles

Post by lyvgbfh »

I hope bumping this is acceptable - it seems this behavior may not be intended, since I can connect_neighbour & disconnect_neighbour on ghost poles, but not access their .neighbours.
(☞゚ヮ゚)☞Electric Grid Enforcer║Custom Circuit Network Colors║Enable Steam Achievements w/ Mods☜(゚ヮ゚☜)

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 104
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: .neighbours on ghost electric poles

Post by lyvgbfh »

boskid wrote: ↑
Wed Apr 20, 2022 9:51 am
Please do not reuse resolved bug reports for unrelated stuff. Also LuaEntity::belt_neighbours cannot be used on electric poles so your report is invalid.
Replying in the correct thread, this is in the same vein as the bug report the quote is from. I may be mistaken but the bugs seem quite similar - neighbours will return ghosts but the ghosts themselves do not return neighbours.
(☞゚ヮ゚)☞Electric Grid Enforcer║Custom Circuit Network Colors║Enable Steam Achievements w/ Mods☜(゚ヮ゚☜)

curiosity
Fast Inserter
Fast Inserter
Posts: 179
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: .neighbours on ghost electric poles

Post by curiosity »

If you think it's a bug, report it in the correct forum, not write to modding API requests.

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 1821
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: .neighbours on ghost electric poles

Post by boskid »

Unfortunately i am not going to implement this. Its not a simple "take inner entity of a ghost" because wires are stored differently by entity ghosts and there would be more issues to solve if this would be exposed (for example it would expose circuit wires that go from ghost poles to a real entities while real entities do not report those circuit wires). It will be possible to get wires of a ghost in 1.2 as it is already implemented here, but it wont be under LuaEntity::neighbours read but something else instead.

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 104
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: .neighbours on ghost electric poles

Post by lyvgbfh »

Fair enough, I appreciate the clarification.
(☞゚ヮ゚)☞Electric Grid Enforcer║Custom Circuit Network Colors║Enable Steam Achievements w/ Mods☜(゚ヮ゚☜)

azaghal
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Jun 27, 2020 11:13 am
Contact:

Re: .neighbours on ghost electric poles

Post by azaghal »

Apologies for possibly hijacking this thread, but I ran into somewhat similar issue, but this time around with the ghost underground belts. If you feel this would be better off discussed in separate thread, please do let me know.

Trying to invoke .neighbours on a pair of "connected" ghost underground belts results in the "Neiughbours can't be used on this entity" error. Invoking the same property on constructed underground belt works as expected (so, you can try to manipulate the other end of the underground belt).

Invoking .belt_neighbours on a ghost underground does not result in an error, but it also does not provide any kind of inputs/outputs entities either - it only returns something if ghost underground belt is connected to a ghost/non-ghost regular belt.

Is this the intended behaviour for underground belts similar to ghost electric poles? And if so - will there be some way to access the ghost underground belt neighbours in version 1.2?

Post Reply

Return to “Won't implement”