Page 1 of 1
[0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Sun Jun 16, 2019 1:46 pm
by Roang
When using LuaSurface.can_place_entity build smoke is visible, even if the entity cannot be placed.
Reference:
https://lua-api.factorio.com/latest/Lua ... ace_entity
Demo while checking to build a Rocket Silo over Solar Panel:
Re: [0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Sun Jun 16, 2019 7:24 pm
by Klonan
Can you provide the relevant code you are using?
Nothing like this has been reported before, so it is worth double checking the script is not at fault
Re: [0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Tue Jun 18, 2019 4:38 am
by Rseding91
Thanks for the report however I can't reproduce what you're saying. As Klonan said: can you please post an example mod showing the problem? I suspect it's some mod problem and not a game issue.
Re: [0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Tue Jun 18, 2019 12:06 pm
by Roang
The relevant code can be found at:
https://github.com/Roang-zero1/upgrade- ... #L203-L214
Maybe the build smoke comes from trying to fast replace a non fast-replaceable entity?
https://github.com/Roang-zero1/upgrade- ... e.lua#L156
I have no access to the game right now so unfortunately I can't test any further.
Re: [0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Wed Jun 19, 2019 7:48 am
by Rseding91
Trying to fast-replace an entity would generate build smokes since it's: create entity -> try to fast-replace. Should the fast-replace fail and then you destroy the new entity you still created it so the smokes are created.
Re: [0.17.49] LuaSurface.can_place_entity creates build smoke
Posted: Thu Jun 20, 2019 3:31 pm
by Roang
Yeah that was it, thanks.
Can be moved to not a bug.