7 Commits

Author SHA1 Message Date
HybridDog
4737e9cd04 No default values for trees, leaves and range in treecapitator.register_tree
These default tree definition options are non-obvious,
so although their use may slightly shorten code in a few situations,
the code would be more difficult to understand.

To check for backwards-compatibility problems,
`treecapitator.register_tree` now checks if these three options are set when required.
Furthermore, `treecapitator.register_tree` now no longer modifies the passed table in-place.

This is a breaking change since there might exist mod which uses the default values.
2023-09-02 14:02:31 +02:00
HybridDog
23f5060825 Add Markdown documentation 2020-02-14 17:13:33 +01:00
HybridDog
22231474b0 Fix multiple tree capitating
It was caused by overriding after_dig_node multiple times to make it execute capitate_tree
2018-08-01 20:21:02 +02:00
Hybrid Dog
fbffeff665 Add a setting to disallow digging a tree if no tool would become worn out 2017-05-25 08:44:02 +02:00
Hybrid Dog
6eec36591c Use metatable to avoid all those table_contains 2017-03-16 16:36:14 +01:00
Hybrid Dog
68662c91ef Some updates
Drop support for minetest versions without minetest.override_item
Disallow registering trees before registering their trunk nodes
Abort if nodes can't be overridden correctly

Code style fixes
2017-03-16 16:36:14 +01:00
Hybrid Dog
3424f86ebe Move api to api.lua 2017-03-16 16:36:14 +01:00