Regnum 3.3.0 upload

Game-5.4.x
Der1248 2019-02-24 19:34:08 +01:00
parent 7ac65bd4f6
commit 19cb4c57bc
368 changed files with 6329 additions and 3621 deletions

View File

@ -17,4 +17,7 @@ And this in only one Game.
License: License:
See README.txt in each mod for more information See README.txt in each mod for more information
Every code written by me is LGPLv2.1 Every code written by me is LGPLv2.1
Notes:
sfinv mod changed

Binary file not shown.

View File

@ -6,3 +6,6 @@ tags
*.vim *.vim
armor.conf armor.conf
## Eclipse project files & directories
.project
.settings

View File

@ -0,0 +1,9 @@
[mod] 3d Armor [3d_armor]
=========================
License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1
License Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0
https://github.com/daviddoesminetest/3d-armors-new-textures

View File

@ -3,7 +3,9 @@
Depends: default Depends: default
Recommends: inventory_plus or unified_inventory (use only one) Recommends: sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts)
Supports: player_monoids and armor_monoid
Adds craftable armor that is visible to other players. Each armor item worn contributes to Adds craftable armor that is visible to other players. Each armor item worn contributes to
a player's armor group level making them less vulnerable to weapons. a player's armor group level making them less vulnerable to weapons.
@ -14,11 +16,176 @@ Overall level is boosted by 10% when wearing a full matching set.
Fire protection added by TenPlus1 when using crystal armor if Ethereal mod active, level 1 Fire protection added by TenPlus1 when using crystal armor if Ethereal mod active, level 1
protects against torches, level 2 for crystal spike, level 3 for fire, level 5 for lava. protects against torches, level 2 for crystal spike, level 3 for fire, level 5 for lava.
Configuration Armor Configuration
------------- -------------------
Armor can be configured by adding a file called armor.conf in 3d_armor mod and/or world directory. Override the following default settings by adding them to your minetest.conf file.
see armor.conf.example for all available options.
Note: worldpath config settings override any settings made in the mod's directory. -- Set false to disable individual armor materials.
armor_material_wood = true
armor_material_cactus = true
armor_material_steel = true
armor_material_bronze = true
armor_material_diamond = true
armor_material_gold = true
armor_material_mithril = true
armor_material_crystal = true
-- Increase this if you get initialization glitches when a player first joins.
armor_init_delay = 1
-- Number of initialization attempts.
-- Use in conjunction with armor_init_delay if initialization problems persist.
armor_init_times = 1
-- Increase this if armor is not getting into bones due to server lag.
armor_bones_delay = 1
-- How often player armor items are updated.
armor_update_time = 1
-- Drop armor when a player dies.
-- Uses bones mod if present, otherwise items are dropped around the player.
armor_drop = true
-- Pulverise armor when a player dies, overrides armor_drop.
armor_destroy = 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 = 1
-- You can use this to increase or decrease overall armor healing,
-- eg: armor_heal_multiplier = 0 will disable healing altogether.
armor_heal_multiplier = 1
-- Enable water protection (periodically restores breath when activated)
armor_water_protect = true
-- Enable fire protection (defaults true if using ethereal mod)
armor_fire_protect = false
-- Enable punch damage effects.
armor_punch_damage = true
-- Enable migration of old armor inventories
armor_migrate_old_inventory = true
API
---
Armor Registration:
armor:register_armor(name, def)
Wrapper function for `minetest.register_tool`, while registering armor as
a tool item is still supported, this may be deprecated in future so new code
should use this method.
Additional fields supported by 3d_armor:
texture = <filename>
preview = <filename>
armor_groups = <table>
damage_groups = <table>
reciprocate_damage = <bool>
on_equip = <function>
on_unequip = <function>
on_destroy = <function>
on_damage = <function>
on_punched = <function>
armor:register_armor_group(group, base)
Example:
armor:register_armor_group("radiation", 100)
armor:register_armor("mod_name:speed_boots", {
description = "Speed Boots",
inventory_image = "mod_name_speed_boots_inv.png",
texture = "mod_name_speed_boots.png",
preview = "mod_name_speed_boots_preview.png",
groups = {armor_feet=1, armor_use=500, physics_speed=1.2, flammable=1},
armor_groups = {fleshy=10, radiation=10},
damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1},
reciprocate_damage = true,
on_destroy = function(player, index, stack)
local pos = player:getpos()
if pos then
minetest.sound_play({
name = "mod_name_break_sound",
pos = pos,
gain = 0.5,
})
end
end,
})
See armor.lua, technic_armor and shields mods for more examples.
Default groups:
Elements: armor_head, armor_torso, armor_legs, armor_feet
Attributes: armor_heal, armor_fire, armor_water
Physics: physics_jump, physics_speed, physics_gravity
Durability: armor_use, flammable
Notes:
Elements may be modified by dependent mods, eg shields adds armor_shield.
Attributes and physics values are 'stackable', durability is determined
by the level of armor_use, total uses == approx (65535/armor_use), non-fleshy
damage groups need to be defined in the tool/weapon used against the player.
Reciprocal tool damage will be done only by the first armor inventory item
with `reciprocate_damage = true`
Armor Functions:
armor:set_player_armor(player)
Primarily an internal function but can be called externally to apply any
changes that might not otherwise get handled.
armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
Used to apply damage to all equipped armor based on the damage groups of
each individual item.`hitter`, `time_from_last_punch` and `tool_capabilities`
are optional but should be valid if included.
armor:damage(player, index, stack, use)
Adds wear to a single armor itemstack, triggers `on_damage` callbacks and
updates the necessary inventories. Also handles item destruction callbacks
and so should NOT be called from `on_unequip` to avoid an infinite loop.
Item Callbacks:
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_punched = func(player, hitter, time_from_last_punch, tool_capabilities)
Notes:
`on_punched` is called every time a player is punched or takes damage, `hitter`,
`time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the
case of fall damage, etc. When fire protection is enabled, hitter == "fire"
in the event of fire damage. Return `false` to override armor damage effects.
When armor is destroyed `stack` will contain a copy of the previous stack.
Global Callbacks:
armor:register_on_update(func(player))
armor:register_on_equip(func(player, index, stack))
armor:register_on_unequip(func(player, index, stack))
armor:register_on_destroy(func(player, index, stack))
Global Callback Example:
armor:register_on_update(function(player)
print(player:get_player_name().." armor updated!")
end)

View File

@ -1,243 +0,0 @@
minetest.register_alias("adminboots","3d_armor:boots_admin")
minetest.register_alias("adminhelmet","3d_armor:helmet_admin")
minetest.register_alias("adminchestplate","3d_armor:chestplate_admin")
minetest.register_alias("adminlegginss","3d_armor:leggings_admin")
minetest.register_tool("3d_armor:helmet_admin", {
description = "Admin Helmet Mode 1 (no speed and no jump)",
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode1.png",
wield_image = "3d_armor_inv_helmet_admin.png",
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:helmet_admin2")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:helmet_admin2", {
description = "Admin Helmet Mode 2 (speed and no jump)",
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode2.png",
wield_image = "3d_armor_inv_helmet_admin.png",
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:helmet_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:helmet_admin3", {
description = "Admin Helmet Mode 3 (no speed and jump)",
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode3.png",
wield_image = "3d_armor_inv_helmet_admin.png",
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:helmet_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:helmet_admin4", {
description = "Admin Helmet Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_helmet_admin.png",
groups = {armor_head=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:helmet_admin")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin", {
description = "Admin Chestplate Mode 1 (no speed and no jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode1.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin2")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin2", {
description = "Admin Chestplate Mode 2 (speed and no jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode2.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin3", {
description = "Admin Chestplate Mode 3 (no speed and jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode3.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin4", {
description = "Admin Chestplate Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=10000, armor_heal=5000, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:leggings_admin", {
description = "Admin Leggings Mode 1 (no speed and no jump)",
wield_image = "3d_armor_inv_leggings_admin.png",
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode1.png",
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin2")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:leggings_admin2", {
description = "Admin Leggings Mode 2 (speed and no jump)",
wield_image = "3d_armor_inv_leggings_admin.png",
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode2.png",
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:leggings_admin3", {
description = "Admin Leggings Mode 3 (no speed and jump)",
wield_image = "3d_armor_inv_leggings_admin.png",
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode3.png",
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:leggings_admin4", {
description = "Admin Leggings Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_leggings_admin.png",
groups = {armor_legs=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin", {
description = "Admin Boots Mode 1 (no speed and no jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode1.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin2")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin2", {
description = "Admin Boots Mode 2 (speed and no jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode2.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin3", {
description = "Admin Boots Mode 3 (no speed and jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode3.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin4", {
description = "Admin Boots Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=5000, armor_heal=2500, armor_use=0, not_in_creative_inventory=1, armor_fire=2000, physics_jump=0.25, physics_speed=0.25},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin")
end
return itemstack
end,
})

View File

@ -0,0 +1,604 @@
-- support for i18n
local S = armor_i18n.gettext
local skin_previews = {}
local use_player_monoids = minetest.global_exists("player_monoids")
local use_armor_monoid = minetest.global_exists("armor_monoid")
local use_pova_mod = minetest.get_modpath("pova")
local armor_def = setmetatable({}, {
__index = function()
return setmetatable({
groups = setmetatable({}, {
__index = function()
return 0
end})
}, {
__index = function()
return 0
end
})
end,
})
local armor_textures = setmetatable({}, {
__index = function()
return setmetatable({}, {
__index = function()
return "blank.png"
end
})
end
})
armor = {
timer = 0,
elements = {"head", "torso", "legs", "feet"},
physics = {"jump", "speed", "gravity"},
attributes = {"heal", "fire", "water"},
formspec = "image[2.5,1;2,4;armor_preview]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[current_player;main;1,5.7;8,1;]"..
"list[current_player;main;1,6.85;8,3;8]"..
"label[8,3;Armor key]"..
"label[5.9,3;Protectionkey]"..
"list[current_player;arm;8,2;1,1;]",
def = armor_def,
textures = armor_textures,
default_skin = "character",
materials = {
wood = "group:wood",
cactus = "default:cactus",
steel = "default:steel_ingot",
bronze = "default:bronze_ingot",
diamond = "default:diamond",
gold = "default:gold_ingot",
mithril = "moreores:mithril_ingot",
crystal = "ethereal:crystal_ingot",
},
fire_nodes = {
{"default:lava_source", 5, 8},
{"default:lava_flowing", 5, 8},
{"fire:basic_flame", 3, 4},
{"fire:permanent_flame", 3, 4},
{"ethereal:crystal_spike", 2, 1},
{"ethereal:fire_flower", 2, 1},
{"default:torch", 1, 1},
{"default:torch_ceiling", 1, 1},
{"default:torch_wall", 1, 1},
},
registered_groups = {["fleshy"]=100},
registered_callbacks = {
on_update = {},
on_equip = {},
on_unequip = {},
on_damage = {},
on_destroy = {},
},
migrate_old_inventory = false,
version = "0.4.12",
}
armor.config = {
init_delay = 2,
init_times = 10,
bones_delay = 1,
update_time = 1,
drop = false,
destroy = false,
level_multiplier = 1,
heal_multiplier = 1,
material_wood = true,
material_cactus = true,
material_steel = true,
material_bronze = true,
material_diamond = true,
material_gold = true,
material_mithril = true,
material_crystal = true,
water_protect = true,
fire_protect = true,
punch_damage = true,
}
-- Armor Registration
armor.register_armor = function(self, name, def)
minetest.register_tool(name, def)
end
armor.register_armor_group = function(self, group, base)
base = base or 100
self.registered_groups[group] = base
if use_armor_monoid then
armor_monoid.register_armor_group(group, base)
end
end
-- Armor callbacks
armor.register_on_update = function(self, func)
if type(func) == "function" then
table.insert(self.registered_callbacks.on_update, func)
end
end
armor.register_on_equip = function(self, func)
if type(func) == "function" then
table.insert(self.registered_callbacks.on_equip, func)
end
end
armor.register_on_unequip = function(self, func)
if type(func) == "function" then
table.insert(self.registered_callbacks.on_unequip, func)
end
end
armor.register_on_damage = function(self, func)
if type(func) == "function" then
table.insert(self.registered_callbacks.on_damage, func)
end
end
armor.register_on_destroy = function(self, func)
if type(func) == "function" then
table.insert(self.registered_callbacks.on_destroy, func)
end
end
armor.run_callbacks = function(self, callback, player, index, stack)
if stack then
local def = stack:get_definition() or {}
if type(def[callback]) == "function" then
def[callback](player, index, stack)
end
end
local callbacks = self.registered_callbacks[callback]
if callbacks then
for _, func in pairs(callbacks) do
func(player, index, stack)
end
end
end
armor.update_player_visuals = function(self, player)
if not player then
return
end
local name = player:get_player_name()
if self.textures[name] then
default.player_set_textures(player, {
self.textures[name].skin,
self.textures[name].armor,
self.textures[name].wielditem,
})
end
self:run_callbacks("on_update", player)
end
armor.set_player_armor = function(self, player)
local name, armor_inv = self:get_valid_player(player, "[set_player_armor]")
if not name then
return
end
local state = 0
local count = 0
local material = {count=1}
local preview = armor:get_preview(name)
local texture = "3d_armor_trans.png"
local textures = {}
local physics = {}
local attributes = {}
local levels = {}
local groups = {}
local change = {}
for _, phys in pairs(self.physics) do
physics[phys] = 1
end
for _, attr in pairs(self.attributes) do
attributes[attr] = 0
end
for group, _ in pairs(self.registered_groups) do
change[group] = 1
levels[group] = 0
end
local list = armor_inv:get_list("armor")
if type(list) ~= "table" then
return
end
for i, stack in pairs(list) do
if stack:get_count() == 1 then
local def = stack:get_definition()
for _, element in pairs(self.elements) do
if def.groups["armor_"..element] then
if def.armor_groups then
for group, level in pairs(def.armor_groups) do
if levels[group] then
levels[group] = levels[group] + level
end
end
else
local level = def.groups["armor_"..element]
levels["fleshy"] = levels["fleshy"] + level
end
break
end
-- DEPRECATED, use armor_groups instead
if def.groups["armor_radiation"] and levels["radiation"] then
levels["radiation"] = def.groups["armor_radiation"]
end
end
local item = stack:get_name()
local tex = def.texture or item:gsub("%:", "_")
tex = tex:gsub(".png$", "")
local prev = def.preview or tex.."_preview"
prev = prev:gsub(".png$", "")
local player_inv = player:get_inventory()
local coun = player_inv:get_stack("am", 1):get_count()
if coun == 0 then
texture = texture.."^"..tex..".png"
end
preview = preview.."^"..prev..".png"
state = state + stack:get_wear()
count = count + 1
for _, phys in pairs(self.physics) do
local value = def.groups["physics_"..phys] or 0
physics[phys] = physics[phys] + value
end
for _, attr in pairs(self.attributes) do
local value = def.groups["armor_"..attr] or 0
local armor_inv = minetest.get_inventory({type="detached", name=player:get_player_name().."_armor"})
local arm = armor_inv:get_stack("arm2", 1):get_name()
if attr == "heal" then
if arm == "tutorial:protection_schluessel1" then
value = value+value*0.1
elseif arm == "tutorial:protection_schluessel2" then
value = value+value*0.2
elseif arm == "tutorial:protection_schluessel3" then
value = value+value*0.3
end
end
attributes[attr] = attributes[attr] + value
end
local mat = string.match(item, "%:.+_(.+)$")
if material.name then
if material.name == mat then
material.count = material.count + 1
end
else
material.name = mat
end
end
end
for group, level in pairs(levels) do
local armor_inv = minetest.get_inventory({type="detached", name=player:get_player_name().."_armor"})
local arm = armor_inv:get_stack("arm2", 1):get_name()
if arm == "tutorial:protection_schluessel1" then
level = level+level*0.1
elseif arm == "tutorial:protection_schluessel2" then
level = level+level*0.2
elseif arm == "tutorial:protection_schluessel3" then
level = level+level*0.3
end
if level > 0 then
level = level * armor.config.level_multiplier
if material.name and material.count == #self.elements then
level = level * 1.1
end
end
local base = self.registered_groups[group]
self.def[name].groups[group] = level
if level > base then
level = base
end
groups[group] = base - level
change[group] = groups[group] / base
end
for _, attr in pairs(self.attributes) do
local mult = attr == "heal" and self.config.heal_multiplier or 1
self.def[name][attr] = attributes[attr] * mult
end
for _, phys in pairs(self.physics) do
self.def[name][phys] = physics[phys]
end
if use_armor_monoid then
armor_monoid.monoid:add_change(player, change, "3d_armor:armor")
else
player:set_armor_groups(groups)
end
if use_player_monoids then
player_monoids.speed:add_change(player, physics.speed,
"3d_armor:physics")
player_monoids.jump:add_change(player, physics.jump,
"3d_armor:physics")
player_monoids.gravity:add_change(player, physics.gravity,
"3d_armor:physics")
elseif use_pova_mod then
-- only add the changes, not the default 1.0 for each physics setting
pova.add_override(name, "3d_armor", {
speed = physics.speed - 1,
jump = physics.jump - 1,
gravity = physics.gravity - 1,
})
pova.do_override(player)
else
player:set_physics_override(physics)
end
self.textures[name].armor = texture
self.textures[name].preview = preview
self.def[name].level = self.def[name].groups.fleshy or 0
self.def[name].state = state
self.def[name].count = count
self:update_player_visuals(player)
end
armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabilities)
local name, armor_inv = self:get_valid_player(player, "[punch]")
if not name then
return
end
local state = 0
local count = 0
local recip = true
local default_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}
local list = armor_inv:get_list("armor")
for i, stack in pairs(list) do
if stack:get_count() == 1 then
local name = stack:get_name()
local use = minetest.get_item_group(name, "armor_use") or 0
local damage = use > 0
local def = stack:get_definition() or {}
if type(def.on_punched) == "function" then
damage = def.on_punched(player, hitter, time_from_last_punch,
tool_capabilities) ~= false and damage == true
end
if damage == true and tool_capabilities then
local damage_groups = def.damage_groups or default_groups
local level = damage_groups.level or 0
local groupcaps = tool_capabilities.groupcaps or {}
local uses = 0
damage = false
for group, caps in pairs(groupcaps) do
local maxlevel = caps.maxlevel or 0
local diff = maxlevel - level
if diff == 0 then
diff = 1
end
if diff > 0 and caps.times then
local group_level = damage_groups[group]
if group_level then
local time = caps.times[group_level]
if time then
local dt = time_from_last_punch or 0
if dt > time / diff then
if caps.uses then
uses = caps.uses * math.pow(3, diff)
end
damage = true
break
end
end
end
end
end
if damage == true and recip == true and hitter and
def.reciprocate_damage == true and uses > 0 then
local item = hitter:get_wielded_item()
if item and item:get_name() ~= "" then
item:add_wear(65535 / uses)
hitter:set_wielded_item(item)
end
-- reciprocate tool damage only once
recip = false
end
end
if damage == true and hitter == "fire" then
damage = minetest.get_item_group(name, "flammable") > 0
end
if damage == true then
self:damage(player, i, stack, use)
end
state = state + stack:get_wear()
count = count + 1
end
end
self.def[name].state = state
self.def[name].count = count
end
armor.damage = function(self, player, index, stack, use)
local old_stack = ItemStack(stack)
stack:add_wear(use)
self:run_callbacks("on_damage", player, index, stack)
self:set_inventory_stack(player, index, stack)
if stack:get_count() == 0 then
self:run_callbacks("on_unequip", player, index, old_stack)
self:run_callbacks("on_destroy", player, index, old_stack)
self:set_player_armor(player)
end
end
armor.get_player_skin = function(self, name)
if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then
return skins.skins[name]..".png"
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
return u_skins.u_skins[name]..".png"
elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
return wardrobe.playerSkins[name]
end
return armor.default_skin..".png"
end
armor.add_preview = function(self, preview)
skin_previews[preview] = true
end
armor.get_preview = function(self, name)
local preview = string.gsub(armor:get_player_skin(name), ".png", "_preview.png")
if skin_previews[preview] then
return preview
end
return "character_preview.png"
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.armoff then
local player_inv = player:get_inventory()
player_inv:set_size("am", 1)
local type = player:get_inventory():get_stack("arm",1):get_name()
if type == "tutorial:armor_key" then
player_inv:set_stack("am", 1, "default:dirt")
else
end
armor:set_player_armor(player)
armor:update_inventory(player)
local name = player:get_player_name()
local formspec = armor:get_armor_formspec(name)
if inv_mod == "inventory_plus" then
local page = player:get_inventory_formspec()
if page:find("detached:"..name.."_armor") then
inventory_plus.set_inventory_formspec(player, formspec)
end
end
end
if fields.armon then
local player_inv = player:get_inventory()
player_inv:set_size("am", 1)
player_inv:set_stack("am", 1, nil)
armor:set_player_armor(player)
armor:update_inventory(player)
local name = player:get_player_name()
local formspec = armor:get_armor_formspec(name)
if inv_mod == "inventory_plus" then
local page = player:get_inventory_formspec()
if page:find("detached:"..name.."_armor") then
inventory_plus.set_inventory_formspec(player, formspec)
end
end
end
end)
armor.get_armor_formspec = function(self, name, listring)
if armor.def[name].init_time == 0 then
return "label[0,0;Armor not initialized!]"
end
local formspec = armor.formspec..
"list[detached:"..name.."_armor;armor;0,1.2;1,4;]"..
"list[detached:"..name.."_armor;armor;1,2.7;1,1;4]"..
"list[detached:"..name.."_armor;arm2;6,2;1,1;]"
local player = minetest.get_player_by_name(name)
local player_inv = player:get_inventory()
local am = player_inv:get_stack("am", 1):get_count()
if am == 1 then
formspec = formspec .."button[7.5,3.7;2,0.5;armon;armor on]"
else
formspec = formspec .."button[7.5,3.7;2,0.5;armoff;armor off]"
end
if listring == true then
formspec = formspec.."listring[current_player;main]"..
"listring[detached:"..name.."_armor;armor]"
end
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
formspec = formspec:gsub("armor_level", armor.def[name].level)
for _, attr in pairs(self.attributes) do
formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr])
end
for _, attr in pairs(self.physics) do
formspec = formspec:gsub("armor_physics_"..attr, armor.def[name][attr])
end
for group, _ in pairs(self.registered_groups) do
formspec = formspec:gsub("armor_group_"..group,
armor.def[name].groups[group])
end
return formspec
end
armor.get_element = function(self, item_name)
for _, element in pairs(armor.elements) do
if minetest.get_item_group(item_name, "armor_"..element) > 0 then
return element
end
end
end
armor.serialize_inventory_list = function(self, list)
local list_table = {}
for _, stack in ipairs(list) do
table.insert(list_table, stack:to_string())
end
return minetest.serialize(list_table)
end
armor.deserialize_inventory_list = function(self, list_string)
local list_table = minetest.deserialize(list_string)
local list = {}
for _, stack in ipairs(list_table or {}) do
table.insert(list, ItemStack(stack))
end
return list
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")
if armor_list_string then
inv:set_list("armor",
self:deserialize_inventory_list(armor_list_string))
return true
end
end
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")))
end
end
armor.update_inventory = function(self, player)
-- DEPRECATED: Legacy inventory support
end
armor.set_inventory_stack = function(self, player, i, stack)
local _, inv = self:get_valid_player(player, "[set_inventory_stack]")
if inv then
inv:set_stack("armor", i, stack)
self:save_armor_inventory(player)
end
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))
return
end
local name = player:get_player_name()
if not name then
minetest.log("warning", S("3d_armor: Player name is nil @1", 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))
return
end
return name, inv
end
armor.drop_armor = function(pos, stack)
local node = minetest.get_node_or_nil(pos)
if node then
local obj = minetest.add_item(pos, stack)
if obj then
obj:setvelocity({x=math.random(-1, 1), y=5, z=math.random(-1, 1)})
end
end
end

View File

@ -1,3 +1,7 @@
-- DEPRECATED, will not be supported in future versions
-- See README.txt for new configuration options.
-- Armor Configuration (defaults) -- Armor Configuration (defaults)
-- You can remove any unwanted armor materials from this table. -- You can remove any unwanted armor materials from this table.
@ -18,12 +22,13 @@ ARMOR_FIRE_PROTECT = false
-- Fire protection nodes, (name, protection level, damage) -- Fire protection nodes, (name, protection level, damage)
ARMOR_FIRE_NODES = { ARMOR_FIRE_NODES = {
{"default:lava_source", 5, 4}, {"default:lava_source", 5, 4},
{"default:lava_flowing", 5, 4}, {"default:lava_flowing", 5, 4},
{"fire:basic_flame", 3, 4}, {"fire:basic_flame", 3, 4},
{"ethereal:crystal_spike", 2, 1}, {"fire:permanent_flame", 3, 4},
{"bakedclay:safe_fire", 2, 1}, {"ethereal:crystal_spike", 2, 1},
--{"default:torch", 1, 1}, {"ethereal:fire_flower", 2, 1},
{"default:torch", 1, 1},
} }
-- Increase this if you get initialization glitches when a player first joins. -- Increase this if you get initialization glitches when a player first joins.
@ -54,3 +59,7 @@ ARMOR_LEVEL_MULTIPLIER = 1
-- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether. -- eg: ARMOR_HEAL_MULTIPLIER = 0 will disable healing altogether.
ARMOR_HEAL_MULTIPLIER = 1 ARMOR_HEAL_MULTIPLIER = 1
-- You can use this to increase or decrease overall armor radiation protection,
-- eg: ARMOR_RADIATION_MULTIPLIER = 0 will completely disable radiation protection.
-- Note: patched technic mod is required
ARMOR_RADIATION_MULTIPLIER = 1

View File

@ -1,734 +1,241 @@
-- support for i18n
local S = armor_i18n.gettext
ARMOR_INIT_DELAY = 1 minetest.register_tool("3d_armor:helmet_admin", {
ARMOR_INIT_TIMES = 1 description = "Admin Helmet Mode 1 (no speed and no jump)",
ARMOR_BONES_DELAY = 1 inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode1.png",
ARMOR_UPDATE_TIME = 1 wield_image = "3d_armor_inv_helmet_admin.png",
ARMOR_DROP = false groups = {armor_head=20, armor_heal=25, armor_use=0, armor_fire=1, armor_water=0.2},
ARMOR_DESTROY = false wear = 0,
ARMOR_LEVEL_MULTIPLIER = 1 on_use = function(itemstack, user, pointed_thing)
ARMOR_HEAL_MULTIPLIER = 1 local keys = user:get_player_control()
ARMOR_MATERIALS = { if keys["sneak"] == true then
wood = "default:stick", itemstack:set_name("3d_armor:helmet_admin2")
cactus = "default:cactus",
steel = "default:steel_ingot",
bronze = "default:bronze_ingot",
diamond = "default:diamond",
gold = "default:gold_ingot",
mithril = "moreores:mithril_ingot",
crystal = "ethereal:crystal_ingot",
}
ARMOR_FIRE_PROTECT = true
ARMOR_FIRE_NODES = {
{"default:lava_source", 5, 4},
{"default:lava_flowing", 5, 4},
{"fire:basic_flame", 3, 4},
{"ethereal:crystal_spike", 2, 1},
{"bakedclay:safe_fire", 2, 1},
{"technic:corium_source", 2, 2},
{"technic:corium_flowing", 2, 2},
{"tutorial:xp_block", 2, 5},
}
local skin_mod = nil
local inv_mod = nil
local modpath = minetest.get_modpath(ARMOR_MOD_NAME)
local worldpath = minetest.get_worldpath()
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
if not minetest.get_modpath("moreores") then
ARMOR_MATERIALS.mithril = nil
end
if not minetest.get_modpath("ethereal") then
ARMOR_MATERIALS.crystal = nil
end
-- override hot nodes so they do not hurt player anywhere but mod
if ARMOR_FIRE_PROTECT == true then
minetest.after(2, function()
for _, row in ipairs(ARMOR_FIRE_NODES) do
if minetest.registered_nodes[row[1]] then
minetest.override_item(row[1], {damage_per_second = 0, radioaktive = 0})
end
end
end)
end
local time = 0
armor = {
player_hp = {},
elements = {"head", "torso", "legs", "feet"},
physics = {"jump","speed","gravity"},
formspec = "size[8,8.5]list[detached:player_name_armor;armor;0,1;2,3;]"
.."list[detached:player_name_armor;arm2;6,2;1,1;]"
.."image[2,0.75;2,4;armor_preview]"
.."list[current_player;main;0,4.5;8,4;]"
.."list[current_player;craft;4,1;3,3;]"
.."list[current_player;craftpreview;7,2;1,1;]",
textures = {},
default_skin = "character",
version = "0.4.3",
}
if minetest.get_modpath("inventory_plus") then
inv_mod = "inventory_plus"
armor.formspec = "size[10,9.5]button[0,0;2,0.5;inven;Back]"
.."button[2,0;2,0.5;main;Main]"
.."background[10,9.5;1,1;gui_formbg.png;true]"
.."listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
.."bgcolor[#080808BB;true]"
.."list[detached:player_name_armor;armor;0,1;1,4;]"
.."list[detached:player_name_armor;armor;1,2.5;1,1;4]"
.."image[2.5,0.75;2,4;armor_preview]"
.."label[4.5,1;Level: armor_level]"
.."label[4.5,1.5;Heal: armor_heal]"
.."label[4.5,2;Fire: armor_fire]"
.."label[4.5,2.5.5;Speed: armor_speed]"
.."label[4.5,3;Jump: armor_jump]"
.."label[8,3;Armor key]"
.."label[5.9,3;Protectionkey]"
.."list[current_player;main;1,5.5;8,1;]"
.."list[current_player;main;1,6.75;8,3;8]"
.."list[current_player;arm;8,2;1,1;]"
.."list[detached:player_name_armor;arm2;6,2;1,1;]"
elseif minetest.get_modpath("unified_inventory") then
inv_mod = "unified_inventory"
unified_inventory.register_button("armor", {
type = "image",
image = "inventory_plus_armor.png",
})
unified_inventory.register_page("armor", {
get_formspec = function(player)
local name = player:get_player_name()
local formspec = "background[0.06,0.99;7.92,7.52;3d_armor_ui_form.png]"
.."label[0,0;Armor]"
.."list[detached:"..name.."_armor;armor;0,1;2,3;]"
.."image[2.5,0.75;2,4;"..armor.textures[name].preview.."]"
.."label[5,1;Level: "..armor.def[name].level.."]"
.."label[5,1.5;Heal: "..armor.def[name].heal.."]"
.."label[5,2;Fire: "..armor.def[name].fire.."]"
return {formspec=formspec}
end,
})
elseif minetest.get_modpath("inventory_enhanced") then
inv_mod = "inventory_enhanced"
end
if minetest.get_modpath("skins") then
skin_mod = "skins"
elseif minetest.get_modpath("simple_skins") then
skin_mod = "simple_skins"
elseif minetest.get_modpath("u_skins") then
skin_mod = "u_skins"
elseif minetest.get_modpath("wardrobe") then
skin_mod = "wardrobe"
end
armor.def = {
state = 0,
count = 0,
}
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.armoff then
local player_inv = player:get_inventory()
player_inv:set_size("am", 1)
local type = player:get_inventory():get_stack("arm",1):get_name()
if type == "tutorial:armor_key" then
player_inv:set_stack("am", 1, "default:dirt")
else
end
armor:set_player_armor(player)
armor:update_inventory(player)
local name = player:get_player_name()
local formspec = armor:get_armor_formspec(name)
if inv_mod == "inventory_plus" then
local page = player:get_inventory_formspec()
if page:find("detached:"..name.."_armor") then
inventory_plus.set_inventory_formspec(player, formspec)
end
end
end
if fields.armon then
local player_inv = player:get_inventory()
player_inv:set_size("am", 1)
player_inv:set_stack("am", 1, nil)
armor:set_player_armor(player)
armor:update_inventory(player)
local name = player:get_player_name()
local formspec = armor:get_armor_formspec(name)
if inv_mod == "inventory_plus" then
local page = player:get_inventory_formspec()
if page:find("detached:"..name.."_armor") then
inventory_plus.set_inventory_formspec(player, formspec)
end
end
end
end)
armor.update_player_visuals = function(self, player)
if not player then
return
end
local name = player:get_player_name()
if self.textures[name] then
default.player_set_textures(player, {
self.textures[name].skin,
self.textures[name].armor,
self.textures[name].wielditem,
})
end
end
armor.set_player_armor = function(self, player)
local name, player_inv = armor:get_valid_player(player, "[set_player_armor]")
if not name then
return
end
local armor_texture = "3d_armor_trans.png"
local armor_level = 0
local armor_heal = 0
local armor_fire = 0
local state = 0
local items = 0
local elements = {}
local textures = {}
local physics_o = {speed=1,gravity=1,jump=1}
local material = {type=nil, count=1}
local preview = armor:get_preview(name) or "character_preview.png"
for _,v in ipairs(self.elements) do
elements[v] = false
end
for i=1, 5 do
local stack = player_inv:get_stack("armor", i)
local item = stack:get_name()
if stack:get_count() == 1 then
local def = stack:get_definition()
for k, v in pairs(elements) do
if v == false then
local level = def.groups["armor_"..k]
if level then
local texture = item:gsub("%:", "_")
local player_inv = player:get_inventory()
local coun = player_inv:get_stack("am", 1):get_count()
if coun == 0 then
table.insert(textures, texture..".png")
else
end
preview = preview.."^"..texture.."_preview.png"
armor_level = armor_level + level
state = state + stack:get_wear()
items = items + 1
local heal = def.groups["armor_heal"] or 0
armor_heal = armor_heal + heal
local fire = def.groups["armor_fire"] or 0
armor_fire = armor_fire + fire
for kk,vv in ipairs(self.physics) do
local o_value = def.groups["physics_"..vv]
if o_value then
physics_o[vv] = physics_o[vv] + o_value
end
end
local mat = string.match(item, "%:.+_(.+)$")
if material.type then
if material.type == mat then
material.count = material.count + 1
end
else
material.type = mat
end
elements[k] = true
end
end
end
end
end
armor_level = armor_level * ARMOR_LEVEL_MULTIPLIER
armor_heal = armor_heal * ARMOR_HEAL_MULTIPLIER
local player_inv = player:get_inventory()
local arm = player_inv:get_stack("arm2", 1):get_name()
if arm == "tutorial:protection_schluessel1" then
armor_level = armor_level+armor_level*0.1
armor_heal = armor_heal+armor_heal*0.1
armor_fire = armor_fire+armor_fire*0.1
elseif arm == "tutorial:protection_schluessel2" then
armor_level = armor_level+armor_level*0.2
armor_heal = armor_heal+armor_heal*0.2
armor_fire = armor_fire+armor_fire*0.2
elseif arm == "tutorial:protection_schluessel3" then
armor_level = armor_level+armor_level*0.3
armor_heal = armor_heal+armor_heal*0.3
armor_fire = armor_fire+armor_fire*0.3
end
if #textures > 0 then
armor_texture = table.concat(textures, "^")
end
local armor_groups = {fleshy=100}
if armor_level > 0 then
armor_groups.level = math.floor(armor_level / 100)
armor_groups.fleshy = 100 - armor_level
end
player:set_armor_groups(armor_groups)
player:set_physics_override(physics_o)
self.textures[name].armor = armor_texture
self.textures[name].preview = preview
self.def[name].state = state
self.def[name].count = items
self.def[name].level = armor_level
self.def[name].heal = armor_heal
self.def[name].jump = physics_o.jump
self.def[name].speed = physics_o.speed
self.def[name].gravity = physics_o.gravity
self.def[name].fire = armor_fire
self:update_player_visuals(player)
end
armor.update_armor = function(self, player, dtime)
local name, player_inv, armor_inv, pos = armor:get_valid_player(player, "[update_armor]")
if not name then
return
end
local hp = player:get_hp() or 0
if ARMOR_FIRE_PROTECT == true then
pos.y = pos.y + 1.4 -- head level
local node_head = minetest.get_node(pos).name
pos.y = pos.y - 1.2 -- feet level
local node_feet = minetest.get_node(pos).name
-- is player inside a hot node?
for _, row in ipairs(ARMOR_FIRE_NODES) do
-- check for fire protection, if not enough then get hurt
if row[1] == node_head or row[1] == node_feet then
if hp > 0 and armor.def[name].fire < row[2] then
player:set_hp(hp - row[3] * dtime)
break
end
end
end
end
if hp == 0 or hp == self.player_hp[name] then
return
end
if self.player_hp[name] > hp then
local heal_max = 0
local state = 0
local items = 0
for i=1, 5 do
local stack = player_inv:get_stack("armor", i)
if stack:get_count() > 0 then
local use = stack:get_definition().groups["armor_use"] or 0
local heal = stack:get_definition().groups["armor_heal"] or 0
local item = stack:get_name()
stack:add_wear(use)
armor_inv:set_stack("armor", i, stack)
player_inv:set_stack("armor", i, stack)
state = state + stack:get_wear()
items = items + 1
if stack:get_count() == 0 then
local desc = minetest.registered_items[item].description
if desc then
minetest.chat_send_player(name, "Your "..desc.." got destroyed!")
end
self:set_player_armor(player)
armor:update_inventory(player)
end
heal_max = heal_max + heal
end
end
local player_inv = player:get_inventory()
local arm = player_inv:get_stack("arm2", 1):get_name()
if arm == "tutorial:protection_schluessel1" then
heal_max = heal_max+heal_max*0.1
elseif arm == "tutorial:protection_schluessel2" then
heal_max = heal_max+heal_max*0.2
elseif arm == "tutorial:protection_schluessel3" then
heal_max = heal_max+heal_max*0.3
end end
self.def[name].state = state return itemstack
self.def[name].count = items end,
heal_max = heal_max * ARMOR_HEAL_MULTIPLIER
if heal_max == nil or heal_max == 0 then
heal_max = 1
end
if heal_max > math.random(heal_max + math.floor(heal_max*0.1)) then
player:set_hp(self.player_hp[name])
return
end
end
self.player_hp[name] = hp
end
armor.get_player_skin = function(self, name)
local skin = nil
if skin_mod == "skins" or skin_mod == "simple_skins" then
skin = skins.skins[name]
elseif skin_mod == "u_skins" then
skin = u_skins.u_skins[name]
elseif skin_mod == "wardrobe" then
skin = string.gsub(wardrobe.playerSkins[name], "%.png$","")
end
return skin or armor.default_skin
end
armor.get_preview = function(self, name)
if skin_mod == "skins" then
return armor:get_player_skin(name).."_preview.png"
end
end
armor.get_armor_formspec = function(self, name)
if not armor.textures[name] then
minetest.log("error", "3d_armor: Player texture["..name.."] is nil [get_armor_formspec]")
return ""
end
if not armor.def[name] then
minetest.log("error", "3d_armor: Armor def["..name.."] is nil [get_armor_formspec]")
return ""
end
local player = minetest.get_player_by_name(name)
local player_inv = player:get_inventory()
local am = player_inv:get_stack("am", 1):get_count()
local formspec = armor.formspec:gsub("player_name", name)
formspec = formspec:gsub("armor_preview", armor.textures[name].preview)
formspec = formspec:gsub("armor_level", armor.def[name].level)
formspec = formspec:gsub("armor_heal", armor.def[name].heal)
formspec = formspec:gsub("armor_fire", armor.def[name].fire)
formspec = formspec:gsub("armor_jump", (armor.def[name].jump-1)*4)
formspec = formspec:gsub("armor_speed", (armor.def[name].speed-1)*4)
if am == 1 then
formspec = formspec .."button[7.5,3.7;2,0.5;armon;armor on]"
else
formspec = formspec .."button[7.5,3.7;2,0.5;armoff;armor off]"
end
return formspec
end
armor.update_inventory = function(self, player)
local name = armor:get_valid_player(player, "[set_player_armor]")
if not name or inv_mod == "inventory_enhanced" then
return
end
if inv_mod == "unified_inventory" then
if unified_inventory.current_page[name] == "armor" then
unified_inventory.set_inventory_formspec(player, "armor")
end
else
local formspec = armor:get_armor_formspec(name)
if inv_mod == "inventory_plus" then
local page = player:get_inventory_formspec()
if page:find("detached:"..name.."_armor") then
inventory_plus.set_inventory_formspec(player, formspec)
end
else
player:set_inventory_formspec(formspec)
end
end
end
armor.get_valid_player = function(self, player, msg)
msg = msg or ""
if not player then
minetest.log("error", "3d_armor: Player reference is nil "..msg)
return
end
local name = player:get_player_name()
if not name then
minetest.log("error", "3d_armor: Player name is nil "..msg)
return
end
local pos = player:getpos()
local player_inv = player:get_inventory()
local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"})
if not pos then
minetest.log("error", "3d_armor: Player position is nil "..msg)
return
elseif not player_inv then
minetest.log("error", "3d_armor: Player inventory is nil "..msg)
return
elseif not armor_inv then
minetest.log("error", "3d_armor: Detached armor inventory is nil "..msg)
return
end
return name, player_inv, armor_inv, pos
end
-- Register Player Model
default.player_register_model("3d_armor_character.b3d", {
animation_speed = 30,
textures = {
armor.default_skin..".png",
"3d_armor_trans.png",
"3d_armor_trans.png",
},
animations = {
stand = {x=0, y=79},
lay = {x=162, y=166},
walk = {x=168, y=187},
mine = {x=189, y=198},
walk_mine = {x=200, y=219},
sit = {x=81, y=160},
},
}) })
-- Register Callbacks minetest.register_tool("3d_armor:helmet_admin2", {
description = "Admin Helmet Mode 2 (speed and no jump)",
inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode2.png",
wield_image = "3d_armor_inv_helmet_admin.png",
groups = {armor_head=20, armor_heal=25, armor_use=0, armor_fire=1, physics_speed=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:helmet_admin3")
end
return itemstack
end,
})
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_tool("3d_armor:helmet_admin3", {
local name = armor:get_valid_player(player, "[on_player_receive_fields]") description = "Admin Helmet Mode 3 (no speed and jump)",
if fields.armor then inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode3.png",
local formspec = armor:get_armor_formspec(name) wield_image = "3d_armor_inv_helmet_admin.png",
armor:set_player_armor(player) groups = {armor_head=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, armor_water=0.2},
armor:update_inventory(player) wear = 0,
local name = player:get_player_name() on_use = function(itemstack, user, pointed_thing)
local formspec = armor:get_armor_formspec(name) local keys = user:get_player_control()
if inv_mod == "inventory_plus" then if keys["sneak"] == true then
local page = player:get_inventory_formspec() itemstack:set_name("3d_armor:helmet_admin4")
if page:find("detached:"..name.."_armor") then end
inventory_plus.set_inventory_formspec(player, formspec) return itemstack
end end,
end })
inventory_plus.set_inventory_formspec(player, formspec)
return
end
for field, _ in pairs(fields) do
if string.find(field, "skins_set") then
minetest.after(0, function(player)
local skin = armor:get_player_skin(name)
armor.textures[name].skin = skin..".png"
armor:set_player_armor(player)
end, player)
end
end
end)
minetest.register_on_joinplayer(function(player) minetest.register_tool("3d_armor:helmet_admin4", {
default.player_set_model(player, "3d_armor_character.b3d") description = "Admin Helmet Mode 4 (speed and jump)",
local name = player:get_player_name() inventory_image = "3d_armor_inv_helmet_admin.png^technic_tool_mode4.png",
local player_inv = player:get_inventory() wield_image = "3d_armor_inv_helmet_admin.png",
local armor_inv = minetest.create_detached_inventory(name.."_armor", { groups = {armor_head=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, physics_speed=0.25, armor_water=0.2},
on_put = function(inv, listname, index, stack, player) wear = 0,
player:get_inventory():set_stack(listname, index, stack) on_use = function(itemstack, user, pointed_thing)
armor:set_player_armor(player) local keys = user:get_player_control()
armor:update_inventory(player) if keys["sneak"] == true then
end, itemstack:set_name("3d_armor:helmet_admin")
on_take = function(inv, listname, index, stack, player) end
player:get_inventory():set_stack(listname, index, nil) return itemstack
armor:set_player_armor(player) end,
armor:update_inventory(player) })
end,
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
local plaver_inv = player:get_inventory()
local stack = inv:get_stack(to_list, to_index)
player_inv:set_stack(to_list, to_index, stack)
player_inv:set_stack(from_list, from_index, nil)
armor:set_player_armor(player)
armor:update_inventory(player)
end,
allow_put = function(inv, listname, index, stack, player)
if listname == "armor" then
if index == 1 and stack:get_definition().groups.armor_head then
return 1
elseif index == 2 and stack:get_definition().groups.armor_torso then
return 1
elseif index == 3 and stack:get_definition().groups.armor_legs then
return 1
elseif index == 4 and stack:get_definition().groups.armor_feet then
return 1
elseif index == 5 and stack:get_definition().groups.armor_shield then
return 1
else
return 0
end
else
return 1
end
end, minetest.register_tool("3d_armor:chestplate_admin", {
allow_take = function(inv, listname, index, stack, player) description = "Admin Chestplate Mode 1 (no speed and no jump)",
return stack:get_count() inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode1.png",
end, wield_image = "3d_armor_inv_chestplate_admin.png",
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player) groups = {armor_torso=20, armor_heal=25, armor_use=0, armor_fire=1, armor_water=0.2},
if listname == "armor" then wear = 0,
if index == 1 and stack:get_definition().groups.armor_head then on_use = function(itemstack, user, pointed_thing)
return 1 local keys = user:get_player_control()
elseif index == 2 and stack:get_definition().groups.armor_torso then if keys["sneak"] == true then
return 1 itemstack:set_name("3d_armor:chestplate_admin2")
elseif index == 3 and stack:get_definition().groups.armor_legs then end
return 1 return itemstack
elseif index == 4 and stack:get_definition().groups.armor_feet then end,
return 1 })
elseif index == 5 and stack:get_definition().groups.armor_shield then
return 1
else
return 0
end
else
return 1
end
end,
})
armor_inv:set_size("armor", 5)
armor_inv:set_size("arm2", 1)
player_inv:set_size("arm", 1)
player_inv:set_size("arm2", 1)
player_inv:set_size("armor", 5)
local stack = player_inv:get_stack("arm2", 1)
armor_inv:set_stack("arm2", 1, stack)
for i=1, 5 do
local stack = player_inv:get_stack("armor", i)
armor_inv:set_stack("armor", i, stack)
end
-- Legacy support, import player's armor from old inventory format minetest.register_tool("3d_armor:chestplate_admin2", {
for _,v in pairs(armor.elements) do description = "Admin Chestplate Mode 2 (speed and no jump)",
local list = "armor_"..v inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode2.png",
armor_inv:add_item("armor", player_inv:get_stack(list, 1)) wield_image = "3d_armor_inv_chestplate_admin.png",
player_inv:set_stack(list, 1, nil) groups = {armor_torso=20, armor_heal=25, armor_use=0, armor_fire=1, physics_speed=0.25, armor_water=0.2},
end wear = 0,
-- TODO Remove this on the next version upate on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin3", {
description = "Admin Chestplate Mode 3 (no speed and jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode3.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:chestplate_admin4", {
description = "Admin Chestplate Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_chestplate_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_chestplate_admin.png",
groups = {armor_torso=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, physics_speed=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:chestplate_admin")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:leggings_admin", {
description = "Admin Leggings Mode 1 (no speed and no jump)",
wield_image = "3d_armor_inv_leggings_admin.png",
inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode1.png",
groups = {armor_legs=20, armor_heal=25, armor_use=0, armor_fire=1, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin2")
end
return itemstack
end,
})
armor.player_hp[name] = 0 minetest.register_tool("3d_armor:leggings_admin2", {
armor.def[name] = { description = "Admin Leggings Mode 2 (speed and no jump)",
state = 0, wield_image = "3d_armor_inv_leggings_admin.png",
count = 0, inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode2.png",
level = 0, groups = {armor_legs=20, armor_heal=25, armor_use=0, armor_fire=1, physics_speed=0.25, armor_water=0.2},
heal = 0, wear = 0,
jump = 1, on_use = function(itemstack, user, pointed_thing)
speed = 1, local keys = user:get_player_control()
gravity = 1, if keys["sneak"] == true then
fire = 0, itemstack:set_name("3d_armor:leggings_admin3")
} end
armor.textures[name] = { return itemstack
skin = armor.default_skin..".png", end,
armor = "3d_armor_trans.png", })
wielditem = "3d_armor_trans.png",
preview = armor.default_skin.."_preview.png",
}
if skin_mod == "skins" then
local skin = skins.skins[name]
if skin and skins.get_type(skin) == skins.type.MODEL then
armor.textures[name].skin = skin..".png"
end
elseif skin_mod == "simple_skins" then
local skin = skins.skins[name]
if skin then
armor.textures[name].skin = skin..".png"
end
elseif skin_mod == "u_skins" then
local skin = u_skins.u_skins[name]
if skin and u_skins.get_type(skin) == u_skins.type.MODEL then
armor.textures[name].skin = skin..".png"
end
elseif skin_mod == "wardrobe" then
local skin = wardrobe.playerSkins[name]
if skin then
armor.textures[name].skin = skin
end
end
if minetest.get_modpath("player_textures") then
local filename = minetest.get_modpath("player_textures").."/textures/player_"..name
local f = io.open(filename..".png")
if f then
f:close()
armor.textures[name].skin = "player_"..name..".png"
end
end
for i=1, ARMOR_INIT_TIMES do
minetest.after(ARMOR_INIT_DELAY * i, function(player)
armor:set_player_armor(player)
if not inv_mod then
armor:update_inventory(player)
end
end, player)
end
end)
if ARMOR_DROP == true or ARMOR_DESTROY == true then minetest.register_tool("3d_armor:leggings_admin3", {
armor.drop_armor = function(pos, stack) description = "Admin Leggings Mode 3 (no speed and jump)",
local obj = minetest.add_item(pos, stack) wield_image = "3d_armor_inv_leggings_admin.png",
if obj then inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode3.png",
local x = math.random(1, 5) groups = {armor_legs=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, armor_water=0.2},
if math.random(1,2) == 1 then wear = 0,
x = -x on_use = function(itemstack, user, pointed_thing)
end local keys = user:get_player_control()
local z = math.random(1, 5) if keys["sneak"] == true then
if math.random(1,2) == 1 then itemstack:set_name("3d_armor:leggings_admin4")
z = -z end
end return itemstack
obj:setvelocity({x=1/x, y=obj:getvelocity().y, z=1/z}) end,
end })
end
minetest.register_on_dieplayer(function(player)
local name, player_inv, armor_inv, pos = armor:get_valid_player(player, "[on_dieplayer]")
if not name then
return
end
local drop = {}
for i=1, player_inv:get_size("armor") do
local stack = armor_inv:get_stack("armor", i)
if stack:get_count() > 0 then
table.insert(drop, stack)
armor_inv:set_stack("armor", i, nil)
player_inv:set_stack("armor", i, nil)
end
end
armor:set_player_armor(player)
if inv_mod == "unified_inventory" then
unified_inventory.set_inventory_formspec(player, "craft")
elseif inv_mod == "inventory_plus" then
local formspec = inventory_plus.get_formspec(player,"main")
inventory_plus.set_inventory_formspec(player, formspec)
else
armor:update_inventory(player)
end
if ARMOR_DESTROY == false then
minetest.after(ARMOR_BONES_DELAY, function()
pos = vector.round(pos)
local node = minetest.get_node(pos)
if node then
if node.name == "bones:bones" then
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local inv = meta:get_inventory()
for _,stack in ipairs(drop) do
if name == owner and inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
armor.drop_armor(pos, stack)
end
end
end
else
for _,stack in ipairs(drop) do
armor.drop_armor(pos, stack)
end
end
end)
end
end)
end
minetest.register_globalstep(function(dtime) minetest.register_tool("3d_armor:leggings_admin4", {
time = time + dtime description = "Admin Leggings Mode 4 (speed and jump)",
if time > ARMOR_UPDATE_TIME then inventory_image = "3d_armor_inv_leggings_admin.png^technic_tool_mode4.png",
for _,player in ipairs(minetest.get_connected_players()) do wield_image = "3d_armor_inv_leggings_admin.png",
armor:update_armor(player, time) groups = {armor_legs=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, physics_speed=0.25, armor_water=0.2},
end wear = 0,
time = 0 on_use = function(itemstack, user, pointed_thing)
end local keys = user:get_player_control()
end) if keys["sneak"] == true then
itemstack:set_name("3d_armor:leggings_admin")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin", {
description = "Admin Boots Mode 1 (no speed and no jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode1.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=20, armor_heal=25, armor_use=0, armor_fire=1, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin2")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin2", {
description = "Admin Boots Mode 2 (speed and no jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode2.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=20, armor_heal=25, armor_use=0, armor_fire=1, physics_speed=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin3")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin3", {
description = "Admin Boots Mode 3 (no speed and jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode3.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin4")
end
return itemstack
end,
})
minetest.register_tool("3d_armor:boots_admin4", {
description = "Admin Boots Mode 4 (speed and jump)",
inventory_image = "3d_armor_inv_boots_admin.png^technic_tool_mode4.png",
wield_image = "3d_armor_inv_boots_admin.png",
groups = {armor_feet=20, armor_heal=25, armor_use=0, armor_fire=1, physics_jump=0.25, physics_speed=0.25, armor_water=0.2},
wear = 0,
on_use = function(itemstack, user, pointed_thing)
local keys = user:get_player_control()
if keys["sneak"] == true then
itemstack:set_name("3d_armor:boots_admin")
end
return itemstack
end,
})

View File

@ -1,4 +1,8 @@
default default
inventory_plus? player_monoids?
unified_inventory? armor_monoid?
pova?
fire?
ethereal?
bakedclay?
intllib?

View File

@ -0,0 +1 @@
Adds craftable armor that is visible to other players.

View File

@ -1,219 +1,502 @@
-- support for i18n
armor_i18n = { }
local MP = minetest.get_modpath(minetest.get_current_modname())
armor_i18n.gettext, armor_i18n.ngettext = dofile(MP.."/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
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local worldpath = minetest.get_worldpath()
local last_punch_time = {}
local pending_players = {}
local timer = 0
dofile(modpath.."/api.lua")
ARMOR_MOD_NAME = minetest.get_current_modname() ARMOR_MOD_NAME = minetest.get_current_modname()
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua") dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua")
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/admin.lua")
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial.lua") dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial.lua")
dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial_craft.lua") dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/tutorial_craft.lua")
if ARMOR_MATERIALS.wood then
minetest.register_tool("3d_armor:helmet_wood", { -- Legacy Config Support
description = "Wood Helmet",
inventory_image = "3d_armor_inv_helmet_wood.png", local input = io.open(modpath.."/armor.conf", "r")
groups = {armor_head=5, armor_heal=0, armor_use=2000}, if input then
wear = 0, dofile(modpath.."/armor.conf")
}) input:close()
minetest.register_tool("3d_armor:chestplate_wood", { input = nil
description = "Wood Chestplate", end
inventory_image = "3d_armor_inv_chestplate_wood.png", input = io.open(worldpath.."/armor.conf", "r")
groups = {armor_torso=10, armor_heal=0, armor_use=2000}, if input then
wear = 0, dofile(worldpath.."/armor.conf")
}) input:close()
minetest.register_tool("3d_armor:leggings_wood", { input = nil
description = "Wood Leggings", end
inventory_image = "3d_armor_inv_leggings_wood.png", for name, _ in pairs(armor.config) do
groups = {armor_legs=5, armor_heal=0, armor_use=2000}, local global = "ARMOR_"..name:upper()
wear = 0, if minetest.global_exists(global) then
}) armor.config[name] = _G[global]
minetest.register_tool("3d_armor:boots_wood", { end
description = "Wood Boots", end
inventory_image = "3d_armor_inv_boots_wood.png", if minetest.global_exists("ARMOR_MATERIALS") then
groups = {armor_feet=5, armor_heal=0, armor_use=2000}, armor.materials = table.copy(ARMOR_MATERIALS)
wear = 0, end
}) if minetest.global_exists("ARMOR_FIRE_NODES") then
armor.fire_nodes = table.copy(ARMOR_FIRE_NODES)
end end
if ARMOR_MATERIALS.cactus then -- Load Configuration
minetest.register_tool("3d_armor:helmet_cactus", {
description = "Cactuc Helmet", for name, config in pairs(armor.config) do
inventory_image = "3d_armor_inv_helmet_cactus.png", local setting = minetest.settings:get("armor_"..name)
groups = {armor_head=7, armor_heal=1, armor_use=200}, if type(config) == "number" then
wear = 0, setting = tonumber(setting)
}) elseif type(config) == "boolean" then
minetest.register_tool("3d_armor:chestplate_cactus", { setting = minetest.settings:get_bool("armor_"..name)
description = "Cactus Chestplate", end
inventory_image = "3d_armor_inv_chestplate_cactus.png", if setting ~= nil then
groups = {armor_torso=15, armor_heal=2, armor_use=200}, armor.config[name] = setting
wear = 0, end
}) end
minetest.register_tool("3d_armor:leggings_cactus", { for material, _ in pairs(armor.materials) do
description = "Cactus Leggings", local key = "material_"..material
inventory_image = "3d_armor_inv_leggings_cactus.png", if armor.config[key] == false then
groups = {armor_legs=7, armor_heal=1, armor_use=200}, armor.materials[material] = nil
wear = 0, end
})
minetest.register_tool("3d_armor:boots_cactus", {
description = "Cactus Boots",
inventory_image = "3d_armor_inv_boots_cactus.png",
groups = {armor_feet=7, armor_heal=1, armor_use=200},
wear = 0,
})
end end
if ARMOR_MATERIALS.steel then -- Mod Compatibility
minetest.register_tool("3d_armor:helmet_steel", {
description = "Steel Helmet", --[[if minetest.get_modpath("technic") then
inventory_image = "3d_armor_inv_helmet_steel.png", armor.formspec = armor.formspec..
groups = {armor_head=10, armor_heal=2, armor_use=100}, "label[5,2.5;"..F("Radiation")..": armor_group_radiation]"
wear = 0, armor:register_armor_group("radiation")
}) end--]]
minetest.register_tool("3d_armor:chestplate_steel", { local skin_mods = {"skins", "u_skins", "simple_skins", "wardrobe"}
description = "Steel Chestplate", for _, mod in pairs(skin_mods) do
inventory_image = "3d_armor_inv_chestplate_steel.png", local path = minetest.get_modpath(mod)
groups = {armor_torso=20, armor_heal=4, armor_use=100}, if path then
wear = 0, local dir_list = minetest.get_dir_list(path.."/textures")
}) for _, fn in pairs(dir_list) do
minetest.register_tool("3d_armor:leggings_steel", { if fn:find("_preview.png$") then
description = "Steel Leggings", armor:add_preview(fn)
inventory_image = "3d_armor_inv_leggings_steel.png", end
groups = {armor_legs=10, armor_heal=2, armor_use=100}, end
wear = 0, armor.skin_mod = mod
}) end
minetest.register_tool("3d_armor:boots_steel", { end
description = "Steel Boots", if not minetest.get_modpath("moreores") then
inventory_image = "3d_armor_inv_boots_steel.png", armor.materials.mithril = nil
groups = {armor_feet=10, armor_heal=2, armor_use=100}, end
wear = 0, if not minetest.get_modpath("ethereal") then
}) armor.materials.crystal = nil
end end
if ARMOR_MATERIALS.bronze then dofile(modpath.."/armor.lua")
minetest.register_tool("3d_armor:helmet_bronze", {
description = "Bronze Helmet", -- Armor Initialization
inventory_image = "3d_armor_inv_helmet_bronze.png",
groups = {armor_head=20, armor_heal=4, armor_use=75}, armor.formspec = armor.formspec..
wear = 0, "label[4.5,1.5;"..F("Level")..": armor_level]"..
}) "label[4.5,2;"..F("Heal")..": armor_attr_heal]"..
minetest.register_tool("3d_armor:chestplate_bronze", { "label[4.5,2.5;"..F("Fire")..": armor_attr_fire]"..
description = "Bronze Chestplate", "label[4.5,3;"..F("Water")..": armor_attr_water]"..
inventory_image = "3d_armor_inv_chestplate_bronze.png", "label[4.5,3.5;"..F("Speed")..": armor_physics_speed]"..
groups = {armor_torso=40, armor_heal=8, armor_use=75}, "label[4.5,4;"..F("Jump")..": armor_physics_jump]"
wear = 0,
}) armor:register_on_destroy(function(player, index, stack)
minetest.register_tool("3d_armor:leggings_bronze", { local name = player:get_player_name()
description = "Bronze Leggings", local def = stack:get_definition()
inventory_image = "3d_armor_inv_leggings_bronze.png", if name and def and def.description then
groups = {armor_legs=20, armor_heal=4, armor_use=75}, minetest.chat_send_player(name, S("Your @1 got destroyed!", def.description))
wear = 0, end
}) end)
minetest.register_tool("3d_armor:boots_bronze", {
description = "Bronze Boots", local function validate_armor_inventory(player)
inventory_image = "3d_armor_inv_boots_bronze.png", -- Workaround for detached inventory swap exploit
groups = {armor_feet=20, armor_heal=4, armor_use=75}, local _, inv = armor:get_valid_player(player, "[validate_armor_inventory]")
wear = 0, if not inv then
}) return
end
local armor_prev = {}
local armor_list_string = player:get_attribute("3d_armor_inventory")
if armor_list_string then
local armor_list = armor:deserialize_inventory_list(armor_list_string)
for i, stack in ipairs(armor_list) do
if stack:get_count() > 0 then
armor_prev[stack:get_name()] = i
end
end
end
local elements = {}
local player_inv = player:get_inventory()
for i = 1, 6 do
local stack = inv:get_stack("armor", i)
if stack:get_count() > 0 then
local item = stack:get_name()
local element = armor:get_element(item)
if element and not elements[element] then
if armor_prev[item] then
armor_prev[item] = nil
else
-- Item was not in previous inventory
armor:run_callbacks("on_equip", player, i, stack)
end
elements[element] = true;
else
inv:remove_item("armor", stack)
-- The following code returns invalid items to the player's main
-- inventory but could open up the possibity for a hacked client
-- to receive items back they never really had. I am not certain
-- so remove the is_singleplayer check at your own risk :]
if minetest.is_singleplayer() and player_inv and
player_inv:room_for_item("main", stack) then
player_inv:add_item("main", stack)
end
end
end
end
for item, i in pairs(armor_prev) do
local stack = ItemStack(item)
-- Previous item is not in current inventory
armor:run_callbacks("on_unequip", player, i, stack)
end
end
armor.init_player_armor = function(player)
local name = player:get_player_name()
local pos = player:getpos()
if not name or not pos then
return false
end
local armor_inv = minetest.create_detached_inventory(name.."_armor", {
on_put = function(inv, listname, index, stack, player)
validate_armor_inventory(player)
armor:save_armor_inventory(player)
armor:set_player_armor(player)
local player_inv = player:get_inventory()
local stack = inv:get_stack("arm2", 1)
player_inv:set_stack("arm2", 1, stack)
for i=1, 6 do
local stack = inv:get_stack("armor", i)
player_inv:set_stack("armor", i, stack)
end
end,
on_take = function(inv, listname, index, stack, player)
validate_armor_inventory(player)
armor:save_armor_inventory(player)
armor:set_player_armor(player)
local player_inv = player:get_inventory()
local stack = inv:get_stack("arm2", 1)
player_inv:set_stack("arm2", 1, stack)
for i=1, 6 do
local stack = inv:get_stack("armor", i)
player_inv:set_stack("armor", i, stack)
end
end,
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
validate_armor_inventory(player)
armor:save_armor_inventory(player)
armor:set_player_armor(player)
end,
allow_put = function(inv, listname, index, put_stack, player)
if listname == "armor" then
if index == 1 and put_stack:get_definition().groups.armor_head then
return 1
elseif index == 2 and put_stack:get_definition().groups.armor_torso then
return 1
elseif index == 3 and put_stack:get_definition().groups.armor_legs then
return 1
elseif index == 4 and put_stack:get_definition().groups.armor_feet then
return 1
elseif index == 5 and put_stack:get_definition().groups.armor_shield then
return 1
else
return 0
end
else
return 1
end
end,
allow_take = function(inv, listname, index, stack, player)
return stack:get_count()
end,
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
return 0
end,
}, name)
local player_inv = player:get_inventory()
armor_inv:set_size("armor", 6)
armor_inv:set_size("arm2", 1)
player_inv:set_size("arm", 1)
player_inv:set_size("arm2", 1)
local stack = player_inv:get_stack("arm2", 1)
armor_inv:set_stack("arm2", 1, stack)
local player_inv = player:get_inventory()
player_inv:set_size("armor", 6)
for i=1, 6 do
local stack = player_inv:get_stack("armor", i)
armor_inv:set_stack("armor", i, stack)
end
for i=1, 6 do
local stack = armor_inv:get_stack("armor", i)
if stack:get_count() > 0 then
armor:run_callbacks("on_equip", player, i, stack)
end
end
armor.def[name] = {
init_time = minetest.get_gametime(),
level = 0,
state = 0,
count = 0,
groups = {},
}
for _, phys in pairs(armor.physics) do
armor.def[name][phys] = 1
end
for _, attr in pairs(armor.attributes) do
armor.def[name][attr] = 0
end
for group, _ in pairs(armor.registered_groups) do
armor.def[name].groups[group] = 0
end
local skin = armor:get_player_skin(name)
armor.textures[name] = {
skin = skin,
armor = "3d_armor_trans.png",
wielditem = "3d_armor_trans.png",
preview = armor.default_skin.."_preview.png",
}
local texture_path = minetest.get_modpath("player_textures")
if texture_path then
local dir_list = minetest.get_dir_list(texture_path.."/textures")
for _, fn in pairs(dir_list) do
if fn == "player_"..name..".png" then
armor.textures[name].skin = fn
break
end
end
end
armor:set_player_armor(player)
return true
end end
if ARMOR_MATERIALS.diamond then -- Armor Player Model
minetest.register_tool("3d_armor:helmet_diamond", {
description = "Diamond Helmet", default.player_register_model("3d_armor_character.b3d", {
inventory_image = "3d_armor_inv_helmet_diamond.png", animation_speed = 30,
groups = {armor_head=15, armor_heal=1, armor_use=200}, textures = {
wear = 0, armor.default_skin..".png",
}) "3d_armor_trans.png",
minetest.register_tool("3d_armor:chestplate_diamond", { "3d_armor_trans.png",
description = "Diamond Chestplate", },
inventory_image = "3d_armor_inv_chestplate_diamond.png", animations = {
groups = {armor_torso=30, armor_heal=2, armor_use=200}, stand = {x=0, y=79},
wear = 0, lay = {x=162, y=166},
}) walk = {x=168, y=187},
minetest.register_tool("3d_armor:leggings_diamond", { mine = {x=189, y=198},
description = "Diamond Leggings", walk_mine = {x=200, y=219},
inventory_image = "3d_armor_inv_leggings_diamond.png", sit = {x=81, y=160},
groups = {armor_legs=15, armor_heal=1, armor_use=200}, },
wear = 0, })
})
minetest.register_tool("3d_armor:boots_diamond", { minetest.register_on_player_receive_fields(function(player, formname, fields)
description = "Diamond Boots", local name = armor:get_valid_player(player, "[on_player_receive_fields]")
inventory_image = "3d_armor_inv_boots_diamond.png", if not name then
groups = {armor_feet=15, armor_heal=1, armor_use=200}, return
wear = 0, end
}) for field, _ in pairs(fields) do
if string.find(field, "skins_set") then
minetest.after(0, function(player)
local skin = armor:get_player_skin(name)
armor.textures[name].skin = skin
armor:set_player_armor(player)
end, player)
end
end
end)
minetest.register_on_joinplayer(function(player)
default.player_set_model(player, "3d_armor_character.b3d")
minetest.after(0, function(player)
if armor.init_player_armor(player) == false then
pending_players[player] = 0
end
end, player)
end)
minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
if name then
armor.def[name] = nil
armor.textures[name] = nil
end
pending_players[player] = nil
end)
if armor.config.drop == true or armor.config.destroy == true then
minetest.register_on_dieplayer(function(player)
local name, armor_inv = armor:get_valid_player(player, "[on_dieplayer]")
if not name then
return
end
local drop = {}
for i=1, armor_inv:get_size("armor") do
local stack = armor_inv:get_stack("armor", i)
if stack:get_count() > 0 then
table.insert(drop, stack)
armor:run_callbacks("on_unequip", player, i, stack)
armor_inv:set_stack("armor", i, nil)
end
end
armor:save_armor_inventory(player)
armor:set_player_armor(player)
local pos = player:getpos()
if pos and armor.config.destroy == false then
minetest.after(armor.config.bones_delay, function()
local meta = nil
local maxp = vector.add(pos, 8)
local minp = vector.subtract(pos, 8)
local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"})
for _, p in pairs(bones) do
local m = minetest.get_meta(p)
if m:get_string("owner") == name then
meta = m
break
end
end
if meta then
local inv = meta:get_inventory()
for _,stack in ipairs(drop) do
if inv:room_for_item("main", stack) then
inv:add_item("main", stack)
else
armor.drop_armor(pos, stack)
end
end
else
for _,stack in ipairs(drop) do
armor.drop_armor(pos, stack)
end
end
end)
end
end)
end end
if ARMOR_MATERIALS.gold then if armor.config.punch_damage == true then
minetest.register_tool("3d_armor:helmet_gold", { minetest.register_on_punchplayer(function(player, hitter,
description = "Gold Helmet", time_from_last_punch, tool_capabilities)
inventory_image = "3d_armor_inv_helmet_gold.png", local name = player:get_player_name()
groups = {armor_head=20, armor_heal=4, armor_use=50}, if name then
wear = 0, armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
}) last_punch_time[name] = minetest.get_gametime()
minetest.register_tool("3d_armor:chestplate_gold", { end
description = "Gold Chestplate", end)
inventory_image = "3d_armor_inv_chestplate_gold.png",
groups = {armor_torso=40, armor_heal=8, armor_use=50},
wear = 0,
})
minetest.register_tool("3d_armor:leggings_gold", {
description = "Gold Leggings",
inventory_image = "3d_armor_inv_leggings_gold.png",
groups = {armor_legs=20, armor_heal=4, armor_use=50},
wear = 0,
})
minetest.register_tool("3d_armor:boots_gold", {
description = "Gold Boots",
inventory_image = "3d_armor_inv_boots_gold.png",
groups = {armor_feet=20, armor_heal=4, armor_use=50},
wear = 0,
})
end end
if ARMOR_MATERIALS.mithril then minetest.register_on_player_hpchange(function(player, hp_change)
minetest.register_tool("3d_armor:helmet_mithril", { if player and hp_change < 0 then
description = "Mithril Helmet", local name = player:get_player_name()
inventory_image = "3d_armor_inv_helmet_mithril.png", if name then
groups = {armor_head=40, armor_heal=8, armor_use=25}, local heal = armor.def[name].heal
wear = 0, if heal >= math.random(100) then
}) hp_change = 0
minetest.register_tool("3d_armor:chestplate_mithril", { end
description = "Mithril Chestplate", -- check if armor damage was handled by fire or on_punchplayer
inventory_image = "3d_armor_inv_chestplate_mithril.png", local time = last_punch_time[name] or 0
groups = {armor_torso=80, armor_heal=16, armor_use=25}, if time == 0 or time + 1 < minetest.get_gametime() then
wear = 0, armor:punch(player)
}) end
minetest.register_tool("3d_armor:leggings_mithril", { end
description = "Mithril Leggings", end
inventory_image = "3d_armor_inv_leggings_mithril.png", return hp_change
groups = {armor_legs=40, armor_heal=8, armor_use=25}, end, true)
wear = 0,
}) minetest.register_globalstep(function(dtime)
minetest.register_tool("3d_armor:boots_mithril", { timer = timer + dtime
description = "Mithril Boots", if timer > armor.config.init_delay then
inventory_image = "3d_armor_inv_boots_mithril.png", local players = minetest.get_connected_players()
groups = {armor_feet=40, armor_heal=8, armor_use=25}, for player, count in pairs(pending_players) do
wear = 0, local remove = armor.init_player_armor(player) == true
}) pending_players[player] = count + 1
if remove == false and count > armor.config.init_times then
minetest.log("warning", S("3d_armor: Failed to initialize player"))
remove = true
end
if remove == true then
pending_players[player] = nil
end
end
timer = 0
end
end)
-- Fire Protection and water breating, added by TenPlus1
if armor.config.fire_protect == true then
-- override hot nodes so they do not hurt player anywhere but mod
for _, row in pairs(armor.fire_nodes) do
if minetest.registered_nodes[row[1]] then
minetest.override_item(row[1], {damage_per_second = 0})
end
end
else
print (S("[3d_armor] Fire Nodes disabled"))
end end
if armor.config.water_protect == true or armor.config.fire_protect == true then
minetest.register_tool("3d_armor:helmet_crystal", { minetest.register_globalstep(function(dtime)
description = "Crystal Helmet", armor.timer = armor.timer + dtime
inventory_image = "3d_armor_inv_helmet_crystal.png", if armor.timer < armor.config.update_time then
groups = {armor_head=100, armor_heal=50, armor_use=0, armor_fire=10}, return
wear = 0, end
}) for _,player in pairs(minetest.get_connected_players()) do
minetest.register_tool("3d_armor:chestplate_crystal", { local name = player:get_player_name()
description = "Crystal Chestplate", local pos = player:getpos()
inventory_image = "3d_armor_inv_chestplate_crystal.png", local hp = player:get_hp()
groups = {armor_torso=200, armor_heal=100, armor_use=0, armor_fire=10}, if not name or not pos or not hp then
wear = 0, return
}) end
minetest.register_tool("3d_armor:leggings_crystal", { -- water breathing
description = "Crystal Leggings", if armor.config.water_protect == true then
inventory_image = "3d_armor_inv_leggings_crystal.png", if armor.def[name].water >= 1 and
groups = {armor_legs=100, armor_heal=50, armor_use=0, armor_fire=10}, player:get_breath() < 10 then
wear = 0, player:set_breath(10)
}) end
minetest.register_tool("3d_armor:boots_crystal", { end
description = "Crystal Boots", -- fire protection
inventory_image = "3d_armor_inv_boots_crystal.png", if armor.config.fire_protect == true then
groups = {armor_feet=100, armor_heal=50, armor_use=0, physics_speed=1,armor_fire=10,physics_jump=0.5}, local fire_damage = true
wear = 0, pos.y = pos.y + 1.4 -- head level
}) local node_head = minetest.get_node(pos).name
pos.y = pos.y - 1.2 -- feet level
local node_feet = minetest.get_node(pos).name
-- is player inside a hot node?
for _, row in pairs(armor.fire_nodes) do
-- check fire protection, if not enough then get hurt
if row[1] == node_head or row[1] == node_feet then
if fire_damage == true then
armor:punch(player, "fire")
last_punch_time[name] = minetest.get_gametime()
fire_damage = false
end
if hp > 0 and armor.def[name].fire < row[2] then
hp = hp - row[3] * armor.config.update_time
player:set_hp(hp)
break
end
end
end
end
end
armor.timer = 0
end)
end

View File

@ -0,0 +1,45 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

View File

@ -0,0 +1,384 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-06 18:20+0200\n"
"PO-Revision-Date: 2017-08-06 18:20+0200\n"
"Last-Translator: fat115 <fat115@framasoft.org>\n"
"Language-Team: \n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.12\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: ../3d_armor/api.lua
msgid "3d_armor: Player name is nil @1"
msgstr "3d_armor : Nom du joueur non trouvé @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player inventory is nil @1"
msgstr "3d_armor : Inventaire du joueur non trouvé @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Detached armor inventory is nil @1"
msgstr "3d_armor : Inventaire détaché pour l'armure non trouvé @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player reference is nil @1"
msgstr "3d_armor : Référence au joueur non trouvée @1"
#: ../3d_armor/armor.lua
msgid "Admin Helmet"
msgstr "Casque d'admin"
#: ../3d_armor/armor.lua
msgid "Admin Chestplate"
msgstr "Cuirasse d'admin"
#: ../3d_armor/armor.lua
msgid "Admin Leggings"
msgstr "Jambières d'admin"
#: ../3d_armor/armor.lua
msgid "Admin Boots"
msgstr "Bottes d'admin"
#: ../3d_armor/armor.lua
msgid "Wood Helmet"
msgstr "Casque en bois"
#: ../3d_armor/armor.lua
msgid "Wood Chestplate"
msgstr "Cuirasse en bois"
#: ../3d_armor/armor.lua
msgid "Wood Leggings"
msgstr "Jambières en bois"
#: ../3d_armor/armor.lua
msgid "Wood Boots"
msgstr "Bottes en bois"
#: ../3d_armor/armor.lua
msgid "Cactus Helmet"
msgstr "Casque en cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Chestplate"
msgstr "Cuirasse en cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Leggings"
msgstr "Jambières en cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Boots"
msgstr "Bottes en cactus"
#: ../3d_armor/armor.lua
msgid "Steel Helmet"
msgstr "Casque en acier"
#: ../3d_armor/armor.lua
msgid "Steel Chestplate"
msgstr " = Cuirasse en acier"
#: ../3d_armor/armor.lua
msgid "Steel Leggings"
msgstr "Jambières en acier"
#: ../3d_armor/armor.lua
msgid "Steel Boots"
msgstr "Bottes en acier"
#: ../3d_armor/armor.lua
msgid "Bronze Helmet"
msgstr "Casque en bronze"
#: ../3d_armor/armor.lua
msgid "Bronze Chestplate"
msgstr "Cuirasse en bronze"
#: ../3d_armor/armor.lua
msgid "Bronze Leggings"
msgstr "Jambières en bronze"
#: ../3d_armor/armor.lua
msgid "Bronze Boots"
msgstr "Bottes en bronze"
#: ../3d_armor/armor.lua
msgid "Diamond Helmet"
msgstr "Casque en diamant"
#: ../3d_armor/armor.lua
msgid "Diamond Chestplate"
msgstr "Cuirasse en diamant"
#: ../3d_armor/armor.lua
msgid "Diamond Leggings"
msgstr "Jambières en diamant"
#: ../3d_armor/armor.lua
msgid "Diamond Boots"
msgstr "Bottes en diamant"
#: ../3d_armor/armor.lua
msgid "Gold Helmet"
msgstr "Casque en or"
#: ../3d_armor/armor.lua
msgid "Gold Chestplate"
msgstr "Cuirasse en or"
#: ../3d_armor/armor.lua
msgid "Gold Leggings"
msgstr "Jambières en or"
#: ../3d_armor/armor.lua
msgid "Gold Boots"
msgstr "Bottes en or"
#: ../3d_armor/armor.lua
msgid "Mithril Helmet"
msgstr "Casque en mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Chestplate"
msgstr "Cuirasse en mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Leggings"
msgstr "Jambières en mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Boots"
msgstr "Bottes en mithril"
#: ../3d_armor/armor.lua
msgid "Crystal Helmet"
msgstr "Casque en cristal"
#: ../3d_armor/armor.lua
msgid "Crystal Chestplate"
msgstr "Cuirasse en cristal"
#: ../3d_armor/armor.lua
msgid "Crystal Leggings"
msgstr "Jambières en cristal"
#: ../3d_armor/armor.lua
msgid "Crystal Boots"
msgstr "Bottes en cristal"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Radiation"
msgstr "Radiation"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Level"
msgstr "Niveau"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Heal"
msgstr "Soins"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Fire"
msgstr "Fire"
#: ../3d_armor/init.lua
msgid "Your @1 got destroyed!"
msgstr "Une partie de votre armure a été détruite : @1 !"
#: ../3d_armor/init.lua
msgid "3d_armor: Failed to initialize player"
msgstr "3d_armor : Impossible d'initialiser le joueur"
#: ../3d_armor/init.lua
msgid "[3d_armor] Fire Nodes disabled"
msgstr "[3d_armor] Noeuds de type feu désactivés"
#: ../3d_armor_ip/init.lua
msgid "3d_armor_ip: Mod loaded but unused."
msgstr "3d_armor_ip : Mod chargé mais inutilisé."
#: ../3d_armor_ip/init.lua
msgid "Back"
msgstr "Retour"
#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua
msgid "Armor"
msgstr "Armure"
#: ../3d_armor_sfinv/init.lua
msgid "3d_armor_sfinv: Mod loaded but unused."
msgstr "3d_armor_sfinv : Mod chargé mais inutilisé."
#: ../3d_armor_stand/init.lua
msgid "Armor stand top"
msgstr "Haut de support d'armure"
#: ../3d_armor_stand/init.lua
msgid "Armor stand"
msgstr "Support d'armure"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand"
msgstr "Support d'armure"
#: ../3d_armor_stand/init.lua
msgid "Locked Armor stand"
msgstr "Support d'armure verrouillé"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand (owned by @1)"
msgstr "Support d'armure (propriété de @1)"
#: ../3d_armor_ui/init.lua
msgid "3d_armor_ui: Mod loaded but unused."
msgstr "3d_armor_ui : Mod chargé mais inutilisé."
#: ../3d_armor_ui/init.lua
msgid "3d Armor"
msgstr "Armure 3d"
#: ../3d_armor_ui/init.lua
msgid "Armor not initialized!"
msgstr "Armure non initialisée !"
#: ../hazmat_suit/init.lua
msgid "hazmat_suit: Mod loaded but unused."
msgstr "hazmat_suit : Mod chargé mais non utilisé."
#: ../hazmat_suit/init.lua
msgid "Hazmat Helmet"
msgstr "Casque 'Hazmat'"
#: ../hazmat_suit/init.lua
msgid "Hazmat Chestplate"
msgstr "Cuirasse 'Hazmat'"
#: ../hazmat_suit/init.lua
msgid "Hazmat Sleeve"
msgstr "Manches 'Hazmat'"
#: ../hazmat_suit/init.lua
msgid "Hazmat Leggins"
msgstr "Jambières 'Hazmat'"
#: ../hazmat_suit/init.lua
msgid "Hazmat Boots"
msgstr "Bottes 'Hazmat'"
#: ../hazmat_suit/init.lua
msgid "Hazmat Suit"
msgstr "Combinaison 'Hazmat'"
#: ../shields/init.lua
msgid "Admin Shield"
msgstr "Bouclier d'admin"
#: ../shields/init.lua
msgid "Wooden Shield"
msgstr "Bouclier en bois"
#: ../shields/init.lua
msgid "Enhanced Wood Shield"
msgstr "Bouclier en bois amélioré"
#: ../shields/init.lua
msgid "Cactus Shield"
msgstr "Bouclier en cactus"
#: ../shields/init.lua
msgid "Enhanced Cactus Shield"
msgstr "Bouclier en cactus amélioré"
#: ../shields/init.lua
msgid "Steel Shield"
msgstr "Bouclier en acier"
#: ../shields/init.lua
msgid "Bronze Shield"
msgstr "Bouclier en bronze"
#: ../shields/init.lua
msgid "Diamond Shield"
msgstr "Bouclier en diamant"
#: ../shields/init.lua
msgid "Gold Shield"
msgstr "Bouclier en or"
#: ../shields/init.lua
msgid "Mithril Shield"
msgstr "Bouclier en mithril"
#: ../shields/init.lua
msgid "Crystal Shield"
msgstr "Bouclier en cristal"
#: ../technic_armor/init.lua
msgid "technic_armor: Mod loaded but unused."
msgstr "technic_armor : Mod chargé mais non utilisé."
#: ../technic_armor/init.lua
msgid "Lead"
msgstr "plomb"
#: ../technic_armor/init.lua
msgid "Brass"
msgstr "laiton"
#: ../technic_armor/init.lua
msgid "Cast Iron"
msgstr "fonte"
#: ../technic_armor/init.lua
msgid "Carbon Steel"
msgstr "acier au carbone"
#: ../technic_armor/init.lua
msgid "Stainless Steel"
msgstr "acier inoxydable"
#: ../technic_armor/init.lua
msgid "Tin"
msgstr "étain"
#: ../technic_armor/init.lua
msgid "Silver"
msgstr "argent"
#: ../technic_armor/init.lua
msgid "Helmet"
msgstr "Casque"
#: ../technic_armor/init.lua
msgid "Chestplate"
msgstr "Cuirasse"
#: ../technic_armor/init.lua
msgid "Leggings"
msgstr "Jambières"
#: ../technic_armor/init.lua
msgid "Boots"
msgstr "Bottes"
#: ../technic_armor/init.lua
msgid "Shield"
msgstr "Bouclier"
#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
#: ../technic_armor/init.lua
msgid "@1 @2"
msgstr "@2 en @1"

View File

@ -0,0 +1,384 @@
# ITALIAN LOCALE FILE FOR THE 3D ARMOR MODULE
# Copyright (C) 2012-2017 Stuart Jones
# This file is distributed under the same license as the 3D ARMOR package.
# Hamlet <h4mlet@riseup.net>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Italian localization file for the 3D Armor module\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-06 18:20+0200\n"
"PO-Revision-Date: 2017-08-18 00:36+0100\n"
"Last-Translator: H4mlet <h4mlet@riseup.net>\n"
"Language-Team: ITALIANO\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.6.10\n"
#: ../3d_armor/api.lua
msgid "3d_armor: Player name is nil @1"
msgstr "3d_armor: Il nome della/del gicatrice/tore è nullo @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player inventory is nil @1"
msgstr "3d_armor: L'inventario della/del giocatrice/tore è nullo @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Detached armor inventory is nil @1"
msgstr "3d_armor: L'inventario staccato dell'armatura è nullo @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player reference is nil @1"
msgstr "3d_armor: Il riferimento alla/al giocatrice/tore è nullo @1"
#: ../3d_armor/armor.lua
msgid "Admin Helmet"
msgstr "Elmo dell'amministratrice/tore"
#: ../3d_armor/armor.lua
msgid "Admin Chestplate"
msgstr "Corazza dell'amministratrice/tore"
#: ../3d_armor/armor.lua
msgid "Admin Leggings"
msgstr "Gambali dell'amministratrice/tore"
#: ../3d_armor/armor.lua
msgid "Admin Boots"
msgstr "Stivali dell'amministratrice/tore"
#: ../3d_armor/armor.lua
msgid "Wood Helmet"
msgstr "Elmo di legno"
#: ../3d_armor/armor.lua
msgid "Wood Chestplate"
msgstr "Corazza di legno"
#: ../3d_armor/armor.lua
msgid "Wood Leggings"
msgstr "Gambali di legno"
#: ../3d_armor/armor.lua
msgid "Wood Boots"
msgstr "Stivali di legno"
#: ../3d_armor/armor.lua
msgid "Cactus Helmet"
msgstr "Elmo di cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Chestplate"
msgstr "Corazza di cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Leggings"
msgstr "Gambali di cactus"
#: ../3d_armor/armor.lua
msgid "Cactus Boots"
msgstr "Stivali di cactus"
#: ../3d_armor/armor.lua
msgid "Steel Helmet"
msgstr "Elmo di acciaio"
#: ../3d_armor/armor.lua
msgid "Steel Chestplate"
msgstr "Corazza di acciaio"
#: ../3d_armor/armor.lua
msgid "Steel Leggings"
msgstr "Gambali di acciaio"
#: ../3d_armor/armor.lua
msgid "Steel Boots"
msgstr "Stivali di acciaio"
#: ../3d_armor/armor.lua
msgid "Bronze Helmet"
msgstr "Elmo di bronzo"
#: ../3d_armor/armor.lua
msgid "Bronze Chestplate"
msgstr "Corazza di bronzo"
#: ../3d_armor/armor.lua
msgid "Bronze Leggings"
msgstr "Gambali di bronzo"
#: ../3d_armor/armor.lua
msgid "Bronze Boots"
msgstr "Stivali di bronzo"
#: ../3d_armor/armor.lua
msgid "Diamond Helmet"
msgstr "Elmo di diamante"
#: ../3d_armor/armor.lua
msgid "Diamond Chestplate"
msgstr "Corazza di diamante"
#: ../3d_armor/armor.lua
msgid "Diamond Leggings"
msgstr "Gambali di diamante"
#: ../3d_armor/armor.lua
msgid "Diamond Boots"
msgstr "Stivali di diamante"
#: ../3d_armor/armor.lua
msgid "Gold Helmet"
msgstr "Elmo d'oro"
#: ../3d_armor/armor.lua
msgid "Gold Chestplate"
msgstr "Corazza d'oro"
#: ../3d_armor/armor.lua
msgid "Gold Leggings"
msgstr "Gambali d'oro"
#: ../3d_armor/armor.lua
msgid "Gold Boots"
msgstr "Stivali d'oro"
#: ../3d_armor/armor.lua
msgid "Mithril Helmet"
msgstr "Elmo di mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Chestplate"
msgstr "Corazza di mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Leggings"
msgstr "Gambali di mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Boots"
msgstr "Stivali di mithril"
#: ../3d_armor/armor.lua
msgid "Crystal Helmet"
msgstr "Elmo di cristallo"
#: ../3d_armor/armor.lua
msgid "Crystal Chestplate"
msgstr "Corazza di cristallo"
#: ../3d_armor/armor.lua
msgid "Crystal Leggings"
msgstr "Gambali di cristallo"
#: ../3d_armor/armor.lua
msgid "Crystal Boots"
msgstr "Stivali di cristallo"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Radiation"
msgstr "Radiazione"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Level"
msgstr "Livello"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Heal"
msgstr "Guarigione"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Fire"
msgstr "Fuoco"
#: ../3d_armor/init.lua
msgid "Your @1 got destroyed!"
msgstr "Il/i vostro/i @1 è/sono stato/i distrutto/i!"
#: ../3d_armor/init.lua
msgid "3d_armor: Failed to initialize player"
msgstr "3d_armor: Inizializzazione della/del giocatrice/tore fallita"
#: ../3d_armor/init.lua
msgid "[3d_armor] Fire Nodes disabled"
msgstr "[3d_armor] Nodi fuoco disabilitati"
#: ../3d_armor_ip/init.lua
msgid "3d_armor_ip: Mod loaded but unused."
msgstr "3d_armor_ip: Mod caricato ma inutilizzato."
#: ../3d_armor_ip/init.lua
msgid "Back"
msgstr "Indietro"
#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua
msgid "Armor"
msgstr "Armatura"
#: ../3d_armor_sfinv/init.lua
msgid "3d_armor_sfinv: Mod loaded but unused."
msgstr "3d_armor_sfinv: Mod caricato ma inutilizzato."
#: ../3d_armor_stand/init.lua
msgid "Armor stand top"
msgstr "Parte superiore del supporto per armatura"
#: ../3d_armor_stand/init.lua
msgid "Armor stand"
msgstr "Supporto per armatura"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand"
msgstr "Supporto per armatura"
#: ../3d_armor_stand/init.lua
msgid "Locked Armor stand"
msgstr "Supporto per armatura chiuso a chiave"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand (owned by @1)"
msgstr "Supporto per armatura (di proprietà di @1)"
#: ../3d_armor_ui/init.lua
msgid "3d_armor_ui: Mod loaded but unused."
msgstr "3d_armor_ui: Mod caricato ma inutilizzato."
#: ../3d_armor_ui/init.lua
msgid "3d Armor"
msgstr "Armatura 3D"
#: ../3d_armor_ui/init.lua
msgid "Armor not initialized!"
msgstr "Armatura non inizializzata!"
#: ../hazmat_suit/init.lua
msgid "hazmat_suit: Mod loaded but unused."
msgstr "hazmat_suit: Mod caricato ma inutilizzato."
#: ../hazmat_suit/init.lua
msgid "Hazmat Helmet"
msgstr "Elmo hazmat"
#: ../hazmat_suit/init.lua
msgid "Hazmat Chestplate"
msgstr "Corazza hazmat"
#: ../hazmat_suit/init.lua
msgid "Hazmat Sleeve"
msgstr "Manica hazmat"
#: ../hazmat_suit/init.lua
msgid "Hazmat Leggins"
msgstr "Gambali hazmat"
#: ../hazmat_suit/init.lua
msgid "Hazmat Boots"
msgstr "Stivali hazmat"
#: ../hazmat_suit/init.lua
msgid "Hazmat Suit"
msgstr "Completo hazmat"
#: ../shields/init.lua
msgid "Admin Shield"
msgstr "Scudo dell'amministratrice/tore"
#: ../shields/init.lua
msgid "Wooden Shield"
msgstr "Scudo di legno"
#: ../shields/init.lua
msgid "Enhanced Wood Shield"
msgstr "Scudo di legno migliorato"
#: ../shields/init.lua
msgid "Cactus Shield"
msgstr "Scudo di cactus"
#: ../shields/init.lua
msgid "Enhanced Cactus Shield"
msgstr "Scudo di cactus migliorato"
#: ../shields/init.lua
msgid "Steel Shield"
msgstr "Scudo di acciaio"
#: ../shields/init.lua
msgid "Bronze Shield"
msgstr "Scudo di bronzo"
#: ../shields/init.lua
msgid "Diamond Shield"
msgstr "Scudo di diamante"
#: ../shields/init.lua
msgid "Gold Shield"
msgstr "Scudo d'oro"
#: ../shields/init.lua
msgid "Mithril Shield"
msgstr "Scudo di mithril"
#: ../shields/init.lua
msgid "Crystal Shield"
msgstr "Scudo di cristallo"
#: ../technic_armor/init.lua
msgid "technic_armor: Mod loaded but unused."
msgstr "technic_armor: Mod caricato ma inutilizzato."
#: ../technic_armor/init.lua
msgid "Lead"
msgstr "Piombo"
#: ../technic_armor/init.lua
msgid "Brass"
msgstr "Ottone"
#: ../technic_armor/init.lua
msgid "Cast Iron"
msgstr "Ghisa"
#: ../technic_armor/init.lua
msgid "Carbon Steel"
msgstr "Acciaio al carbonio"
#: ../technic_armor/init.lua
msgid "Stainless Steel"
msgstr "Acciaio inossidabile"
#: ../technic_armor/init.lua
msgid "Tin"
msgstr "Stagno"
#: ../technic_armor/init.lua
msgid "Silver"
msgstr "Argento"
#: ../technic_armor/init.lua
msgid "Helmet"
msgstr "Elmo"
#: ../technic_armor/init.lua
msgid "Chestplate"
msgstr "Corazza"
#: ../technic_armor/init.lua
msgid "Leggings"
msgstr "Gambali"
#: ../technic_armor/init.lua
msgid "Boots"
msgstr "Stivali"
#: ../technic_armor/init.lua
msgid "Shield"
msgstr "Scudo"
#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
#: ../technic_armor/init.lua
msgid "@1 @2"
msgstr "@2 di @1"

View File

@ -0,0 +1,386 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-06 18:20+0200\n"
"PO-Revision-Date: 2018-02-07 13:25+0800\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"Last-Translator: MuhdNurHidayat (MNH48) <mnh48mail@gmail.com>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: ms\n"
#: ../3d_armor/api.lua
msgid "3d_armor: Player name is nil @1"
msgstr "3d_armor: Nama pemain tiada nilai @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player inventory is nil @1"
msgstr "3d_armor: Inventori pemain tiada nilai @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Detached armor inventory is nil @1"
msgstr "3d_armor: Inventori perisai terpisah tiada nilai @1"
#: ../3d_armor/api.lua
msgid "3d_armor: Player reference is nil @1"
msgstr "3d_armor: Rujukan pemain tiada nilai @1"
#: ../3d_armor/armor.lua
msgid "Admin Helmet"
msgstr "Helmet Pentadbir"
#: ../3d_armor/armor.lua
msgid "Admin Chestplate"
msgstr "Perisai Dada Pentadbir"
#: ../3d_armor/armor.lua
msgid "Admin Leggings"
msgstr "Perisai Kaki Pentadbir"
#: ../3d_armor/armor.lua
msgid "Admin Boots"
msgstr "But Pentadbir"
#: ../3d_armor/armor.lua
msgid "Wood Helmet"
msgstr "Helmet Kayu"
#: ../3d_armor/armor.lua
msgid "Wood Chestplate"
msgstr "Perisai Dada Kayu"
#: ../3d_armor/armor.lua
msgid "Wood Leggings"
msgstr "Perisai Kaki Kayu"
#: ../3d_armor/armor.lua
msgid "Wood Boots"
msgstr "But Kayu"
#: ../3d_armor/armor.lua
msgid "Cactus Helmet"
msgstr "Helmet Kaktus"
#: ../3d_armor/armor.lua
msgid "Cactus Chestplate"
msgstr "Perisai Dada Kaktus"
#: ../3d_armor/armor.lua
msgid "Cactus Leggings"
msgstr "Perisai Kaki Kaktus"
#: ../3d_armor/armor.lua
msgid "Cactus Boots"
msgstr "But Kaktus"
#: ../3d_armor/armor.lua
msgid "Steel Helmet"
msgstr "Helmet Keluli"
#: ../3d_armor/armor.lua
msgid "Steel Chestplate"
msgstr "Perisai Dada Keluli"
#: ../3d_armor/armor.lua
msgid "Steel Leggings"
msgstr "Perisai Kaki Keluli"
#: ../3d_armor/armor.lua
msgid "Steel Boots"
msgstr "But Keluli"
#: ../3d_armor/armor.lua
msgid "Bronze Helmet"
msgstr "Helmet Gangsa"
#: ../3d_armor/armor.lua
msgid "Bronze Chestplate"
msgstr "Perisai Dada Gangsa"
#: ../3d_armor/armor.lua
msgid "Bronze Leggings"
msgstr "Perisai Kaki Gangsa"
#: ../3d_armor/armor.lua
msgid "Bronze Boots"
msgstr "But Gangsa"
# 'Diamond' should be translated as 'intan' because the more common word 'berlian' is only specifically used for the gemstone diamond.
#: ../3d_armor/armor.lua
msgid "Diamond Helmet"
msgstr "Helmet Intan"
#: ../3d_armor/armor.lua
msgid "Diamond Chestplate"
msgstr "Perisai Dada Intan"
#: ../3d_armor/armor.lua
msgid "Diamond Leggings"
msgstr "Perisai Kaki Intan"
#: ../3d_armor/armor.lua
msgid "Diamond Boots"
msgstr "But Intan"
#: ../3d_armor/armor.lua
msgid "Gold Helmet"
msgstr "Helmet Emas"
#: ../3d_armor/armor.lua
msgid "Gold Chestplate"
msgstr "Perisai Dada Emas"
#: ../3d_armor/armor.lua
msgid "Gold Leggings"
msgstr "Perisai Kaki Emas"
#: ../3d_armor/armor.lua
msgid "Gold Boots"
msgstr "But Emas"
#: ../3d_armor/armor.lua
msgid "Mithril Helmet"
msgstr "Helmet Mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Chestplate"
msgstr "Perisai Dada Mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Leggings"
msgstr "Perisai Kaki Mithril"
#: ../3d_armor/armor.lua
msgid "Mithril Boots"
msgstr "But Mithril"
#: ../3d_armor/armor.lua
msgid "Crystal Helmet"
msgstr "Helmet Kristal"
#: ../3d_armor/armor.lua
msgid "Crystal Chestplate"
msgstr "Perisai Dada Kristal"
#: ../3d_armor/armor.lua
msgid "Crystal Leggings"
msgstr "Perisai Kaki Kristal"
#: ../3d_armor/armor.lua
msgid "Crystal Boots"
msgstr "But Kristal"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Radiation"
msgstr "Radiasi"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Level"
msgstr "Tahap"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Heal"
msgstr "Pulih"
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Fire"
msgstr "Api"
#: ../3d_armor/init.lua
msgid "Your @1 got destroyed!"
msgstr "@1 anda telah musnah!"
#: ../3d_armor/init.lua
msgid "3d_armor: Failed to initialize player"
msgstr "3d_armor: Gagal mengasalkan pemain"
#: ../3d_armor/init.lua
msgid "[3d_armor] Fire Nodes disabled"
msgstr "[3d_armor] Nod-nod Api dilumpuhkan"
#: ../3d_armor_ip/init.lua
msgid "3d_armor_ip: Mod loaded but unused."
msgstr "3d_armor_ip: Mods dimuatkan tetapi tidak digunakan."
#: ../3d_armor_ip/init.lua
msgid "Back"
msgstr "Kembali"
#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua
msgid "Armor"
msgstr "Perisai"
#: ../3d_armor_sfinv/init.lua
msgid "3d_armor_sfinv: Mod loaded but unused."
msgstr "3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan."
#: ../3d_armor_stand/init.lua
msgid "Armor stand top"
msgstr "Bhg atas dirian perisai"
#: ../3d_armor_stand/init.lua
msgid "Armor stand"
msgstr "Dirian perisai"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand"
msgstr "Dirian Perisai"
#: ../3d_armor_stand/init.lua
msgid "Locked Armor stand"
msgstr "Dirian perisai Berkunci"
#: ../3d_armor_stand/init.lua
msgid "Armor Stand (owned by @1)"
msgstr "Dirian Perisai (milik @1)"
#: ../3d_armor_ui/init.lua
msgid "3d_armor_ui: Mod loaded but unused."
msgstr "3d_armor_ui: Mods dimuatkan tetapi tidak digunakan."
#: ../3d_armor_ui/init.lua
msgid "3d Armor"
msgstr "Perisai 3d"
#: ../3d_armor_ui/init.lua
msgid "Armor not initialized!"
msgstr "Perisai tidak diasalkan!"
#: ../hazmat_suit/init.lua
msgid "hazmat_suit: Mod loaded but unused."
msgstr "hazmat_suit: Mods dimuatkan tetapi tidak digunakan."
#: ../hazmat_suit/init.lua
msgid "Hazmat Helmet"
msgstr "Helmet Keselamatan"
#: ../hazmat_suit/init.lua
msgid "Hazmat Chestplate"
msgstr "Perisai Dada Keselamatan"
#: ../hazmat_suit/init.lua
msgid "Hazmat Sleeve"
msgstr "Perisai Tangan Keselamatan"
#: ../hazmat_suit/init.lua
msgid "Hazmat Leggins"
msgstr "Perisai Kaki Keselamatan"
#: ../hazmat_suit/init.lua
msgid "Hazmat Boots"
msgstr "But Keselamatan"
#: ../hazmat_suit/init.lua
msgid "Hazmat Suit"
msgstr "Pakaian Keselamatan"
#: ../shields/init.lua
msgid "Admin Shield"
msgstr "Perisai Pegang Pentadbir"
#: ../shields/init.lua
msgid "Wooden Shield"
msgstr "Perisai Pegang Kayu"
#: ../shields/init.lua
msgid "Enhanced Wood Shield"
msgstr "Perisai Pegang Kayu Kukuh"
#: ../shields/init.lua
msgid "Cactus Shield"
msgstr "Perisai Pegang Kaktus"
#: ../shields/init.lua
msgid "Enhanced Cactus Shield"
msgstr "Perisai Pegang Kaktus Kukuh"
#: ../shields/init.lua
msgid "Steel Shield"
msgstr "Perisai Pegang Keluli"
#: ../shields/init.lua
msgid "Bronze Shield"
msgstr "Perisai Pegang Gangsa"
#: ../shields/init.lua
msgid "Diamond Shield"
msgstr "Perisai Pegang Intan"
#: ../shields/init.lua
msgid "Gold Shield"
msgstr "Perisai Pegang Emas"
#: ../shields/init.lua
msgid "Mithril Shield"
msgstr "Perisai Pegang Mithril"
#: ../shields/init.lua
msgid "Crystal Shield"
msgstr "Perisai Pegang Kristal"
#: ../technic_armor/init.lua
msgid "technic_armor: Mod loaded but unused."
msgstr "technic_armor: Mods dimuatkan tetapi tidak digunakan."
# 'Lead' here is the chemical compound so the translation is 'plumbum', not 'pimpin' (act of leading).
#: ../technic_armor/init.lua
msgid "Lead"
msgstr "Plumbum"
#: ../technic_armor/init.lua
msgid "Brass"
msgstr "Loyang"
#: ../technic_armor/init.lua
msgid "Cast Iron"
msgstr "Besi Tuang"
#: ../technic_armor/init.lua
msgid "Carbon Steel"
msgstr "Keluli Karbon"
#: ../technic_armor/init.lua
msgid "Stainless Steel"
msgstr "Keluli Tahan Karat"
#: ../technic_armor/init.lua
msgid "Tin"
msgstr "Timah"
#: ../technic_armor/init.lua
msgid "Silver"
msgstr "Perak"
#: ../technic_armor/init.lua
msgid "Helmet"
msgstr "Helmet"
#: ../technic_armor/init.lua
msgid "Chestplate"
msgstr "Perisai Dada"
#: ../technic_armor/init.lua
msgid "Leggings"
msgstr "Perisai Kaki"
#: ../technic_armor/init.lua
msgid "Boots"
msgstr "But"
#: ../technic_armor/init.lua
msgid "Shield"
msgstr "Perisai Pegang"
#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
#: ../technic_armor/init.lua
msgid "@1 @2"
msgstr "@2 @1"

View File

@ -0,0 +1,383 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-08-06 18:20+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../3d_armor/api.lua
msgid "3d_armor: Player name is nil @1"
msgstr ""
#: ../3d_armor/api.lua
msgid "3d_armor: Player inventory is nil @1"
msgstr ""
#: ../3d_armor/api.lua
msgid "3d_armor: Detached armor inventory is nil @1"
msgstr ""
#: ../3d_armor/api.lua
msgid "3d_armor: Player reference is nil @1"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Admin Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Admin Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Admin Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Admin Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Wood Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Wood Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Wood Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Wood Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Cactus Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Cactus Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Cactus Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Cactus Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Steel Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Steel Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Steel Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Steel Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Bronze Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Bronze Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Bronze Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Bronze Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Diamond Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Diamond Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Diamond Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Diamond Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Gold Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Gold Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Gold Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Gold Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Mithril Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Mithril Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Mithril Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Mithril Boots"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Crystal Helmet"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Crystal Chestplate"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Crystal Leggings"
msgstr ""
#: ../3d_armor/armor.lua
msgid "Crystal Boots"
msgstr ""
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Radiation"
msgstr ""
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Level"
msgstr ""
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Heal"
msgstr ""
#: ../3d_armor/init.lua ../3d_armor_ui/init.lua
msgid "Fire"
msgstr ""
#: ../3d_armor/init.lua
msgid "Your @1 got destroyed!"
msgstr ""
#: ../3d_armor/init.lua
msgid "3d_armor: Failed to initialize player"
msgstr ""
#: ../3d_armor/init.lua
msgid "[3d_armor] Fire Nodes disabled"
msgstr ""
#: ../3d_armor_ip/init.lua
msgid "3d_armor_ip: Mod loaded but unused."
msgstr ""
#: ../3d_armor_ip/init.lua
msgid "Back"
msgstr ""
#: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua
msgid "Armor"
msgstr ""
#: ../3d_armor_sfinv/init.lua
msgid "3d_armor_sfinv: Mod loaded but unused."
msgstr ""
#: ../3d_armor_stand/init.lua
msgid "Armor stand top"
msgstr ""
#: ../3d_armor_stand/init.lua
msgid "Armor stand"
msgstr ""
#: ../3d_armor_stand/init.lua
msgid "Armor Stand"
msgstr ""
#: ../3d_armor_stand/init.lua
msgid "Locked Armor stand"
msgstr ""
#: ../3d_armor_stand/init.lua
msgid "Armor Stand (owned by @1)"
msgstr ""
#: ../3d_armor_ui/init.lua
msgid "3d_armor_ui: Mod loaded but unused."
msgstr ""
#: ../3d_armor_ui/init.lua
msgid "3d Armor"
msgstr ""
#: ../3d_armor_ui/init.lua
msgid "Armor not initialized!"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "hazmat_suit: Mod loaded but unused."
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Helmet"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Chestplate"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Sleeve"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Leggins"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Boots"
msgstr ""
#: ../hazmat_suit/init.lua
msgid "Hazmat Suit"
msgstr ""
#: ../shields/init.lua
msgid "Admin Shield"
msgstr ""
#: ../shields/init.lua
msgid "Wooden Shield"
msgstr ""
#: ../shields/init.lua
msgid "Enhanced Wood Shield"
msgstr ""
#: ../shields/init.lua
msgid "Cactus Shield"
msgstr ""
#: ../shields/init.lua
msgid "Enhanced Cactus Shield"
msgstr ""
#: ../shields/init.lua
msgid "Steel Shield"
msgstr ""
#: ../shields/init.lua
msgid "Bronze Shield"
msgstr ""
#: ../shields/init.lua
msgid "Diamond Shield"
msgstr ""
#: ../shields/init.lua
msgid "Gold Shield"
msgstr ""
#: ../shields/init.lua
msgid "Mithril Shield"
msgstr ""
#: ../shields/init.lua
msgid "Crystal Shield"
msgstr ""
#: ../technic_armor/init.lua
msgid "technic_armor: Mod loaded but unused."
msgstr ""
#: ../technic_armor/init.lua
msgid "Lead"
msgstr ""
#: ../technic_armor/init.lua
msgid "Brass"
msgstr ""
#: ../technic_armor/init.lua
msgid "Cast Iron"
msgstr ""
#: ../technic_armor/init.lua
msgid "Carbon Steel"
msgstr ""
#: ../technic_armor/init.lua
msgid "Stainless Steel"
msgstr ""
#: ../technic_armor/init.lua
msgid "Tin"
msgstr ""
#: ../technic_armor/init.lua
msgid "Silver"
msgstr ""
#: ../technic_armor/init.lua
msgid "Helmet"
msgstr ""
#: ../technic_armor/init.lua
msgid "Chestplate"
msgstr ""
#: ../technic_armor/init.lua
msgid "Leggings"
msgstr ""
#: ../technic_armor/init.lua
msgid "Boots"
msgstr ""
#: ../technic_armor/init.lua
msgid "Shield"
msgstr ""
#. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string)
#: ../technic_armor/init.lua
msgid "@1 @2"
msgstr ""

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 782 B

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 712 B

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 883 B

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 524 B

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 902 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 893 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 853 B

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 556 B

After

Width:  |  Height:  |  Size: 478 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 887 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 878 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 B

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 364 B

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