Tile restrictions

Place to get help with not working mods / modding interface.
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1456
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Tile restrictions

Post by TheSAguy »

Is there a way to prevent someone from building on desert tiles?
Or even better, allow building on desert if there is concrete floor?

Thanks
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Tile restrictions

Post by Nexela »

I don't think you can prevent but you should be able to work around it.

Something like this

On_Built_event
if entity.surface.get_tile(entity.position).name = "sand-dark" then

player.insert(entity.name)
entity.destroy()


http://lua-api.factorio.com/latest/LuaTile.html
Post Reply

Return to “Modding help”