[0.14.4] [Rseding91] - ghost timer and can_place_entity ghost returns false
Posted: Fri Sep 09, 2016 10:01 am
The ghost timer bars(assumption!) cause can_place_entity to return false when checking a ghost entity.
/c game.player.surface.create_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force}
/c game.player.print(tostring(game.player.surface.can_place_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=1}, direction=2, force=game.player.force})) --returns false, I think the timer is the issue
/c game.player.print(tostring(game.player.surface.can_place_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force})) --returns false, expected
/c game.player.print(tostring(game.player.surface.can_place_entity{name="transport-belt", position={x=0,y=1}, direction=2, force=game.player.force})) --returns true, expected it is an empty tile
/c game.player.print(tostring(game.player.surface.can_place_entity{name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force})) --returns true, expected as you should be able to place over a ghost
Also a question. if the answer is no then it is a bug or a feature request
Is it possible to create ghosts without the timer? The same way they appear when shift-clicking to place a ghost or placing a blueprint.
/c game.player.surface.create_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force}
/c game.player.print(tostring(game.player.surface.can_place_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=1}, direction=2, force=game.player.force})) --returns false, I think the timer is the issue
/c game.player.print(tostring(game.player.surface.can_place_entity{name="entity-ghost", inner_name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force})) --returns false, expected
/c game.player.print(tostring(game.player.surface.can_place_entity{name="transport-belt", position={x=0,y=1}, direction=2, force=game.player.force})) --returns true, expected it is an empty tile
/c game.player.print(tostring(game.player.surface.can_place_entity{name="transport-belt", position={x=0,y=0}, direction=2, force=game.player.force})) --returns true, expected as you should be able to place over a ghost
Also a question. if the answer is no then it is a bug or a feature request

Is it possible to create ghosts without the timer? The same way they appear when shift-clicking to place a ghost or placing a blueprint.