mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-07-02 00:10:25 +02:00
Add a throwing.toolranks settting to allow globally disabling toolranks
This commit is contained in:
@ -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
|
||||
|
2
init.lua
2
init.lua
@ -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)
|
||||
|
Reference in New Issue
Block a user