Add a throwing.toolranks settting to allow globally disabling toolranks
This commit is contained in:
parent
fbfafa00bb
commit
02f57e3711
|
@ -13,13 +13,19 @@ Mods based on this API:
|
||||||
|
|
||||||
The settings are the following:
|
The settings are the following:
|
||||||
```
|
```
|
||||||
|
# Movement parameters
|
||||||
throwing.velocity_factor = 19
|
throwing.velocity_factor = 19
|
||||||
throwing.horizontal_acceleration_factor = -3
|
throwing.horizontal_acceleration_factor = -3
|
||||||
throwing.vertical_acceleration = -10
|
throwing.vertical_acceleration = -10
|
||||||
|
|
||||||
|
# Whether to allow placing an arrow as a node
|
||||||
throwing.allow_arrow_placing = false
|
throwing.allow_arrow_placing = false
|
||||||
|
|
||||||
|
# Minimum time between two shots
|
||||||
throwing.bow_cooldown = 0.2
|
throwing.bow_cooldown = 0.2
|
||||||
|
|
||||||
|
# Whether to enable toolranks for bows
|
||||||
|
throwing.toolranks = true
|
||||||
```
|
```
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
2
init.lua
2
init.lua
|
@ -7,7 +7,7 @@ throwing.target_node = 2
|
||||||
throwing.target_both = 3
|
throwing.target_both = 3
|
||||||
|
|
||||||
throwing.modname = minetest.get_current_modname()
|
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 ---------
|
--------- Arrows functions ---------
|
||||||
function throwing.is_arrow(itemstack)
|
function throwing.is_arrow(itemstack)
|
||||||
|
|
Loading…
Reference in New Issue