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.
[0.13.0] can_place_entity returns true on water
[0.13.0] can_place_entity returns true on water
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:
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).
You can check it with rso 2.0.0(attached) and following map string:
Code: Select all
>>>AAANAAAAXQADAwYAAAAEAAAAY29hbAMDAwoAAABjb3BwZXItb3Jl
AwMDCQAAAGNydWRlLW9pbAMDAwoAAABlbmVteS1iYXNlAwMDCAAAAGl
yb24tb3JlAwMDBQAAAHN0b25lAwMDYlx4VAAAAAAAAAAAAwDg/eeN<<
<
- Attachments
-
- rso-mod_2.0.0.zip
- (34.95 KiB) Downloaded 132 times
Re: [0.13]LuaSurface.can_place_entity always true
Just reported it with rso also - tested on oil wells and biter bases there.
Re: [0.13.0] can_place_entity returns true on water
Fixed in 0.13.1 with a test so it should stay fixed now
If you want to get ahold of me I'm almost always on Discord.