New translation system, part 5: Items, part 1
This commit is contained in:
parent
0cc038c545
commit
342202c979
9 changed files with 153 additions and 138 deletions
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mcl_bows")
|
||||
|
||||
-- Time in seconds after which a stuck arrow is deleted
|
||||
local ARROW_TIMEOUT = 60
|
||||
-- Time after which stuck arrow is rechecked for being stuck
|
||||
|
@ -11,11 +13,11 @@ local mod_awards = minetest.get_modpath("awards") and minetest.get_modpath("mcl_
|
|||
local mod_button = minetest.get_modpath("mesecons_button")
|
||||
|
||||
minetest.register_craftitem("mcl_bows:arrow", {
|
||||
description = "Arrow",
|
||||
_doc_items_longdesc = [[Arrows are ammunition for bows and dispensers.
|
||||
An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.
|
||||
Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.]],
|
||||
_doc_items_usagehelp = "To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.",
|
||||
description = S("Arrow"),
|
||||
_doc_items_longdesc = S("Arrows are ammunition for bows and dispensers.").."\n"..
|
||||
S("An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.").."\n"..
|
||||
S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."),
|
||||
_doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."),
|
||||
inventory_image = "mcl_bows_arrow_inv.png",
|
||||
groups = { ammo=1, ammo_bow=1 },
|
||||
_on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
local S = minetest.get_translator("mcl_bows")
|
||||
|
||||
mcl_bows = {}
|
||||
|
||||
local arrows = {
|
||||
|
@ -95,10 +97,10 @@ end
|
|||
|
||||
-- Bow item, uncharged state
|
||||
minetest.register_tool("mcl_bows:bow", {
|
||||
description = "Bow",
|
||||
_doc_items_longdesc = [[Bows are ranged weapons to shoot arrows at your foes.
|
||||
The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.]],
|
||||
_doc_items_usagehelp = [[To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.]],
|
||||
description = S("Bow"),
|
||||
_doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n"..
|
||||
S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."),
|
||||
_doc_items_usagehelp = S("To use the bow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot."),
|
||||
_doc_items_durability = BOW_DURABILITY,
|
||||
inventory_image = "mcl_bows_bow.png",
|
||||
stack_max = 1,
|
||||
|
@ -138,7 +140,7 @@ end
|
|||
-- Bow in charging state
|
||||
for level=0, 2 do
|
||||
minetest.register_tool("mcl_bows:bow_"..level, {
|
||||
description = "Bow",
|
||||
description = S("Bow"),
|
||||
_doc_items_create_entry = false,
|
||||
inventory_image = "mcl_bows_bow_"..level..".png",
|
||||
stack_max = 1,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue