Can_place_entity Question/issue?
Posted: Sat Jan 26, 2019 11:29 pm
I am making a mod to place some miner ghosts on ore fields. First I order the deconstruction of trees/rocks on the ore field and then I start placing ghosts.
game.surfaces[1].can_place_entity seems to return false when the item is a ghost and the place it is trying to put the ghost has a tree in it. In the game we can place ghosts over things which have been ordered for deconstruction.
My question is, Is there another function or parameter which I cannot find to tell can_place_entity that its ok to put a ghost on something being deconstructed or will I need to check each time can_place_entity is false if deconstruction has been ordered? I'd rather use a built in because it would be fewer things for me to check for like water, a biter nest, or no ore.
game.surfaces[1].can_place_entity seems to return false when the item is a ghost and the place it is trying to put the ghost has a tree in it. In the game we can place ghosts over things which have been ordered for deconstruction.
My question is, Is there another function or parameter which I cannot find to tell can_place_entity that its ok to put a ghost on something being deconstructed or will I need to check each time can_place_entity is false if deconstruction has been ordered? I'd rather use a built in because it would be fewer things for me to check for like water, a biter nest, or no ore.