1
0
Fork 0

Specify the repair material of tools and armor

This commit is contained in:
Wuzzy 2018-02-02 02:33:10 +01:00
parent 40f468f18f
commit e97fe05acc
3 changed files with 45 additions and 0 deletions

View File

@ -53,6 +53,7 @@ minetest.register_tool("mcl_farming:hoe_wood", {
full_punch_interval = 1, full_punch_interval = 1,
damage_groups = { fleshy = 1, } damage_groups = { fleshy = 1, }
}, },
_repair_material = "group:wood",
}) })
minetest.register_craft({ minetest.register_craft({
@ -103,6 +104,7 @@ minetest.register_tool("mcl_farming:hoe_stone", {
full_punch_interval = 0.5, full_punch_interval = 0.5,
damage_groups = { fleshy = 1, } damage_groups = { fleshy = 1, }
}, },
_repair_material = "mcl_core:cobblestone",
}) })
minetest.register_craft({ minetest.register_craft({
@ -149,6 +151,7 @@ minetest.register_tool("mcl_farming:hoe_iron", {
full_punch_interval = 0.33333333, full_punch_interval = 0.33333333,
damage_groups = { fleshy = 1, } damage_groups = { fleshy = 1, }
}, },
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
@ -201,6 +204,7 @@ minetest.register_tool("mcl_farming:hoe_gold", {
full_punch_interval = 1, full_punch_interval = 1,
damage_groups = { fleshy = 1, } damage_groups = { fleshy = 1, }
}, },
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
@ -255,6 +259,7 @@ minetest.register_tool("mcl_farming:hoe_diamond", {
full_punch_interval = 0.25, full_punch_interval = 0.25,
damage_groups = { fleshy = 1, } damage_groups = { fleshy = 1, }
}, },
_repair_material = "mcl_core:diamond",
}) })
minetest.register_craft({ minetest.register_craft({

View File

@ -75,6 +75,7 @@ minetest.register_tool("mcl_tools:pick_wood", {
damage_groups = {fleshy=2}, damage_groups = {fleshy=2},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "group:wood",
}) })
minetest.register_tool("mcl_tools:pick_stone", { minetest.register_tool("mcl_tools:pick_stone", {
description = "Stone Pickaxe", description = "Stone Pickaxe",
@ -91,6 +92,7 @@ minetest.register_tool("mcl_tools:pick_stone", {
damage_groups = {fleshy=3}, damage_groups = {fleshy=3},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:cobble",
}) })
minetest.register_tool("mcl_tools:pick_iron", { minetest.register_tool("mcl_tools:pick_iron", {
description = "Iron Pickaxe", description = "Iron Pickaxe",
@ -107,6 +109,7 @@ minetest.register_tool("mcl_tools:pick_iron", {
damage_groups = {fleshy=4}, damage_groups = {fleshy=4},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("mcl_tools:pick_gold", { minetest.register_tool("mcl_tools:pick_gold", {
description = "Golden Pickaxe", description = "Golden Pickaxe",
@ -123,6 +126,7 @@ minetest.register_tool("mcl_tools:pick_gold", {
damage_groups = {fleshy=2}, damage_groups = {fleshy=2},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("mcl_tools:pick_diamond", { minetest.register_tool("mcl_tools:pick_diamond", {
description = "Diamond Pickaxe", description = "Diamond Pickaxe",
@ -139,6 +143,7 @@ minetest.register_tool("mcl_tools:pick_diamond", {
damage_groups = {fleshy=5}, damage_groups = {fleshy=5},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:diamond",
}) })
local get_shovel_dig_group = function(itemstring) local get_shovel_dig_group = function(itemstring)
@ -250,6 +255,7 @@ minetest.register_tool("mcl_tools:shovel_wood", {
}, },
on_place = make_grass_path, on_place = make_grass_path,
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "group:wood",
}) })
minetest.register_tool("mcl_tools:shovel_stone", { minetest.register_tool("mcl_tools:shovel_stone", {
description = "Stone Shovel", description = "Stone Shovel",
@ -268,6 +274,7 @@ minetest.register_tool("mcl_tools:shovel_stone", {
}, },
on_place = make_grass_path, on_place = make_grass_path,
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:cobble",
}) })
minetest.register_tool("mcl_tools:shovel_iron", { minetest.register_tool("mcl_tools:shovel_iron", {
description = "Iron Shovel", description = "Iron Shovel",
@ -286,6 +293,7 @@ minetest.register_tool("mcl_tools:shovel_iron", {
}, },
on_place = make_grass_path, on_place = make_grass_path,
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("mcl_tools:shovel_gold", { minetest.register_tool("mcl_tools:shovel_gold", {
description = "Golden Shovel", description = "Golden Shovel",
@ -304,6 +312,7 @@ minetest.register_tool("mcl_tools:shovel_gold", {
}, },
on_place = make_grass_path, on_place = make_grass_path,
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("mcl_tools:shovel_diamond", { minetest.register_tool("mcl_tools:shovel_diamond", {
description = "Diamond Shovel", description = "Diamond Shovel",
@ -322,6 +331,7 @@ minetest.register_tool("mcl_tools:shovel_diamond", {
}, },
on_place = make_grass_path, on_place = make_grass_path,
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:diamond",
}) })
-- Axes -- Axes
@ -340,6 +350,7 @@ minetest.register_tool("mcl_tools:axe_wood", {
damage_groups = {fleshy=7}, damage_groups = {fleshy=7},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "group:wood",
}) })
minetest.register_tool("mcl_tools:axe_stone", { minetest.register_tool("mcl_tools:axe_stone", {
description = "Stone Axe", description = "Stone Axe",
@ -355,6 +366,7 @@ minetest.register_tool("mcl_tools:axe_stone", {
damage_groups = {fleshy=9}, damage_groups = {fleshy=9},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:cobble",
}) })
minetest.register_tool("mcl_tools:axe_iron", { minetest.register_tool("mcl_tools:axe_iron", {
description = "Iron Axe", description = "Iron Axe",
@ -371,6 +383,7 @@ minetest.register_tool("mcl_tools:axe_iron", {
damage_groups = {fleshy=9}, damage_groups = {fleshy=9},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("mcl_tools:axe_gold", { minetest.register_tool("mcl_tools:axe_gold", {
description = "Golden Axe", description = "Golden Axe",
@ -386,6 +399,7 @@ minetest.register_tool("mcl_tools:axe_gold", {
damage_groups = {fleshy=7}, damage_groups = {fleshy=7},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("mcl_tools:axe_diamond", { minetest.register_tool("mcl_tools:axe_diamond", {
description = "Diamond Axe", description = "Diamond Axe",
@ -401,6 +415,7 @@ minetest.register_tool("mcl_tools:axe_diamond", {
damage_groups = {fleshy=9}, damage_groups = {fleshy=9},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:diamond",
}) })
-- Swords -- Swords
@ -420,6 +435,7 @@ minetest.register_tool("mcl_tools:sword_wood", {
damage_groups = {fleshy=4}, damage_groups = {fleshy=4},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "group:wood",
}) })
minetest.register_tool("mcl_tools:sword_stone", { minetest.register_tool("mcl_tools:sword_stone", {
description = "Stone Sword", description = "Stone Sword",
@ -436,6 +452,7 @@ minetest.register_tool("mcl_tools:sword_stone", {
damage_groups = {fleshy=5}, damage_groups = {fleshy=5},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:cobble",
}) })
minetest.register_tool("mcl_tools:sword_iron", { minetest.register_tool("mcl_tools:sword_iron", {
description = "Iron Sword", description = "Iron Sword",
@ -452,6 +469,7 @@ minetest.register_tool("mcl_tools:sword_iron", {
damage_groups = {fleshy=6}, damage_groups = {fleshy=6},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("mcl_tools:sword_gold", { minetest.register_tool("mcl_tools:sword_gold", {
description = "Golden Sword", description = "Golden Sword",
@ -468,6 +486,7 @@ minetest.register_tool("mcl_tools:sword_gold", {
damage_groups = {fleshy=4}, damage_groups = {fleshy=4},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("mcl_tools:sword_diamond", { minetest.register_tool("mcl_tools:sword_diamond", {
description = "Diamond Sword", description = "Diamond Sword",
@ -484,6 +503,7 @@ minetest.register_tool("mcl_tools:sword_diamond", {
damage_groups = {fleshy=7}, damage_groups = {fleshy=7},
}, },
sound = { breaks = "default_tool_breaks" }, sound = { breaks = "default_tool_breaks" },
_repair_material = "mcl_core:diamond",
}) })
--Shears --Shears

View File

@ -12,6 +12,7 @@ minetest.register_tool("3d_armor:helmet_leather", {
inventory_image = "3d_armor_inv_helmet_leather.png", inventory_image = "3d_armor_inv_helmet_leather.png",
groups = {armor_head=5, armor_heal=0, armor_use=100}, groups = {armor_head=5, armor_heal=0, armor_use=100},
wear = 0, wear = 0,
_repair_material = "mcl_mobitems:leather",
}) })
minetest.register_tool("3d_armor:helmet_iron", { minetest.register_tool("3d_armor:helmet_iron", {
@ -21,6 +22,7 @@ minetest.register_tool("3d_armor:helmet_iron", {
inventory_image = "3d_armor_inv_helmet_iron.png", inventory_image = "3d_armor_inv_helmet_iron.png",
groups = {armor_head=10, armor_heal=5, armor_use=250}, groups = {armor_head=10, armor_heal=5, armor_use=250},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("3d_armor:helmet_gold", { minetest.register_tool("3d_armor:helmet_gold", {
@ -30,6 +32,7 @@ minetest.register_tool("3d_armor:helmet_gold", {
inventory_image = "3d_armor_inv_helmet_gold.png", inventory_image = "3d_armor_inv_helmet_gold.png",
groups = {armor_head=15, armor_heal=10, armor_use=500}, groups = {armor_head=15, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("3d_armor:helmet_diamond",{ minetest.register_tool("3d_armor:helmet_diamond",{
@ -39,6 +42,7 @@ minetest.register_tool("3d_armor:helmet_diamond",{
inventory_image = "3d_armor_inv_helmet_diamond.png", inventory_image = "3d_armor_inv_helmet_diamond.png",
groups = {armor_head=20, armor_heal=15, armor_use=750}, groups = {armor_head=20, armor_heal=15, armor_use=750},
wear = 0, wear = 0,
_repair_material = "mcl_core:diamond",
}) })
minetest.register_tool("3d_armor:helmet_chain", { minetest.register_tool("3d_armor:helmet_chain", {
@ -48,6 +52,7 @@ minetest.register_tool("3d_armor:helmet_chain", {
inventory_image = "3d_armor_inv_helmet_chain.png", inventory_image = "3d_armor_inv_helmet_chain.png",
groups = {armor_head=15, armor_heal=10, armor_use=500}, groups = {armor_head=15, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
-- Regisiter Torso Armor -- Regisiter Torso Armor
@ -59,6 +64,7 @@ minetest.register_tool("3d_armor:chestplate_leather", {
inventory_image = "3d_armor_inv_chestplate_leather.png", inventory_image = "3d_armor_inv_chestplate_leather.png",
groups = {armor_torso=15, armor_heal=0, armor_use=100}, groups = {armor_torso=15, armor_heal=0, armor_use=100},
wear = 0, wear = 0,
_repair_material = "mcl_mobitems:leather",
}) })
minetest.register_tool("3d_armor:chestplate_iron", { minetest.register_tool("3d_armor:chestplate_iron", {
@ -68,6 +74,7 @@ minetest.register_tool("3d_armor:chestplate_iron", {
inventory_image = "3d_armor_inv_chestplate_iron.png", inventory_image = "3d_armor_inv_chestplate_iron.png",
groups = {armor_torso=20, armor_heal=5, armor_use=250}, groups = {armor_torso=20, armor_heal=5, armor_use=250},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("3d_armor:chestplate_gold", { minetest.register_tool("3d_armor:chestplate_gold", {
@ -77,6 +84,7 @@ minetest.register_tool("3d_armor:chestplate_gold", {
inventory_image = "3d_armor_inv_chestplate_gold.png", inventory_image = "3d_armor_inv_chestplate_gold.png",
groups = {armor_torso=25, armor_heal=10, armor_use=500}, groups = {armor_torso=25, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("3d_armor:chestplate_diamond",{ minetest.register_tool("3d_armor:chestplate_diamond",{
@ -86,6 +94,7 @@ minetest.register_tool("3d_armor:chestplate_diamond",{
inventory_image = "3d_armor_inv_chestplate_diamond.png", inventory_image = "3d_armor_inv_chestplate_diamond.png",
groups = {armor_torso=30, armor_heal=15, armor_use=750}, groups = {armor_torso=30, armor_heal=15, armor_use=750},
wear = 0, wear = 0,
_repair_material = "mcl_core:diamond",
}) })
minetest.register_tool("3d_armor:chestplate_chain", { minetest.register_tool("3d_armor:chestplate_chain", {
@ -95,6 +104,7 @@ minetest.register_tool("3d_armor:chestplate_chain", {
inventory_image = "3d_armor_inv_chestplate_chain.png", inventory_image = "3d_armor_inv_chestplate_chain.png",
groups = {armor_torso=25, armor_heal=10, armor_use=500}, groups = {armor_torso=25, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
-- Regisiter Leg Armor -- Regisiter Leg Armor
@ -106,6 +116,7 @@ minetest.register_tool("3d_armor:leggings_leather", {
inventory_image = "3d_armor_inv_leggings_leather.png", inventory_image = "3d_armor_inv_leggings_leather.png",
groups = {armor_legs=10, armor_heal=0, armor_use=100}, groups = {armor_legs=10, armor_heal=0, armor_use=100},
wear = 0, wear = 0,
_repair_material = "mcl_mobitems:leather",
}) })
minetest.register_tool("3d_armor:leggings_iron", { minetest.register_tool("3d_armor:leggings_iron", {
@ -115,6 +126,7 @@ minetest.register_tool("3d_armor:leggings_iron", {
inventory_image = "3d_armor_inv_leggings_iron.png", inventory_image = "3d_armor_inv_leggings_iron.png",
groups = {armor_legs=15, armor_heal=5, armor_use=250}, groups = {armor_legs=15, armor_heal=5, armor_use=250},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("3d_armor:leggings_gold", { minetest.register_tool("3d_armor:leggings_gold", {
@ -124,6 +136,7 @@ minetest.register_tool("3d_armor:leggings_gold", {
inventory_image = "3d_armor_inv_leggings_gold.png", inventory_image = "3d_armor_inv_leggings_gold.png",
groups = {armor_legs=20, armor_heal=10, armor_use=500}, groups = {armor_legs=20, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("3d_armor:leggings_diamond",{ minetest.register_tool("3d_armor:leggings_diamond",{
@ -133,6 +146,7 @@ minetest.register_tool("3d_armor:leggings_diamond",{
inventory_image = "3d_armor_inv_leggings_diamond.png", inventory_image = "3d_armor_inv_leggings_diamond.png",
groups = {armor_legs=25, armor_heal=15, armor_use=750}, groups = {armor_legs=25, armor_heal=15, armor_use=750},
wear = 0, wear = 0,
_repair_material = "mcl_core:diamond",
}) })
minetest.register_tool("3d_armor:leggings_chain", { minetest.register_tool("3d_armor:leggings_chain", {
@ -142,6 +156,7 @@ minetest.register_tool("3d_armor:leggings_chain", {
inventory_image = "3d_armor_inv_leggings_chain.png", inventory_image = "3d_armor_inv_leggings_chain.png",
groups = {armor_legs=20, armor_heal=10, armor_use=500}, groups = {armor_legs=20, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
-- Regisiter Boots -- Regisiter Boots
@ -152,6 +167,7 @@ minetest.register_tool("3d_armor:boots_leather", {
inventory_image = "3d_armor_inv_boots_leather.png", inventory_image = "3d_armor_inv_boots_leather.png",
groups = {armor_feet=5, armor_heal=0, armor_use=100}, groups = {armor_feet=5, armor_heal=0, armor_use=100},
wear = 0, wear = 0,
_repair_material = "mcl_mobitems:leather",
}) })
minetest.register_tool("3d_armor:boots_iron", { minetest.register_tool("3d_armor:boots_iron", {
@ -161,6 +177,7 @@ minetest.register_tool("3d_armor:boots_iron", {
inventory_image = "3d_armor_inv_boots_iron.png", inventory_image = "3d_armor_inv_boots_iron.png",
groups = {armor_feet=10, armor_heal=5, armor_use=250}, groups = {armor_feet=10, armor_heal=5, armor_use=250},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
minetest.register_tool("3d_armor:boots_gold", { minetest.register_tool("3d_armor:boots_gold", {
@ -170,6 +187,7 @@ minetest.register_tool("3d_armor:boots_gold", {
inventory_image = "3d_armor_inv_boots_gold.png", inventory_image = "3d_armor_inv_boots_gold.png",
groups = {armor_feet=15, armor_heal=10, armor_use=500}, groups = {armor_feet=15, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:gold_ingot",
}) })
minetest.register_tool("3d_armor:boots_diamond",{ minetest.register_tool("3d_armor:boots_diamond",{
@ -179,6 +197,7 @@ minetest.register_tool("3d_armor:boots_diamond",{
inventory_image = "3d_armor_inv_boots_diamond.png", inventory_image = "3d_armor_inv_boots_diamond.png",
groups = {armor_feet=20, armor_heal=15, armor_use=750}, groups = {armor_feet=20, armor_heal=15, armor_use=750},
wear = 0, wear = 0,
_repair_material = "mcl_core:diamond",
}) })
minetest.register_tool("3d_armor:boots_chain", { minetest.register_tool("3d_armor:boots_chain", {
@ -188,6 +207,7 @@ minetest.register_tool("3d_armor:boots_chain", {
inventory_image = "3d_armor_inv_boots_chain.png", inventory_image = "3d_armor_inv_boots_chain.png",
groups = {armor_feet=15, armor_heal=10, armor_use=500}, groups = {armor_feet=15, armor_heal=10, armor_use=500},
wear = 0, wear = 0,
_repair_material = "mcl_core:iron_ingot",
}) })
-- Register Craft Recipies -- Register Craft Recipies