Update Farming, Mobs, 3d_armor
Farming : minors fixe, add the straw block Mobs : better api, swimming parameter for mobs, add eggs, code optimisation 3d_armor : change the model, many new textures, new shield, and new enchanted shield (which gain compared to normal shield +1 armor and x2 durability)
							
								
								
									
										1
									
								
								mods/3d_armor/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						| @@ -4,4 +4,5 @@ | ||||
| *bak* | ||||
| tags | ||||
| *.vim | ||||
| armor.conf | ||||
|  | ||||
|   | ||||
							
								
								
									
										8
									
								
								mods/3d_armor/3d_armor/admin.lua
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| @@ -6,28 +6,28 @@ minetest.register_alias("adminlegginss","3d_armor:leggings_admin") | ||||
| minetest.register_tool("3d_armor:helmet_admin", { | ||||
| 	description = "Admin Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_admin.png", | ||||
| 	groups = {armor_head=1000, armor_heal=1000, armor_use=0, not_in_creative=0}, | ||||
| 	groups = {armor_head=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_admin", { | ||||
| 	description = "Admin Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_admin.png", | ||||
| 	groups = {armor_torso=1000, armor_heal=1000, armor_use=0, not_in_creative=0}, | ||||
| 	groups = {armor_torso=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_admin", { | ||||
| 	description = "Admin Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_admin.png", | ||||
| 	groups = {armor_legs=1000, armor_heal=1000, armor_use=0, not_in_creative=0}, | ||||
| 	groups = {armor_legs=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_admin", { | ||||
| 	description = "Admin Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_admin.png", | ||||
| 	groups = {armor_feet=1000, armor_heal=1000, armor_use=0, not_in_creative=0}, | ||||
| 	groups = {armor_feet=1000, armor_heal=1000, armor_use=0, not_in_creative_inventory=1}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,17 @@ | ||||
| -- Armor Configuration (defaults) | ||||
|  | ||||
| -- You can remove any unwanted armor materials from this table. | ||||
| -- Note that existing armor that is removed will show up as an unknown item. | ||||
| ARMOR_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", | ||||
| } | ||||
|  | ||||
| -- Increase this if you get initialization glitches when a player first joins. | ||||
| ARMOR_INIT_DELAY = 1 | ||||
|  | ||||
|   | ||||
| @@ -6,6 +6,15 @@ ARMOR_DROP = minetest.get_modpath("bones") ~= nil | ||||
| ARMOR_DESTROY = false | ||||
| ARMOR_LEVEL_MULTIPLIER = 1 | ||||
| ARMOR_HEAL_MULTIPLIER = 1 | ||||
| ARMOR_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", | ||||
| } | ||||
|  | ||||
| local skin_mod = nil | ||||
| local inv_mod = nil | ||||
| @@ -24,6 +33,10 @@ if input then | ||||
| 	input:close() | ||||
| 	input = nil | ||||
| end | ||||
| if not minetest.get_modpath("moreores") then | ||||
| 	ARMOR_MATERIALS.mithril = nil | ||||
| end | ||||
|  | ||||
|  | ||||
| local time = 0 | ||||
|  | ||||
| @@ -33,11 +46,12 @@ armor = { | ||||
| 	physics = {"jump","speed","gravity"}, | ||||
| 	formspec = "size[8,8.5]list[detached:player_name_armor;armor;0,1;2,3;]" | ||||
| 		.."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;]", | ||||
| 		.."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 | ||||
| @@ -91,16 +105,16 @@ armor.set_player_armor = function(self, player) | ||||
| 	if not player then | ||||
| 		return | ||||
| 	end | ||||
|  	local name = player:get_player_name() | ||||
|  	if not name then | ||||
| 	local name = player:get_player_name() | ||||
| 	if not name then | ||||
| 		minetest.log("error", "3d_armor: Player name is nil [set_player_armor]") | ||||
|  		return | ||||
| 		return | ||||
| 	end | ||||
| 	local player_inv = player:get_inventory() | ||||
| 	if not player_inv then | ||||
| 		minetest.log("error", "3d_armor: Player inventory is nil [set_player_armor]") | ||||
|  		return | ||||
|  	end | ||||
| 		return | ||||
| 	end | ||||
| 	local armor_texture = "3d_armor_trans.png" | ||||
| 	local armor_level = 0 | ||||
| 	local armor_heal = 0 | ||||
| @@ -131,7 +145,7 @@ armor.set_player_armor = function(self, player) | ||||
| 						items = items + 1 | ||||
| 						local heal = def.groups["armor_heal"] or 0 | ||||
| 						armor_heal = armor_heal + heal | ||||
| 						for kk,vv in ipairs(self.physics) do							 | ||||
| 						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 | ||||
| @@ -182,11 +196,11 @@ armor.set_player_armor = function(self, player) | ||||
| end | ||||
|  | ||||
| armor.update_armor = function(self, player) | ||||
|  	if not player then | ||||
| 	if not player then | ||||
| 		minetest.log("error", "3d_armor: Player reference is nil [update_armor]") | ||||
|  		return | ||||
|  	end | ||||
|  	local name = player:get_player_name() | ||||
| 		return | ||||
| 	end | ||||
| 	local name = player:get_player_name() | ||||
| 	if not name then | ||||
| 		minetest.log("error", "3d_armor: Player name is nil[update_armor]") | ||||
| 		return | ||||
| @@ -200,11 +214,11 @@ armor.update_armor = function(self, player) | ||||
| 		local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"}) | ||||
| 		if not player_inv then | ||||
| 			minetest.log("error", "3d_armor: Player inventory is nil [update_armor]") | ||||
|  			return | ||||
|  		elseif not armor_inv then | ||||
| 			return | ||||
| 		elseif not armor_inv then | ||||
| 			minetest.log("error", "3d_armor: Detached inventory is nil [update_armor]") | ||||
|  			return | ||||
|  		end | ||||
| 			return | ||||
| 		end | ||||
| 		local heal_max = 0 | ||||
| 		local state = 0 | ||||
| 		local items = 0 | ||||
| @@ -281,13 +295,13 @@ armor.update_inventory = function(self, player) | ||||
| 		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 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() | ||||
| 			local page = player:get_inventory_formspec() | ||||
| 			if page:find("detached:"..name.."_armor") then | ||||
| 				inventory_plus.set_inventory_formspec(player, formspec) | ||||
| 			end | ||||
| @@ -299,7 +313,7 @@ end | ||||
|  | ||||
| -- Register Player Model | ||||
|  | ||||
| default.player_register_model("3d_armor_character.x", { | ||||
| default.player_register_model("3d_armor_character.b3d", { | ||||
| 	animation_speed = 30, | ||||
| 	textures = { | ||||
| 		armor.default_skin..".png", | ||||
| @@ -337,7 +351,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.x") | ||||
| 	default.player_set_model(player, "3d_armor_character.b3d") | ||||
| 	local name = player:get_player_name() | ||||
| 	local player_inv = player:get_inventory() | ||||
| 	local armor_inv = minetest.create_detached_inventory(name.."_armor",{ | ||||
| @@ -386,7 +400,7 @@ minetest.register_on_joinplayer(function(player) | ||||
| 		player_inv:set_stack(list, 1, nil) | ||||
| 	end | ||||
| 	-- TODO Remove this on the next version upate | ||||
| 	 | ||||
|  | ||||
| 	armor.player_hp[name] = 0 | ||||
| 	armor.def[name] = { | ||||
| 		state = 0, | ||||
| @@ -458,7 +472,7 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then | ||||
| 			end | ||||
| 			armor:set_player_armor(player) | ||||
| 			if inv_mod == "unified_inventory" then | ||||
|  				unified_inventory.set_inventory_formspec(player, "craft") | ||||
| 				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) | ||||
|   | ||||
| @@ -1,212 +1,188 @@ | ||||
| ARMOR_MOD_NAME = minetest.get_current_modname() | ||||
| dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua") | ||||
| dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/admin.lua") | ||||
| local use_moreores = minetest.get_modpath("moreores") | ||||
|  | ||||
| -- Regisiter Head Armor | ||||
| if ARMOR_MATERIALS.wood then | ||||
| 	minetest.register_tool("3d_armor:helmet_wood", { | ||||
| 		description = "Wood Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_wood.png", | ||||
| 		groups = {armor_head=5, armor_heal=0, armor_use=2000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_wood", { | ||||
| 		description = "Wood Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_wood.png", | ||||
| 		groups = {armor_torso=8, armor_heal=0, armor_use=2000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_wood", { | ||||
| 		description = "Wood Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_wood.png", | ||||
| 		groups = {armor_legs=8, armor_heal=0, armor_use=2000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_wood", { | ||||
| 		description = "Wood Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_wood.png", | ||||
| 		groups = {armor_feet=5, armor_heal=0, armor_use=2000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_wood", { | ||||
| 	description = "Wood Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_wood.png", | ||||
| 	groups = {armor_head=5, armor_heal=0, armor_use=2000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
| if ARMOR_MATERIALS.cactus then | ||||
| 	minetest.register_tool("3d_armor:helmet_cactus", { | ||||
| 		description = "Cactuc Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_cactus.png", | ||||
| 		groups = {armor_head=6, armor_heal=0, armor_use=1000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_cactus", { | ||||
| 		description = "Cactus Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_cactus.png", | ||||
| 		groups = {armor_torso=9, armor_heal=0, armor_use=1000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_cactus", { | ||||
| 		description = "Cactus Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_cactus.png", | ||||
| 		groups = {armor_legs=9, armor_heal=0, armor_use=1000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_cactus", { | ||||
| 		description = "Cactus Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_cactus.png", | ||||
| 		groups = {armor_feet=6, armor_heal=0, armor_use=1000}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_cactus", { | ||||
| 	description = "Cactuc Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_cactus.png", | ||||
| 	groups = {armor_head=6, armor_heal=0, armor_use=1000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
| if ARMOR_MATERIALS.steel then | ||||
| 	minetest.register_tool("3d_armor:helmet_steel", { | ||||
| 		description = "Steel Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_steel.png", | ||||
| 		groups = {armor_head=8, armor_heal=0, armor_use=500}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_steel", { | ||||
| 		description = "Steel Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_steel.png", | ||||
| 		groups = {armor_torso=10, armor_heal=0, armor_use=500}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_steel", { | ||||
| 		description = "Steel Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_steel.png", | ||||
| 		groups = {armor_legs=10, armor_heal=0, armor_use=500}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_steel", { | ||||
| 		description = "Steel Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_steel.png", | ||||
| 		groups = {armor_feet=8, armor_heal=0, armor_use=500}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_steel", { | ||||
| 	description = "Steel Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_steel.png", | ||||
| 	groups = {armor_head=8, armor_heal=0, armor_use=500}, | ||||
| 	wear = 0, | ||||
| }) | ||||
| if ARMOR_MATERIALS.bronze then | ||||
| 	minetest.register_tool("3d_armor:helmet_bronze", { | ||||
| 		description = "Bronze Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_bronze.png", | ||||
| 		groups = {armor_head=10, armor_heal=4, armor_use=250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_bronze", { | ||||
| 		description = "Bronze Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_bronze.png", | ||||
| 		groups = {armor_torso=12, armor_heal=4, armor_use=250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_bronze", { | ||||
| 		description = "Bronze Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_bronze.png", | ||||
| 		groups = {armor_legs=12, armor_heal=6, armor_use=250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_bronze", { | ||||
| 		description = "Bronze Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_bronze.png", | ||||
| 		groups = {armor_feet=10, armor_heal=4, armor_use=250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_bronze", { | ||||
| 	description = "Bronze Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_bronze.png", | ||||
| 	groups = {armor_head=10, armor_heal=4, armor_use=250}, | ||||
| 	wear = 0, | ||||
| }) | ||||
| if ARMOR_MATERIALS.diamond then | ||||
| 	minetest.register_tool("3d_armor:helmet_diamond", { | ||||
| 		description = "Diamond Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_diamond.png", | ||||
| 		groups = {armor_head=14, armor_heal=12, armor_use=100}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_diamond", { | ||||
| 		description = "Diamond Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_diamond.png", | ||||
| 		groups = {armor_torso=18, armor_heal=12, armor_use=100}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_diamond", { | ||||
| 		description = "Diamond Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_diamond.png", | ||||
| 		groups = {armor_legs=18, armor_heal=12, armor_use=100}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_diamond", { | ||||
| 		description = "Diamond Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_diamond.png", | ||||
| 		groups = {armor_feet=14, armor_heal=12, armor_use=100}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_diamond", { | ||||
| 	description = "Diamond Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_diamond.png", | ||||
| 	groups = {armor_head=14, armor_heal=12, armor_use=100}, | ||||
| 	wear = 0, | ||||
| }) | ||||
| if ARMOR_MATERIALS.gold then | ||||
| 	minetest.register_tool("3d_armor:helmet_gold", { | ||||
| 		description = "Gold Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_gold.png", | ||||
| 		groups = {armor_head=12, armor_heal=6, armor_use=200}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:chestplate_gold", { | ||||
| 		description = "Gold Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_gold.png", | ||||
| 		groups = {armor_torso=15, armor_heal=6, armor_use=200}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:leggings_gold", { | ||||
| 		description = "Gold Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_gold.png", | ||||
| 		groups = {armor_legs=15, armor_heal=6, armor_use=200}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	minetest.register_tool("3d_armor:boots_gold", { | ||||
| 		description = "Gold Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_gold.png", | ||||
| 		groups = {armor_feet=12, armor_heal=6, armor_use=200}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_tool("3d_armor:helmet_gold", { | ||||
| 	description = "Gold Helmet", | ||||
| 	inventory_image = "3d_armor_inv_helmet_gold.png", | ||||
| 	groups = {armor_head=12, armor_heal=6, armor_use=200}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| if use_moreores then | ||||
| if ARMOR_MATERIALS.mithril then | ||||
| 	minetest.register_tool("3d_armor:helmet_mithril", { | ||||
| 		description = "Mithril Helmet", | ||||
| 		inventory_image = "3d_armor_inv_helmet_mithril.png", | ||||
| 		groups = {armor_head=15, armor_heal=12, armor_use=50}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Regisiter Torso Armor | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_wood", { | ||||
| 	description = "Wood Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_wood.png", | ||||
| 	groups = {armor_torso=8, armor_heal=0, armor_use=2000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_cactus", { | ||||
| 	description = "Cactus Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_cactus.png", | ||||
| 	groups = {armor_torso=9, armor_heal=0, armor_use=1000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_steel", { | ||||
| 	description = "Steel Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_steel.png", | ||||
| 	groups = {armor_torso=10, armor_heal=0, armor_use=500}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_bronze", { | ||||
| 	description = "Bronze Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_bronze.png", | ||||
| 	groups = {armor_torso=12, armor_heal=4, armor_use=250}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_diamond", { | ||||
| 	description = "Diamond Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_diamond.png", | ||||
| 	groups = {armor_torso=18, armor_heal=12, armor_use=100}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:chestplate_gold", { | ||||
| 	description = "Gold Chestplate", | ||||
| 	inventory_image = "3d_armor_inv_chestplate_gold.png", | ||||
| 	groups = {armor_torso=15, armor_heal=6, armor_use=200}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| if use_moreores then | ||||
| 	minetest.register_tool("3d_armor:chestplate_mithril", { | ||||
| 		description = "Mithril Chestplate", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_mithril.png", | ||||
| 		groups = {armor_torso=20, armor_heal=12, armor_use=50}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Regisiter Leg Armor | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_wood", { | ||||
| 	description = "Wood Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_wood.png", | ||||
| 	groups = {armor_legs=8, armor_heal=0, armor_use=2000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_cactus", { | ||||
| 	description = "Cactus Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_cactus.png", | ||||
| 	groups = {armor_legs=9, armor_heal=0, armor_use=1000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_steel", { | ||||
| 	description = "Steel Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_steel.png", | ||||
| 	groups = {armor_legs=10, armor_heal=0, armor_use=500}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_bronze", { | ||||
| 	description = "Bronze Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_bronze.png", | ||||
| 	groups = {armor_legs=12, armor_heal=6, armor_use=250}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_diamond", { | ||||
| 	description = "Diamond Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_diamond.png", | ||||
| 	groups = {armor_legs=18, armor_heal=12, armor_use=100}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:leggings_gold", { | ||||
| 	description = "Gold Leggings", | ||||
| 	inventory_image = "3d_armor_inv_leggings_gold.png", | ||||
| 	groups = {armor_legs=15, armor_heal=6, armor_use=200}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| if use_moreores then | ||||
| 	minetest.register_tool("3d_armor:leggings_mithril", { | ||||
| 		description = "Mithril Leggings", | ||||
| 		inventory_image = "3d_armor_inv_leggings_mithril.png", | ||||
| 		groups = {armor_legs=20, armor_heal=12, armor_use=50}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Regisiter Boots | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_wood", { | ||||
| 	description = "Wood Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_wood.png", | ||||
| 	groups = {armor_feet=5, armor_heal=0, armor_use=2000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_cactus", { | ||||
| 	description = "Cactus Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_cactus.png", | ||||
| 	groups = {armor_feet=6, armor_heal=0, armor_use=1000}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_steel", { | ||||
| 	description = "Steel Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_steel.png", | ||||
| 	groups = {armor_feet=8, armor_heal=0, armor_use=500}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_bronze", { | ||||
| 	description = "Bronze Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_bronze.png", | ||||
| 	groups = {armor_feet=10, armor_heal=4, armor_use=250}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_diamond", { | ||||
| 	description = "Diamond Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_diamond.png", | ||||
| 	groups = {armor_feet=14, armor_heal=12, armor_use=100}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| minetest.register_tool("3d_armor:boots_gold", { | ||||
| 	description = "Gold Boots", | ||||
| 	inventory_image = "3d_armor_inv_boots_gold.png", | ||||
| 	groups = {armor_feet=12, armor_heal=6, armor_use=200}, | ||||
| 	wear = 0, | ||||
| }) | ||||
|  | ||||
| if use_moreores then | ||||
| 	minetest.register_tool("3d_armor:boots_mithril", { | ||||
| 		description = "Mithril Boots", | ||||
| 		inventory_image = "3d_armor_inv_boots_mithril.png", | ||||
| @@ -215,22 +191,7 @@ if use_moreores then | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Register Craft Recipies | ||||
|  | ||||
| local craft_ingreds = { | ||||
| 	wood = "default:wood", | ||||
| 	cactus = "default:cactus", | ||||
| 	steel = "default:steel_ingot", | ||||
| 	bronze = "default:bronze_ingot", | ||||
| 	diamond = "default:diamond", | ||||
| 	gold = "default:gold_ingot", | ||||
| } | ||||
|  | ||||
| if use_moreores then | ||||
| 	craft_ingreds.mithril = "moreores:mithril_ingot" | ||||
| end | ||||
|  | ||||
| for k, v in pairs(craft_ingreds) do | ||||
| for k, v in pairs(ARMOR_MATERIALS) do | ||||
| 	minetest.register_craft({ | ||||
| 		output = "3d_armor:helmet_"..k, | ||||
| 		recipe = { | ||||
|   | ||||
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/models/3d_armor_character.b3d
									
									
									
									
									
										Executable file
									
								
							
							
						
						
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_boots_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 291 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_boots_admin_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 632 B After Width: | Height: | Size: 321 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 308 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_boots_cactus_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 295 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 287 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 472 B After Width: | Height: | Size: 216 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 609 B After Width: | Height: | Size: 316 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 274 B | 
| Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 782 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_chestplate_admin_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 556 B | 
| Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 712 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_chestplate_cactus_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 475 B | 
| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 430 B | 
| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB | 
| Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 669 B | 
| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 537 B | 
| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 453 B | 
| Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 725 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_helmet_admin_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 883 B | 
| Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 602 B | 
| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 891 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 846 B After Width: | Height: | Size: 545 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_helmet_cactus_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 883 B | 
| Before Width: | Height: | Size: 878 B After Width: | Height: | Size: 524 B | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 902 B | 
| Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 489 B | 
| Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 893 B | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 798 B | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 853 B | 
| Before Width: | Height: | Size: 858 B After Width: | Height: | Size: 556 B | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 887 B | 
| Before Width: | Height: | Size: 863 B After Width: | Height: | Size: 485 B | 
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 878 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 129 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_boots_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 187 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 129 B | 
| Before Width: | Height: | Size: 213 B After Width: | Height: | Size: 129 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 226 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 142 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_chestplate_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 220 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 247 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 142 B | 
| Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 142 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 140 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_helmet_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 212 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 140 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 155 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_inv_leggings_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 214 B After Width: | Height: | Size: 140 B | 
| Before Width: | Height: | Size: 242 B After Width: | Height: | Size: 155 B | 
| Before Width: | Height: | Size: 215 B After Width: | Height: | Size: 155 B | 
| Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 155 B | 
| Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 155 B | 
| Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 155 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 351 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_leggings_admin_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 639 B After Width: | Height: | Size: 335 B | 
| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 695 B After Width: | Height: | Size: 424 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/3d_armor/3d_armor/textures/3d_armor_leggings_cactus_preview.png
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						| Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 306 B | 
| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 569 B After Width: | Height: | Size: 298 B | 
| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 497 B | 
| Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |