Add a throwing.toolranks settting to allow globally disabling toolranks

This commit is contained in:
upsilon 2020-04-02 16:05:33 +02:00
parent fbfafa00bb
commit 02f57e3711
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
2 changed files with 7 additions and 1 deletions

View File

@ -13,13 +13,19 @@ Mods based on this API:
The settings are the following:
```
# Movement parameters
throwing.velocity_factor = 19
throwing.horizontal_acceleration_factor = -3
throwing.vertical_acceleration = -10
# Whether to allow placing an arrow as a node
throwing.allow_arrow_placing = false
# Minimum time between two shots
throwing.bow_cooldown = 0.2
# Whether to enable toolranks for bows
throwing.toolranks = true
```
## API

View File

@ -7,7 +7,7 @@ throwing.target_node = 2
throwing.target_both = 3
throwing.modname = minetest.get_current_modname()
local use_toolranks = minetest.get_modpath("toolranks")
local use_toolranks = minetest.get_modpath("toolranks") and minetest.settings:get_bool("throwing.toolranks", true)
--------- Arrows functions ---------
function throwing.is_arrow(itemstack)