Page 1 of 1

An immovable "garbagefill" tile

Posted: Fri Feb 19, 2021 6:44 pm
by adamwong246
I've made a polluting tile called "garbagefill". Is there a way to make this indestructible?

I found that by setting the minable property to nil, you can concrete over the "garbagefill" but this also allows you to landfill over a garbagefill, which is not a desired effect.

If I set the minable property, you can no longer concrete over garbagefill without mining it, also undesired.

How can I achieve both effects- a tile that CAN be concreted over but NOT landfilled over?

Re: An immovable "garbagefill" tile

Posted: Sun Feb 21, 2021 3:18 pm
by Pi-C
adamwong246 wrote:
Fri Feb 19, 2021 6:44 pm
How can I achieve both effects- a tile that CAN be concreted over but NOT landfilled over?
Not sure if this can be achieved with prototype definitions. However, you could listen to the relevant events (on_X_built_tile, on_X_mined_tile, and script_raised_set_tiles; replace 'X' with "player' or 'robot') in the control stage. If one of your tiles is removed, you can then just revert the change.

The built/mined events will tell you what old tile has been replaced/removed. The same is not true for script_raised_set_tiles, so you should store the coordinates of all your garbage tiles in your mod's global table. In case you're interested, we do something similar (with "Musk floor" tiles) in Bio Industries.