Overview
A simple mod that deletes the nasty-ass decorative textures biters leave behind once the nests have been cleared out. It isn't fancy, it isn't pretty, it just deletes them with no fading or anything - though it does do it in a random order so it at least emulates a natural process. But with any luck you'll be away from the scene of the crime when it happens so it won't matter either way.
Any biter creep decal that isn't near a spawner, worm, or corpse thereof will be deleted.
How it works
A list of all chunks in the save is created and maintained, updated in real time as chunks and surfaces are generated or deleted. This is used for various purposes.
The mod relies on 'state machines' to operate. At a rate configurable in the settings, these state machines are created and "ticked", with each state machine responsible for a single cleaning operation, split into stages spread out over time to keep the performance impact low. These state machines perform a different part of the cleanup each time they are ticked, and then move into a different state ready for the next time they are ticked. These stages are:
- State 1: choosing a location. A random chunk is chosen from the list, and then a random tile within that chunk is chosen. The next state is always 2.
- State 2: scanning for biter creep. A radius around the chosen tile is checked for biter creep. The next state is 3 if there is creep, or 0 if not.
- State 3: scanning for biter nests. Another radius is checked for biter nest structures such as spawners and worms. The next state is always 4.
- State 4: checking the distance from creep to nest. Every bit of creep is checked for proximity to a nest structure. Any out of range are marked for cleaning. The next state is 5 if some have been marked, or 0 if not.
- State 5: scanning for other mess. Another radius is checked for mess which can appear in creep but also elsewhere. The next state is 6 if some is found, or 8 if not.
- State 6: checking the distance from creep to mess. Every bit of that secondary mess is checked if it's close enough to the creep to be considered a part of it, and then it is marked for cleaning if and only if all the creep it is part of is also being cleaned. The next state is 7 if some mess has been marked, or 8 if not.
- State 7: actually cleaning the mess. Any of the mess that was marked in state 6 is now actually removed. The next state is always 8.
- State 8: actually cleaning the main creep. Any creep that was marked in state 4 is now actually removed. The next state is always 0.
- State 0: the null state. Nothing happens in this state - being in this state means the state machine has finished, so it gets deleted.
This version should fix the stability issues that were occurring in versions 3.0.0 - 3.0.3. Please update as soon as possible to avoid issues.
Thank you for your patience while this update has been in the works. I hope your factories continue to grow without further issues.
Planned features
- Support for pentapod egg rafts and the mess surrounding them (Space Age)
- Possibly restoring creep under biter nest structures if it was removed, for example under spawners that were captive and then freed
Compatibility
It should check any entities that use the types "unit-spawner" or "turret" (which is how worms are classified) and which are tagged with "placeable-enemy" when looking for nests around decals. This means it shouldn't delete creep decals near modded spawners like those from Armoured Biters, and modded worms too (though I don't know of any examples). A cursory test seems to agree with that assessment but it hasn't been rigorously tested.