Compare commits

...

4 Commits

Author SHA1 Message Date
mckaygerhard 93f17cd1f6 mods - 3darmor - upgraded, feature Added, nil checks, vulnerability checks
* Added the possibility to wear the armor on rightclick backported
  from https://github.com/minetest-mods/3d_armor/pull/16
* fix not being able to place armor on anvil due new right click
* fix armor equip/unequip initial implmentation
  that backports https://github.com/minetest-mods/3d_armor/pull/17
  solving a number of problems with the new right-click armor equipping
* fix callbacks not being called by armor.equip() and `armor.unequip()`
* fix player physics player_physics_locked attribute
* add feather falling
* prevents a crash when a pipeworks deployer tries to equip armor
* Fix typo in wieldview caused by skindb crash when player joins
* update and added nether lava and lava crust to fire protection list.
* fix bug Armor still damageable in (pvp) protected area
* Fix detached inventory vulnerability complete checks
* Fix count when armor is destroyed, option to prevent physics override
* update version to 0.4.15 that works with 0.4.X and 5.X engines
2023-07-24 14:36:56 -04:00
mckaygerhard 5812e5473c mods - hudbars+hbarmor+hunger - detection of original mods
* detection of original mods and bypass build-in own features
* optimize loading of hubar for armor, bad initialization
* real check player becouse of wrong implementation at engine
2023-07-24 14:27:52 -04:00
mckaygerhard 5e27b5b423 mods - hudbars+hbarmor+hunger - fusion into a simgle loading mod
* fix workaroun about ssettings not configurable
* do not hardcoded hp_max from other mods, unless configured here
* provide settings for hbhunger steps
* provide settings for auto hide or not hbarmor
* document those missing features
* mark mod with version 2.3.5.0 and using redo flag
2023-07-24 13:01:42 -04:00
mckaygerhard 7d9314ca68 mod - hudbars and hbhunger - settings and format number
* provide settings to customized from menu ui or using set command
2023-07-24 00:31:42 -04:00
106 changed files with 1583 additions and 793 deletions

View File

@ -53,7 +53,10 @@ To download you can play this game with the following minetest engines:
* nssf as `nssf` [mods/nssf](mods/nssf) from https://git.minetest.io/minenux/minetest-mod-nssf
* nsspf as `nsspf` [mods/nsspf](mods/nsspf) from https://git.minetest.io/minenux/minetest-mod-nsspf
* armors and stuff mods
* 3d_armor and shields [mods/3d_armor](mods/3d_armor) https://codeberg.org/minenux/minetest-mod-3d_armor
* 3d_armor & shields [mods/3d_armor](mods/3d_armor) https://codeberg.org/minenux/minetest-mod-3d_armor
* 3d_armor_globes [mods/3d_armor_gloves](mods/3d_armor_gloves) https://codeberg.org/minenux/minetest-mod-3d_armor_gloves
* 3d_armor_technic [mods/3d_armor_techincs](mods/3d_armor_technic) https://codeberg.org/minenux/minetest-mod-3d_armor/src/branch/stable-5.0/3d_armor_technic
* 3d_armor_mobile [mods/3d_armor_mobile](mods/3d_armor_mobile) https://codeberg.org/minenux/minetest-mod-3d_armor/src/branch/stable-4.0/3d_armor_mobile
* player stuffs:
* minenux bags as `backpacks` [mods/backpacks](mods/backpacks)
* Shara RedCat ezhh
@ -62,8 +65,8 @@ To download you can play this game with the following minetest engines:
* Wilhelmines Marinara as `marinara` [mods/marinara](mods/marinara) https://git.minetest.io/minenux/minetest-mod-marinara forked compatible version
* Wuzzy
* Hudbars as `hudbars` [mods/hudbars](mods/hudbars) https://codeberg.org/minenux/minetest-mod-hudbars
* Hudbar Armor as `hbarmor` [mods/hbarmor](mods/hbarmor) https://codeberg.org/Wuzzy/minetest_hbarmor/
* Hudbar Hunger as `hbhunger` [mods/hbhunger](mods/hbhunger) https://codeberg.org/Wuzzy/minetest_hbhunger/
* Hudbar Armor as `hudbars` [mods/hudbars](mods/hudbars) https://codeberg.org/minenux/minetest-game-nssg/commit/39c56ecd26ef559f063bf9effa0b1c58cc6bf969
* Stamina&Hunger as `hudbars` [mods/hbhunger](mods/hbhunger) https://codeberg.org/minenux/minetest-game-nssg/commit/39c56ecd26ef559f063bf9effa0b1c58cc6bf969
## Licensing

View File

@ -94,7 +94,7 @@ Additional fields supported by 3d_armor:
on_unequip = <function>
on_destroy = <function>
on_damage = <function>
on_punch = <function>
on_punched = <function>
armor:register_armor_group(group, base)
```
@ -186,7 +186,7 @@ on_equip = func(player, index, stack)
on_unequip = func(player, index, stack)
on_destroy = func(player, index, stack)
on_damage = func(player, index, stack)
on_punch = func(player, hitter, time_from_last_punch, tool_capabilities)
on_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
Notes:

View File

@ -94,7 +94,7 @@ Additional fields supported by 3d_armor:
on_unequip = <function>
on_destroy = <function>
on_damage = <function>
on_punch = <function>
on_punched = <function>
armor:register_armor_group(group, base)
```
@ -186,7 +186,7 @@ on_equip = func(player, index, stack)
on_unequip = func(player, index, stack)
on_destroy = func(player, index, stack)
on_damage = func(player, index, stack)
on_punch = func(player, hitter, time_from_last_punch, tool_capabilities)
on_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
Notes:

View File

@ -75,7 +75,28 @@
-- support for i18n
local S = armor_i18n.gettext
local S
-- Intllib or native translator
if minetest.get_translator ~= nil then
S = minetest.get_translator(minetest.get_current_modname())
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
local skin_previews = {}
local use_player_monoids = minetest.global_exists("player_monoids")
@ -109,7 +130,7 @@ armor = {
timer = 0,
elements = {"head", "torso", "legs", "feet"},
physics = {"jump", "speed", "gravity"},
attributes = {"heal", "fire", "water"},
attributes = {"heal", "fire", "water", "feather"},
formspec = "image[2.5,0;2,4;armor_preview]"..
default.gui_bg..
default.gui_bg_img..
@ -153,7 +174,7 @@ armor = {
on_destroy = {},
},
migrate_old_inventory = true,
version = "0.4.12.1",
version = "0.4.15",
get_translator = S
}
@ -172,12 +193,13 @@ armor.config = {
material_bronze = true,
material_diamond = true,
material_gold = true,
material_mithril = minetest.get_modpath("moreores") ~= nil,
material_mithril = true,
material_crystal = true,
material_nether = minetest.get_modpath("nether") ~= nil,
material_nether = true,
water_protect = true,
fire_protect = minetest.get_modpath("ethereal") ~= nil,
fire_protect_torch = minetest.get_modpath("ethereal") ~= nil,
feather_fall = true,
punch_damage = true,
}
@ -198,6 +220,19 @@ armor.config = {
-- damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
-- })
armor.register_armor = function(self, name, def)
def.on_secondary_use = function(itemstack, player)
return armor:equip(player, itemstack)
end
def.on_place = function(itemstack, player, pointed_thing)
if pointed_thing.type == "node" and player and not player:get_player_control().sneak then
local node = minetest.get_node(pointed_thing.under)
local ndef = minetest.registered_nodes[node.name]
if ndef and ndef.on_rightclick then
return ndef.on_rightclick(pointed_thing.under, node, player, itemstack, pointed_thing)
end
end
return armor:equip(player, itemstack)
end
local check_mat_exists = string.match(name, "%:.+_(.+)$")
if check_mat_exists == nil then
minetest.log("warning:[3d_armor] Registered armor "..name..
@ -470,7 +505,16 @@ armor.set_player_armor = function(self, player)
})
pova.do_override(player)
else
player:set_physics_override(physics)
local player_physics_locked
if minetest.has_feature("object_use_texture_alpha") then
player_physics_locked = player:get_meta():get_int("player_physics_locked")
else
player_physics_locked = player:get_attribute("player_physics_locked")
if player_physics_locked ~= nil then tonumber(player_physics_locked) end
end
if player_physics_locked == nil or player_physics_locked == 0 then
player:set_physics_override(physics)
end
end
self.textures[name].armor = texture
self.textures[name].preview = preview
@ -612,7 +656,7 @@ armor.get_weared_armor_elements = function(self, player)
local item_name = inv:get_stack("armor", i):get_name()
local element = self:get_element(item_name)
if element ~= nil then
weared_armor[element] = item_name
weared_armor[element] = item_name
end
end
return weared_armor
@ -624,24 +668,28 @@ end
-- @tparam ObjectRef player Player to whom item is equipped.
-- @tparam armor_name itemstack Armor item to be equipped.
-- @treturn armor_name Leftover item stack.
armor.equip = function(self, player, armor_name)
local name, inv = self:get_valid_player(player, "[equip]")
local weared_armor = self:get_weared_armor_elements(player)
local armor_element = self:get_element(armor_name)
if not name then
return
elseif self:get_element(armor_name) == nil then
return
elseif inv:contains_item("armor", ItemStack(armor_name)) then
return
armor.equip = function(self, player, itemstack)
local name, armor_inv = self:get_valid_player(player, "[equip]")
local armor_element = self:get_element(itemstack:get_name())
if name and armor_element then
local index
for i=1, armor_inv:get_size("armor") do
local stack = armor_inv:get_stack("armor", i)
if self:get_element(stack:get_name()) == armor_element then
index = i
self:unequip(player, armor_element)
break
elseif not index and stack:is_empty() then
index = i
end
end
local stack = itemstack:take_item()
armor_inv:set_stack("armor", index, stack)
self:run_callbacks("on_equip", player, index, stack)
self:set_player_armor(player)
self:save_armor_inventory(player)
end
if weared_armor[armor_element] ~= nil then
self:unequip(player, weared_armor[armor_element])
end
inv:add_item("armor", ItemStack(armor_name))
minetest.after(0, function() player:get_inventory():remove_item("main", ItemStack(armor_name)) end)
self:set_player_armor(player)
self:save_armor_inventory(player)
return itemstack
end
--- Unequips a piece of armor from a player.
@ -650,20 +698,29 @@ end
-- @tparam ObjectRef player Player from whom item is removed.
-- @tparam string armor_name Armor type identifier associated with the item
-- to be removed (armor_name).
armor.unequip = function(self, player, armor_name)
local name, inv = self:get_valid_player(player, "[unequip]")
armor.unequip = function(self, player, armor_element)
local name, armor_inv = self:get_valid_player(player, "[unequip]")
if not name then
return
elseif self:get_element(armor_name) == nil then
return
elseif not inv:contains_item("armor", ItemStack(armor_name)) then
return
end
inv:remove_item("armor", ItemStack(armor_name))
minetest.after(0, function() player:get_inventory():add_item("main", ItemStack(armor_name)) end)
self:set_player_armor(player)
self:save_armor_inventory(player)
self:save_armor_inventory(player)
for i=1, armor_inv:get_size("armor") do
local stack = armor_inv:get_stack("armor", i)
if self:get_element(stack:get_name()) == armor_element then
armor_inv:set_stack("armor", i, "")
minetest.after(0, function()
local inv = player:get_inventory()
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
minetest.add_item(player:get_pos(), stack)
end
end)
self:run_callbacks("on_unequip", player, i, stack)
self:set_player_armor(player)
self:save_armor_inventory(player)
return
end
end
end
--- Removes all armor worn by player.
@ -671,12 +728,10 @@ end
-- @function armor:remove_all
-- @tparam ObjectRef player
armor.remove_all = function(self, player)
local name, armor_inv = self:get_valid_player(player, "[remove_all]")
local name, inv = self:get_valid_player(player, "[remove_all]")
local name, inv = self:get_valid_player(player, "[remove_all]")
if not name then
return
end
armor_inv:set_list("armor", {})
end
inv:set_list("armor", {})
self:set_player_armor(player)
self:save_armor_inventory(player)
@ -694,8 +749,8 @@ armor.get_player_skin = function(self, name)
skin_mod = skins.skins[name]..".png"
return skins.skins[name]..".png"
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
skin_mod = skins.skins[name]..".png"
return u_skins.skins[name]..".png"
skin_mod = u_skins.u_skins[name]..".png"
return u_skins.u_skins[name]..".png"
elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
skin_mod = wardrobe.playerSkins[name]
return wardrobe.playerSkins[name]
@ -815,7 +870,13 @@ end
armor.load_armor_inventory = function(self, player)
local _, inv = self:get_valid_player(player, "[load_armor_inventory]")
if inv then
local armor_list_string = player:get_attribute("3d_armor_inventory")
local armor_list_string
if minetest.has_feature("object_use_texture_alpha") then
local meta = player:get_meta()
armor_list_string = meta:get_string("3d_armor_inventory")
else
armor_list_string = player:get_attribute("3d_armor_inventory")
end
if armor_list_string then
inv:set_list("armor",
self:deserialize_inventory_list(armor_list_string))
@ -831,8 +892,14 @@ end
armor.save_armor_inventory = function(self, player)
local _, inv = self:get_valid_player(player, "[save_armor_inventory]")
if inv then
player:set_attribute("3d_armor_inventory",
self:serialize_inventory_list(inv:get_list("armor")))
if minetest.has_feature("object_use_texture_alpha") then
local meta = player:get_meta()
meta:set_string("3d_armor_inventory",
self:serialize_inventory_list(inv:get_list("armor")))
else
player:set_attribute("3d_armor_inventory",
self:serialize_inventory_list(inv:get_list("armor")))
end
end
end
@ -844,6 +911,7 @@ end
-- @param player
armor.update_inventory = function(self, player)
-- DEPRECATED: Legacy inventory support
minetest.log("warning", "[3d_armor] deprecated api call update_inventory")
end
--- Sets inventory stack.
@ -870,17 +938,23 @@ end
armor.get_valid_player = function(self, player, msg)
msg = msg or ""
if not player then
minetest.log("warning", S("3d_armor: Player reference is nil @1", msg))
minetest.log("warning", ("3d_armor%s: Player reference is nil"):format(msg))
return
end
if type(player) ~= "userdata" then
-- Fake player, fail silently
return
end
local name = player:get_player_name()
if not name then
minetest.log("warning", S("3d_armor: Player name is nil @1", msg))
minetest.log("warning", ("3d_armor%s: Player name is nil"):format(msg))
return
end
local inv = minetest.get_inventory({type="detached", name=name.."_armor"})
if not inv then
minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg))
-- This check may fail when called inside `on_joinplayer`
-- in that case, the armor will be initialized/updated later on
minetest.log("warning", ("3d_armor%s: Detached armor inventory is nil"):format(msg))
return
end
return name, inv

View File

@ -718,8 +718,8 @@ if armor.materials.mithril then
armor:register_armor("3d_armor:helmet_mithril", {
description = S("Mithril Helmet"),
inventory_image = "3d_armor_inv_helmet_mithril.png",
groups = {armor_head=1, armor_heal=13, armor_use=66},
armor_groups = {fleshy=16},
groups = {armor_head=1, armor_heal=12, armor_use=100},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, level=3},
})
--- Mithril Chestplate
@ -736,8 +736,8 @@ if armor.materials.mithril then
armor:register_armor("3d_armor:chestplate_mithril", {
description = S("Mithril Chestplate"),
inventory_image = "3d_armor_inv_chestplate_mithril.png",
groups = {armor_torso=1, armor_heal=13, armor_use=66},
armor_groups = {fleshy=21},
groups = {armor_torso=1, armor_heal=12, armor_use=100},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, level=3},
})
--- Mithril Leggings
@ -754,8 +754,8 @@ if armor.materials.mithril then
armor:register_armor("3d_armor:leggings_mithril", {
description = S("Mithril Leggings"),
inventory_image = "3d_armor_inv_leggings_mithril.png",
groups = {armor_legs=1, armor_heal=13, armor_use=66},
armor_groups = {fleshy=21},
groups = {armor_legs=1, armor_heal=12, armor_use=100},
armor_groups = {fleshy=20},
damage_groups = {cracky=2, snappy=1, level=3},
})
--- Mithril Boots
@ -772,8 +772,8 @@ if armor.materials.mithril then
armor:register_armor("3d_armor:boots_mithril", {
description = S("Mithril Boots"),
inventory_image = "3d_armor_inv_boots_mithril.png",
groups = {armor_feet=1, armor_heal=13, armor_use=66},
armor_groups = {fleshy=16},
groups = {armor_feet=1, armor_heal=12, armor_use=100},
armor_groups = {fleshy=15},
damage_groups = {cracky=2, snappy=1, level=3},
})
end

View File

@ -5,16 +5,17 @@ local last_punch_time = {}
local pending_players = {}
local timer = 0
dofile(modpath.."/api.lua")
-- support for i18n
armor_i18n = { }
armor_i18n.gettext, armor_i18n.ngettext = dofile(modpath.."/intllib.lua")
-- escaping formspec
armor_i18n.fgettext = function(...) return minetest.formspec_escape(armor_i18n.gettext(...)) end
-- local functions
local S = armor_i18n.gettext
local F = armor_i18n.fgettext
armor_i18n.gettext = armor.get_translator
armor_i18n.ngettext = function(s) return s end
armor_i18n.fgettext = minetest.formspec_escape
dofile(modpath.."/api.lua")
-- local functions
local F = minetest.formspec_escape
local S = armor.get_translator
-- Legacy Config Support
@ -22,13 +23,11 @@ local input = io.open(modpath.."/armor.conf", "r")
if input then
dofile(modpath.."/armor.conf")
input:close()
input = nil
end
input = io.open(worldpath.."/armor.conf", "r")
if input then
dofile(worldpath.."/armor.conf")
input:close()
input = nil
end
for name, _ in pairs(armor.config) do
local global = "ARMOR_"..name:upper()
@ -80,7 +79,7 @@ end
if minetest.get_modpath("technic") then
armor.formspec = armor.formspec..
"label[5,2.5;"..F("Radiation")..": armor_group_radiation]"
"label[5,2.5;"..F(S("Radiation"))..": armor_group_radiation]"
armor:register_armor_group("radiation")
end
local skin_mods = {"skins", "u_skins", "simple_skins", "wardrobe"}
@ -93,6 +92,7 @@ for _, mod in pairs(skin_mods) do
armor:add_preview(fn)
end
end
armor.set_skin_mod(mod) -- will be deprecated
armor.skin_mod = mod
end
end
@ -111,27 +111,25 @@ dofile(modpath.."/armor.lua")
-- Armor Initialization
armor.formspec = armor.formspec..
"label[5,1;"..F("Level")..": armor_level]"..
"label[5,1.5;"..F("Heal")..": armor_attr_heal]"
"label[5,1;"..F(S("Level"))..": armor_level]"..
"label[5,1.5;"..F(S("Heal"))..": armor_attr_heal]"
if armor.config.fire_protect then
armor.formspec = armor.formspec.."label[5,2;"..F("Fire")..": armor_attr_fire]"
armor.formspec = armor.formspec.."label[5,2;"..F(S("Fire"))..": armor_attr_fire]"
end
armor:register_on_damage(function(player, index, stack)
local name = player:get_player_name()
local def = stack:get_definition()
if name and def and def.description and stack:get_wear() > 60100 then
minetest.chat_send_player(name, S("Your @1 is almost broken!", def.description))
-- minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0})
minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0})
end
end)
armor:register_on_destroy(function(player, index, stack)
local name = player:get_player_name()
local def = stack:get_definition()
if name and def and def.description then
minetest.chat_send_player(name, S("Your @1 got destroyed!", def.description))
-- minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0})
minetest.sound_play("default_tool_breaks", {to_player = name, gain = 2.0})
end
end)
@ -143,7 +141,13 @@ local function validate_armor_inventory(player)
return
end
local armor_prev = {}
local armor_list_string = player:get_attribute("3d_armor_inventory")
local armor_list_string
if minetest.has_feature("object_use_texture_alpha") then
local attribute_meta = player:get_meta() -- I know, the function's name is weird but let it be like that. ;)
armor_list_string = attribute_meta:get_string("3d_armor_inventory")
else
armor_list_string = player:get_attribute("3d_armor_inventory")
end
if armor_list_string then
local armor_list = armor:deserialize_inventory_list(armor_list_string)
for i, stack in ipairs(armor_list) do
@ -319,6 +323,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if not name then
return
end
local player_name = player:get_player_name()
for field, _ in pairs(fields) do
if string.find(field, "skins_set") then
minetest.after(0, function(player)
@ -332,8 +337,10 @@ end)
minetest.register_on_joinplayer(function(player)
default.player_set_model(player, "3d_armor_character.b3d")
local player_name = player:get_player_name()
minetest.after(0, function(player)
if init_player_armor(player) == false then
local pplayer = minetest.get_player_by_name(player_name)
if pplayer and init_player_armor(player) == false then
pending_players[player] = 0
end
end, player)
@ -398,7 +405,7 @@ if armor.config.drop == true or armor.config.destroy == true then
end)
else -- reset un-dropped armor and it's effects
minetest.register_on_respawnplayer(function(player)
armor:set_player_armor(player)
if player then armor:set_player_armor(player) end
end)
end
@ -406,8 +413,9 @@ if armor.config.punch_damage == true then
minetest.register_on_punchplayer(function(player, hitter,
time_from_last_punch, tool_capabilities)
local name = player:get_player_name()
local tplayer = hitter:is_player()
if name and tplayer and minetest.is_protected(player:get_pos(), "") then
local tplayer = minetest.get_player_by_name(name)
local hplayer = minetest.is_player(hitter)
if name and tplayer and hplayer and minetest.is_protected(player:get_pos(), "") then
return
elseif name then
armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
@ -436,6 +444,20 @@ end, true)
minetest.register_globalstep(function(dtime)
timer = timer + dtime
if armor.config.feather_fall == true then
for _,player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
if armor.def[name].feather > 0 then
local vel_y = player:get_velocity().y
if vel_y < 0 and vel_y < 3 then
vel_y = -(vel_y * 0.05)
player:add_velocity({x = 0, y = vel_y, z = 0})
end
end
end
end
if timer > armor.config.init_delay then
for player, count in pairs(pending_players) do
local remove = init_player_armor(player) == true

View File

@ -0,0 +1,62 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor : Abgetrennter Rüstungsbestand ist nicht gesetzt: @1
3d_armor: Player name is nil @1=3d_armor : Spielername ist nicht gesetzt: @1
3d_armor: Player reference is nil @1=3d_armor : Spielerreferenz ist nicht gesetzt: @1
### armor.lua ###
Admin Boots=Adminstiefel
Admin Chestplate=Adminbrustplatte
Admin Helmet=Adminhelm
Admin Leggings=Adminhose
Bronze Boots=Bronzestiefel
Bronze Chestplate=Bronzebrustplatte
Bronze Helmet=Bronzehelm
Bronze Leggings=Bronzehose
Cactus Boots=Kaktusstiefel
Cactus Chestplate=Kaktusbrustplatte
Cactus Helmet=Kaktushelm
Cactus Leggings=Kaktushose
Crystal Boots=Kristallstiefel
Crystal Chestplate=Kristallbrustplatte
Crystal Helmet=Kristallhelm
Crystal Leggings=Kristallhose
Nether Boots=Netherstiefel
Nether Chestplate=Netherbrustplatte
Nether Helmet=Netherhelm
Nether Leggings=Netherhose
Diamond Boots=Diamantstiefel
Diamond Chestplate=Diamantbrustplatte
Diamond Helmet=Diamanthelm
Diamond Leggings=Diamanthose
Gold Boots=Goldstiefel
Gold Chestplate=Goldbrustplatte
Gold Helmet=Goldhelm
Gold Leggings=Goldhose
Mithril Boots=Mithrilstiefel
Mithril Chestplate=Mithrilbrustplatte
Mithril Helmet=Mithrilhelm
Mithril Leggings=Mithrilhose
Steel Boots=Stahlstiefel
Steel Chestplate=Stahlbrustplatte
Steel Helmet=Stahlhelm
Steel Leggings=Stahlhose
Wood Boots=Holzstiefel
Wood Chestplate=Holzbrustplatte
Wood Helmet=Holzhelm
Wood Leggings=Holzhose
### init.lua ###
3d_armor: Failed to initialize player=3d_armor : Initialisierung des Spielers fehlgeschlagen
Fire=Feuer
Heal=Heilen
Level=Stufe
Radiation=Strahlen
Your @1 got destroyed!=Deine @1 wurde zerstört!
Your @1 is almost broken!=Deine @1 ist fast kaputt!
[3d_armor] Fire Nodes disabled=[3d_armor] Feuer-Knoten deaktiviert

View File

@ -0,0 +1,7 @@
# textdomain: 3d_armor
Radiation=Radiado
Level=Nivelo
Heal=Sanigi
Fire=Fajro
Your @1 is almost broken!=Via @1 estas preskaŭ rompita!
Your @1 got destroyed!=Via @1 detruiĝis!

View File

@ -0,0 +1,62 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: La armadura desconectada es nula @1
3d_armor: Player name is nil @1=3d_armor: El nombre del jugador es nulo @1
3d_armor: Player reference is nil @1=3d_armor: La referencia del jugador es nula @1
### armor.lua ###
Admin Boots=Botas de admin
Admin Chestplate=Peto de admin
Admin Helmet=Casco de admin
Admin Leggings=Grebas de admin
Bronze Boots=Botas de bronce
Bronze Chestplate=Peto de bronce
Bronze Helmet=Casco de bronce
Bronze Leggings=Grebas de bronce
Cactus Boots=Botas de cactus
Cactus Chestplate=Peto de cactus
Cactus Helmet=Casco de cactus
Cactus Leggings=Grebas de cactus
Crystal Boots=Botas de cristal
Crystal Chestplate=Peto de cristal
Crystal Helmet=Casco de cristal
Crystal Leggings=Grebas de cristal
Nether Boots=Botas de nether
Nether Chestplate=Peto de nether
Nether Helmet=Casco de nether
Nether Leggings=Grebas de nether
Diamond Boots=Botas de diamante
Diamond Chestplate=Peto de diamante
Diamond Helmet=Casco de diamante
Diamond Leggings=Grebas de diamante
Gold Boots=Botas de oro
Gold Chestplate=Peto de oro
Gold Helmet=Casco de oro
Gold Leggings=Grebas de oro
Mithril Boots=Botas de mitrilo
Mithril Chestplate=Peto de mitrilo
Mithril Helmet=Casco de mitrilo
Mithril Leggings=Grebas de mitrilo
Steel Boots=Botas de acero
Steel Chestplate=Peto de acero
Steel Helmet=Casco de acero
Steel Leggings=Grebas de acero
Wood Boots=Botas de madera
Wood Chestplate=Peto de madera
Wood Helmet=Casco de madera
Wood Leggings=Grebas de madera
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: Fallo en la inicialización del jugador
Fire=Fuego
Heal=Salud
Level=Nivel
Radiation=Radiación
Your @1 got destroyed!=¡Tu @1 fue destruído!
Your @1 is almost broken!=¡Tu @1 esta a punto de romperse!
[3d_armor] Fire Nodes disabled=[3d_armor] Nodos de fuego desabilitados

View File

@ -0,0 +1,62 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor : Inventaire détaché pour l'armure non trouvé @1
3d_armor: Player name is nil @1=3d_armor : Nom du joueur non trouvé @1
3d_armor: Player reference is nil @1=3d_armor : Référence au joueur non trouvée @1
### armor.lua ###
Admin Boots=Bottes d'admin
Admin Chestplate=Cuirasse d'admin
Admin Helmet=Casque d'admin
Admin Leggings=Jambières d'admin
Bronze Boots=Bottes en bronze
Bronze Chestplate=Cuirasse en bronze
Bronze Helmet=Casque en bronze
Bronze Leggings=Jambières en bronze
Cactus Boots=Bottes en cactus
Cactus Chestplate=Cuirasse en cactus
Cactus Helmet=Casque en cactus
Cactus Leggings=Jambières en cactus
Crystal Boots=Bottes en cristal
Crystal Chestplate=Cuirasse en cristal
Crystal Helmet=Casque en cristal
Crystal Leggings=Jambières en cristal
Nether Boots=Bottes en nether
Nether Chestplate=Cuirasse en nether
Nether Helmet=Casque en nether
Nether Leggings=Jambières en nether
Diamond Boots=Bottes en diamant
Diamond Chestplate=Cuirasse en diamant
Diamond Helmet=Casque en diamant
Diamond Leggings=Jambières en diamant
Gold Boots=Bottes en or
Gold Chestplate=Cuirasse en or
Gold Helmet=Casque en or
Gold Leggings=Jambières en or
Mithril Boots=Bottes en mithril
Mithril Chestplate=Cuirasse en mithril
Mithril Helmet=Casque en mithril
Mithril Leggings=Jambières en mithril
Steel Boots=Bottes en acier
Steel Chestplate=Cuirasse en acier
Steel Helmet=Casque en acier
Steel Leggings=Jambières en acier
Wood Boots=Bottes en bois
Wood Chestplate=Cuirasse en bois
Wood Helmet=Casque en bois
Wood Leggings=Jambières en bois
### init.lua ###
3d_armor: Failed to initialize player=3d_armor : Impossible d'initialiser le joueur
Fire=Fire
Heal=Soins
Level=Niveau
Radiation=Radiation
Your @1 got destroyed!=Une partie de votre armure a été détruite : @1 !
Your @1 is almost broken!=Une partie de votre armure est presque détruite : @1 !
[3d_armor] Fire Nodes disabled=[3d_armor] Nœuds de type feu désactivés

View File

@ -0,0 +1,90 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: L'inventario separato dell'armatura è nullo @1
3d_armor: Player name is nil @1=3d_armor: Il nome dell'utente è nullo @1
3d_armor: Player reference is nil @1=3d_armor: Il riferimento all'utente è nullo @1
### armor.lua ###
Admin Boots=Stivali dell'amministratrice/tore
Admin Chestplate=Corazza dell'amministratrice/tore
Admin Helmet=Elmo dell'amministratrice/tore
Admin Leggings=Gambali dell'amministratrice/tore
Bronze Boots=Stivali di bronzo
Bronze Chestplate=Corazza di bronzo
Bronze Helmet=Elmo di bronzo
Bronze Leggings=Gambali di bronzo
Cactus Boots=Stivali di cactus
Cactus Chestplate=Corazza di cactus
Cactus Helmet=Elmo di cactus
Cactus Leggings=Gambali di cactus
Crystal Boots=Stivali di cristallo
Crystal Chestplate=Corazza di cristallo
Crystal Helmet=Elmo di cristallo
Crystal Leggings=Gambali di cristallo
Nether Boots=Stivali di nether
Nether Chestplate=Corazza di nether
Nether Helmet=Elmo di nether
Nether Leggings=Gambali di nether
Diamond Boots=Stivali di diamante
Diamond Chestplate=Corazza di diamante
Diamond Helmet=Elmo di diamante
Diamond Leggings=Gambali di diamante
Gold Boots=Stivali d'oro
Gold Chestplate=Corazza d'oro
Gold Helmet=Elmo d'oro
Gold Leggings=Gambali d'oro
Mithril Boots=Stivali di mithril
Mithril Chestplate=Corazza di mithril
Mithril Helmet=Elmo di mithril
Mithril Leggings=Gambali di mithril
Steel Boots=Stivali d'acciaio
Steel Chestplate=Corazza d'acciaio
Steel Helmet=Elmo d'acciaio
Steel Leggings=Gambali d'acciaio
Wood Boots=Stivali di legno
Wood Chestplate=Corazza di legno
Wood Helmet=Elmo di legno
Wood Leggings=Gambali di legno
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: Inizializzazione dell'utente fallita
Fire=Fuoco
Heal=Guarigione
Level=Livello
Radiation=Radiazione
Your @1 got destroyed!=@1 in frantumi!
Your @1 is almost broken!=@1 quasi in frantumi!
[3d_armor] Fire Nodes disabled=[3d_armor] Nodi fuoco disabilitati
##### not used anymore #####
3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod caricata ma inutilizzata.
Back=Indietro
Armor=Armatura
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod caricata ma inutilizzata.
Armor stand top=Parte superiore del supporto per armatura
Armor stand=Supporto per armatura
Armor Stand=Supporto per armatura
Locked Armor stand=Supporto per armatura chiuso a chiave
Armor Stand (owned by @1)=Supporto per armatura (di proprietà di @1)
3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod caricata ma inutilizzata.
3d Armor=Armatura 3D
Armor not initialized!=Armatura non inizializzata!
Admin Shield=Scudo dell'amministratrice/tore
Wooden Shield=Scudo di legno
Enhanced Wood Shield=Scudo di legno migliorato
Cactus Shield=Scudo di cactus
Enhanced Cactus Shield=Scudo di cactus migliorato
Steel Shield=Scudo d'acciaio
Bronze Shield=Scudo di bronzo
Diamond Shield=Scudo di diamante
Gold Shield=Scudo d'oro
Mithril Shield=Scudo di mithril
Crystal Shield=Scudo di cristallo
Nether Shield=Scudo di nether

View File

@ -0,0 +1,90 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: Inventori perisai terpisah tiada nilai @1
3d_armor: Player name is nil @1=3d_armor: Nama pemain tiada nilai @1
3d_armor: Player reference is nil @1=3d_armor: Rujukan pemain tiada nilai @1
### armor.lua ###
Admin Boots=But Pentadbir
Admin Chestplate=Perisai Dada Pentadbir
Admin Helmet=Helmet Pentadbir
Admin Leggings=Perisai Kaki Pentadbir
Bronze Boots=But Gangsa
Bronze Chestplate=Perisai Dada Gangsa
Bronze Helmet=Helmet Gangsa
Bronze Leggings=Perisai Kaki Gangsa
Cactus Boots=But Kaktus
Cactus Chestplate=Perisai Dada Kaktus
Cactus Helmet=Helmet Kaktus
Cactus Leggings=Perisai Kaki Kaktus
Crystal Boots=But Kristal
Crystal Chestplate=Perisai Dada Kristal
Crystal Helmet=Helmet Kristal
Crystal Leggings=Perisai Kaki Kristal
Nether Boots=But Nether
Nether Chestplate=Perisai Dada Nether
Nether Helmet=Helmet Nether
Nether Leggings=Perisai Kaki Nether
Diamond Boots=But Intan
Diamond Chestplate=Perisai Dada Intan
Diamond Helmet=Helmet Intan
Diamond Leggings=Perisai Kaki Intan
Gold Boots=But Emas
Gold Chestplate=Perisai Dada Emas
Gold Helmet=Helmet Emas
Gold Leggings=Perisai Kaki Emas
Mithril Boots=But Mithril
Mithril Chestplate=Perisai Dada Mithril
Mithril Helmet=Helmet Mithril
Mithril Leggings=Perisai Kaki Mithril
Steel Boots=But Keluli
Steel Chestplate=Perisai Dada Keluli
Steel Helmet=Helmet Keluli
Steel Leggings=Perisai Kaki Keluli
Wood Boots=But Kayu
Wood Chestplate=Perisai Dada Kayu
Wood Helmet=Helmet Kayu
Wood Leggings=Perisai Kaki Kayu
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: Gagal mengasalkan pemain
Fire=Api
Heal=Pulih
Level=Tahap
Radiation=Radiasi
Your @1 got destroyed!=@1 anda telah musnah!
Your @1 is almost broken!=
[3d_armor] Fire Nodes disabled=[3d_armor] Nod-nod Api dilumpuhkan
##### not used anymore #####
3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mods dimuatkan tetapi tidak digunakan.
Back=Kembali
Armor=Perisai
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan.
Armor stand top=Bhg atas dirian perisai
Armor stand=Dirian perisai
Armor Stand=Dirian Perisai
Locked Armor stand=Dirian perisai Berkunci
Armor Stand (owned by @1)=Dirian Perisai (milik @1)
3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mods dimuatkan tetapi tidak digunakan.
3d Armor=Perisai 3d
Armor not initialized!=Perisai tidak diasalkan!
Admin Shield=Perisai Pegang Pentadbir
Wooden Shield=Perisai Pegang Kayu
Enhanced Wood Shield=Perisai Pegang Kayu Kukuh
Cactus Shield=Perisai Pegang Kaktus
Enhanced Cactus Shield=Perisai Pegang Kaktus Kukuh
Steel Shield=Perisai Pegang Keluli
Bronze Shield=Perisai Pegang Gangsa
Diamond Shield=Perisai Pegang Intan
Gold Shield=Perisai Pegang Emas
Mithril Shield=Perisai Pegang Mithril
Crystal Shield=Perisai Pegang Kristal
Nether Shield=Perisai Pegang Nether

View File

@ -0,0 +1,90 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1
3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1
3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1
### armor.lua ###
Admin Boots=Botas de Administrador
Admin Chestplate=Peitoral de Administrador
Admin Helmet=Capacete de Administrador
Admin Leggings=Calças de Administrador
Bronze Boots=Botas de Bronze
Bronze Chestplate=Peitoral de Bronze
Bronze Helmet=Capacete de Bronze
Bronze Leggings=Calças de Bronze
Cactus Boots=Botas de Madeira
Cactus Chestplate=Peitoral de Cacto
Cactus Helmet=Capacete de Cacto
Cactus Leggings=Calças de Cacto
Crystal Boots=Botas de Cristal
Crystal Chestplate=Peitoral de Cristal
Crystal Helmet=Capacete de Cristal
Crystal Leggings=Calças de Cristal
Nether Boots=Botas de Nether
Nether Chestplate=Peitoral de Nether
Nether Helmet=Capacete de Nether
Nether Leggings=Calças de Nether
Diamond Boots=Botas de Diamante
Diamond Chestplate=Peitoral de Diamante
Diamond Helmet=Capacete de Diamante
Diamond Leggings=Calças de Diamante
Gold Boots=Botas de Ouro
Gold Chestplate=Peitoral de Ouro
Gold Helmet=Capacete de Ouro
Gold Leggings=Calças de Ouro
Mithril Boots=Botas de Mithril
Mithril Chestplate=Peitoral de Mithril
Mithril Helmet=Capacete de Mithril
Mithril Leggings=Calças de Mithril
Steel Boots=Botas de Aço
Steel Chestplate=Peitoral de Aço
Steel Helmet=Capacete de Aço
Steel Leggings=Calças de Aço
Wood Boots=Botas de Madeira
Wood Chestplate=Peitoral de Madeira
Wood Helmet=Capacete de Madeira
Wood Leggings=Calças de Madeira
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador
Fire=Fogo
Heal=Saúde
Level=Nível
Radiation=Radiação
Your @1 got destroyed!=@1 foi destruído(a)!
Your @1 is almost broken!=
[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados
##### not used anymore #####
3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante.
Back=Voltar
Armor=Armadura
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante.
Armor stand top=Topo de estande de armadura
Armor stand=Estande de armadura
Armor Stand=Estande de Armadura
Locked Armor stand=Estande de Armadura Trancada
Armor Stand (owned by @1)=Estande de Armadura (pertente a @1)
3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante.
3d Armor=3d Armor
Armor not initialized!=Armadura não inicializada!
Admin Shield=Escudo de Administrador
Wooden Shield=Escudo de Madeira
Enhanced Wood Shield=Escudo de Madeira Melhorado
Cactus Shield=Escudo de Cacto
Enhanced Cactus Shield=Escudo de Cacto Melhorado
Steel Shield=Escudo de Aço
Bronze Shield=Escudo de Bronze
Diamond Shield=Escudo de Diamante
Gold Shield=Escudo de Ouro
Mithril Shield=Escudo de Mithril
Crystal Shield=Escudo de Cristal
Nether Shield=Escudo de Nether

View File

@ -0,0 +1,90 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: Inventario avulso de armadura é nulo @1
3d_armor: Player name is nil @1=3d_armor: Nome de jogador é nulo @1
3d_armor: Player reference is nil @1=3d_armor: Referência Jogador é nula @1
### armor.lua ###
Admin Boots=Botas de Administrador
Admin Chestplate=Peitoral de Administrador
Admin Helmet=Capacete de Administrador
Admin Leggings=Calças de Administrador
Bronze Boots=Botas de Bronze
Bronze Chestplate=Peitoral de Bronze
Bronze Helmet=Capacete de Bronze
Bronze Leggings=Calças de Bronze
Cactus Boots=Botas de Madeira
Cactus Chestplate=Peitoral de Cacto
Cactus Helmet=Capacete de Cacto
Cactus Leggings=Calças de Cacto
Crystal Boots=Botas de Cristal
Crystal Chestplate=Peitoral de Cristal
Crystal Helmet=Capacete de Cristal
Crystal Leggings=Calças de Cristal
Nether Boots=Botas de Nether
Nether Chestplate=Peitoral de Nether
Nether Helmet=Capacete de Nether
Nether Leggings=Calças de Nether
Diamond Boots=Botas de Diamante
Diamond Chestplate=Peitoral de Diamante
Diamond Helmet=Capacete de Diamante
Diamond Leggings=Calças de Diamante
Gold Boots=Botas de Ouro
Gold Chestplate=Peitoral de Ouro
Gold Helmet=Capacete de Ouro
Gold Leggings=Calças de Ouro
Mithril Boots=Botas de Mithril
Mithril Chestplate=Peitoral de Mithril
Mithril Helmet=Capacete de Mithril
Mithril Leggings=Calças de Mithril
Steel Boots=Botas de Aço
Steel Chestplate=Peitoral de Aço
Steel Helmet=Capacete de Aço
Steel Leggings=Calças de Aço
Wood Boots=Botas de Madeira
Wood Chestplate=Peitoral de Madeira
Wood Helmet=Capacete de Madeira
Wood Leggings=Calças de Madeira
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: Falha ao inicializar jogador
Fire=Fogo
Heal=Saúde
Level=Nível
Radiation=Radiação
Your @1 got destroyed!=@1 foi destruído(a)!
Your @1 is almost broken!=
[3d_armor] Fire Nodes disabled=[3d_armor] Nodes de gofo desabilitados
##### not used anymore #####
3d_armor_ip: Mod loaded but unused.=3d_armor_ip: Mod carregado mas inoperante.
Back=Voltar
Armor=Armadura
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: Mod carregado mas inoperante.
Armor stand top=Topo de estande de armadura
Armor stand=Estande de armadura
Armor Stand=Estande de Armadura
Locked Armor stand=Estande de Armadura Trancada
Armor Stand (owned by @1)=Estande de Armadura (pertente a @1)
3d_armor_ui: Mod loaded but unused.=3d_armor_ui: Mod carregado mas inoperante.
3d Armor=3d Armor
Armor not initialized!=Armadura não inicializada!
Admin Shield=Escudo de Administrador
Wooden Shield=Escudo de Madeira
Enhanced Wood Shield=Escudo de Madeira Melhorado
Cactus Shield=Escudo de Cacto
Enhanced Cactus Shield=Escudo de Cacto Melhorado
Steel Shield=Escudo de Aço
Bronze Shield=Escudo de Bronze
Diamond Shield=Escudo de Diamante
Gold Shield=Escudo de Ouro
Mithril Shield=Escudo de Mithril
Crystal Shield=Escudo de Cristal
Nether Shield=Escudo de Nether

View File

@ -0,0 +1,85 @@
# textdomain: 3d_armor
### api.lua ###
3d_armor: Detached armor inventory is nil @1=3d_armor: Отдельный инвентарь брони является nil @1
3d_armor: Player name is nil @1=3d_armor: Имя игрока является nil @1
3d_armor: Player reference is nil @1=3d_armor: Ссылка игрока является nil @1
### armor.lua ###
Admin Boots=ботинки админа
Admin Chestplate=бронежилет админа
Admin Helmet=шлем админа
Admin Leggings=гамаши админа
Bronze Boots=бронзовые ботинки
Bronze Chestplate=бронзовый бронежилет
Bronze Helmet=бронзовый шлем
Bronze Leggings=бронзовые гамаши
Cactus Boots=кактусовые ботинки
Cactus Chestplate=кактусовый бронежилет
Cactus Helmet=кактусовый шлем
Cactus Leggings=кактусовые гамаши
Crystal Boots=кристалловые ботинки
Crystal Chestplate=кристалловый бронежилет
Crystal Helmet=кристалловый шлем
Crystal Leggings=кристалловые гамаши
Diamond Boots=алмазные ботинки
Diamond Chestplate=алмазный бронежилет
Diamond Helmet=алмазный шлем
Diamond Leggings=алмазные гамаши
Gold Boots=золотые ботинки
Gold Chestplate=золотой бронежилет
Gold Helmet=золотой шлем
Gold Leggings=золотые гамаши
Mithril Boots=мифриловые ботинки
Mithril Chestplate=мифриловый бронежилет
Mithril Helmet=мифриловый шлем
Mithril Leggings=мифриловые гамаши
Steel Boots=стальные ботинки
Steel Chestplate=стальной бронежилет
Steel Helmet=стальной шлем
Steel Leggings=стальные гамаши
Wood Boots=деревянные ботинки
Wood Chestplate=деревянный бронежилет
Wood Helmet=деревянный шлем
Wood Leggings=деревянные гамаши
### init.lua ###
3d_armor: Failed to initialize player=3d_armor: не смог подготовить игрока
Fire=огонь
Heal=исцеление
Level=уровень
Radiation=излучение
Your @1 got destroyed!=твой(и) @1 был(и) разрушен(ы)!
Your @1 is almost broken!=
[3d_armor] Fire Nodes disabled=[3d_armor] блоки огня отключены
##### not used anymore #####
3d_armor_ip: Mod loaded but unused.=3d_armor_ip: мод загружен но не используется.
Back=назад
Armor=бронь
3d_armor_sfinv: Mod loaded but unused.=3d_armor_sfinv: мод загружен но не используется.
Armor stand top=стойка для брони (верх)
Armor stand=стойка для брони
Armor Stand=стойка для брони
Locked Armor stand=защищенная стойка для брони
Armor Stand (owned by @1)=стойка для брони (принадлежит @1)
3d_armor_ui: Mod loaded but unused.=3d_armor_ui: мод загружен но не используется.
3d Armor=3D бронь
Armor not initialized!=бронь не подготовлена!
Admin Shield=щит админа
Wooden Shield=деревянный щит
Enhanced Wood Shield=улучшенный деревянный щит
Cactus Shield=кактусный щит
Enhanced Cactus Shield=улучшенный кактусный щит
Steel Shield=стальной щит
Bronze Shield=бронзовый щит
Diamond Shield=алмазный щит
Gold Shield=золотой щит
Mithril Shield=мифриловый щит
Crystal Shield=кристалловый щит

View File

@ -0,0 +1,7 @@
# textdomain: 3d_armor
Radiation=Strålning
Level=Nivå
Heal=Läkning
Fire=Eld
Your @1 is almost broken!=Din @1 är nästan förstörd!
Your @1 got destroyed!=Din @1 blev förstörd!

View File

@ -0,0 +1,7 @@
# textdomain: 3d_armor
Radiation=
Level=
Heal=
Fire=
Your @1 is almost broken!=
Your @1 got destroyed!=

View File

@ -1,13 +1,13 @@
-- support for i18n
local S = armor_i18n.gettext
local F = minetest.formspec_escape
if not minetest.global_exists("inventory_plus") then
minetest.log("warning", "3d_armor_ip: Mod loaded but unused.")
minetest.log("warning", "[3d_armor_ip]: Mod loaded but unused.")
return
end
-- support for i18n
local S = armor_i18n.gettext
local F = armor_i18n.fgettext
armor.formspec = "size[8,8.5]button[6,0;2,0.5;main;"..F("Back").."]"..armor.formspec
armor.formspec = "size[8,8.5]button[6,0;2,0.5;main;"..F(S("Back")).."]"..armor.formspec
armor:register_on_update(function(player)
local name = player:get_player_name()
local formspec = armor:get_armor_formspec(name, true)
@ -36,3 +36,5 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
inventory_plus.set_inventory_formspec(player, formspec)
end
end)
minetest.log("[3d_armor_ip]: Mod loaded successfully.")

View File

@ -0,0 +1,3 @@
# textdomain: 3d_armor_ip
Back=Dorso
Armor=Kiraso

View File

@ -0,0 +1,3 @@
# textdomain: 3d_armor_ip
Back=Retour
Armor=Armure

View File

@ -0,0 +1,3 @@
# textdomain: 3d_armor_ip
Back=Voltar
Armor=Armadura

View File

@ -0,0 +1,3 @@
# textdomain: 3d_armor_ip
Back=Tillbaka
Armor=Rustning

View File

@ -0,0 +1,3 @@
# textdomain: 3d_armor_ip
Back=
Armor=

View File

@ -1,4 +1,4 @@
name = 3d_armor_ip
depends = default
depends = 3d_armor
optional_depends = inventory_plus
description = ARMOR PAGE to the inventory plus

View File

@ -1,11 +1,11 @@
-- support for i18n
local S = armor_i18n.gettext
if not minetest.global_exists("sfinv") then
minetest.log("warning", "[3d_armor_sfinv]: Mod loaded but unused.")
return
end
local S = armor_i18n.gettext
sfinv.register_page("3d_armor:armor", {
title = S("Armor"),
get = function(self, player, context)
@ -19,3 +19,5 @@ armor:register_on_update(function(player)
sfinv.set_player_inventory_formspec(player)
end
end)
minetest.log("[3d_armor_sfinv]: Mod loaded successfully.")

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=Kiraso

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=Armadura

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=Armure

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=Armadura

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=Rustning

View File

@ -0,0 +1,2 @@
# textdomain: 3d_armor_sfinv
Armor=

View File

@ -1,4 +1,4 @@
name = 3d_armor_sfinv
depends = default
depends = 3d_armor
optional_depends = sfinv
description = ARMOR PAGE to the simple fast inventory

View File

@ -134,7 +134,7 @@ local function remove_hidden_node(pos)
end
minetest.register_node("3d_armor_stand:top", {
description = S("Armor stand top"),
description = S("Armor Stand Top"),
paramtype = "light",
drawtype = "plantlike",
sunlight_propagates = true,
@ -149,7 +149,7 @@ minetest.register_node("3d_armor_stand:top", {
})
minetest.register_node("3d_armor_stand:armor_stand", {
description = S("Armor stand"),
description = S("Armor Stand"),
drawtype = "mesh",
mesh = "3d_armor_stand.obj",
tiles = {"3d_armor_stand.png"},
@ -217,7 +217,7 @@ minetest.register_node("3d_armor_stand:armor_stand", {
})
minetest.register_node("3d_armor_stand:locked_armor_stand", {
description = S("Locked Armor stand"),
description = S("Locked Armor Stand"),
drawtype = "mesh",
mesh = "3d_armor_stand.obj",
tiles = {"3d_armor_stand_locked.png"},
@ -351,3 +351,5 @@ minetest.register_craft({
{"3d_armor_stand:armor_stand", "default:steel_ingot"},
}
})
minetest.log("[3d_armor_stand]: Mod loaded successfully.")

View File

@ -0,0 +1,5 @@
# textdomain: 3d_armor_stand
Armor Stand Top=Kirasstando Supro
Armor Stand=Kirasstando
Locked Armor Stand=Ŝlosita Kirasstando
Armor Stand (owned by @1)=Kirasstando (posedata de @1)

View File

@ -0,0 +1,5 @@
# textdomain: 3d_armor_stand
Armor Stand Top=Haut de support d'armure
Armor Stand=Support d'armure
Locked Armor Stand=Support d'armure verrouillé
Armor Stand (owned by @1)=Support d'armure (propriété de @1)

View File

@ -0,0 +1,5 @@
# textdomain: 3d_armor_stand
Armor Stand Top=Topo do suporte de armadura
Armor Stand=Suporte de Armadura
Locked Armor Stand=Suporte de armadura trancado
Armor Stand (owned by @1)=Suporte de Armadura (dono: @1)

View File

@ -0,0 +1,5 @@
# textdomain: 3d_armor_stand
Armor Stand Top=Rustningställstopp
Armor Stand=Rustningställ
Locked Armor Stand=Låst rustningställ
Armor Stand (owned by @1)=Rustningställ (ägd av @1)

View File

@ -0,0 +1,5 @@
# textdomain: 3d_armor_stand
Armor Stand Top=
Armor Stand=
Locked Armor Stand=
Armor Stand (owned by @1)=

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 164 B

View File

@ -8,7 +8,8 @@ local S = armor_i18n.gettext
local F = armor_i18n.fgettext
local has_technic = minetest.get_modpath("technic") ~= nil
if unified_inventory.sfinv_compat_layer then
local ui = unified_inventory
if ui.sfinv_compat_layer then
return
end
@ -22,7 +23,7 @@ end)
unified_inventory.register_button("armor", {
type = "image",
image = "inventory_plus_armor.png",
tooltip = S("3d Armor")
tooltip = S("3D Armor")
})
unified_inventory.register_page("armor", {
@ -30,24 +31,26 @@ unified_inventory.register_page("armor", {
local fy = perplayer_formspec.formspec_y
local name = player:get_player_name()
if armor.def[name].init_time == 0 then
return {formspec="label[0,0;"..F("Armor not initialized!").."]"}
return {formspec="label[0,0;"..F(S("Armor not initialized!")).."]"}
end
local formspec = "background[0.06,"..fy..";7.92,7.52;3d_armor_ui_form.png]"..
"label[0,0;"..F("Armor").."]"..
"label[0,0;"..F(S("Armor")).."]"..
"list[detached:"..name.."_armor;armor;0,"..fy..";2,3;]"..
"image[2.5,"..(fy - 0.25)..";2,4;"..armor.textures[name].preview.."]"..
"label[5.0,"..(fy + 0.0)..";"..F("Level")..": "..armor.def[name].level.."]"..
"label[5.0,"..(fy + 0.5)..";"..F("Heal")..": "..armor.def[name].heal.."]"..
"label[5.0,"..(fy + 0.0)..";"..F(S("Level"))..": "..armor.def[name].level.."]"..
"label[5.0,"..(fy + 0.5)..";"..F(S("Heal"))..": "..armor.def[name].heal.."]"..
"listring[current_player;main]"..
"listring[detached:"..name.."_armor;armor]"
if armor.config.fire_protect then
formspec = formspec.."label[5.0,"..(fy + 1.0)..";"..
F("Fire")..": "..armor.def[name].fire.."]"
F(S("Fire"))..": "..armor.def[name].fire.."]"
end
if has_technic then
formspec = formspec.."label[5.0,"..(fy + 1.5)..";"..
F("Radiation")..": "..armor.def[name].groups["radiation"].."]"
F(S("Radiation"))..": "..armor.def[name].groups["radiation"].."]"
end
return {formspec=formspec}
end,
})
minetest.log("[3d_armor_ui]: Mod loaded successfully.")

View File

@ -0,0 +1,8 @@
# textdomain: 3d_armor_ui
3D Armor=3D Kiraso
Armor not initialized!=Kiraso ne pravigita!
Armor=Kiraso
Level=Nivelo
Heal=Sanigi
Fire=Fajro
Radiation=Radiado

View File

@ -0,0 +1,8 @@
# textdomain: 3d_armor_ui
3D Armor=Armure 3D
Armor not initialized!=Armure non initialisée !
Armor=Armure
Level=Niveau
Heal=Soins
Fire=Feu
Radiation=Radiation

View File

@ -0,0 +1,8 @@
# textdomain: 3d_armor_ui
3D Armor=3D Armor
Armor not initialized!=Armadura não inicializada!
Armor=Armadura
Level=Nível
Heal=Vida
Fire=Fogo
Radiation=Radiação

View File

@ -0,0 +1,8 @@
# textdomain: 3d_armor_ui
3D Armor=
Armor not initialized!=Rustning har inte initialiserats
Armor=Rustning
Level=Nivå
Heal=Läkning
Fire=Eld
Radiation=Strålning

View File

@ -0,0 +1,8 @@
# textdomain: 3d_armor_ui
3D Armor=
Armor not initialized!=
Armor=
Level=
Heal=
Fire=
Radiation=

View File

@ -33,11 +33,11 @@ armor_destroy (Pulverize armor on death) bool false
# You can use this to increase or decrease overall armor effectiveness,
# eg: level_multiplier = 0.5 will reduce armor level by half.
armor_level_multiplier (Armor effectiveness multiplier) float 0.4
armor_level_multiplier (Armor effectiveness multiplier) float 0.9
# You can use this to increase or decrease overall armor healing,
# eg: armor_heal_multiplier = 0 will disable healing altogether.
armor_heal_multiplier (Armor healing multiplier) float 0.1
armor_heal_multiplier (Armor healing multiplier) float 0.6
# Enable water protection (periodically restores breath when activated).
armor_water_protect (Enable water protection) bool true
@ -46,7 +46,7 @@ armor_water_protect (Enable water protection) bool true
armor_fire_protect (Enable fire protection) bool false
# Enable fire damage from torches (defaults true if using ethereal mod).
armor_fire_protect_torch (Enable fire protection torch damage) bool true
armor_fire_protect_torch (Enable fire protection torch damage) bool false
# Enable punch damage effects.
armor_punch_damage (Enable damage effects) bool true
@ -63,7 +63,7 @@ shields_disable_sounds (Disable shield sounds) bool false
[wieldview]
# Set number of seconds between visible wielded item updates.
wieldview_update_time (Wieldview refresh rate [seconds]) int 3
wieldview_update_time (Wieldview refresh rate [seconds]) int 2
# Show nodes as tiles, disabled by default.
wieldview_node_tiles (Show nodes as tiles) bool false

View File

@ -1,16 +1,51 @@
[mod] Shields [shields]
=======================
minetest mod 3d_armor_mobile
===========================
Adds shields to 3d_armor
SHIELDS feature to 3d armors
Depends: 3d_armor
## Information
--------------
Originally a part of 3d_armor, shields have been re-included as an optional extra.
Adds shields to the game, so players can use to protect or block
![screenshot.png](screenshot.png)
## Technical info
-----------------
This mod must be named `shields` and will provide such items to 3d armors,
originally a part of 3d_armor, shields have been re-included as an optional extra.
If you do not what shields then simply remove the shields folder from the modpack.
Shields Configuration
---------------------
It can be downloade from
* https://git.minetest.io/minenux/minetest-mod-3d_armor
#### Compatibility
Make sure you are using Minetest 0.4.16+ and start a new world
#### Dependencies
* default
* 3d_armor
#### Configuration
Override the following default settings by adding them to your minetest.conf file.
shields_disable_sounds = false
* shields_disable_sounds = false
## LICENSE
Lasted features, non comercial unless xpresed permission:
Copyright (C) 2023 mckaygerhard - CC-BY-SA-NC 4.0
Source code base:
Copyright (c) 2018-2019 Lone_Wolf
Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1
License Textures:
Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0

View File

@ -8,7 +8,6 @@
local S = armor_i18n.gettext
local disable_sounds = minetest.settings:get_bool("shields_disable_sounds")
local use_moreores = minetest.get_modpath("moreores")
local function play_sound_effect(player, name)
if not disable_sounds and player then
local pos = player:get_pos()
@ -412,3 +411,5 @@ for k, v in pairs(armor.materials) do
},
})
end
minetest.log("[3d_armor:shields] mod loaded successfully")

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=Adminschild
Wooden Shield=Holzschild
Enhanced Wood Shield=verbessert Holzschild
Cactus Shield=Kaktusschild
Enhanced Cactus Shield=verbessert Kaktusschild
Steel Shield=Stahlschild
Bronze Shield=Bronzeschild
Diamond Shield=Diamantschild
Gold Shield=Goldschild
Mithril Shield=Mithrilschild
Crystal Shield=Kristallschild
Nether Shield=Netherschild

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=Administra Ŝildo
Wooden Shield=Ligna Ŝildo
Enhanced Wood Shield=Plibonigita Ligna Ŝildo
Cactus Shield=Kakta Ŝildo
Enhanced Cactus Shield=Plibonigita Kakta Ŝildo
Steel Shield=Ŝtala Ŝildo
Bronze Shield=Bronza Ŝildo
Diamond Shield=Diamanta Ŝildo
Gold Shield=Ora Ŝildo
Mithril Shield=Mitrila Ŝildo
Crystal Shield=Kristala Ŝildo
Nether Shield=Inferna Ŝildo

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=Bouclier d'admin
Wooden Shield=Bouclier en bois
Enhanced Wood Shield=Bouclier en bois amélioré
Cactus Shield=Bouclier en cactus
Enhanced Cactus Shield=Bouclier en cactus amélioré
Steel Shield=Bouclier en acier
Bronze Shield=Bouclier en bronze
Diamond Shield=Bouclier en diamant
Gold Shield=Bouclier en or
Mithril Shield=Bouclier en mithril
Crystal Shield=Bouclier en cristal
Nether Shield=Bouclier en nether

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=Escudo de Administrador
Wooden Shield=Escudo de Madeira
Enhanced Wood Shield=Escudo de Madeira Encantado
Cactus Shield=Escudo de Cacto
Enhanced Cactus Shield=Escude de Cacto Encantado
Steel Shield=Escudo de Aço
Bronze Shield=Escudo de Bronze
Diamond Shield=Escudo de Diamante
Gold Shield=Escudo de Ouro
Mithril Shield=Escudo de Mithril
Crystal Shield=Escudo de Cristal
Nether Shield=Escudo de Nether

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=Adminsköld
Wooden Shield=Träsköld
Enhanced Wood Shield=Förbättrad träsköld
Cactus Shield=Kaktussköld
Enhanced Cactus Shield=Förbättrad kaktussköld
Steel Shield=Stålsköld
Bronze Shield=Bronssköld
Diamond Shield=Diamantsköld
Gold Shield=Guldsköld
Mithril Shield=Mithrilsköld
Crystal Shield=Kristallsköld
Nether Shield=Nethersköld

View File

@ -0,0 +1,13 @@
# textdomain: shields
Admin Shield=
Wooden Shield=
Enhanced Wood Shield=
Cactus Shield=
Enhanced Cactus Shield=
Steel Shield=
Bronze Shield=
Diamond Shield=
Gold Shield=
Mithril Shield=
Crystal Shield=
Nether Shield=

View File

@ -21,3 +21,7 @@ Wield image transformation: To apply a simple transformation to the item in
hand, add the group “wieldview_transform” to the item definition. The group
rating equals one of the numbers used for the [transform texture modifier
of the Lua API.
Disabling the feature in-game: If you want to hide the wielded item
you can add an INT metadata to the player called "show_wielded_item" and set
it to 2 (any other value will show the wielded item again).

View File

@ -66,11 +66,12 @@ end
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
wieldview.wielded_item[name] = ""
minetest.after(0, function(player)
if player then
wieldview:update_wielded_item(player)
minetest.after(0, function(pname)
local pplayer = minetest.get_player_by_name(pname)
if pplayer then
wieldview:update_wielded_item(pplayer)
end
end, player)
end, name)
end)
minetest.register_globalstep(function(dtime)
@ -85,3 +86,4 @@ minetest.register_globalstep(function(dtime)
end
end)
minetest.log("[3d_armor:wieldview] mod loaded successfully")

View File

@ -0,0 +1,3 @@
name = wieldview
depends = 3d_armor
description = Makes hand wielded items visible to other players.

View File

@ -1,42 +0,0 @@
# HUD bar for `3d_armor` [`hbarmor`]
* Version: 1.0.0
## Description
This mod adds a simple HUD bar which displays the current damage
of the player's armor (from the 3D Armor [`3d_armor`] mod) as a percentage (rounded).
100% armor means the armor is in perfect shape. 0% means the armor is almost destroyed
or non-existant. Note that to reach 100%, the player must wear at least 4 different
pieces of armor in perfect shape.
The armor bar also does not tell anything about the armor's strength,
only how worn out it already is.
By default, the armor bar is hidden if the player wears no armor.
## Dependencies
* HUD bars [`hudbars`], major version 2
* 3D Armor [`3d_armor`] (tested with Minetest 5.0.0)
## Licensing
This mod is entirly free softare.
### Source code
* License: MIT License (see below)
* Authors: Wuzzy, forked from the mod “Better HUD (and hunger)” [`hud`] by BlockMen (2013-2014)
### Textures
* `hbarmor_icon.png`—Stu ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen
* `hbarmor_bgicon.png`—Stu (CC BY-SA 3.0), modified by BlockMen
* `hbarmor_bar.png`—Wuzzy (MIT License)
Everything else is under the MIT License:
© Copyright BlockMen (2013-2014)
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the MIT License.
See <https://opensource.org/licenses/MIT> for more details.

View File

@ -1,2 +0,0 @@
hudbars
3d_armor

View File

@ -1,174 +0,0 @@
-- Intllib
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("ethereal") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
local N = function(s) return s end
if (not armor) or (not armor.def) then
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
end
local hbarmor = {}
-- HUD statbar values
hbarmor.armor = {}
-- Stores if player's HUD bar has been initialized so far.
hbarmor.player_active = {}
-- Time difference in seconds between updates to the HUD armor bar.
-- Increase this number for slow servers.
hbarmor.tick = 0.3
-- If true, the armor bar is hidden when the player does not wear any armor
hbarmor.autohide = false
--load custom settings
local set = minetest.settings:get_bool("hbarmor_autohide")
if set ~= nil then
hbarmor.autohide = set
end
set = minetest.settings:get("hbarmor_tick")
if tonumber(set) ~= nil then
hbarmor.tick = tonumber(set)
end
local must_hide = function(playername, arm)
return ((not armor.def[playername].count or armor.def[playername].count == 0) and arm == 0)
end
local arm_printable = function(arm)
return math.ceil(math.floor(arm+0.5))
end
local function custom_hud(player)
local name = player:get_player_name()
if minetest.settings:get_bool("enable_damage") then
local ret = hbarmor.get_armor(player)
if ret == false then
minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in custom_hud returned with false!")
end
local arm = tonumber(hbarmor.armor[name])
if not arm then arm = 0 end
local hide
if hbarmor.autohide then
hide = must_hide(name, arm)
else
hide = false
end
hb.init_hudbar(player, "armor", arm_printable(arm), nil, hide)
end
end
--register and define armor HUD bar
local hicon = "hbarmor_icon.png"
if hb.settings.bar_type == "progress_bar" then hicon = nil end
hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = hicon, bgicon = nil, bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } )
function hbarmor.get_armor(player)
if not player or not armor.def then
return false
end
local name = player:get_player_name()
local def = armor.def[name] or nil
if def and def.state and def.count then
hbarmor.set_armor(name, def.state, def.count)
else
return false
end
return true
end
function hbarmor.set_armor(player_name, ges_state, items)
local max_items = 4
if items == 5 then
max_items = items
end
local max = max_items * 65535
local lvl = max - ges_state
lvl = lvl/max
if ges_state == 0 and items == 0 then
lvl = 0
end
hbarmor.armor[player_name] = math.max(0, math.min(lvl* (items * (100 / max_items)), 100))
end
-- update hud elemtens if value has changed
local function update_hud(player)
local name = player:get_player_name()
--armor
local arm = tonumber(hbarmor.armor[name])
if not arm then
arm = 0
hbarmor.armor[name] = 0
end
if hbarmor.autohide then
-- hide armor bar completely when there is none
if must_hide(name, arm) then
hb.hide_hudbar(player, "armor")
else
hb.change_hudbar(player, "armor", arm_printable(arm))
hb.unhide_hudbar(player, "armor")
end
else
hb.change_hudbar(player, "armor", arm_printable(arm))
end
end
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
custom_hud(player)
hbarmor.player_active[name] = true
end)
minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
hbarmor.player_active[name] = false
end)
local main_timer = 0
local timer = 0
minetest.register_globalstep(function(dtime)
main_timer = main_timer + dtime
timer = timer + dtime
if main_timer > hbarmor.tick or timer > 4 then
if minetest.settings:get_bool("enable_damage") then
if main_timer > hbarmor.tick then main_timer = 0 end
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
if hbarmor.player_active[name] == true then
local ret = hbarmor.get_armor(player)
if ret == false then
minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in globalstep returned with false!")
end
-- update all hud elements
update_hud(player)
end
end
end
end
if timer > 4 then timer = 0 end
end)

View File

@ -1,3 +0,0 @@
# textdomain:hbarmor
Armor=Panzerung
@1: @2%=@1: @2%

View File

@ -1,3 +0,0 @@
# textdomain:hbarmor
Armor=Armadura
@1: @2%=@1:@2%

View File

@ -1,3 +0,0 @@
# textdomain:hbarmor
Armor=Armatura
@1: @2%=@1:@2%

View File

@ -1,5 +0,0 @@
# textdomain:hbarmor
Armor=
# Format string for displaying the armor. E.g. "Armor: 100%"
@1: @2%=

View File

@ -1,3 +0,0 @@
name = hbarmor
description = Adds a HUD bar displaying the current damage of the player's armor.
depends = hudbars, 3d_armor

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,7 +0,0 @@
#If true, automatically hides the armor HUD bar when the player wears no
#armor. Otherwise, the armor bar shows “0%”.
hbarmor_autohide (Automatically hide armor HUD bar) bool false
#Time difference in seconds between updates to the armor HUD bar.
#Increase this number for slow servers.
hbarmor_tick (Armor HUD bar update frequency) float 0.3 0.0 4.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

View File

@ -1,2 +0,0 @@
Wuzzy <Wuzzy@disroot.org> <Wuzzy2@mail.ru>
Wuzzy <Wuzzy@disroot.org> <almikes@aol.com>

View File

@ -1,96 +0,0 @@
# Hunger with HUD bar [`hbhunger`]
* Version: 1.1.2
## Using the mod
This mod adds a mechanic for hunger.
This mod depends on the HUD bars mod [`hudbars`], version 1.4.1 or any later version
starting with “1.” or “2.”.
## About hunger
This mod adds a hunger mechanic to the game. Players get a new attribute called “satiation”:
* A new player starts with 20 satiation points out of 30
* Actions like digging, placing and walking cause exhaustion, which lower the satiation
* Every 800 seconds you lose 1 satiation point without doing anything
* At 1 or 0 satiation you will suffer damage and die in case you don't eat something
* If your satiation is 16 or higher, you will slowly regenerate health points
* Eating food will increase your satiation (Duh!)
Important: Eating food will not directly increase your health anymore, as long as the food
item is supported by this mod (see below).
Careful! Some foods may be poisoned. If you eat a poisoned item, you may still get a satiation
boost, but for a brief period you lose health points because of food poisoning. However,
food poisoning can never kill you.
## Statbar mode
If you use the statbar mode of the HUD Bars mod, these things are important to know:
As with all mods using HUD Bars, the bread statbar symbols represent the rough percentage
out of 30 satiation points, in steps of 5%, so the symbols give you an estimate of your
satiation. This is different from the hunger mod by BlockMen.
You gain health at 5.5 symbols or more, as 5.5 symbols correspond to 16 satiation points.
You *may* lose health at exactly 0.5 symbols, as 0.5 symbols correspond to 1-2 satiation points.
## Supported food
All mods which add food through standard measures (`minetest.item_eat`) are already
supported automatically. Poisoned food needs special support.
### Known supported food mods
* Apple and Blueberries from Minetest Game [`default`]
* Red and brown mushroom from Minetest Game [`flowers`]
* Bread from Minetest Game [`farming`]
* [`animalmaterials`] (Mob Framework (`mobf` modpack))
* Bushes [`bushes`]
* [`bushes_classic`]
* Creatures [`creatures`]
* [`dwarves`] (beer and such)
* Docfarming [`docfarming`]
* Ethereal / Ethereal NG [`ethereal`]
* Farming Redo [`farming`] by TenPlus1
* Farming plus [`farming_plus`]
* Ferns [`ferns`]
* Fishing [`fishing`]
* [`fruit`]
* Glooptest [`glooptest`]
* JKMod ([`jkanimals`], [`jkfarming`], [`jkwine`])
* [`kpgmobs`]
* [`mobfcooking`]
* [`mooretrees`]
* [`mtfoods`]
* [`mushroom`]
* [`mush45`]
* Seaplants [`sea`]
* Simple mobs [`mobs`]
* Pizza [`pizza`]
* Not So Simple Mobs [`nssm`]
### Supported mods without optional dependency (mods provide their own support)
* Food ([`food`], [`food_basic`])
* Sweet Foods [`food_sweet`]
### Example
* Eating an apple (from Minetest Game) increases your satiation by 2;
## Licensing
This mod is free software.
### Source code
* License: [LGPL v2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)
* Author: by Wuzzy (2015-2016)
* Forked from the “Better HUD (and hunger)” mod by BlockMen (2013-2015),
most code comes from this mod.
### Textures
* `hbhunger_icon.png`—PilzAdam ([MIT License](https://opensource.org/licenses/MIT)), modified by BlockMen
* `hbhunger_bgicon.png`—PilzAdam (MIT License), modified by BlockMen
* `hbhunger_bar.png`—Wuzzy (MIT License)
* `hbhunger_icon_health_poison.png`—celeron55 ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen, modified again by Wuzzy
* Everything else: MIT License, by BlockMen and Wuzzy

View File

@ -1,30 +0,0 @@
hudbars
default
flowers?
animalmaterials?
bucket?
bushes?
bushes_classic?
cooking?
creatures?
docfarming?
dwarves?
ethereal?
farming?
farming_plus?
ferns?
fishing?
fruit?
glooptest?
jkanimals?
jkfarming?
jkwine?
kpgmobs?
mobfcooking?
mobs?moretrees?
mtfoods?
mush45?
mushroom?
seaplants?
pizza?
nssm?

View File

@ -1,218 +0,0 @@
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("hbhunger") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
local N = function(s) return s end
if minetest.settings:get_bool("enable_damage") then
hbhunger = {}
hbhunger.food = {}
-- HUD statbar values
hbhunger.hunger = {}
hbhunger.hunger_out = {}
-- Count number of poisonings a player has at once
hbhunger.poisonings = {}
-- HUD item ids
local hunger_hud = {}
hbhunger.HUD_TICK = 0.1
--Some hunger settings
hbhunger.exhaustion = {} -- Exhaustion is experimental!
hbhunger.HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken
hbhunger.EXHAUST_DIG = 3 -- exhaustion increased this value after digged node
hbhunger.EXHAUST_PLACE = 1 -- exhaustion increased this value after placed
hbhunger.EXHAUST_MOVE = 0.3 -- exhaustion increased this value if player movement detected
hbhunger.EXHAUST_LVL = 160 -- at what exhaustion player satiation gets lowerd
hbhunger.SAT_MAX = 30 -- maximum satiation points
hbhunger.SAT_INIT = 20 -- initial satiation points
hbhunger.SAT_HEAL = 15 -- required satiation points to start healing
--load custom settings
local set = io.open(minetest.get_modpath("hbhunger").."/hbhunger.conf", "r")
if set then
dofile(minetest.get_modpath("hbhunger").."/hbhunger.conf")
set:close()
end
local function custom_hud(player)
hb.init_hudbar(player, "satiation", hbhunger.get_hunger_raw(player))
end
dofile(minetest.get_modpath("hbhunger").."/hunger.lua")
dofile(minetest.get_modpath("hbhunger").."/register_foods.lua")
-- register satiation hudbar
local sicon = "hbhunger_icon.png"
if hb.settings.bar_type == "progress_bar" then
sicon = nil
end
hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { icon = sicon, bgicon = nil, bar = "hbhunger_bar.png" }, hbhunger.SAT_INIT, hbhunger.SAT_MAX, false, nil, { format_value = "%.1f", format_max_value = "%2d" })
-- update hud elemtens if value has changed
local function update_hud(player)
local name = player:get_player_name()
--hunger
local h_out = tonumber(hbhunger.hunger_out[name])
local h = tonumber(hbhunger.hunger[name])
if h_out ~= h then
hbhunger.hunger_out[name] = h
hb.change_hudbar(player, "satiation", h)
end
end
hbhunger.get_hunger_raw = function(player)
local inv = player:get_inventory()
if not inv then return nil end
local hgp = inv:get_stack("hunger", 1):get_count()
if hgp == 0 then
hgp = 21
inv:set_stack("hunger", 1, ItemStack({name=":", count=hgp}))
else
hgp = hgp
end
return hgp-1
end
hbhunger.set_hunger_raw = function(player)
local inv = player:get_inventory()
local name = player:get_player_name()
local value = hbhunger.hunger[name]
if not inv or not value then return nil end
if value > hbhunger.SAT_MAX then value = hbhunger.SAT_MAX end
if value < 0 then value = 0 end
inv:set_stack("hunger", 1, ItemStack({name=":", count=value+1}))
return true
end
minetest.register_on_joinplayer(function(player)
if minetest.is_player(player) then
local name = player:get_player_name()
local inv = player:get_inventory()
inv:set_size("hunger",1)
hbhunger.hunger[name] = hbhunger.get_hunger_raw(player)
hbhunger.hunger_out[name] = hbhunger.hunger[name]
hbhunger.exhaustion[name] = 0
hbhunger.poisonings[name] = 0
custom_hud(player)
hbhunger.set_hunger_raw(player)
end
end)
minetest.register_on_respawnplayer(function(player)
local name = player:get_player_name()
if minetest.is_player(player) and name then
hbhunger.hunger[name] = hbhunger.SAT_INIT
hbhunger.set_hunger_raw(player)
hbhunger.exhaustion[name] = 0
end
end)
local main_timer = 0
local timer = 0
local timer2 = 0
minetest.register_globalstep(function(dtime)
main_timer = main_timer + dtime
timer = timer + dtime
timer2 = timer2 + dtime
if main_timer > hbhunger.HUD_TICK or timer > 4 or timer2 > hbhunger.HUNGER_TICK then
if main_timer > hbhunger.HUD_TICK then main_timer = 0 end
for _,player in ipairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local h = tonumber(hbhunger.hunger[name])
local hp = player:get_hp()
if timer > 4 then
-- heal player by 1 hp if not dead and satiation is > hbhunger.SAT_HEAL
if h > hbhunger.SAT_HEAL and hp > 0 and player:get_breath() > 0 then
player:set_hp(hp+1)
-- or damage player by 1 hp if satiation is < 2
elseif h <= 1 then
if hp-1 >= 0 then player:set_hp(hp-1) end
end
end
-- lower satiation by 1 point after xx seconds
if timer2 > hbhunger.HUNGER_TICK then
if h > 0 then
h = h-1
hbhunger.hunger[name] = h
hbhunger.set_hunger_raw(player)
end
end
-- update all hud elements
update_hud(player)
local controls = player:get_player_control()
-- Determine if the player is walking
if controls.up or controls.down or controls.left or controls.right then
hbhunger.handle_node_actions(nil, nil, player)
end
end
end
if timer > 4 then timer = 0 end
if timer2 > hbhunger.HUNGER_TICK then timer2 = 0 end
end)
minetest.register_chatcommand("satiation", {
privs = {["server"]=true},
params = S("[<player>] <satiation>"),
description = S("Set satiation of player or yourself"),
func = function(name, param)
if minetest.settings:get_bool("enable_damage") == false then
return false, S("Not possible, damage is disabled.")
end
local targetname, satiation = string.match(param, "(%S+) (%S+)")
if not targetname then
satiation = param
end
satiation = tonumber(satiation)
if not satiation then
return false, S("Invalid satiation!")
end
if not targetname then
targetname = name
end
local target = minetest.get_player_by_name(targetname)
if target == nil then
return false, S("Player @1 does not exist.", targetname)
end
if satiation > hbhunger.SAT_MAX then
satiation = hbhunger.SAT_MAX
elseif satiation < 0 then
satiation = 0
end
hbhunger.hunger[targetname] = satiation
hbhunger.set_hunger_raw(target)
return true
end,
})
end

View File

@ -1,7 +0,0 @@
# textdomain:hbhunger
Satiation=Sättigung
Set satiation of player or yourself=Sättigung von Spieler oder Ihnen selbst setzen
Not possible, damage is disabled.=Nicht möglich, Schaden ist deaktiviert.
Invalid satiation!=Ungültige Sättigung!
Player @1 does not exist.=Spieler @1 existiert nicht.
[<player>] <satiation>=[<Spieler>] <Sättigung>

View File

@ -1,2 +0,0 @@
# textdomain:hbhunger
Satiation=Saciado

View File

@ -1,2 +0,0 @@
# textdomain:hbhunger
Satiation=Sazietà

View File

@ -1,2 +0,0 @@
# textdomain:hbhunger
Satiation=Kekenyangan

View File

@ -1,2 +0,0 @@
# textdomain:hbhunger
Satiation=Saciedade

View File

@ -1,2 +0,0 @@
# textdomain:hbhunger
Satiation=голод

View File

@ -1,7 +0,0 @@
# textdomain:hbhunger
Satiation=
Set satiation of player or yourself=
Not possible, damage is disabled.=
Invalid satiation!=
Player @1 does not exist.=
[<player>] <satiation>=

View File

@ -1,4 +0,0 @@
name = hbhunger
description = Adds a simple hunger meachanic with satiation, food poisoning and different healing.
depends = hudbars
optional_depends = default, flowers, animalmaterials, bucket, bushes, bushes_classic, cooking, creatures, docfarming, dwarves, ethereal, farming, farming_plus, ferns, fishing, fruit, glooptest, jkanimals, jkfarming, jkwine, kpgmobs, mobfcooking, mobs, moretrees, mtfoods, mush45, mushroom, seaplants, pizza, nssm

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -1,6 +1,6 @@
# minetest HUD bars
HUD mod to display as bars and API for
HUD mod to display as bars and API for healt, armor, breath, hunger
## Information
--------------
@ -13,33 +13,125 @@ this mod will place them accordingly.
![](screenshot.png)
## TEchnical info
### Features
* This mod adds a mechanic for hunger, using "satiation" concept
* This mod adds information bar for armor status
* Eating an apple (from Minetest Game) increases your satiation by 2
> Warning: Eating food will not directly increase your health anymore, as long as the food
item is supported by this mod (see below).
> Warning: ! Some foods may be poisoned. If you eat a poisoned item, you may still get a satiation
boost, but for a brief period you lose health points because of food poisoning. However,
food poisoning can never kill you.
## Technical info
-----------------
This mod its a simplification of hudbars+hbarmor+hbhunger for performance
it provides extra checks for security an backguard compatibility
on all minetest engines. TExture media was optimized for low end devices.
This fusioned hudbars 2.3.4.0 and hbarmor 1.0.1 with hbhunger 1.1.2
with aditional patches rejected by upstream that improves performance.
#### About armor support
This mod adds a simple HUD bar which displays the current damage
of the player's armor (from the 3D Armor [`3d_armor`] mod) as a percentage (rounded).
100% armor means the armor is in perfect shape. 0% means the armor is almost destroyed
or non-existant. Note that to reach 100%, the player must wear at least 4 or 6 different
pieces of armor in perfect shape.
#### About hunger supoort
This mod adds a hunger buildin mechanic to the game. Players get a new attribute called “satiation”:
* A new player starts with 20 satiation points out of 30
* Actions like digging, placing and walking cause exhaustion, which lower the satiation
* Every 800 seconds you lose 1 satiation point without doing anything
* At 1 or 0 satiation you will suffer damage and die in case you don't eat something
* If your satiation is 16 or higher, you will slowly regenerate health points
* Eating food will increase your satiation (Duh!)
All mods which add food through standard measures (`minetest.item_eat`) are already
supported automatically. Poisoned food needs special support.
#### Dependencies
* default
* 3d_armor
* farming
More mod are optionally supported depending of availability
#### Known supported food mods
* Apple and Blueberries from Minetest Game [`default`]
* Red and brown mushroom from Minetest Game [`flowers`]
* Bread from Minetest Game [`farming`]
* [`animalmaterials`] (Mob Framework (`mobf` modpack))
* Bushes [`bushes`]
* [`bushes_classic`]
* Creatures [`creatures`]
* [`dwarves`] (beer and such)
* Docfarming [`docfarming`]
* Ethereal / Ethereal NG [`ethereal`]
* Farming Redo [`farming`] by TenPlus1
* Farming plus [`farming_plus`]
* Ferns [`ferns`]
* Fishing [`fishing`]
* [`fruit`]
* Glooptest [`glooptest`]
* JKMod ([`jkanimals`], [`jkfarming`], [`jkwine`])
* [`kpgmobs`]
* [`mobfcooking`]
* [`mooretrees`]
* [`mtfoods`]
* [`mushroom`]
* [`mush45`]
* Seaplants [`sea`]
* Simple mobs [`mobs`]
* Pizza [`pizza`]
* Not So Simple Mobs [`nssm`]
#### Statbar mode
If you use the statbar mode of the HUD Bars mod, these things are important to know:
As with all mods using HUD Bars, the bread statbar symbols represent the rough percentage
out of 30 satiation points, in steps of 5%, so the symbols give you an estimate of your
satiation. This is different from the hunger mod by BlockMen.
> **Warning** Keep in mind if running a server with this mod,
that the custom position should be displayed correctly on every screen size.
#### Dependencies
There's no depends
#### Current version
The current version is 2.3.4.0 its a plus fork from original cos current
The current version is 2.3.5 its a plus fork from original cos current
minetest most close mods developers are not so open to support already working servers.
It works for Minetest 0.4.17+ (maybe 0.4.16 too) or later.
It works for Minetest 0.4.16+/5.X+ or later.
#### Settings
#### Configurations
This mod can be configured quite a bit. You can change HUD bar appearance, offsets, ordering, and more.
Use the advanced settings menu in Minetest for detailed configuration.
| configuration name | Description | type | values, min/default/max |
| configuration name | Description | type | values, default/min/max |
| ---------------------------- | ------------------------------------- | ---- | ------------------------ |
| hudbars_bar_type | HUD bars style | enum | progress_bar progress_bar,statbar_classic,statbar_modern |
| hudbars_hp_player_maximun | set the maximun hp of the player healt | int | 10 20 60 |
| hudbars_br_player_maximun | set the maximun player breath value | int | 10 10 30 |
| hbarmor_autohide | Automatically hide armor HUD bar | bool | false |
| hbhunger_satiation_tick | Time in seconds which 1 saturation point is taken | float | 800 |
| hbhunger_satiation_sprint_dig | exhaustion increased this value after digged node | float | 3 |
| hbhunger_satiation_sprint_place | exhaustion increased this value after placed | float | 1 |
| hbhunger_satiation_sprint_move | exhaustion increased this value if player moves | float | 0.2 |
| hbhunger_satiation_sprint_lvl | at what exhaustion player satiation gets lowerd | float | 160 |
| hudbars_bar_type | HUD bars style | enum | progress_bar (progress_bar,statbar_classic,statbar_modern) |
| hudbars_autohide_breath | Automatically hide breath indicators | bool | true |
| hudbars_alignment_pattern | HUD bars alignment pattern | enum | zigzag zigzag,stack_up,stack_down |
| hudbars_alignment_pattern | HUD bars alignment pattern | enum | zigzag (zigzag,stack_up,stack_down) |
| hudbars_sorting | HUD bars order | string | breath=1, health=0 |
| hudbars_pos_left_x | Left HUD bar screen x position | float | 0.5 0.0 1.0 |
| hudbars_pos_left_y | Left HUD bar screen y position | float | 1.0 0.0 1.0 |
@ -54,7 +146,7 @@ Use the advanced settings menu in Minetest for detailed configuration.
| hudbars_start_statbar_offset_right_x | Right HUD statbar x offset | int | 25 |
| hudbars_start_statbar_offset_right_y | Right HUD statbar y offset | int | -90 |
| hudbars_vmargin | Vertical distance between HUD bars | int | 24 0 |
| hudbars_tick | Default HUD bars update interval | float | 0.1 0.0 4.0 |
| hudbars_tick | Default HUD bars update interval | float | 0.2 0.0 4.0 |
#### API
@ -65,9 +157,12 @@ Documentation for the API of this mod can be found in [`API.md`.](API.md)
#### License of source code
Author: Wuzzy (2015)
Authors:
Also: This mod was forked from the “Better HUD” [hud] mod by BlockMen.
* Wuzzy (2015)
* PICCORO Lenz McKAY (2023)
This mod was forked from the “Better HUD” (and hunger) [hud] mod by BlockMen.
Translations:
@ -87,12 +182,15 @@ and/or modify it under the terms of the MIT License.
#### Licenses of textures
* `hudbars_icon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_bgicon_health.png`—celeron55 (CC BY-SA 3.0), modified by BlockMen
* `hudbars_icon_breath.png`—kaeza (MIT License), modified by BlockMen, modified again by Wuzzy
* `hudbars_bgicon_breath.png`—based on previous image, edited by Wuzzy (MIT License)
* `hudbars_bar_health.png`—Wuzzy (MIT License)
* `hudbars_bar_breath.png`—Wuzzy (MIT License)
* `hudbars_bar_background.png`—Wuzzy (MIT License)
* `hbarmor_icon.png`—Stu ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen
* `hbarmor_bar.png`—Wuzzy (MIT License)
* `hbhunger_icon.png`—PilzAdam ([MIT License](https://opensource.org/licenses/MIT)), modified by BlockMen
* `hbhunger_bar.png`—Wuzzy (MIT License)
* `hbhunger_icon_health_poison.png`—celeron55 ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen, modified again by Wuzzy
#### License references

View File

@ -32,7 +32,7 @@ hb.settings.forceload_default_hudbars = hb.load_setting("hudbars_forceload_defau
-- Misc. settings
hb.settings.alignment_pattern = hb.load_setting("hudbars_alignment_pattern", "string", "zigzag", {"zigzag", "stack_up", "stack_down"})
hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", false)
hb.settings.autohide_breath = hb.load_setting("hudbars_autohide_breath", "bool", (true and not hb.settings.forceload_default_hudbars))
local sorting = minetest.settings:get("hudbars_sorting")
if sorting ~= nil then
@ -55,3 +55,25 @@ core.PLAYER_MAX_HP_DEFAULT = hb.settings.hp_player_maximun
else
core.PLAYER_MAX_HP = hb.settings.hp_player_maximun
end
hbarmor.autohide = (true and not hb.settings.forceload_default_hudbars)
hbhunger.HUD_TICK = 0.2
hbhunger.HUNGER_TICK = 800 -- time in seconds after that 1 hunger point is taken
hbhunger.EXHAUST_DIG = 3 -- exhaustion increased this value after digged node
hbhunger.EXHAUST_PLACE = 1 -- exhaustion increased this value after placed
hbhunger.EXHAUST_MOVE = 0.2 -- exhaustion increased this value if player movement detected
hbhunger.EXHAUST_LVL = 160 -- at what exhaustion player satiation gets lowerd
hbhunger.SAT_MAX = 30 -- maximum satiation points
hbhunger.SAT_INIT = 20 -- initial satiation points
hbhunger.SAT_HEAL = 15 -- required satiation points to start healing
local set
set = minetest.settings:get_bool("hbarmor_autohide") if set ~= nil then hbarmor.autohide = set end
set = minetest.settings:get("hbhunger_satiation_tick") if set ~= nil then hbhunger.HUNGER_TICK = tonumber(set) end
set = minetest.settings:get("hbhunger_satiation_dig") if set ~= nil then hbhunger.HUNGER_DIG = tonumber(set) end
set = minetest.settings:get("hbhunger_satiation_place") if set ~= nil then hbhunger.HUNGER_PLACE = tonumber(set) end
set = minetest.settings:get("hbhunger_satiation_move") if set ~= nil then hbhunger.HUNGER_MOVE = tonumber(set) end
set = minetest.settings:get("hbhunger_satiation_lvl") if set ~= nil then hbhunger.HUNGER_LVL = tonumber(set) end

View File

@ -1 +1,31 @@
intllib?
default?
intllib?
3d_armor?
flowers?
animalmaterials?
bucket?
bushes?
bushes_classic?
cooking?
creatures?
docfarming?
dwarves?
ethereal?
farming?
farming_plus?
ferns?
fishing?
fruit?
glooptest?
jkanimals?
jkfarming?
jkwine?
kpgmobs?
mobfcooking?
mobs?moretrees?
mtfoods?
mush45?
mushroom?
seaplants?
pizza?
nssm?

View File

@ -1 +1 @@
HUD mod to display as bars and API for
HUD mod to display as bars and API for satiaton/stamina and armor status features

View File

@ -106,13 +106,13 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound
hbhunger.set_hunger_raw(user)
end
-- we must respect the real maximun hp of the player already set
max_hp = user:get_properties().hp_max
local max_hp = user:get_properties().hp_max
-- Healing
if hp < max_hp then
-- heal is not defines due way of hbhunger.register_food
if not heal then heal = 1 end
-- eating something not give you inmediate life, give you statiation to get recovery
if hp < 3 and heal > 0 then hp = hp + heal end
if hp < 6 and heal > 0 then hp = hp + heal end
-- so do not hardcoded hp to 20 when eating
if hp > max_hp then hp = max_hp end
-- this will work only when valid then

View File

@ -24,7 +24,13 @@ end
local N = function(s) return s end
if (not armor) or (not armor.def) then
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
end
hb = {}
hb.version = "2.3.5.0"
hb.redo = true
hb.hudtables = {}
@ -34,8 +40,34 @@ hb.hudbars_count = 0
-- table which records which HUD bar slots have been “registered” so far; used for automatic positioning
hb.registered_slots = {}
-- Table which contains all players with active default HUD bars (only for internal use)
hb.players = {}
hbarmor = {}
hbhunger = {}
-- HUD item ids
local hunger_hud = {}
-- Stores if player's HUD bar has been initialized so far.
hbarmor.player_active = {}
-- HUD statbar values
hbarmor.armor = {}
hbhunger.food = {}
hbhunger.hunger = {}
hbhunger.hunger_out = {}
hbhunger.poisonings = {}
hbhunger.exhaustion = {} -- Exhaustion is experimental!
-- If true, the armor bar is hidden when the player does not wear any armor
hbarmor.autohide = true
hb.settings = {}
hb.hba = minetest.get_modpath("hbarmor")
hb.hbh = minetest.get_modpath("hbhunger")
function hb.load_setting(sname, stype, defaultval, valid_values)
local sval
if stype == "string" then
@ -70,13 +102,56 @@ end
-- Load default settings
dofile(minetest.get_modpath("hudbars").."/default_settings.lua")
if not hb.hbh then
-- due lackof global hbhunger these need to be first
hbhunger.get_hunger_raw = function(player)
local inv = player:get_inventory()
if not inv then return nil end
local hgp = inv:get_stack("hunger", 1):get_count()
if hgp == 0 then
hgp = 21
inv:set_stack("hunger", 1, ItemStack({name=":", count=hgp}))
else
hgp = hgp
end
return hgp-1
end
hbhunger.set_hunger_raw = function(player)
local inv = player:get_inventory()
local name = player:get_player_name()
local value = hbhunger.hunger[name]
if not inv or not value then return nil end
if value > hbhunger.SAT_MAX then value = hbhunger.SAT_MAX end
if value < 0 then value = 0 end
inv:set_stack("hunger", 1, ItemStack({name=":", count=value+1}))
return true
end
-- Load hunger management function for food and mod handling
dofile(minetest.get_modpath("hudbars").."/hunger.lua")
dofile(minetest.get_modpath("hudbars").."/register_foods.lua")
end
local function player_exists(player)
return player ~= nil and player:is_player()
return player ~= nil and (type(player) == "userdata")
end
local must_hide = function(playername, arm)
return ((not armor.def[playername].count or armor.def[playername].count == 0 or not hb.settings.forceload_default_hudbars) and arm == 0)
end
local arm_printable = function(arm)
return math.ceil(math.floor(arm+0.5))
end
local function checksupportmax(player)
local statusinfo = minetest.get_server_status()
if string.find(statusinfo,"0.4.1") and not string.find(statusinfo,"0.4.18") and not string.find(statusinfo,"0.4.17.5") then
if string.find(statusinfo,"0.4.1") and not string.find(statusinfo,"0.4.18") and not string.find(statusinfo,"0.4.17.3") then
hb.settings.hp_player_maximun = 20
hb.settings.br_player_maximun = 10
if player_exists(player) then
@ -116,9 +191,6 @@ local function make_label(format_string, format_string_config, label, start_valu
return ret
end
-- Table which contains all players with active default HUD bars (only for internal use)
hb.players = {}
function hb.value_to_barlength(value, max)
if max == 0 then
return 0
@ -456,6 +528,8 @@ function hb.hide_hudbar(player, identifier)
local name = player:get_player_name()
local hudtable = hb.get_hudtable(identifier)
if hudtable == nil then return false end
if not hudtable.hudstate[name] then return false end
if not hudtable.hudstate[name].hidden then return false end
if hudtable.hudstate[name].hidden == true then return true end
if hb.settings.bar_type == "progress_bar" then
if hudtable.hudids[name].icon ~= nil then
@ -475,7 +549,8 @@ function hb.unhide_hudbar(player, identifier)
local name = player:get_player_name()
local hudtable = hb.get_hudtable(identifier)
if hudtable == nil then return false end
if hudtable.hudstate[name].hidden == false then return true end
if not hudtable.hudstate[name] then return false end
if not hudtable.hudstate[name].hidden then return false end
local value = hudtable.hudstate[name].value
local max = hudtable.hudstate[name].max
if hb.settings.bar_type == "progress_bar" then
@ -518,16 +593,26 @@ function hb.get_hudbar_identifiers()
return ids
end
--register built-in HUD bars
--register built-in HUD bars and armor HUD bar
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
local hicon = "hudbars_icon_health.png"
local bicon = "hudbars_icon_breath.png"
local aicon = "hbarmor_icon.png"
local sicon = "hbhunger_icon.png"
if hb.settings.bar_type == "progress_bar" then
hicon = nil
bicon = nil
aicon = nil
sicon = nil
end
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = hicon, bgicon = nil }, hb.settings.hp_player_maximun, hb.settings.hp_player_maximun, false)
hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = bicon, bgicon = nil }, hb.settings.br_player_maximun, hb.settings.br_player_maximun, false)
if not hb.hba then
hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { bar = "hbarmor_bar.png", icon = aicon, bgicon = nil }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" } } )
end
if not hb.hbh then
hb.register_hudbar("satiation", 0xFFFFFF, S("Satiation"), { bar = "hbhunger_bar.png", icon = sicon, bgicon = nil }, hbhunger.SAT_INIT, hbhunger.SAT_MAX, false, nil, { format_value = "%02d", format_max_value = "%02d" })
end
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = hicon, bgicon = nil }, hb.settings.hp_player_maximun, hb.settings.hp_player_maximun, false)
hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = bicon, bgicon = nil }, hb.settings.br_player_maximun, hb.settings.br_player_maximun, true)
end
local function hide_builtin(player)
@ -537,27 +622,66 @@ local function hide_builtin(player)
player:hud_set_flags(flags)
end
if not hb.hba then
function hbarmor.get_armor(player)
if not player or not armor.def then
return false
end
local name = player:get_player_name()
local def = armor.def[name] or nil
if def and def.state and def.count then
hbarmor.set_armor(name, def.state, def.count)
else
minetest.log("error", "[hudbars] Call to hbarmor.get_armor returned with false!")
return false
end
return true
end
function hbarmor.set_armor(player_name, ges_state, items)
local max_items = 4
if items == 5 then max_items = items end
local max = max_items * 65535
local lvl = max - ges_state
lvl = lvl/max
if ges_state == 0 and items == 0 then lvl = 0 end
hbarmor.armor[player_name] = math.max(0, math.min(lvl* (items * (100 / max_items)), 100))
end
end
local function custom_hud(player)
local name = player:get_player_name()
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
local hide
if minetest.settings:get_bool("enable_damage") then
hide = false
else
hide = true
end
local hp = player:get_hp()
local hp_max = hb.settings.hp_player_maximun
hb.init_hudbar(player, "health", math.min(hp, hp_max), hp_max, hide)
local hide_hp = not minetest.settings:get_bool("enable_damage") or true
if player:get_properties().hp_max then player:set_properties({hp_max = hb.settings.hp_player_maximun}) end
hb.init_hudbar(player, "health", math.min(hp, hp_max), hp_max, hide_hp)
local breath = player:get_breath()
local breath_max = hb.settings.br_player_maximun
local hide_breath
-- real honoring to configuration of max hp custom heal and breath
if player:get_properties().hp_max then player:set_properties({hp_max = hb.settings.hp_player_maximun}) end
if player:get_properties().breath_max then player:set_properties({breath_max = hb.settings.br_player_maximun}) end
-- workaround bug https://github.com/minetest/minetest/issues/12350
if breath >= breath_max and hb.settings.autohide_breath == true then hide_breath = true else hide_breath = false end
hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath or hide)
hb.init_hudbar(player, "breath", math.min(breath, breath_max), breath_max, hide_breath)
if not hb.hba then
local arm = tonumber(hbarmor.armor[name])
if not arm then arm = 0 end
local hide_ar = hbarmor.autohide and must_hide(name, arm)
hbarmor.get_armor(player)
arm = tonumber(hbarmor.armor[name])
hb.init_hudbar(player, "armor", arm_printable(arm), 100, hide_ar)
end
if not hb.hbh then
hb.init_hudbar(player, "satiation", hbhunger.get_hunger_raw(player), nil, (not hb.settings.forceload_default_hudbars) )
end
end
end
@ -569,16 +693,18 @@ end
-- update built-in HUD bars
local function update_hud(player)
if not player_exists(player) then return end
local name = player:get_player_name() -- player checks are already made before call this function
if not name then return end
-- loading only if need or force loading
if minetest.settings:get_bool("enable_damage") then
if hb.settings.forceload_default_hudbars then
hb.unhide_hudbar(player, "health")
end
--air
local breath_max = player:get_properties().breath_max or hb.settings.br_player_maximun
-- workaround bug https://github.com/minetest/minetest/issues/12350
local breath = player:get_breath()
if breath >= breath_max and hb.settings.autohide_breath == true then
hb.hide_hudbar(player, "breath")
else
@ -587,10 +713,38 @@ local function update_hud(player)
end
--health
update_health(player)
-- armor
if not hb.hba then
local larmor = hbarmor.armor[name]
local arm = tonumber(larmor)
if not arm then arm = 0; hbarmor.armor[name] = 0 end
if hbarmor.autohide then
if must_hide(name, arm) then
hb.hide_hudbar(player, "armor")
else
hb.change_hudbar(player, "armor", arm_printable(arm))
hb.unhide_hudbar(player, "armor")
end
else
hb.change_hudbar(player, "armor", arm_printable(arm))
hb.unhide_hudbar(player, "armor")
end
end
-- hunger
if not hb.hbh then
local h_out = tonumber(hbhunger.hunger_out[name])
local h = tonumber(hbhunger.hunger[name])
if h_out ~= h then
hbhunger.hunger_out[name] = h
hb.change_hudbar(player, "satiation", h)
end
end
elseif hb.settings.forceload_default_hudbars then
update_health(player)
hb.hide_hudbar(player, "health")
hb.hide_hudbar(player, "breath")
hb.hide_hudbar(player, "armor")
hb.hide_hudbar(player, "satiation")
end
end
@ -601,34 +755,122 @@ minetest.register_on_player_hpchange(function(player)
end)
minetest.register_on_respawnplayer(function(player)
if not player_exists(player) then return end
local name = player:get_player_name()
update_health(player)
if not hb.hbh then
hbhunger.hunger[name] = hbhunger.SAT_INIT
hbhunger.set_hunger_raw(player)
hbhunger.exhaustion[name] = 0
end
hb.hide_hudbar(player, "breath")
end)
minetest.register_on_joinplayer(function(player)
if not player_exists(player) then return end
local name = player:get_player_name()
local inv = player:get_inventory()
if not hb.hbh then
inv:set_size("hunger",1)
hbhunger.hunger[name] = hbhunger.get_hunger_raw(player)
hbhunger.hunger_out[name] = hbhunger.hunger[name]
hbhunger.exhaustion[name] = 0
hbhunger.poisonings[name] = 0
end
hide_builtin(player)
custom_hud(player)
hb.players[player:get_player_name()] = player
hb.players[name] = player
if not hb.hba then
hbarmor.player_active[name] = true
end
if not hb.hbh then
hbhunger.set_hunger_raw(player)
end
end)
minetest.register_on_leaveplayer(function(player)
hb.players[player:get_player_name()] = nil
if not player_exists(player) then return end
local name = player:get_player_name()
hb.players[name] = nil
if not hb.hba then
hbarmor.player_active[name] = false
end
end)
local modresult = ""
if hb.hba then modresult = modresult .. " without build-in hbarmor" end
if hb.hbh then modresult = modresult .. " without build-in hbhunger" end
minetest.log("[MOD] hudbars"..modresult.." loaded" )
local main_timer = 0
local timer = 0
local timer2 = 0
minetest.register_globalstep(function(dtime)
main_timer = main_timer + dtime
timer = timer + dtime
timer2 = timer2 + dtime
-- main timer are for healt and breath, separate satiation cos needs aditional timers
if main_timer > hb.settings.tick or timer > 4 then
if main_timer > hb.settings.tick then main_timer = 0 end
-- only proceed if damage is enabled
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
-- update hud for healt
for _, player in pairs(hb.players) do
-- update all hud elements
update_hud(player)
end
if not hb.hba then
-- update all hud elements
for _,player in ipairs(minetest.get_connected_players()) do
if player_exists(player) then
local name = player:get_player_name()
if hbarmor.player_active[name] == true then
hbarmor.get_armor(player)
update_hud(player)
end
end
end
end
end
end
if not hb.hbh then
-- satiaton are internal properties, so update live (not hb) player properties
if timer > 4 or timer2 > hbhunger.HUNGER_TICK then
for _,player in ipairs(minetest.get_connected_players()) do
if player_exists(player) then
local name = player:get_player_name()
local h = tonumber(hbhunger.hunger[name])
local hp = player:get_hp()
if timer > 4 then
if h > hbhunger.SAT_HEAL and hp > 0 and player:get_breath() > 0 then
player:set_hp(hp+1) -- heal player by 1 hp if not dead and satiation is > hbhunger.SAT_HEAL
elseif h <= 1 then
if hp-1 >= 0 then player:set_hp(hp-1) end -- or damage player by 1 hp if satiation is < 2
end
end
if timer2 > hbhunger.HUNGER_TICK then
if h > 0 then
h = h-1 -- lower satiation by 1 point after xx seconds
hbhunger.hunger[name] = h
hbhunger.set_hunger_raw(player)
end
end
-- still do not update all hud elements cos we have 2 loops
local controls = player:get_player_control()
if controls.up or controls.down or controls.left or controls.right then
hbhunger.handle_node_actions(nil, nil, player) -- Determine if the player is walking
end
end
end
end
end
if timer > 4 then timer = 0 end
if timer2 > hbhunger.HUNGER_TICK then timer2 = 0 end
end)

View File

@ -2,3 +2,11 @@
Health=Leben
Breath=Atem
@1: @2/@3=@1: @2/@3
Armor=Panzerung
@1: @2%=@1: @2%
Satiation=Sättigung
Set satiation of player or yourself=Sättigung von Spieler oder Ihnen selbst setzen
Not possible, damage is disabled.=Nicht möglich, Schaden ist deaktiviert.
Invalid satiation!=Ungültige Sättigung!
Player @1 does not exist.=Spieler @1 existiert nicht.
[<player>] <satiation>=[<Spieler>] <Sättigung>

View File

@ -2,3 +2,10 @@
Health=Salud
Breath=Aliento
@1: @2/@3=@1: @2/@3
Armor=Armado
@1: @2%=@1:@2%
Satiation=Saciado
Set satiation of player or yourself=Establece la saciedad en el jugador o en si mismo
Not possible, damage is disabled.=No es posible, daño esta desactivado.
Invalid satiation!=Satisfaccion invalida!
Player @1 does not exist.=El jugador @1 no existe.

View File

@ -1,6 +1,7 @@
# textdomain: hudbars
Health=Salute
Breath=Ossigeno
# Default format string for progress bar-style HUD bars, e.g. “Health 5/20”
@1: @2/@3=@1: @2/@3
Armor=Armatura
@1: @2%=@1:@2%
Satiation=Sazietà

View File

@ -2,3 +2,4 @@
Health=Kesihatan
Breath=Nafas
@1: @2/@3=@1: @2/@3
Satiation=Kekenyangan

View File

@ -1,6 +1,7 @@
# textdomain: hudbars
Health=Saude
Breath=Folego
# Formato de string padrão para progresso bar-style de barras do HUD, por exemplo “Saude 5/20”
@1: @2/@3=@1: @2/@3
Armor=Armado
@1: @2%=@1: @2%
Satiation=Saciedade

View File

@ -1,4 +1,7 @@
# textdomain: hudbars
Health=HP
Health=Здоровье
Breath=дыхание
@1: @2/@3=@1: @2/@3
Armor=Доспехи
@1: @2%=@1: @2%
Satiation=голод

View File

@ -1,6 +1,10 @@
# textdomain: hudbars
Health=
Breath=
Armor=
# Default format string for progress bar-style HUD bars, e.g. “Health 5/20”
# Default format string for progress bar-style HUD bars, e.g. “Health 05/20”
@1: @2/@3=
# Format string for displaying the armor. E.g. "Armor: 100%"
@1: @2%=

View File

@ -1,2 +1,3 @@
name = hudbars
description = HUD mod to display as bars and API for
description = HUD mod to display as bars and API for with satiaton/stamina features and armor status
optional_depends = 3d_armor, default, flowers, animalmaterials, bucket, bushes, bushes_classic, cooking, creatures, docfarming, dwarves, ethereal, farming, farming_plus, ferns, fishing, fruit, glooptest, jkanimals, jkfarming, jkwine, kpgmobs, mobfcooking, mobs, moretrees, mtfoods, mush45, mushroom, seaplants, pizza, nssm

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -124,4 +124,17 @@ hudbars_hp_player_maximun (maximun value of heal of player) int 40
# set a default value for max breath of player, if you customized and need on older engines
hudbars_br_player_maximun (maximun value of braeth of player) int 20
#If true, automatically hides the armor HUD bar when the player wears no
#armor. Otherwise, the armor bar shows “0%”.
hbarmor_autohide (Automatically hide armor HUD bar) bool false
hbhunger_satiation_tick (Time in seconds after which 1 saturation point is taken) float 800
hbhunger_satiation_sprint_dig (exhaustion increased this value after digged node) float 3
hbhunger_satiation_sprint_place (exhaustion increased this value after placed) float 1
hbhunger_satiation_sprint_move (exhaustion increased this value if player movement detected) float 0.3
hbhunger_satiation_sprint_lvl (at what exhaustion player satiation gets lowerd) float 160

Some files were not shown because too many files have changed in this diff Show More