[0.17.49] LuaSurface.can_place_entity creates build smoke

Bugs that are actually features.
Roang
Inserter
Inserter
Posts: 27
Joined: Tue Aug 22, 2017 12:38 pm
Contact:

[0.17.49] LuaSurface.can_place_entity creates build smoke

Post 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:
Peek 2019-06-16 15-45.webm
(188.46 KiB) Downloaded 158 times

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5218
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.49] LuaSurface.can_place_entity creates build smoke

Post 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

Rseding91
Factorio Staff
Factorio Staff
Posts: 14003
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] LuaSurface.can_place_entity creates build smoke

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Roang
Inserter
Inserter
Posts: 27
Joined: Tue Aug 22, 2017 12:38 pm
Contact:

Re: [0.17.49] LuaSurface.can_place_entity creates build smoke

Post 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.

Rseding91
Factorio Staff
Factorio Staff
Posts: 14003
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.49] LuaSurface.can_place_entity creates build smoke

Post 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.
If you want to get ahold of me I'm almost always on Discord.

Roang
Inserter
Inserter
Posts: 27
Joined: Tue Aug 22, 2017 12:38 pm
Contact:

Re: [0.17.49] LuaSurface.can_place_entity creates build smoke

Post by Roang »

Yeah that was it, thanks.
Can be moved to not a bug.

Post Reply

Return to “Not a bug”