[0.13.0] can_place_entity returns true on water

This subforum contains all the issues which we already resolved.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

[0.13]LuaSurface.can_place_entity always true

Post by Choumiko »

It seems like LuaSurface.can_place_entity is broken, as in always returning true:
The furnace in the image is at X=15 Y=1, using can_place_entity with a straight-rail at X=15Y=3 returns true, even though it*s in the water.
Image
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

[0.13.0] can_place_entity returns true on water

Post by orzelek »

When calling can_place_entity for oil patch or enemy base/turret it will return true when checked entity location is on water.
You can check it with rso 2.0.0(attached) and following map string:

Code: Select all

>>>AAANAAAAXQADAwYAAAAEAAAAY29hbAMDAwoAAABjb3BwZXItb3Jl
AwMDCQAAAGNydWRlLW9pbAMDAwoAAABlbmVteS1iYXNlAwMDCAAAAGl
yb24tb3JlAwMDBQAAAHN0b25lAwMDYlx4VAAAAAAAAAAAAwDg/eeN<<
<
Enemy bases in bottom left corner will be placed on water - their placement is guarded by can_place_entity check in mod code (control.lua line 864).
Attachments
rso-mod_2.0.0.zip
(34.95 KiB) Downloaded 132 times
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.13]LuaSurface.can_place_entity always true

Post by orzelek »

Just reported it with rso also - tested on oil wells and biter bases there.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14363
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.13.0] can_place_entity returns true on water

Post by Rseding91 »

Fixed in 0.13.1 with a test so it should stay fixed now :P
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”