forked from mtcontrib/3d_armor
		
	Compare commits
	
		
			23 Commits
		
	
	
		
			babb15262d
			...
			master
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8f775a64f0 | ||
| 
						 | 
					dbe0a9276a | ||
| 
						 | 
					dbc891a711 | ||
| 
						 | 
					a79d1383aa | ||
| 
						 | 
					220cbc8d92 | ||
| 
						 | 
					8fe014e6d3 | ||
| 
						 | 
					a586aeee0c | ||
| 
						 | 
					082e866274 | ||
| 
						 | 
					c224a73df7 | ||
| 
						 | 
					280165fada | ||
| 
						 | 
					ab1bec3be8 | ||
| 
						 | 
					22955b413a | ||
| 
						 | 
					1fcbf64d53 | ||
| 
						 | 
					fb86c02e43 | ||
| 
						 | 
					20917da061 | ||
| 
						 | 
					7bd77a7b80 | ||
| 
						 | 
					25369e5165 | ||
| 
						 | 
					7fc313f911 | ||
| 
						 | 
					4bac73fc9e | ||
| 
						 | 
					f430395b64 | ||
| 
						 | 
					467709c935 | ||
| 
						 | 
					e0b6112320 | ||
| 
						 | 
					f3e66701aa | 
@@ -352,7 +352,7 @@ armor.update_player_visuals = function(self, player)
 | 
			
		||||
	end
 | 
			
		||||
	local name = player:get_player_name()
 | 
			
		||||
	if self.textures[name] then
 | 
			
		||||
		default.player_set_textures(player, {
 | 
			
		||||
		player_api.set_textures(player, {
 | 
			
		||||
			self.textures[name].skin,
 | 
			
		||||
			self.textures[name].armor,
 | 
			
		||||
			self.textures[name].wielditem,
 | 
			
		||||
@@ -373,7 +373,7 @@ armor.set_player_armor = function(self, player)
 | 
			
		||||
	local state = 0
 | 
			
		||||
	local count = 0
 | 
			
		||||
	local preview = armor:get_preview(name)
 | 
			
		||||
	local texture = "3d_armor_trans.png"
 | 
			
		||||
	local texture = "blank.png"
 | 
			
		||||
	local physics = {}
 | 
			
		||||
	local attributes = {}
 | 
			
		||||
	local levels = {}
 | 
			
		||||
@@ -415,7 +415,7 @@ armor.set_player_armor = function(self, player)
 | 
			
		||||
				end
 | 
			
		||||
				-- DEPRECATED, use armor_groups instead
 | 
			
		||||
				if def.groups["armor_radiation"] and levels["radiation"] then
 | 
			
		||||
					levels["radiation"] = def.groups["armor_radiation"]
 | 
			
		||||
					levels["radiation"] = levels["radiation"] + def.groups["armor_radiation"]
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
			local item = stack:get_name()
 | 
			
		||||
@@ -694,6 +694,9 @@ armor.equip = function(self, player, itemstack)
 | 
			
		||||
				index = i
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
		if not index then -- armor inventory is full with other armor elements
 | 
			
		||||
			return itemstack
 | 
			
		||||
		end
 | 
			
		||||
		local stack = itemstack:take_item()
 | 
			
		||||
		armor_inv:set_stack("armor", index, stack)
 | 
			
		||||
		self:run_callbacks("on_equip", player, index, stack)
 | 
			
		||||
@@ -719,11 +722,14 @@ armor.unequip = function(self, player, armor_element)
 | 
			
		||||
		if self:get_element(stack:get_name()) == armor_element then
 | 
			
		||||
			armor_inv:set_stack("armor", i, "")
 | 
			
		||||
			minetest.after(0, function()
 | 
			
		||||
				local inv = player:get_inventory()
 | 
			
		||||
				if inv:room_for_item("main", stack) then
 | 
			
		||||
					inv:add_item("main", stack)
 | 
			
		||||
				else
 | 
			
		||||
					minetest.add_item(player:get_pos(), stack)
 | 
			
		||||
				local pplayer = minetest.get_player_by_name(name)
 | 
			
		||||
				if pplayer then -- player is still online
 | 
			
		||||
					local inv = pplayer:get_inventory()
 | 
			
		||||
					if inv:room_for_item("main", stack) then
 | 
			
		||||
						inv:add_item("main", stack)
 | 
			
		||||
					else
 | 
			
		||||
						minetest.add_item(pplayer:get_pos(), stack)
 | 
			
		||||
					end
 | 
			
		||||
				end
 | 
			
		||||
			end)
 | 
			
		||||
			self:run_callbacks("on_unequip", player, i, stack)
 | 
			
		||||
 
 | 
			
		||||
@@ -268,8 +268,8 @@ local function init_player_armor(initplayer)
 | 
			
		||||
	local skin = armor:get_player_skin(name)
 | 
			
		||||
	armor.textures[name] = {
 | 
			
		||||
		skin = skin,
 | 
			
		||||
		armor = "3d_armor_trans.png",
 | 
			
		||||
		wielditem = "3d_armor_trans.png",
 | 
			
		||||
		armor = "blank.png",
 | 
			
		||||
		wielditem = "blank.png",
 | 
			
		||||
		preview = armor.default_skin.."_preview.png",
 | 
			
		||||
	}
 | 
			
		||||
	local texture_path = minetest.get_modpath("player_textures")
 | 
			
		||||
@@ -291,21 +291,26 @@ player_api.register_model("3d_armor_character.b3d", {
 | 
			
		||||
	animation_speed = 30,
 | 
			
		||||
	textures = {
 | 
			
		||||
		armor.default_skin..".png",
 | 
			
		||||
		"3d_armor_trans.png",
 | 
			
		||||
		"3d_armor_trans.png",
 | 
			
		||||
		"blank.png",
 | 
			
		||||
		"blank.png",
 | 
			
		||||
	},
 | 
			
		||||
	animations = {
 | 
			
		||||
		stand = {x=0, y=79},
 | 
			
		||||
		lay = {x=162, y=166},
 | 
			
		||||
		lay = {x=162, y=166, eye_height = 0.3, override_local = true,
 | 
			
		||||
			collisionbox = {-0.6, 0.0, -0.6, 0.6, 0.3, 0.6}},
 | 
			
		||||
		walk = {x=168, y=187},
 | 
			
		||||
		mine = {x=189, y=198},
 | 
			
		||||
		walk_mine = {x=200, y=219},
 | 
			
		||||
		sit = {x=81, y=160},
 | 
			
		||||
		sit = {x=81, y=160, eye_height = 0.8, override_local = true,
 | 
			
		||||
			collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.0, 0.3}},
 | 
			
		||||
		-- compatibility w/ the emote mod
 | 
			
		||||
		wave = {x = 192, y = 196, override_local = true},
 | 
			
		||||
		point = {x = 196, y = 196, override_local = true},
 | 
			
		||||
		freeze = {x = 205, y = 205, override_local = true},
 | 
			
		||||
	},
 | 
			
		||||
	collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
 | 
			
		||||
	-- stepheight: use default
 | 
			
		||||
	eye_height = 1.47,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
 | 
			
		||||
@@ -322,7 +327,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
minetest.register_on_joinplayer(function(player)
 | 
			
		||||
	default.player_set_model(player, "3d_armor_character.b3d")
 | 
			
		||||
	player_api.set_model(player, "3d_armor_character.b3d")
 | 
			
		||||
	init_player_armor(player)
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
@@ -395,10 +400,14 @@ if armor.config.punch_damage == true then
 | 
			
		||||
	minetest.register_on_punchplayer(function(player, hitter,
 | 
			
		||||
			time_from_last_punch, tool_capabilities)
 | 
			
		||||
		local name = player:get_player_name()
 | 
			
		||||
		local hit_ip = hitter:is_player()
 | 
			
		||||
		if name and hit_ip and minetest.is_protected(player:get_pos(), "") then
 | 
			
		||||
			return
 | 
			
		||||
		elseif name then
 | 
			
		||||
		if hitter then
 | 
			
		||||
			local hit_ip = hitter:is_player()
 | 
			
		||||
			if name and hit_ip and minetest.is_protected(player:get_pos(), "") then
 | 
			
		||||
				return
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
 | 
			
		||||
		if name then
 | 
			
		||||
			armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
 | 
			
		||||
			last_punch_time[name] = minetest.get_gametime()
 | 
			
		||||
		end
 | 
			
		||||
@@ -440,7 +449,7 @@ minetest.register_globalstep(function(dtime)
 | 
			
		||||
			local name = player:get_player_name()
 | 
			
		||||
			if armor.def[name].feather > 0 then
 | 
			
		||||
				local vel_y = player:get_velocity().y
 | 
			
		||||
				if vel_y < 0 and vel_y < 3 then
 | 
			
		||||
				if vel_y < -0.5 then
 | 
			
		||||
					vel_y = -(vel_y * 0.05)
 | 
			
		||||
					player:add_velocity({x = 0, y = vel_y, z = 0})
 | 
			
		||||
				end
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
# textdomain: 3d_armor
 | 
			
		||||
Radiation=Radiado
 | 
			
		||||
Level=Nivelo
 | 
			
		||||
Heal=Sanigi
 | 
			
		||||
Heal=Blokŝanco
 | 
			
		||||
Fire=Fajro
 | 
			
		||||
Your @1 is almost broken!=Via @1 estas preskaŭ rompita!
 | 
			
		||||
Your @1 got destroyed!=Via @1 detruiĝis!
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								3d_armor/locale/3d_armor.pl.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								3d_armor/locale/3d_armor.pl.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
# textdomain: 3d_armor
 | 
			
		||||
Radiation=Promieniowanie
 | 
			
		||||
Level=Poziom
 | 
			
		||||
Heal=Uzdrawianie
 | 
			
		||||
Fire=Ogień
 | 
			
		||||
Your @1 is almost broken!=Twój @1 jest prawie zepsuty!
 | 
			
		||||
Your @1 got destroyed!=Twój @1 został zniszczony!
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
# textdomain: 3d_armor
 | 
			
		||||
Radiation=излучение
 | 
			
		||||
Level=уровень
 | 
			
		||||
Heal=исцеление
 | 
			
		||||
Fire=огонь
 | 
			
		||||
Your @1 is almost broken!=
 | 
			
		||||
Your @1 got destroyed!=твой(и) @1 был(и) разрушен(ы)!
 | 
			
		||||
Radiation=Излучение
 | 
			
		||||
Level=Уровень
 | 
			
		||||
Heal=Исцеление
 | 
			
		||||
Fire=Пламя
 | 
			
		||||
Your @1 is almost broken!=Ваш предмет «@1» почти сломан!
 | 
			
		||||
Your @1 got destroyed!=Ваш предмет «@1» был уничтожен!
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								3d_armor/locale/3d_armor.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								3d_armor/locale/3d_armor.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
# textdomain: 3d_armor
 | 
			
		||||
Radiation=Радіація
 | 
			
		||||
Level=Рівень
 | 
			
		||||
Heal=Зцілення
 | 
			
		||||
Fire=Вогонь
 | 
			
		||||
Your @1 is almost broken!=Ваш @1 майже зламаний!
 | 
			
		||||
Your @1 got destroyed!=Ваш(і) @1 був(ли) зламаний(і)!
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 274 B  | 
@@ -1,3 +1,3 @@
 | 
			
		||||
# textdomain: 3d_armor_ip
 | 
			
		||||
Back=Dorso
 | 
			
		||||
Armor=Kiraso
 | 
			
		||||
Armor=Armaĵo
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								3d_armor_ip/locale/3d_armor_ip.ru.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								3d_armor_ip/locale/3d_armor_ip.ru.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
# textdomain: 3d_armor_ip
 | 
			
		||||
Back=Назад
 | 
			
		||||
Armor=Броня
 | 
			
		||||
							
								
								
									
										3
									
								
								3d_armor_ip/locale/3d_armor_ip.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								3d_armor_ip/locale/3d_armor_ip.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
			
		||||
# textdomain: 3d_armor_ip
 | 
			
		||||
Back=Назад
 | 
			
		||||
Armor=Броня
 | 
			
		||||
@@ -15,7 +15,7 @@ sfinv.register_page("3d_armor:armor", {
 | 
			
		||||
	end
 | 
			
		||||
})
 | 
			
		||||
armor:register_on_update(function(player)
 | 
			
		||||
	if sfinv.enabled then
 | 
			
		||||
	if sfinv.enabled and sfinv.get_page(player) == "3d_armor:armor" then
 | 
			
		||||
		sfinv.set_player_inventory_formspec(player)
 | 
			
		||||
	end
 | 
			
		||||
end)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,2 @@
 | 
			
		||||
# textdomain: 3d_armor_sfinv
 | 
			
		||||
Armor=Kiraso
 | 
			
		||||
Armor=Armaĵoj
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								3d_armor_sfinv/locale/3d_armor_sfinv.ru.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								3d_armor_sfinv/locale/3d_armor_sfinv.ru.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
# textdomain: 3d_armor_sfinv
 | 
			
		||||
Armor=Броня
 | 
			
		||||
							
								
								
									
										2
									
								
								3d_armor_sfinv/locale/3d_armor_sfinv.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								3d_armor_sfinv/locale/3d_armor_sfinv.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,2 @@
 | 
			
		||||
# textdomain: 3d_armor_sfinv
 | 
			
		||||
Armor=Броня
 | 
			
		||||
@@ -6,27 +6,27 @@ local armor_stand_formspec = "size[8,7]" ..
 | 
			
		||||
	default.gui_bg_img ..
 | 
			
		||||
	default.gui_slots ..
 | 
			
		||||
	default.get_hotbar_bg(0,3) ..
 | 
			
		||||
	"list[current_name;armor_head;3,0.5;1,1;]" ..
 | 
			
		||||
	"list[current_name;armor_torso;4,0.5;1,1;]" ..
 | 
			
		||||
	"list[current_name;armor_legs;3,1.5;1,1;]" ..
 | 
			
		||||
	"list[current_name;armor_feet;4,1.5;1,1;]" ..
 | 
			
		||||
	"list[current_name;main;3,0.5;2,1;]" ..
 | 
			
		||||
	"list[current_name;main;3,1.5;2,1;2]" ..
 | 
			
		||||
	"image[3,0.5;1,1;3d_armor_stand_head.png]" ..
 | 
			
		||||
	"image[4,0.5;1,1;3d_armor_stand_torso.png]" ..
 | 
			
		||||
	"image[3,1.5;1,1;3d_armor_stand_legs.png]" ..
 | 
			
		||||
	"image[4,1.5;1,1;3d_armor_stand_feet.png]" ..
 | 
			
		||||
	"list[current_player;main;0,3;8,1;]" ..
 | 
			
		||||
	"list[current_player;main;0,4.25;8,3;8]"
 | 
			
		||||
	"list[current_player;main;0,4.25;8,3;8]" ..
 | 
			
		||||
	"listring[current_name;main]" ..
 | 
			
		||||
	"listring[current_player;main]"
 | 
			
		||||
 | 
			
		||||
local elements = {"head", "torso", "legs", "feet"}
 | 
			
		||||
 | 
			
		||||
local function drop_armor(pos)
 | 
			
		||||
	local meta = minetest.get_meta(pos)
 | 
			
		||||
	local inv = meta:get_inventory()
 | 
			
		||||
	for _, element in pairs(elements) do
 | 
			
		||||
		local stack = inv:get_stack("armor_"..element, 1)
 | 
			
		||||
	for i = 1, 4 do
 | 
			
		||||
		local stack = inv:get_stack("main", i)
 | 
			
		||||
		if stack and stack:get_count() > 0 then
 | 
			
		||||
			armor.drop_armor(pos, stack)
 | 
			
		||||
			inv:set_stack("armor_"..element, 1, nil)
 | 
			
		||||
			inv:set_stack("main", i, nil)
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
end
 | 
			
		||||
@@ -62,14 +62,14 @@ local function update_entity(pos)
 | 
			
		||||
		object = minetest.add_entity(pos, "3d_armor_stand:armor_entity")
 | 
			
		||||
	end
 | 
			
		||||
	if object then
 | 
			
		||||
		local texture = "3d_armor_trans.png"
 | 
			
		||||
		local texture = "blank.png"
 | 
			
		||||
		local textures = {}
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		local yaw = 0
 | 
			
		||||
		if inv then
 | 
			
		||||
			for _, element in pairs(elements) do
 | 
			
		||||
				local stack = inv:get_stack("armor_"..element, 1)
 | 
			
		||||
			for i, element in ipairs(elements) do
 | 
			
		||||
				local stack = inv:get_stack("main", i)
 | 
			
		||||
				if stack:get_count() == 1 then
 | 
			
		||||
					local item = stack:get_name() or ""
 | 
			
		||||
					local def = stack:get_definition() or {}
 | 
			
		||||
@@ -144,159 +144,144 @@ minetest.register_node("3d_armor_stand:top", {
 | 
			
		||||
	buildable_to = false,
 | 
			
		||||
	drop = "",
 | 
			
		||||
	groups = {not_in_creative_inventory = 1},
 | 
			
		||||
	is_ground_content = false,
 | 
			
		||||
	on_blast = function() end,
 | 
			
		||||
	tiles = {"3d_armor_trans.png"},
 | 
			
		||||
	tiles = {"blank.png"},
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_node("3d_armor_stand:armor_stand", {
 | 
			
		||||
	description = S("Armor Stand"),
 | 
			
		||||
	drawtype = "mesh",
 | 
			
		||||
	mesh = "3d_armor_stand.obj",
 | 
			
		||||
	tiles = {"3d_armor_stand.png"},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	selection_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
			{-0.25, -0.4375, -0.25, 0.25, 1.4, 0.25},
 | 
			
		||||
			{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	groups = {choppy=2, oddly_breakable_by_hand=2},
 | 
			
		||||
	sounds = default.node_sound_wood_defaults(),
 | 
			
		||||
	on_construct = function(pos)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		meta:set_string("formspec", armor_stand_formspec)
 | 
			
		||||
		meta:set_string("infotext", S("Armor Stand"))
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		for _, element in pairs(elements) do
 | 
			
		||||
			inv:set_size("armor_"..element, 1)
 | 
			
		||||
local function register_armor_stand(def)
 | 
			
		||||
	local function owns_armor_stand(pos, meta, player)
 | 
			
		||||
		if def.name == "locked_armor_stand" and not has_locked_armor_stand_privilege(meta, player) then
 | 
			
		||||
			return false
 | 
			
		||||
		end
 | 
			
		||||
	end,
 | 
			
		||||
	can_dig = function(pos, player)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		for _, element in pairs(elements) do
 | 
			
		||||
			if not inv:is_empty("armor_"..element) then
 | 
			
		||||
				return false
 | 
			
		||||
			end
 | 
			
		||||
		local has_access = minetest.is_player(player) and not minetest.is_protected(pos, player:get_player_name())
 | 
			
		||||
		if def.name == "shared_armor_stand" and not has_access then
 | 
			
		||||
			return false
 | 
			
		||||
		end
 | 
			
		||||
		return true
 | 
			
		||||
	end,
 | 
			
		||||
	after_place_node = function(pos, placer)
 | 
			
		||||
		minetest.add_entity(pos, "3d_armor_stand:armor_entity")
 | 
			
		||||
		add_hidden_node(pos, placer)
 | 
			
		||||
	end,
 | 
			
		||||
	allow_metadata_inventory_put = function(pos, listname, index, stack)
 | 
			
		||||
		local def = stack:get_definition() or {}
 | 
			
		||||
		local groups = def.groups or {}
 | 
			
		||||
		if groups[listname] then
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	minetest.register_node("3d_armor_stand:" .. def.name, {
 | 
			
		||||
		description = def.description,
 | 
			
		||||
		drawtype = "mesh",
 | 
			
		||||
		mesh = "3d_armor_stand.obj",
 | 
			
		||||
		tiles = {def.texture},
 | 
			
		||||
		use_texture_alpha = "clip",
 | 
			
		||||
		paramtype = "light",
 | 
			
		||||
		paramtype2 = "facedir",
 | 
			
		||||
		walkable = false,
 | 
			
		||||
		selection_box = {
 | 
			
		||||
			type = "fixed",
 | 
			
		||||
			fixed = {
 | 
			
		||||
				{-0.25, -0.4375, -0.25, 0.25, 1.4, 0.25},
 | 
			
		||||
				{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
		groups = {choppy=2, oddly_breakable_by_hand=2},
 | 
			
		||||
		is_ground_content = false,
 | 
			
		||||
		sounds = default.node_sound_wood_defaults(),
 | 
			
		||||
		on_construct = function(pos)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			meta:set_string("formspec", armor_stand_formspec)
 | 
			
		||||
			meta:set_string("infotext", def.description)
 | 
			
		||||
			if def.name == "locked_armor_stand" then
 | 
			
		||||
				meta:set_string("owner", "")
 | 
			
		||||
			end
 | 
			
		||||
			local inv = meta:get_inventory()
 | 
			
		||||
			inv:set_size("main", 4)
 | 
			
		||||
		end,
 | 
			
		||||
		can_dig = function(pos, player)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			local inv = meta:get_inventory()
 | 
			
		||||
			if not inv:is_empty("main") then
 | 
			
		||||
				return false
 | 
			
		||||
			end
 | 
			
		||||
			return true
 | 
			
		||||
		end,
 | 
			
		||||
		after_place_node = function(pos, placer)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			minetest.add_entity(pos, "3d_armor_stand:armor_entity")
 | 
			
		||||
			if def.name == "locked_armor_stand" then
 | 
			
		||||
				meta:set_string("owner", placer:get_player_name() or "")
 | 
			
		||||
				meta:set_string("infotext", S("Armor Stand (owned by @1)", meta:get_string("owner")))
 | 
			
		||||
			elseif def.name == "shared_armor_stand" then
 | 
			
		||||
				meta:set_string("infotext", def.description)
 | 
			
		||||
			end
 | 
			
		||||
			add_hidden_node(pos, placer)
 | 
			
		||||
		end,
 | 
			
		||||
		allow_metadata_inventory_put = function(pos, listname, index, stack, player)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			if not owns_armor_stand(pos, meta, player) then
 | 
			
		||||
				return 0
 | 
			
		||||
			end
 | 
			
		||||
			local inv = meta:get_inventory()
 | 
			
		||||
			local stack_def = stack:get_definition() or {}
 | 
			
		||||
			local groups = stack_def.groups or {}
 | 
			
		||||
			for i, element in ipairs(elements) do
 | 
			
		||||
				if groups["armor_"..element] and inv:get_stack(listname, i):is_empty() then
 | 
			
		||||
					return 1
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
			return 0
 | 
			
		||||
		end,
 | 
			
		||||
		allow_metadata_inventory_take = function(pos, listname, index, stack, player)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			if not owns_armor_stand(pos, meta, player) then
 | 
			
		||||
				return 0
 | 
			
		||||
			end
 | 
			
		||||
			return 1
 | 
			
		||||
		end
 | 
			
		||||
		return 0
 | 
			
		||||
	end,
 | 
			
		||||
	allow_metadata_inventory_move = function(pos)
 | 
			
		||||
		return 0
 | 
			
		||||
	end,
 | 
			
		||||
	on_metadata_inventory_put = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	on_metadata_inventory_take = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	after_destruct = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
		remove_hidden_node(pos)
 | 
			
		||||
	end,
 | 
			
		||||
		end,
 | 
			
		||||
		allow_metadata_inventory_move = function(pos)
 | 
			
		||||
			return 0
 | 
			
		||||
		end,
 | 
			
		||||
		on_metadata_inventory_put = function(pos, listname, index, stack)
 | 
			
		||||
			local meta = minetest.get_meta(pos)
 | 
			
		||||
			local inv = meta:get_inventory()
 | 
			
		||||
			local stack_def = stack:get_definition() or {}
 | 
			
		||||
			local groups = stack_def.groups or {}
 | 
			
		||||
			for i, element in ipairs(elements) do
 | 
			
		||||
				if groups["armor_"..element] then
 | 
			
		||||
					inv:set_stack(listname, i, stack)
 | 
			
		||||
					if index ~= i then
 | 
			
		||||
						inv:set_stack(listname, index, nil)
 | 
			
		||||
					end
 | 
			
		||||
					break
 | 
			
		||||
				end
 | 
			
		||||
			end
 | 
			
		||||
			update_entity(pos)
 | 
			
		||||
		end,
 | 
			
		||||
		on_metadata_inventory_take = function(pos)
 | 
			
		||||
			update_entity(pos)
 | 
			
		||||
		end,
 | 
			
		||||
		after_destruct = function(pos)
 | 
			
		||||
			update_entity(pos)
 | 
			
		||||
			remove_hidden_node(pos)
 | 
			
		||||
		end,
 | 
			
		||||
		on_blast = def.on_blast
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
register_armor_stand({
 | 
			
		||||
	name = "armor_stand",
 | 
			
		||||
	description = S("Armor Stand"),
 | 
			
		||||
	texture = "3d_armor_stand.png",
 | 
			
		||||
	on_blast = function(pos)
 | 
			
		||||
		drop_armor(pos)
 | 
			
		||||
		armor.drop_armor(pos, "3d_armor_stand:armor_stand")
 | 
			
		||||
		minetest.remove_node(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_node("3d_armor_stand:locked_armor_stand", {
 | 
			
		||||
register_armor_stand({
 | 
			
		||||
	name = "locked_armor_stand",
 | 
			
		||||
	description = S("Locked Armor Stand"),
 | 
			
		||||
	drawtype = "mesh",
 | 
			
		||||
	mesh = "3d_armor_stand.obj",
 | 
			
		||||
	tiles = {"3d_armor_stand_locked.png"},
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	walkable = false,
 | 
			
		||||
	selection_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
			{-0.25, -0.4375, -0.25, 0.25, 1.4, 0.25},
 | 
			
		||||
			{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	groups = {choppy=2, oddly_breakable_by_hand=2},
 | 
			
		||||
	sounds = default.node_sound_wood_defaults(),
 | 
			
		||||
	on_construct = function(pos)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		meta:set_string("formspec", armor_stand_formspec)
 | 
			
		||||
		meta:set_string("infotext", S("Armor Stand"))
 | 
			
		||||
		meta:set_string("owner", "")
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		for _, element in pairs(elements) do
 | 
			
		||||
			inv:set_size("armor_"..element, 1)
 | 
			
		||||
		end
 | 
			
		||||
	end,
 | 
			
		||||
	can_dig = function(pos, player)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		for _, element in pairs(elements) do
 | 
			
		||||
			if not inv:is_empty("armor_"..element) then
 | 
			
		||||
				return false
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
		return true
 | 
			
		||||
	end,
 | 
			
		||||
	after_place_node = function(pos, placer)
 | 
			
		||||
		minetest.add_entity(pos, "3d_armor_stand:armor_entity")
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		meta:set_string("owner", placer:get_player_name() or "")
 | 
			
		||||
		meta:set_string("infotext", S("Armor Stand (owned by @1)", meta:get_string("owner")))
 | 
			
		||||
		add_hidden_node(pos, placer)
 | 
			
		||||
	end,
 | 
			
		||||
	allow_metadata_inventory_put = function(pos, listname, index, stack, player)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		if not has_locked_armor_stand_privilege(meta, player) then
 | 
			
		||||
			return 0
 | 
			
		||||
		end
 | 
			
		||||
		local def = stack:get_definition() or {}
 | 
			
		||||
		local groups = def.groups or {}
 | 
			
		||||
		if groups[listname] then
 | 
			
		||||
			return 1
 | 
			
		||||
		end
 | 
			
		||||
		return 0
 | 
			
		||||
	end,
 | 
			
		||||
	allow_metadata_inventory_take = function(pos, listname, index, stack, player)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		if not has_locked_armor_stand_privilege(meta, player) then
 | 
			
		||||
			return 0
 | 
			
		||||
		end
 | 
			
		||||
		return stack:get_count()
 | 
			
		||||
	end,
 | 
			
		||||
	allow_metadata_inventory_move = function(pos)
 | 
			
		||||
		return 0
 | 
			
		||||
	end,
 | 
			
		||||
	on_metadata_inventory_put = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	on_metadata_inventory_take = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	after_destruct = function(pos)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
		remove_hidden_node(pos)
 | 
			
		||||
	end,
 | 
			
		||||
	on_blast = function(pos)
 | 
			
		||||
		-- Not affected by TNT
 | 
			
		||||
	end,
 | 
			
		||||
	texture = "3d_armor_stand_locked.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
register_armor_stand({
 | 
			
		||||
	name = "shared_armor_stand",
 | 
			
		||||
	description = S("Shared Armor Stand"),
 | 
			
		||||
	texture = "3d_armor_stand_shared.png"
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_entity("3d_armor_stand:armor_entity", {
 | 
			
		||||
@@ -306,7 +291,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", {
 | 
			
		||||
		mesh = "3d_armor_entity.obj",
 | 
			
		||||
		visual_size = {x=1, y=1},
 | 
			
		||||
		collisionbox = {0,0,0,0,0,0},
 | 
			
		||||
		textures = {"3d_armor_trans.png"},
 | 
			
		||||
		textures = {"blank.png"},
 | 
			
		||||
	},
 | 
			
		||||
	_pos = nil,
 | 
			
		||||
	on_activate = function(self)
 | 
			
		||||
@@ -328,7 +313,7 @@ minetest.register_entity("3d_armor_stand:armor_entity", {
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_abm({
 | 
			
		||||
	nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:armor_stand"},
 | 
			
		||||
	nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:shared_armor_stand", "3d_armor_stand:armor_stand"},
 | 
			
		||||
	interval = 15,
 | 
			
		||||
	chance = 1,
 | 
			
		||||
	action = function(pos, node, active_object_count, active_object_count_wider)
 | 
			
		||||
@@ -339,6 +324,32 @@ minetest.register_abm({
 | 
			
		||||
	end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_lbm({
 | 
			
		||||
	label = "Update armor stand inventories",
 | 
			
		||||
	name = "3d_armor_stand:update_inventories",
 | 
			
		||||
	nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:shared_armor_stand", "3d_armor_stand:armor_stand"},
 | 
			
		||||
	run_at_every_load = false,
 | 
			
		||||
	action = function(pos, node)
 | 
			
		||||
		local meta = minetest.get_meta(pos)
 | 
			
		||||
		local inv = meta:get_inventory()
 | 
			
		||||
		local lists = inv:get_lists()
 | 
			
		||||
		for _, element in pairs(elements) do
 | 
			
		||||
			if not lists["armor_"..element] then
 | 
			
		||||
				-- Abort to avoid item loss in case env_meta.txt is corrupted/deleted
 | 
			
		||||
				return
 | 
			
		||||
			end
 | 
			
		||||
		end
 | 
			
		||||
		inv:set_lists({main = {
 | 
			
		||||
			lists.armor_head[1],
 | 
			
		||||
			lists.armor_torso[1],
 | 
			
		||||
			lists.armor_legs[1],
 | 
			
		||||
			lists.armor_feet[1]
 | 
			
		||||
		}})
 | 
			
		||||
		meta:set_string("formspec", armor_stand_formspec)
 | 
			
		||||
		update_entity(pos)
 | 
			
		||||
	end
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_craft({
 | 
			
		||||
	output = "3d_armor_stand:armor_stand",
 | 
			
		||||
	recipe = {
 | 
			
		||||
@@ -354,3 +365,10 @@ minetest.register_craft({
 | 
			
		||||
		{"3d_armor_stand:armor_stand", "default:steel_ingot"},
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_craft({
 | 
			
		||||
	output = "3d_armor_stand:shared_armor_stand",
 | 
			
		||||
	recipe = {
 | 
			
		||||
		{"3d_armor_stand:armor_stand", "default:copper_ingot"},
 | 
			
		||||
	}
 | 
			
		||||
})
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: 3d_armor_stand
 | 
			
		||||
Armor Stand Top=Kirasstando Supro
 | 
			
		||||
Armor Stand=Kirasstando
 | 
			
		||||
Locked Armor Stand=Ŝlosita Kirasstando
 | 
			
		||||
Armor Stand (owned by @1)=Kirasstando (posedata de @1)
 | 
			
		||||
Armor Stand Top=Armaĵtenila Supro
 | 
			
		||||
Armor Stand=Armaĵtenilo
 | 
			
		||||
Locked Armor Stand=Ŝlosita Armaĵtenilo
 | 
			
		||||
Armor Stand (owned by @1)=Ŝlosita Armaĵtenilo (posedata de @1)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								3d_armor_stand/locale/3d_armor_stand.es.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								3d_armor_stand/locale/3d_armor_stand.es.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
# textdomain: 3d_armor_stand
 | 
			
		||||
Armor Stand Top=
 | 
			
		||||
Armor Stand=Soporte de armadura
 | 
			
		||||
Locked Armor Stand=Soporte de armadura privado
 | 
			
		||||
Shared Armor Stand=Soporte de armadura compartido
 | 
			
		||||
Armor Stand (owned by @1)=Soporte de armadura (de @1)
 | 
			
		||||
							
								
								
									
										6
									
								
								3d_armor_stand/locale/3d_armor_stand.ru.tr
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								3d_armor_stand/locale/3d_armor_stand.ru.tr
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
# textdomain: 3d_armor_stand
 | 
			
		||||
Armor Stand Top=Верх Стойки для Брони
 | 
			
		||||
Armor Stand=Стойка для Брони
 | 
			
		||||
Locked Armor Stand=Заблокированная Стойка для Брони
 | 
			
		||||
Shared Armor Stand=Публичная Стойка для Брони
 | 
			
		||||
Armor Stand (owned by @1)=Стойка для Брони (владалец: @1)
 | 
			
		||||
							
								
								
									
										5
									
								
								3d_armor_stand/locale/3d_armor_stand.uk.tr
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								3d_armor_stand/locale/3d_armor_stand.uk.tr
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: 3d_armor_stand
 | 
			
		||||
Armor Stand Top=Верх Стійки для Броні
 | 
			
		||||
Armor Stand=Стійка для Броні
 | 
			
		||||
Locked Armor Stand=Закрита Стійка для Броні
 | 
			
		||||
Armor Stand (owned by @1)=Стійка для Броні (власник @1)
 | 
			
		||||
@@ -2,4 +2,5 @@
 | 
			
		||||
Armor Stand Top=
 | 
			
		||||
Armor Stand=
 | 
			
		||||
Locked Armor Stand=
 | 
			
		||||
Shared Armor Stand=
 | 
			
		||||
Armor Stand (owned by @1)=
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								3d_armor_stand/models/3d_armor_stand_shared.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								3d_armor_stand/models/3d_armor_stand_shared.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 1011 B  | 
@@ -1,7 +1,7 @@
 | 
			
		||||
# textdomain: 3d_armor_ui
 | 
			
		||||
3D Armor=3D Kiraso
 | 
			
		||||
Armor not initialized!=Kiraso ne pravigita!
 | 
			
		||||
Armor=Kiraso
 | 
			
		||||
3D Armor=3D Armaĵoj
 | 
			
		||||
Armor not initialized!=Armaĵoj ne pretigitaj!
 | 
			
		||||
Armor=Armaĵo
 | 
			
		||||
Level=Nivelo
 | 
			
		||||
Heal=Sanigi
 | 
			
		||||
Fire=Fajro
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								3d_armor_ui/locale/3d_armor_ui.ru.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								3d_armor_ui/locale/3d_armor_ui.ru.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
# textdomain: 3d_armor_ui
 | 
			
		||||
3D Armor=3D Броня
 | 
			
		||||
Armor not initialized!=Броня не инициализирована!
 | 
			
		||||
Armor=Броня
 | 
			
		||||
Level=Уровень
 | 
			
		||||
Heal=Исцеление
 | 
			
		||||
Fire=Пламя
 | 
			
		||||
Radiation=Излучение
 | 
			
		||||
							
								
								
									
										8
									
								
								3d_armor_ui/locale/3d_armor_ui.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								3d_armor_ui/locale/3d_armor_ui.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
# textdomain: 3d_armor_ui
 | 
			
		||||
3D Armor=3D Броня
 | 
			
		||||
Armor not initialized!=Броня не ініціалізована!
 | 
			
		||||
Armor=Броня
 | 
			
		||||
Level=Рівень
 | 
			
		||||
Heal=Зцілення
 | 
			
		||||
Fire=Вогонь
 | 
			
		||||
Radiation=Радіація
 | 
			
		||||
@@ -41,7 +41,7 @@ armor:register_armor(":3d_armor:chestplate_admin", {
 | 
			
		||||
	description = S("Admin Chestplate"),
 | 
			
		||||
	inventory_image = "3d_armor_inv_chestplate_admin.png",
 | 
			
		||||
	armor_groups = {fleshy=100},
 | 
			
		||||
	groups = {armor_torso=1, armor_heal=100, armor_use=0,
 | 
			
		||||
	groups = {armor_torso=1, armor_heal=100, armor_use=0, armor_water=1,
 | 
			
		||||
			not_in_creative_inventory=1},
 | 
			
		||||
	on_drop = function(itemstack, dropper, pos)
 | 
			
		||||
		return
 | 
			
		||||
@@ -61,7 +61,7 @@ armor:register_armor(":3d_armor:leggings_admin", {
 | 
			
		||||
	description = S("Admin Leggings"),
 | 
			
		||||
	inventory_image = "3d_armor_inv_leggings_admin.png",
 | 
			
		||||
	armor_groups = {fleshy=100},
 | 
			
		||||
	groups = {armor_legs=1, armor_heal=100, armor_use=0,
 | 
			
		||||
	groups = {armor_legs=1, armor_heal=100, armor_use=0, armor_water=1,
 | 
			
		||||
			not_in_creative_inventory=1},
 | 
			
		||||
	on_drop = function(itemstack, dropper, pos)
 | 
			
		||||
		return
 | 
			
		||||
@@ -82,7 +82,7 @@ armor:register_armor(":3d_armor:boots_admin", {
 | 
			
		||||
	inventory_image = "3d_armor_inv_boots_admin.png",
 | 
			
		||||
	armor_groups = {fleshy=100},
 | 
			
		||||
	groups = {armor_feet=1, armor_heal=100, armor_use=0, physics_speed=1,
 | 
			
		||||
			not_in_creative_inventory=1},
 | 
			
		||||
			armor_water=1, not_in_creative_inventory=1},
 | 
			
		||||
	on_drop = function(itemstack, dropper, pos)
 | 
			
		||||
		return
 | 
			
		||||
	end,
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_admin
 | 
			
		||||
Admin Helmet=Administra Kasko
 | 
			
		||||
Admin Chestplate=Administra Brustkiraso
 | 
			
		||||
Admin Chestplate=Administra Kiraso
 | 
			
		||||
Admin Leggings=Administra Pantalono
 | 
			
		||||
Admin Boots=Administra Botoj
 | 
			
		||||
Admin Boots=Administraj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_admin
 | 
			
		||||
Admin Helmet=шлем админа
 | 
			
		||||
Admin Chestplate=бронежилет админа
 | 
			
		||||
Admin Leggings=гамаши админа
 | 
			
		||||
Admin Boots=ботинки админа
 | 
			
		||||
Admin Helmet=Шлем Админа
 | 
			
		||||
Admin Chestplate=Нагрудник Админа
 | 
			
		||||
Admin Leggings=Поножи Админа
 | 
			
		||||
Admin Boots=Ботинки Админа
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_admin/locale/armor_admin.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_admin/locale/armor_admin.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_admin
 | 
			
		||||
Admin Helmet=Шолом адміна
 | 
			
		||||
Admin Chestplate=Броня адміна
 | 
			
		||||
Admin Leggings=Штани адміна
 | 
			
		||||
Admin Boots=Взуття адміна
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_bronze
 | 
			
		||||
Bronze Helmet=Bronza Kasko
 | 
			
		||||
Bronze Chestplate=Bronza Brustkiraso
 | 
			
		||||
Bronze Chestplate=Bronza Kiraso
 | 
			
		||||
Bronze Leggings=Bronza Pantalono
 | 
			
		||||
Bronze Boots=Bronza Botoj
 | 
			
		||||
Bronze Boots=Bronzaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_bronze
 | 
			
		||||
Bronze Helmet=бронзовый шлем
 | 
			
		||||
Bronze Chestplate=бронзовый бронежилет
 | 
			
		||||
Bronze Leggings=бронзовые гамаши
 | 
			
		||||
Bronze Boots=бронзовые ботинки
 | 
			
		||||
Bronze Helmet=Бронзовый Шлем
 | 
			
		||||
Bronze Chestplate=Бронзовый Нагрудник
 | 
			
		||||
Bronze Leggings=Бронзовые Поножи
 | 
			
		||||
Bronze Boots=Бронзовые Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_bronze/locale/armor_bronze.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_bronze/locale/armor_bronze.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_bronze
 | 
			
		||||
Bronze Helmet=Бронзовий шолом
 | 
			
		||||
Bronze Chestplate=Бронзова броня
 | 
			
		||||
Bronze Leggings=Бронзові штани
 | 
			
		||||
Bronze Boots=Бронзове взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_cactus
 | 
			
		||||
Cactus Helmet=Kakta Kasko
 | 
			
		||||
Cactus Chestplate=Kakta Brustkiraso
 | 
			
		||||
Cactus Chestplate=Kakta Kiraso
 | 
			
		||||
Cactus Leggings=Kakta Pantalono
 | 
			
		||||
Cactus Boots=Kakta Botoj
 | 
			
		||||
Cactus Boots=Kaktaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_cactus
 | 
			
		||||
Cactus Helmet=кактусовый шлем
 | 
			
		||||
Cactus Chestplate=кактусовый бронежилет
 | 
			
		||||
Cactus Leggings=кактусовые гамаши
 | 
			
		||||
Cactus Boots=кактусовые ботинки
 | 
			
		||||
Cactus Helmet=Кактусовый Шлем
 | 
			
		||||
Cactus Chestplate=Кактусовый Нагрудник
 | 
			
		||||
Cactus Leggings=Кактусовые Поножи
 | 
			
		||||
Cactus Boots=Кактусовые Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_cactus/locale/armor_cactus.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_cactus/locale/armor_cactus.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_cactus
 | 
			
		||||
Cactus Helmet=Кактусовий шолом
 | 
			
		||||
Cactus Chestplate=Кактусова броня
 | 
			
		||||
Cactus Leggings=Кактусові штани
 | 
			
		||||
Cactus Boots=Кактусове взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_crystal
 | 
			
		||||
Crystal Helmet=Kristala Kasko
 | 
			
		||||
Crystal Chestplate=Kristala Brustkiraso
 | 
			
		||||
Crystal Chestplate=Kristala Kiraso
 | 
			
		||||
Crystal Leggings=Kristala Pantalono
 | 
			
		||||
Crystal Boots=Kristala Botoj
 | 
			
		||||
Crystal Boots=Kristalaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_crystal
 | 
			
		||||
Crystal Helmet=кристалловый шлем
 | 
			
		||||
Crystal Chestplate=кристалловый бронежилет
 | 
			
		||||
Crystal Leggings=кристалловые гамаши
 | 
			
		||||
Crystal Boots=кристалловые ботинки
 | 
			
		||||
Crystal Helmet=Кристальный Шлем
 | 
			
		||||
Crystal Chestplate=Кристальный Нагрудник
 | 
			
		||||
Crystal Leggings=Кристальные Поножи
 | 
			
		||||
Crystal Boots=Кристальные Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_crystal/locale/armor_crystal.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_crystal/locale/armor_crystal.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_crystal
 | 
			
		||||
Crystal Helmet=Кришталевий шолом
 | 
			
		||||
Crystal Chestplate=Кришталева броня
 | 
			
		||||
Crystal Leggings=Кришталеві штани
 | 
			
		||||
Crystal Boots=Кришталеве взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_diamond
 | 
			
		||||
Diamond Helmet=Diamanta Kasko
 | 
			
		||||
Diamond Chestplate=Diamanta Brustkiraso
 | 
			
		||||
Diamond Chestplate=Diamanta Kiraso
 | 
			
		||||
Diamond Leggings=Diamanta Pantalono
 | 
			
		||||
Diamond Boots=Diamanta Botoj
 | 
			
		||||
Diamond Boots=Diamantaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_diamond
 | 
			
		||||
Diamond Helmet=алмазный шлем
 | 
			
		||||
Diamond Chestplate=алмазный бронежилет
 | 
			
		||||
Diamond Leggings=алмазные гамаши
 | 
			
		||||
Diamond Boots=алмазные ботинки
 | 
			
		||||
Diamond Helmet=Алмазный Шлем
 | 
			
		||||
Diamond Chestplate=Алмазный Нагрудник
 | 
			
		||||
Diamond Leggings=Алмазные Поножи
 | 
			
		||||
Diamond Boots=Алмазные Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_diamond/locale/armor_diamond.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_diamond/locale/armor_diamond.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_diamond
 | 
			
		||||
Diamond Helmet=Діамантовий шолом
 | 
			
		||||
Diamond Chestplate=Діамантова броня
 | 
			
		||||
Diamond Leggings=Діамантові штани
 | 
			
		||||
Diamond Boots=Діамантове взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_gold
 | 
			
		||||
Gold Helmet=Ora Kasko
 | 
			
		||||
Gold Chestplate=Ora Brustkiraso
 | 
			
		||||
Gold Chestplate=Ora Kiraso
 | 
			
		||||
Gold Leggings=Ora Pantalono
 | 
			
		||||
Gold Boots=Ora Botoj
 | 
			
		||||
Gold Boots=Oraj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_gold
 | 
			
		||||
Gold Helmet=золотой шлем
 | 
			
		||||
Gold Chestplate=золотой бронежилет
 | 
			
		||||
Gold Leggings=золотые гамаши
 | 
			
		||||
Gold Boots=золотые ботинки
 | 
			
		||||
Gold Helmet=Золотой Шлем
 | 
			
		||||
Gold Chestplate=Золотой Нагрудник
 | 
			
		||||
Gold Leggings=Золотые Поножи
 | 
			
		||||
Gold Boots=Золотые Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_gold/locale/armor_gold.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_gold/locale/armor_gold.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_gold
 | 
			
		||||
Gold Helmet=Золотий шолом
 | 
			
		||||
Gold Chestplate=Золота броня
 | 
			
		||||
Gold Leggings=Золоті штани
 | 
			
		||||
Gold Boots=Золоте взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_mithril
 | 
			
		||||
Mithril Helmet=Mitrila Kasko
 | 
			
		||||
Mithril Chestplate=Mitrila Brustkiraso
 | 
			
		||||
Mithril Chestplate=Mitrila Kiraso
 | 
			
		||||
Mithril Leggings=Mitrila Pantalono
 | 
			
		||||
Mithril Boots=Mitrila Botoj
 | 
			
		||||
Mithril Boots=Mitrilaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_mithril
 | 
			
		||||
Mithril Helmet=мифриловый шлем
 | 
			
		||||
Mithril Chestplate=мифриловый бронежилет
 | 
			
		||||
Mithril Leggings=мифриловые гамаши
 | 
			
		||||
Mithril Boots=мифриловые ботинки
 | 
			
		||||
Mithril Helmet=Мифриловый Шлем
 | 
			
		||||
Mithril Chestplate=Мифриловый Нагрудник
 | 
			
		||||
Mithril Leggings=Мифриловые Поножи
 | 
			
		||||
Mithril Boots=Мифриловые Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_mithril/locale/armor_mithril.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_mithril/locale/armor_mithril.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_mithril
 | 
			
		||||
Mithril Helmet=Міфріловий шолом
 | 
			
		||||
Mithril Chestplate=Міфрілова броня
 | 
			
		||||
Mithril Leggings=Міфрілові штани
 | 
			
		||||
Mithril Boots=Міфрілове взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_nether
 | 
			
		||||
Nether Helmet=Inferna Kasko
 | 
			
		||||
Nether Chestplate=Inferna Brustkiraso
 | 
			
		||||
Nether Chestplate=Inferna Kiraso
 | 
			
		||||
Nether Leggings=Inferna Pantalono
 | 
			
		||||
Nether Boots=Inferna Botoj
 | 
			
		||||
Nether Boots=Infernaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_nether
 | 
			
		||||
Nether Helmet=адский шлем
 | 
			
		||||
Nether Chestplate=адский бронежилет
 | 
			
		||||
Nether Leggings=адские гамаши
 | 
			
		||||
Nether Boots=адские ботинки
 | 
			
		||||
Nether Helmet=Незерский Шлем
 | 
			
		||||
Nether Chestplate=Незерский Нагрудник
 | 
			
		||||
Nether Leggings=Незерские Поножи
 | 
			
		||||
Nether Boots=Незерские Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_nether/locale/armor_nether.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_nether/locale/armor_nether.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_nether
 | 
			
		||||
Nether Helmet=Пекельний шолом
 | 
			
		||||
Nether Chestplate=Пекельна броня
 | 
			
		||||
Nether Leggings=Пекельні штани
 | 
			
		||||
Nether Boots=Пекельне взуття
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
name = armor_nether
 | 
			
		||||
depends = 3d_armor
 | 
			
		||||
optional_depends = nether
 | 
			
		||||
description = Adds craftable wood armor.
 | 
			
		||||
description = Adds craftable nether armor.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_steel
 | 
			
		||||
Steel Helmet=Ŝtala Kasko
 | 
			
		||||
Steel Chestplate=Ŝtala Brustkiraso
 | 
			
		||||
Steel Chestplate=Ŝtala Kiraso
 | 
			
		||||
Steel Leggings=Ŝtala Pantalono
 | 
			
		||||
Steel Boots=Ŝtala Botoj
 | 
			
		||||
Steel Boots=Ŝtalaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_steel
 | 
			
		||||
Steel Helmet=стальной шлем
 | 
			
		||||
Steel Chestplate=стальной бронежилет
 | 
			
		||||
Steel Leggings=стальные гамаши
 | 
			
		||||
Steel Boots=стальные ботинки
 | 
			
		||||
Steel Helmet=Стальной Шлем
 | 
			
		||||
Steel Chestplate=Стальной Нагрудник
 | 
			
		||||
Steel Leggings=Стальные Поножи
 | 
			
		||||
Steel Boots=Стальные Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_steel/locale/armor_steel.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_steel/locale/armor_steel.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_steel
 | 
			
		||||
Steel Helmet=Сталевий шолом
 | 
			
		||||
Steel Chestplate=Сталева броня
 | 
			
		||||
Steel Leggings=Сталеві штани
 | 
			
		||||
Steel Boots=Сталеве взуття
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_wood
 | 
			
		||||
Wood Helmet=Ligna Kasko
 | 
			
		||||
Wood Chestplate=Ligna Brustkiraso
 | 
			
		||||
Wood Chestplate=Ligna Kiraso
 | 
			
		||||
Wood Leggings=Ligna Pantalono
 | 
			
		||||
Wood Boots=Ligna Botoj
 | 
			
		||||
Wood Boots=Lignaj Botoj
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,5 @@
 | 
			
		||||
# textdomain: armor_wood
 | 
			
		||||
Wood Helmet=деревянный шлем
 | 
			
		||||
Wood Chestplate=деревянный бронежилет
 | 
			
		||||
Wood Leggings=деревянные гамаши
 | 
			
		||||
Wood Boots=деревянные ботинки
 | 
			
		||||
Wood Helmet=Деревянный Шлем
 | 
			
		||||
Wood Chestplate=Деревянный Нагрудник
 | 
			
		||||
Wood Leggings=Деревянные Поножи
 | 
			
		||||
Wood Boots=Деревянные Ботинки
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								armor_wood/locale/armor_wood.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								armor_wood/locale/armor_wood.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
# textdomain: armor_wood
 | 
			
		||||
Wood Helmet=Дерев'яний шолом
 | 
			
		||||
Wood Chestplate=Дерев'яна броня
 | 
			
		||||
Wood Leggings=Дерев'яні штани
 | 
			
		||||
Wood Boots=Дерев'яне взуття
 | 
			
		||||
							
								
								
									
										13
									
								
								shields/locale/shields.es.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								shields/locale/shields.es.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
# textdomain: shields
 | 
			
		||||
Admin Shield=Escudo de admin
 | 
			
		||||
Wooden Shield=Escudo de madera
 | 
			
		||||
Enhanced Wood Shield=Escudo de madera mejorado
 | 
			
		||||
Cactus Shield=Escudo de cactus
 | 
			
		||||
Enhanced Cactus Shield=Escudo de cactus mejorado
 | 
			
		||||
Steel Shield=Escudo de acero
 | 
			
		||||
Bronze Shield=Escudo de bronce
 | 
			
		||||
Diamond Shield=Escudo de diamante
 | 
			
		||||
Gold Shield=Escudo de oro
 | 
			
		||||
Mithril Shield=Escudo de mitrilo
 | 
			
		||||
Crystal Shield=Escudo de cristal
 | 
			
		||||
Nether Shield=Escudo de nether
 | 
			
		||||
							
								
								
									
										13
									
								
								shields/locale/shields.ru.tr
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								shields/locale/shields.ru.tr
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
# textdomain: shields
 | 
			
		||||
Admin Shield=Щит Админа
 | 
			
		||||
Wooden Shield=Деревянный Щит
 | 
			
		||||
Enhanced Wood Shield=Улучшенный Деревянный Щит
 | 
			
		||||
Cactus Shield=Кактусовый Щит
 | 
			
		||||
Enhanced Cactus Shield=Улучшенный Кактусовый Щит
 | 
			
		||||
Steel Shield=Стальной Щит
 | 
			
		||||
Bronze Shield=Бронзовый Щит
 | 
			
		||||
Diamond Shield=Алмазный Щит
 | 
			
		||||
Gold Shield=Золотой Щит
 | 
			
		||||
Mithril Shield=Мифриловый Щит
 | 
			
		||||
Crystal Shield=Кристальный Щит
 | 
			
		||||
Nether Shield=Незерский Щит
 | 
			
		||||
							
								
								
									
										13
									
								
								shields/locale/shields.uk.tr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								shields/locale/shields.uk.tr
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
# textdomain: shields
 | 
			
		||||
Admin Shield=Щит адміна
 | 
			
		||||
Wooden Shield=Дерев'яний щит
 | 
			
		||||
Enhanced Wood Shield=Зміцнений дерев'яний щит
 | 
			
		||||
Cactus Shield=Кактусовий щит
 | 
			
		||||
Enhanced Cactus Shield=Зміцнений кактусовий щит
 | 
			
		||||
Steel Shield=Сталевий щит
 | 
			
		||||
Bronze Shield=Бронзовий щит
 | 
			
		||||
Diamond Shield=Діамантовий щит
 | 
			
		||||
Gold Shield=Золотий щит
 | 
			
		||||
Mithril Shield=Міфріловий щит
 | 
			
		||||
Crystal Shield=Кристальний щит
 | 
			
		||||
Nether Shield=Пекельний щит
 | 
			
		||||
@@ -92,7 +92,7 @@ local get_image_from_tile = memoize(function(tile)
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	return "3d_armor_trans.png"
 | 
			
		||||
	return "blank.png"
 | 
			
		||||
end)
 | 
			
		||||
 | 
			
		||||
local function get_image_cube(tiles)
 | 
			
		||||
@@ -139,7 +139,7 @@ local function get_image_cube(tiles)
 | 
			
		||||
		)
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	return "3d_armor_trans.png"
 | 
			
		||||
	return "blank.png"
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local function is_normal_node(drawtype)
 | 
			
		||||
@@ -158,7 +158,7 @@ armor.get_wield_image = memoize(function(item)
 | 
			
		||||
	item = ItemStack(item)
 | 
			
		||||
 | 
			
		||||
	if item:is_empty() then
 | 
			
		||||
		return "3d_armor_trans.png"
 | 
			
		||||
		return "blank.png"
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	local def = item:get_definition()
 | 
			
		||||
@@ -169,7 +169,7 @@ armor.get_wield_image = memoize(function(item)
 | 
			
		||||
	local meta = item:get_meta()
 | 
			
		||||
	local color = meta:get("color") or def.color
 | 
			
		||||
 | 
			
		||||
	local image = "3d_armor_trans.png"
 | 
			
		||||
	local image = "blank.png"
 | 
			
		||||
 | 
			
		||||
	if def.wield_image and def.wield_image ~= "" then
 | 
			
		||||
		local parts = {def.wield_image}
 | 
			
		||||
@@ -193,7 +193,7 @@ armor.get_wield_image = memoize(function(item)
 | 
			
		||||
 | 
			
		||||
	elseif def.type == "node" then
 | 
			
		||||
		if def.drawtype == "nodebox" or def.drawtype == "mesh" then
 | 
			
		||||
			image = "3d_armor_trans.png"
 | 
			
		||||
			image = "blank.png"
 | 
			
		||||
 | 
			
		||||
		else
 | 
			
		||||
			local tiles = def.tiles
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ dofile(minetest.get_modpath(minetest.get_current_modname()).."/get_texture.lua")
 | 
			
		||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/transform.lua")
 | 
			
		||||
 | 
			
		||||
wieldview.get_item_texture = function(self, item)
 | 
			
		||||
	local texture = "3d_armor_trans.png"
 | 
			
		||||
	local texture = "blank.png"
 | 
			
		||||
	if item ~= "" then
 | 
			
		||||
		texture = armor.get_wield_image(item)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user