Page 1 of 1

[1.1.57] Belt ghosts can't have their belt_neighbours checked

Posted: Mon Apr 18, 2022 10:32 pm
by PFQNiet
I'm honestly not sure if this used to be possible and has regressed, or was just never possible in the first place (in which case this should be moved to Modding Interface Requests), but my mod just crashed today and I had to do some debugging!

Steps to reproduce:
- Build a belt
- Place a belt ghost after it

- Mouse over the "real" belt and use the command:

Code: Select all

/c game.print(#game.player.selected.belt_neighbours.outputs)
The console prints 1, showing that the ghost belt is considered a belt_neighbour of the real belt.

- Mouse over the ghost belt and use the command:

Code: Select all

/c game.print(#game.player.selected.belt_neighbours.inputs)
I expect the console to print 1 since the "real" belt is an input to the ghost belt, but instead the game returns an error "Entity is not transport-belt-connectable."

Basically this is an inconsistency. Either the ghost belt shouldn't count as a belt_neighbour because it's not a "real" belt, or the ghost belt should have access to its belt_neighbours.

Re: [1.1.57] Belt ghosts can't have their belt_neighbours checked

Posted: Tue Apr 19, 2022 6:20 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.

Re: [1.1.57] Belt ghosts can't have their belt_neighbours checked

Posted: Tue Apr 19, 2022 6:33 pm
by lyvgbfh
Rseding91 wrote:
Tue Apr 19, 2022 6:20 pm
Thanks for the report. It's now fixed for the next release.
This also happens for electric pole ghosts

Re: [1.1.57] Belt ghosts can't have their belt_neighbours checked

Posted: Wed Apr 20, 2022 9:51 am
by boskid
lyvgbfh wrote:
Tue Apr 19, 2022 6:33 pm
Rseding91 wrote:
Tue Apr 19, 2022 6:20 pm
Thanks for the report. It's now fixed for the next release.
This also happens for electric pole ghosts
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.