HybridDog / treecapitator

the TreeCapitator mod for minetest
Other
17 stars 11 forks source link

Opt-in setting for requiring special capitation tool #9

Closed tacotexmex closed 7 years ago

tacotexmex commented 7 years ago

I really like treecapitator but for some games it allows for too fast progression. How about an optional global settings variable that registers a saw for example, that is required to trigger the capitation? Regular axes would function as in the default game.

HybridDog commented 7 years ago

Mods can override treecapitator.capitate_tree(pos, digger). This mod shouldn't register saws in my opinion, but a setting which makes capitation only work with axes could be added. And the technic mod adds a chainsaw which imo works worse than treecapitator, it could be changed to use treecapitator only if the trunk was dug with the technic chainsaw.

tacotexmex commented 7 years ago

Yes, if it requires a certain tool it's easy to override what tool that is from another mod.

HybridDog commented 7 years ago

https://github.com/HybridDog/treecapitator/commit/fbffeff665cf0fc785723b6c0f1b8c177a528ec3

tacotexmex commented 7 years ago

Great! Thank you @HybridDog. Now I can start hacking on my two man saw project. 😃

tacotexmex commented 7 years ago

Or can I? I don't get how to not only reduce capitation to when using proper tools but also to a specific tool only. Do you have it in your heart to provide an example?

HybridDog commented 7 years ago
function treecapitator.capitation_allowed(pos, digger)
    return digger:get_wielded_item():get_name() == "mod:some_tool"
end
tacotexmex commented 7 years ago

Thank you, I really appreciate it.