Compare commits
	
		
			2 Commits
		
	
	
		
			master
			...
			fd81f21c70
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fd81f21c70 | |||
|  | 2c388fc8e5 | 
							
								
								
									
										2
									
								
								blackmithril/depends.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| 3d_armor | ||||
							
								
								
									
										47
									
								
								blackmithril/init.lua
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,47 @@ | ||||
| if ARMOR_MATERIALS.blackmithril then | ||||
| 	-- Register helmets : | ||||
| 	minetest.register_tool(":3d_armor:helmet_blackmithril", { | ||||
| 		description = "Black Mithril Helmet (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_helmet_blackmithril.png", | ||||
| 		groups = {armor_head = 11, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register chestplates : | ||||
| 	minetest.register_tool(":3d_armor:chestplate_blackmithril", { | ||||
| 		description = "Black Mithril Chestplate (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_blackmithril.png", | ||||
| 		groups = {armor_torso = 17, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register leggings : | ||||
| 	minetest.register_tool(":3d_armor:leggings_blackmithril", { | ||||
| 		description = "Black Mithril Leggings (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_blackmithril.png", | ||||
| 		groups = {armor_legs = 17, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register boots : | ||||
| 		minetest.register_tool(":3d_armor:boots_blackmithril", { | ||||
| 		description = "Black Mithril Boots (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_boots_blackmithril.png", | ||||
| 		groups = {armor_feet = 11, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_craftitem(":3d_armor:blackmithril_ingot", { | ||||
| 	description = "Black Mithril Ingot", | ||||
| 	inventory_image = "3d_armor_blackmithril_ingot.png", | ||||
| 	stack_max = 99, | ||||
| 	groups = {ingot = 1} | ||||
| }) | ||||
|  | ||||
| -- Black Mithril craft recipe | ||||
| minetest.register_craft({ | ||||
| 	output = "3d_armor:blackmithril_ingot", | ||||
| 	recipe = { | ||||
| 		{"default:mithril_ingot", 			"mobs:dungeon_master_blood",	""}, | ||||
| 		{"mobs:dungeon_master_diamond", "default:obsidian",						""}, | ||||
| 		{"", 														"",														""} | ||||
| 	} | ||||
| }) | ||||
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_blackmithril_ingot.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 255 B | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_boots_blackmithril.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 11 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_boots_blackmithril_preview.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 653 B | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_chestplate_blackmithril.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 9.8 KiB | 
| After Width: | Height: | Size: 2.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_helmet_blackmithril.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 10 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_helmet_blackmithril_preview.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 862 B | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_inv_boots_blackmithril.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 2.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_inv_chestplate_blackmithril.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 3.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_inv_helmet_blackmithril.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 2.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_inv_leggings_blackmithril.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 2.6 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_leggings_blackmithril.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 2.0 KiB | 
							
								
								
									
										
											BIN
										
									
								
								blackmithril/textures/3d_armor_leggings_blackmithril_preview.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										2
									
								
								depends.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| 3d_armor | ||||
| shields | ||||
							
								
								
									
										2
									
								
								hardenedleather/depends.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| 3d_armor | ||||
							
								
								
									
										46
									
								
								hardenedleather/init.lua
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,46 @@ | ||||
| if ARMOR_MATERIALS.hardenedleather then | ||||
| 	-- Register helmets : | ||||
| 	minetest.register_tool(":3d_armor:helmet_hardenedleather", { | ||||
| 		description = "Hardened Leather Helmet (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_helmet_hardenedleather.png", | ||||
| 		groups = {armor_head = 5, armor_heal = 0, armor_use = 250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register chestplates : | ||||
| 	minetest.register_tool(":3d_armor:chestplate_hardenedleather", { | ||||
| 		description = "Hardened Leather Chestplate (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_hardenedleather.png", | ||||
| 		groups = {armor_torso = 8, armor_heal = 0, armor_use = 250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register leggings : | ||||
| 	minetest.register_tool(":3d_armor:leggings_hardenedleather", { | ||||
| 		description = "Hardened Leather Leggings (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_hardenedleather.png", | ||||
| 		groups = {armor_legs = 8, armor_heal = 0, armor_use = 250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register boots : | ||||
| 		minetest.register_tool(":3d_armor:boots_hardenedleather", { | ||||
| 		description = "Hardened Leather Boots (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_boots_hardenedleather.png", | ||||
| 		groups = {armor_feet = 5, armor_heal = 0, armor_use = 250}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_craftitem(":3d_armor:hardenedleather", { | ||||
| 	description = "Hardened Leather", | ||||
| 	inventory_image = "3d_armor_hardenedleather.png", | ||||
| 	stack_max = 99, | ||||
| }) | ||||
|  | ||||
| -- Hardened Leather craft recipe | ||||
| minetest.register_craft({ | ||||
| 	output = "3d_armor:hardenedleather", | ||||
| 	recipe = { | ||||
| 		{"default:steel_ingot",		"mobs:leather", 	"default:bronze_ingot"}, | ||||
| 		{"mobs:leather", 					"mobs:leather", 	"mobs:leather"				}, | ||||
| 		{"default:bronze_ingot", 	"mobs:leather", 	"default:steel_ingot"	} | ||||
| 	} | ||||
| }) | ||||
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_boots_hardenedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_boots_hardenedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 461 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_chestplate_hardenedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_chestplate_hardenedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 1.9 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_hardenedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 184 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_helmet_hardenedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 304 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_helmet_hardenedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 243 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_inv_boots_hardenedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 773 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_inv_chestplate_hardenedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 1.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_inv_helmet_hardenedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 171 B | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_inv_leggings_hardenedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_leggings_hardenedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.0 KiB | 
							
								
								
									
										
											BIN
										
									
								
								hardenedleather/textures/3d_armor_leggings_hardenedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 2.0 KiB | 
							
								
								
									
										267
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						| @@ -1,14 +1,10 @@ | ||||
| armor.config.material_reinforcedleather = true | ||||
| armor.config.material_hardenedleather = true | ||||
| armor.config.material_blackmithril = true | ||||
| armor.config.material_leather = true | ||||
|  | ||||
| armor.materials.reinforcedleather = "3d_armor:reinforcedleather" | ||||
| armor.materials.hardenedleather = "3d_armor:hardenedleather" | ||||
| armor.materials.blackmithril = "3d_armor:blackmithril_ingot" | ||||
| armor.materials.leather = "mobs:leather" | ||||
|  | ||||
| local S = minetest.get_translator("3d_armor_classes") | ||||
|  | ||||
| -- Load Configuration | ||||
|  | ||||
| @@ -30,41 +26,10 @@ for material, _ in pairs(armor.materials) do | ||||
| 	end | ||||
| end | ||||
|  | ||||
| -- Function to change max stamina if hbsprint is present | ||||
| local mod_hbsprint = minetest.get_modpath("hbsprint") ~= nil | ||||
| local function change_stamina_max(player, value) | ||||
| 	if mod_hbsprint then | ||||
| 		core.after(0.5, function() | ||||
| 			local new_max = value + hb.get_hudtable("stamina").hudstate[player:get_player_name()].max | ||||
| 			local val = player:get_meta():get_float("hbsprint:stamina") | ||||
| 			if val > new_max then | ||||
| 				player:get_meta():set_float("hbsprint:stamina", new_max) | ||||
| 				hb.change_hudbar(player, "stamina", new_max, new_max) | ||||
| 			elseif val <= new_max then | ||||
| 				hb.unhide_hudbar(player, "stamina") | ||||
| 				hb.change_hudbar(player, "stamina", nil, new_max) | ||||
| 			end | ||||
| 		end) | ||||
| 	end | ||||
| end | ||||
|  | ||||
| local mod_hb = minetest.get_modpath("hudbars") ~= nil | ||||
| local function change_hp_max(player, value) | ||||
| 	local hp_max = player:get_properties().hp_max | ||||
| 	local hp = player:get_hp() | ||||
| 	local new_max = hp_max + value | ||||
| 	if hp > new_max then | ||||
| 		player:set_hp(new_max, {type="set_hp", from="mod"}) | ||||
| 		if mod_hb then | ||||
| 			hb.change_hudbar(player, "health", new_max, new_max) | ||||
| 		end | ||||
| 	end | ||||
| 	player:set_properties({hp_max = new_max}) | ||||
| end | ||||
|  | ||||
| -- Reinforced Leather | ||||
| minetest.register_craftitem(":3d_armor:reinforcedleather", { | ||||
| 	description = S("Reinforced Leather"), | ||||
| 	description = "Reinforced Leather", | ||||
| 	inventory_image = "3d_armor_reinforcedleather.png", | ||||
| 	stack_max = 99, | ||||
| }) | ||||
| @@ -81,70 +46,45 @@ minetest.register_craft({ | ||||
| if armor.materials.reinforcedleather then | ||||
| 	-- Register helmets : | ||||
| 	armor:register_armor(":3d_armor:helmet_reinforcedleather", { | ||||
| 			description = S("Reinforced Leather Helmet (@1)", S("Hunter")), | ||||
| 			description = "Reinforced Leather Helmet (Hunter)", | ||||
| 			inventory_image = "3d_armor_inv_helmet_reinforcedleather.png", | ||||
| 			groups = {armor_head=1, armor_use=40, physics_speed=0.4, physics_gravity=-0.02}, | ||||
| 			groups = {armor_head=1, armor_use=40, physics_speed=0.02, physics_gravity=-0.02}, | ||||
| 			armor_groups = {fleshy=6}, | ||||
| 			damage_groups = {cracky=2, snappy=1, choppy=1, level=2}, | ||||
| 			on_equip = function(player, index, stack) | ||||
| 				change_stamina_max(player, 2) | ||||
| 			end, | ||||
| 			on_unequip = function(player, index, stack) | ||||
| 				change_stamina_max(player, -2) | ||||
| 			end, | ||||
| 			damage_groups = {cracky=2, snappy=1, choppy=1, level=2} | ||||
| 	}) | ||||
| 	 | ||||
| 	-- Register chestplates : | ||||
| 	armor:register_armor(":3d_armor:chestplate_reinforcedleather", { | ||||
| 		description = S("Reinforced Leather Chestplate (@1)", S("Hunter")), | ||||
| 		description = "Reinforced Leather Chestplate (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_reinforcedleather.png", | ||||
| 		groups = {armor_torso = 1, armor_use = 40, physics_speed=1.6, physics_gravity=-0.08}, | ||||
| 		groups = {armor_torso = 1, armor_use = 40, physics_speed=0.08, physics_gravity=-0.08}, | ||||
| 		armor_groups = {fleshy=11}, | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 8) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -8) | ||||
| 		end, | ||||
|  | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=2} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register leggings : | ||||
| 	armor:register_armor(":3d_armor:leggings_reinforcedleather", { | ||||
| 		description = S("Reinforced Leather Leggings (@1)", S("Hunter")), | ||||
| 		description = "Reinforced Leather Leggings (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_reinforcedleather.png", | ||||
| 		groups = {armor_legs = 1, armor_use = 40, physics_speed=1.2, physics_gravity=-0.06}, | ||||
| 		groups = {armor_legs = 1, armor_use = 40, physics_speed=0.06, physics_gravity=-0.06}, | ||||
| 		armor_groups = {fleshy=11}, | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 6) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -6) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=2} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register boots : | ||||
| 	armor:register_armor(":3d_armor:boots_reinforcedleather", { | ||||
| 		description = S("Reinforced Leather Boots (@1)", S("Hunter")), | ||||
| 		description = "Reinforced Leather Boots (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_boots_reinforcedleather.png", | ||||
| 		groups = {armor_feet = 1, armor_use = 40, physics_speed=0.4, physics_gravity=-0.02}, | ||||
| 		groups = {armor_feet = 1, armor_use = 40, physics_speed=0.02, physics_gravity=-0.02}, | ||||
| 		armor_groups = {fleshy=6}, | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=3}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 2) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -2) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, choppy=1, level=3} | ||||
| 	}) | ||||
| end | ||||
|  | ||||
|  | ||||
| -- Hardened Leather | ||||
| minetest.register_craftitem(":3d_armor:hardenedleather", { | ||||
| 	description = S("Hardened Leather"), | ||||
| 	description = "Hardened Leather", | ||||
| 	inventory_image = "3d_armor_hardenedleather.png", | ||||
| 	stack_max = 99, | ||||
| }) | ||||
| @@ -161,131 +101,44 @@ minetest.register_craft({ | ||||
| if armor.materials.hardenedleather then | ||||
| 	-- Register helmets : | ||||
| 	armor:register_armor(":3d_armor:helmet_hardenedleather", { | ||||
| 		description = S("Hardened Leather Helmet (@1)", S("Hunter")), | ||||
| 		description = "Hardened Leather Helmet (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_helmet_hardenedleather.png", | ||||
| 		groups = {armor_head = 1, armor_use = 250, physics_speed=0.2, physics_gravity=-0.01}, | ||||
| 		groups = {armor_head = 1, armor_use = 250, physics_speed=0.01, physics_gravity=-0.01}, | ||||
| 		armor_groups = {fleshy=5}, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register chestplates : | ||||
| 	armor:register_armor(":3d_armor:chestplate_hardenedleather", { | ||||
| 		description = S("Hardened Leather Chestplate (@1)", S("Hunter")), | ||||
| 		description = "Hardened Leather Chestplate (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_hardenedleather.png", | ||||
| 		groups = {armor_torso = 1, armor_use = 250, physics_speed=0.8, physics_gravity=-0.04}, | ||||
| 		groups = {armor_torso = 1, armor_use = 250, physics_speed=0.04, physics_gravity=-0.04}, | ||||
| 		armor_groups = {fleshy=8}, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 4) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -4) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register leggings : | ||||
| 	armor:register_armor(":3d_armor:leggings_hardenedleather", { | ||||
| 		description = S("Hardened Leather Leggings (@1)", S("Hunter")), | ||||
| 		description = "Hardened Leather Leggings (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_hardenedleather.png", | ||||
| 		groups = {armor_legs = 1, armor_use = 250, physics_speed=0.6, physics_gravity=-0.03}, | ||||
| 		groups = {armor_legs = 1, armor_use = 250, physics_speed=0.03, physics_gravity=-0.03}, | ||||
| 		armor_groups = {fleshy=8}, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 3) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -3) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register boots : | ||||
| 	armor:register_armor(":3d_armor:boots_hardenedleather", { | ||||
| 		description = S("Hardened Leather Boots (@1)", S("Hunter")), | ||||
| 		description = "Hardened Leather Boots (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_boots_hardenedleather.png", | ||||
| 		groups = {armor_feet = 1, armor_use = 250, physics_speed=0.2, physics_gravity=-0.01}, | ||||
| 		groups = {armor_feet = 1, armor_use = 250, physics_speed=0.01, physics_gravity=-0.01}, | ||||
| 		armor_groups = {fleshy=5}, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Simple leather | ||||
| if armor.materials.leather then | ||||
| 	-- Register helmets : | ||||
| 	armor:register_armor(":3d_armor:helmet_leather", { | ||||
| 		description = S("Leather Helmet (@1)", S("Hunter")), | ||||
| 		inventory_image = "3d_armor_inv_helmet_leather.png", | ||||
| 		groups = {armor_head = 1, armor_use = 2700, physics_speed=0.1, physics_gravity=-0.01}, | ||||
| 		armor_groups = {fleshy=4}, | ||||
| 		damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=2, level=1}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 	}) | ||||
|  | ||||
| 	-- Register chestplates : | ||||
| 	armor:register_armor(":3d_armor:chestplate_leather", { | ||||
| 		description = S("Leather Chestplate (@1)", S("Hunter")), | ||||
| 		inventory_image = "3d_armor_inv_chestplate_leather.png", | ||||
| 		groups = {armor_torso = 1, armor_use = 2700, physics_speed=0.4, physics_gravity=-0.04}, | ||||
| 		armor_groups = {fleshy=7}, | ||||
| 		damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=2, level=1}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 2) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -2) | ||||
| 		end, | ||||
| 	}) | ||||
|  | ||||
| 	-- Register leggings : | ||||
| 	armor:register_armor(":3d_armor:leggings_leather", { | ||||
| 		description = S("Leather Leggings (@1)", S("Hunter")), | ||||
| 		inventory_image = "3d_armor_inv_leggings_leather.png", | ||||
| 		groups = {armor_legs = 1, armor_use = 2700, physics_speed=0.3, physics_gravity=-0.03}, | ||||
| 		armor_groups = {fleshy=7}, | ||||
| 		damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=2, level=1}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 2) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -2) | ||||
| 		end, | ||||
| 	}) | ||||
|  | ||||
| 	-- Register boots : | ||||
| 	armor:register_armor(":3d_armor:boots_leather", { | ||||
| 		description = S("Leather Boots (@1)", S("Hunter")), | ||||
| 		inventory_image = "3d_armor_inv_boots_leather.png", | ||||
| 		groups = {armor_feet = 1, armor_use = 2700, physics_speed=0.1, physics_gravity=-0.01}, | ||||
| 		armor_groups = {fleshy=4}, | ||||
| 		damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=2, level=1}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2} | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| -- Black Mithril | ||||
| minetest.register_craftitem(":3d_armor:blackmithril_ingot", { | ||||
| 	description = S("Black Mithril Ingot"), | ||||
| 	description = "Black Mithril Ingot", | ||||
| 	inventory_image = "3d_armor_blackmithril_ingot.png", | ||||
| 	stack_max = 99, | ||||
| 	groups = {ingot = 1} | ||||
| @@ -303,87 +156,49 @@ minetest.register_craft({ | ||||
| if armor.materials.blackmithril then | ||||
| 	-- Register helmets : | ||||
| 	armor:register_armor(":3d_armor:helmet_blackmithril", { | ||||
| 		description = S("Black Mithril Helmet (@1)", S("Warrior")), | ||||
| 		description = "Black Mithril Helmet (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_helmet_blackmithril.png", | ||||
| 		groups = {armor_head = 1, armor_heal = 15, physics_speed=0.2, armor_use = 40}, | ||||
| 		groups = {armor_head = 1, armor_heal = 15, armor_use = 40}, | ||||
| 		armor_groups = {fleshy=16}, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_hp_max(player, 1) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_hp_max(player, -1) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register chestplates : | ||||
| 	armor:register_armor(":3d_armor:chestplate_blackmithril", { | ||||
| 		description = S("Black Mithril Chestplate (@1)", S("Warrior")), | ||||
| 		description = "Black Mithril Chestplate (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_blackmithril.png", | ||||
| 		groups = {armor_torso = 1, armor_heal = 15, physics_speed=0.8, armor_use = 40}, | ||||
| 		groups = {armor_torso = 1, armor_heal = 15, armor_use = 40}, | ||||
| 		armor_groups = {fleshy=22}, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_hp_max(player, 5) | ||||
| 			change_stamina_max(player, 4) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_hp_max(player, -5) | ||||
| 			change_stamina_max(player, -4) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register leggings : | ||||
| 	armor:register_armor(":3d_armor:leggings_blackmithril", { | ||||
| 		description = S("Black Mithril Leggings (@1)", S("Warrior")), | ||||
| 		description = "Black Mithril Leggings (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_blackmithril.png", | ||||
| 		groups = {armor_legs = 1, armor_heal = 15, physics_speed = 0.6, armor_use = 40}, | ||||
| 		groups = {armor_legs = 1, armor_heal = 15, armor_use = 40}, | ||||
| 		armor_groups = {fleshy=22}, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_hp_max(player, 3) | ||||
| 			change_stamina_max(player, 3) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_hp_max(player, -3) | ||||
| 			change_stamina_max(player, -3) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3} | ||||
| 	}) | ||||
|  | ||||
| 	-- Register boots : | ||||
| 	armor:register_armor(":3d_armor:boots_blackmithril", { | ||||
| 		description = S("Black Mithril Boots (@1)", S("Warrior")), | ||||
| 		description = "Black Mithril Boots (Warrior)", | ||||
| 		inventory_image = "3d_armor_inv_boots_blackmithril.png", | ||||
| 		groups = {armor_feet = 1, armor_heal = 15, physics_speed = 0.2, armor_use = 40}, | ||||
| 		groups = {armor_feet = 1, armor_heal = 15, armor_use = 40}, | ||||
| 		armor_groups = {fleshy=16}, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3}, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_hp_max(player, 1) | ||||
| 			change_stamina_max(player, 1) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_hp_max(player, -1) | ||||
| 			change_stamina_max(player, -1) | ||||
| 		end, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3} | ||||
| 	})	 | ||||
|  | ||||
| 	-- Register shield : | ||||
| 	armor:register_armor(":shields:shield_blackmithril", { | ||||
| 		description = S("Black Mithril Shield (@1)", S("Warrior")), | ||||
| 		description = "Black Mithril Shield (warrior)", | ||||
| 		inventory_image = "shields_inv_shield_black_mithril_warrior.png", | ||||
| 		groups = {armor_shield=15, armor_heal=0, armor_use=50}, | ||||
| 		armor_groups = {fleshy=16}, | ||||
| 		damage_groups = {cracky=2, snappy=1, level=3}, | ||||
| 		reciprocate_damage = true, | ||||
| 		on_equip = function(player, index, stack) | ||||
| 			change_hp_max(player, 5) | ||||
| 		end, | ||||
| 		on_unequip = function(player, index, stack) | ||||
| 			change_hp_max(player, -5) | ||||
| 		end, | ||||
| 	}) | ||||
| }) | ||||
| end | ||||
|  | ||||
| for k, v in pairs(armor.materials) do | ||||
|   | ||||
| @@ -1,25 +0,0 @@ | ||||
| # textdomain: 3d_armor_classes | ||||
|  | ||||
| Hunter=Chasseur | ||||
| Warrior=Guerrier | ||||
| Reinforced Leather=Cuir renforcé | ||||
| Reinforced Leather Helmet (@1)=Casque en cuir renforcé (@1) | ||||
| Reinforced Leather Chestplate (@1)=Plastron en cuir renforcé (@1) | ||||
| Reinforced Leather Leggings (@1)=Jambières en cuir renforcé (@1) | ||||
| Reinforced Leather Boots (@1)=Bottes en cuir renforcé (@1) | ||||
| Hardened Leather=Cuir durci | ||||
| Hardened Leather Helmet (@1)=Casque en cuir durci (@1) | ||||
| Hardened Leather Chestplate (@1)=Plastron en cuir durci (@1) | ||||
| Hardened Leather Leggings (@1)=Jambières en cuir durci (@1) | ||||
| Hardened Leather Boots (@1)=Bottes en cuir durci (@1) | ||||
| Leather=Cuir | ||||
| Leather Helmet (@1)=Casque en cuir (@1) | ||||
| Leather Chestplate (@1)=Plastron en cuir (@1) | ||||
| Leather Leggings (@1)=Jambières en cuir (@1) | ||||
| Leather Boots (@1)=Bottes en cuir (@1) | ||||
| Black Mithril Ingot=Lingot de mithril noir | ||||
| Black Mithril Helmet (@1)=Casque en mithril noir (@1) | ||||
| Black Mithril Chestplate (@1)=Plastron en mithril noir (@1) | ||||
| Black Mithril Leggings (@1)=Jambières en mithril noir (@1) | ||||
| Black Mithril Boots (@1)=Bottes en mithril noir (@1) | ||||
| Black Mithril Shield (@1)=Bouclier en mithril noir (@1) | ||||
| @@ -1,25 +0,0 @@ | ||||
| # textdomain: 3d_armor_classes | ||||
|  | ||||
| Hunter= | ||||
| Warrior= | ||||
| Reinforced Leather= | ||||
| Reinforced Leather Helmet (@1)= | ||||
| Reinforced Leather Chestplate (@1)= | ||||
| Reinforced Leather Leggings (@1)= | ||||
| Reinforced Leather Boots (@1)= | ||||
| Hardened Leather= | ||||
| Hardened Leather Helmet (@1)= | ||||
| Hardened Leather Chestplate (@1)= | ||||
| Hardened Leather Leggings (@1)= | ||||
| Hardened Leather Boots (@1)= | ||||
| Leather= | ||||
| Leather Helmet (@1)= | ||||
| Leather Chestplate (@1)= | ||||
| Leather Leggings (@1)= | ||||
| Leather Boots (@1)= | ||||
| Black Mithril Ingot= | ||||
| Black Mithril Helmet (@1)= | ||||
| Black Mithril Chestplate (@1)= | ||||
| Black Mithril Leggings (@1)= | ||||
| Black Mithril Boots (@1)= | ||||
| Black Mithril Shield (@1)= | ||||
							
								
								
									
										2
									
								
								magicmithril/depends.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| 3d_armor | ||||
							
								
								
									
										1
									
								
								magicmithril/init.lua
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| -- We need an init.lua, even an empty one | ||||
							
								
								
									
										3
									
								
								mod.conf
									
									
									
									
									
								
							
							
						
						| @@ -1,3 +0,0 @@ | ||||
| name = 3d_armor_classes | ||||
| depends = 3d_armor,shields,mobs | ||||
| optional_depends = hudbars,hbsprint | ||||
							
								
								
									
										0
									
								
								modpack.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						
							
								
								
									
										2
									
								
								obsidian/depends.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| 3d_armor | ||||
							
								
								
									
										1
									
								
								obsidian/init.lua
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1 @@ | ||||
| -- We need an init.lua, even an empty one | ||||
							
								
								
									
										2
									
								
								reinforcedleather/depends.txt
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,2 @@ | ||||
| default | ||||
| 3d_armor | ||||
							
								
								
									
										46
									
								
								reinforcedleather/init.lua
									
									
									
									
									
										Executable file
									
								
							
							
						
						| @@ -0,0 +1,46 @@ | ||||
| if ARMOR_MATERIALS.reinforcedleather then | ||||
| 	-- Register helmets : | ||||
| 	minetest.register_tool(":3d_armor:helmet_reinforcedleather", { | ||||
| 		description = "Reinforced Leather Helmet (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_helmet_reinforcedleather.png", | ||||
| 		groups = {armor_head = 6, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register chestplates : | ||||
| 	minetest.register_tool(":3d_armor:chestplate_reinforcedleather", { | ||||
| 		description = "Reinforced Leather Chestplate (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_chestplate_reinforcedleather.png", | ||||
| 		groups = {armor_torso = 11, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register leggings : | ||||
| 	minetest.register_tool(":3d_armor:leggings_reinforcedleather", { | ||||
| 		description = "Reinforced Leather Leggings (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_leggings_reinforcedleather.png", | ||||
| 		groups = {armor_legs = 11, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| 	-- Register boots : | ||||
| 		minetest.register_tool(":3d_armor:boots_reinforcedleather", { | ||||
| 		description = "Reinforced Leather Boots (Hunter)", | ||||
| 		inventory_image = "3d_armor_inv_boots_reinforcedleather.png", | ||||
| 		groups = {armor_feet = 6, armor_heal = 0, armor_use = 40}, | ||||
| 		wear = 0, | ||||
| 	}) | ||||
| end | ||||
|  | ||||
| minetest.register_craftitem(":3d_armor:reinforcedleather", { | ||||
| 	description = "Reinforced Leather", | ||||
| 	inventory_image = "3d_armor_reinforcedleather.png", | ||||
| 	stack_max = 99, | ||||
| }) | ||||
|  | ||||
| -- Reinforced Leather craft recipe | ||||
| minetest.register_craft({ | ||||
| 	output = "3d_armor:reinforcedleather", | ||||
| 	recipe = { | ||||
| 		{"default:mithril_ingot",	"technic:brass_ingot",	""}, | ||||
| 		{"darkage:chain", 					"mobs:minotaur_eye",		""}, | ||||
| 		{"", 												"", 										""} | ||||
| 	} | ||||
| }) | ||||
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_boots_reinforcedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.1 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_boots_reinforcedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 764 B | 
| After Width: | Height: | Size: 4.2 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_chestplate_reinforcedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 2.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_helmet_reinforcedleather.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.3 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_helmet_reinforcedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 603 B | 
| After Width: | Height: | Size: 706 B | 
| After Width: | Height: | Size: 2.0 KiB | 
| After Width: | Height: | Size: 328 B | 
| After Width: | Height: | Size: 1.3 KiB | 
| After Width: | Height: | Size: 2.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_leggings_reinforcedleather_preview.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										
											BIN
										
									
								
								reinforcedleather/textures/3d_armor_reinforcedleather.png
									
									
									
									
									
										Executable file
									
								
							
							
						
						| After Width: | Height: | Size: 214 B | 
| Before Width: | Height: | Size: 600 B | 
| Before Width: | Height: | Size: 480 B | 
| Before Width: | Height: | Size: 1.5 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 319 B | 
| Before Width: | Height: | Size: 256 B | 
| Before Width: | Height: | Size: 465 B | 
| Before Width: | Height: | Size: 724 B | 
| Before Width: | Height: | Size: 184 B | 
| Before Width: | Height: | Size: 728 B | 
| Before Width: | Height: | Size: 1008 B | 
| Before Width: | Height: | Size: 949 B |