From 02f57e3711d5fde297c7795eb3d22ab7e369a575 Mon Sep 17 00:00:00 2001 From: upsilon Date: Thu, 2 Apr 2020 16:05:33 +0200 Subject: [PATCH] Add a throwing.toolranks settting to allow globally disabling toolranks --- README.md | 6 ++++++ init.lua | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d1e767..87fdcf1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/init.lua b/init.lua index 5bdbd31..26eca8b 100644 --- a/init.lua +++ b/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)