From 67f503758fa0dae65833b7af150e859661a139c2 Mon Sep 17 00:00:00 2001 From: Handful of Frogs Date: Sun, 12 May 2024 10:56:19 +0300 Subject: [PATCH] feat: enchantability for bronze armor and weapons --- compatibility.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/compatibility.lua b/compatibility.lua index c1bff8b..cdd8b00 100644 --- a/compatibility.lua +++ b/compatibility.lua @@ -202,7 +202,7 @@ if industrialtest.mclAvailable then minetest.register_tool("industrialtest:"..material.."_pickaxe",{ description=S(materialDisplayName.." Pickaxe"), inventory_image="industrialtest_mcl_"..material.."_pickaxe.png", - groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass}, + groups={tool=1,pickaxe=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability}, tool_capabilities={ full_punch_interval=1, max_drop_level=config.dropLevel, @@ -218,7 +218,7 @@ if industrialtest.mclAvailable then minetest.register_tool("industrialtest:"..material.."_shovel",{ description=S(materialDisplayName.." Shovel"), inventory_image="industrialtest_mcl_"..material.."_shovel.png", - groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass}, + groups={tool=1,shovel=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability}, tool_capabilities={ full_punch_interval=1, max_drop_level=config.dropLevel, @@ -270,7 +270,7 @@ if industrialtest.mclAvailable then minetest.register_tool("industrialtest:"..material.."_axe",{ description=S(materialDisplayName.." Axe"), inventory_image="industrialtest_mcl_"..material.."_axe.png", - groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass}, + groups={tool=1,axe=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability}, tool_capabilities={ full_punch_interval=1, max_level_drop=config.levelDrop, @@ -287,7 +287,7 @@ if industrialtest.mclAvailable then minetest.register_tool("industrialtest:"..material.."_sword",{ description=S(materialDisplayName.." Sword"), inventory_image="industrialtest_mcl_"..material.."_sword.png", - groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass}, + groups={weapon=1,sword=1,dig_speed_class=config.digSpeedClass,enchantability=config.enchantability}, tool_capabilities={ full_punch_interval=0.625, max_drop_level=config.maxDropLevel, @@ -304,7 +304,7 @@ if industrialtest.mclAvailable then minetest.register_tool("industrialtest:"..material.."_hoe",{ description=S(materialDisplayName.." Hoe"), inventory_image="industrialtest_mcl_"..material.."_hoe.png", - groups={tool=1,hoe=1}, + groups={tool=1,hoe=1,enchantability=config.enchantability}, tool_capabilities={ full_punch_interval=1, damage_groups={fleshy=1} @@ -372,6 +372,7 @@ if industrialtest.mclAvailable then cook_material=config.armorCookMaterial, sound_equip=config.armorEquipSound, sound_unequip=config.armorUnequipSound, + enchantability=config.enchantability, textures={ head="industrialtest_mcl_"..material.."_helmet.png", torso="industrialtest_mcl_"..material.."_chestplate.png", @@ -575,7 +576,8 @@ if industrialtest.mclAvailable then }, armorCookMaterial="industrialtest:bronze_nugget", armorEquipSound="mcl_armor_equip_iron", - armorUnequipSound="mcl_armor_unequip_iron" + armorUnequipSound="mcl_armor_unequip_iron", + enchantability=15, }) --register other blocks that are not availabe in MCL