mirror of
https://github.com/minetest-mods/throwing.git
synced 2025-07-01 16:00:27 +02:00
Add toolranks_extras support
This displays `bow level x` instead of `tool level x` when toolranks is enabled, and display `Arrows thrown` instead of `Node dug`.
This commit is contained in:
5
init.lua
5
init.lua
@ -7,6 +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 S = minetest.get_translator("throwing")
|
||||||
local use_toolranks = minetest.get_modpath("toolranks") and minetest.settings:get_bool("throwing.toolranks", true)
|
local use_toolranks = minetest.get_modpath("toolranks") and minetest.settings:get_bool("throwing.toolranks", true)
|
||||||
|
|
||||||
--------- Arrows functions ---------
|
--------- Arrows functions ---------
|
||||||
@ -348,6 +349,10 @@ end
|
|||||||
|
|
||||||
|
|
||||||
---------- Bows -----------
|
---------- Bows -----------
|
||||||
|
if use_toolranks and minetest.get_modpath("toolranks_extras") and toolranks_extras.register_tool_type then
|
||||||
|
toolranks_extras.register_tool_type("bow", S("bow"), S("Arrows thrown"))
|
||||||
|
end
|
||||||
|
|
||||||
function throwing.register_bow(name, def)
|
function throwing.register_bow(name, def)
|
||||||
local enable_toolranks = use_toolranks and not def.no_toolranks
|
local enable_toolranks = use_toolranks and not def.no_toolranks
|
||||||
|
|
||||||
|
7
locale/template.txt
Normal file
7
locale/template.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# textdomain: throwing
|
||||||
|
|
||||||
|
|
||||||
|
### init.lua ###
|
||||||
|
|
||||||
|
Arrows thrown=
|
||||||
|
bow=
|
7
locale/throwing.fr.tr
Normal file
7
locale/throwing.fr.tr
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# textdomain: throwing
|
||||||
|
|
||||||
|
|
||||||
|
### init.lua ###
|
||||||
|
|
||||||
|
Arrows thrown=Flèches lancées
|
||||||
|
bow=arc
|
2
mod.conf
2
mod.conf
@ -1,3 +1,3 @@
|
|||||||
name = throwing
|
name = throwing
|
||||||
optional_depends = wielded_light, toolranks
|
optional_depends = wielded_light, toolranks, toolranks_extras
|
||||||
description = Throwing library: provides an API for registering throwing and throwable things
|
description = Throwing library: provides an API for registering throwing and throwable things
|
||||||
|
Reference in New Issue
Block a user