Page 1 of 1

"Entity is not splitter" on splitter ghost

Posted: Mon Nov 26, 2018 2:56 pm
by Jelmergu
A splitter's ghost does not allow the reading of splitter_filter, splitter_output_priority and splitter_input_priority. The error given is "Entity is not splitter". While this is true(entity is a ghost after all) the ghost should have those properties, as evident by the fact that the advanced view does show the properties on the ghost.

What did I do:
Create a new game
Cheat in a splitter with /c game.player.insert({name="splitter", count=1})
Place the splitter
Set any filter
Make a blueprint of the splitter with filter
Place the blueprint
Attempt to get the output_priority with /c game.print(game.player.selected.splitter_output_priority)

What did I expect
A console message saying "left"

What did I get
0tmp.png
0tmp.png (969.43 KiB) Viewed 1058 times

Re: "Entity is not splitter" on splitter ghost

Posted: Mon Nov 26, 2018 3:29 pm
by Bilka
This is technically not a bug because the entity is an entity-ghost (of a splitter), and the entity ghost does not have those properties. However, the lua api has been changed in 0.17 to target the inner entity of the ghost instead of the ghost in most cases, meaning that this is fixed.