.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: 176
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: 176
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: 1792
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☜(゚ヮ゚☜)

Post Reply

Return to “Won't implement”