-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default: Generalise, optimise and simplify grass spread function
Credit to tenplus1 for the suggestion to generalise for mod use. Mods can add mod nodes to 'group:spreading_dirt_type' enabling the function to work with mod nodes. Add some nodes to this group. Removing 'dirt_with_grass' etc. from 'neighbors' stops the ABM action running everywhere and constantly, on the dirt nodes immediately below the surface nodes. Now the action only runs in the rare case of a dirt node with neighbouring air, grass decorations or snow. Remove check for air above to allow grass to spread under light- transmitting nodes such as fences, walls, plants. This causes spread under slabs, stairs and glass, when near air, but seems worth it. Remove unnecessary check for nil node.
- Loading branch information
Showing
2 changed files
with
15 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters