Clear 'player_sneak' and 'player_api.player_attached' table values
when player leaves.
Remove unnecessary commas and whitespace.
Fix table name in 'game_api.txt'.
Clean up documentation in 'game_api.txt'.
Previously, opening a trapdoor caused the side textures to flip.
Fix the incorrect textures.
Also add a texture transform to a tile of the open trapdoor, such
that the closed trapdoor sides use the lower part of the texture
and the open trapdoor sides use the higher part.
Clean up some codestyle issues.
All stair/slab nodes with parent nodes that are rotatable (wood and bricks)
are reverted to not having world-aligned textures, to fix the breakage of
rotated stair/slab appearence in worlds.
Update, and add missing documentation to, game_api.txt.
Avoid hard-coded player inventory lists.
Expose `bones.player_inventory_lists` for mods to look up or change,
which player inventory lists are being dropped or placed into bones.
Bush saplings grow in half the time of tree saplings.
Bushes do not need 'from sapling' schematic variants because only the
stem node is force-placed in the mapgen schematic, so only the sapling
is force-replaced.
Bush leaves drop saplings with a rarity that ensures at least 1 sapling
per bush on average.
This implements a node-timer based leafdecay mechanism, and exposes
an API to use it in mods.
The API is documented in game_api.txt.
`default.register_leafdecay(leafdecaydef)`
`leafdecaydef` is a table, with following members:
{
trunks = { "default:tree"}, -- nodes considered trunks
leaves = { "default:leaves", "default:apple"}, -- nodes considered leaves
radius = 3, -- activates leafdecay this far from the trunk
}
The algorithm will drop `leaves` items in the area if no `trunks` are found
in the `trunk_radius` sized area around the position of the leaf. If a node
listed in `leaves` has a group `leafdecay_drop > 0`, then the item is dropped,
otherwise the item is removed but not dropped.
The algorithm also implements a value `default.leafdecay_speed` (default
15) which can be modified to increase or decrease of the leaf decay. The
algorithm will vary the actual speed a bit to introduce randomness.
Leaf decay is randomized by 0.1 seconds to reduce the chance that
decay happens many times on the same second interval. This requires
nodetimer_interval to be set to values lower than 1.0 to have an
effect.
The leaves will decay between 2 and 10 seconds after digging the trunk,
and happen at non-integer second intervals.
-- The API was added by sofar.