forked from mrkubax10/industrialtest
Compare commits
7 Commits
fix/bronze
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a607bedfe | |||
| 4ac7210f40 | |||
| 5b5816a65c | |||
| 36549e9a49 | |||
| bea76ecc62 | |||
| fd569985da | |||
| 67f503758f |
3
api.lua
3
api.lua
@@ -514,6 +514,9 @@ end
|
||||
|
||||
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
||||
local meta=minetest.get_meta(pos)
|
||||
if not meta:contains("industrialtest.network") then
|
||||
return
|
||||
end
|
||||
local network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
||||
local removed=false
|
||||
for key,node in ipairs(network) do
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,7 +20,7 @@ local transformer={}
|
||||
transformer.onPowerFlow=function(pos,side,amount)
|
||||
local normalized=industrialtest.api.normalizeSide(pos,side)
|
||||
local def=minetest.registered_nodes[minetest.get_node(pos).name]
|
||||
if normalized~=5 and amount>=def._industrialtest_lowerFlow then
|
||||
if normalized~=5 and amount>def._industrialtest_lowerFlow then
|
||||
minetest.remove_node(pos)
|
||||
industrialtest.internal.explode(pos,2)
|
||||
end
|
||||
|
||||
@@ -31,6 +31,10 @@ local function registerElectricChainsaw(config)
|
||||
local definition={
|
||||
description=config.displayName,
|
||||
inventory_image="industrialtest_"..config.name..".png",
|
||||
after_use=function(itemstack)
|
||||
-- Hack to make sure that chainsaw won't be destroyed when has 0 EU
|
||||
return nil
|
||||
end,
|
||||
_industrialtest_powerStorage=true,
|
||||
_industrialtest_powerCapacity=10000,
|
||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||
@@ -70,10 +74,6 @@ local function registerElectricChainsaw(config)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
definition.after_use=function(itemstack)
|
||||
-- Hack to make sure that chainsaw won't be destroyed when has 0 EU in MCL
|
||||
return nil
|
||||
end
|
||||
definition._mcl_diggroups={
|
||||
axey={
|
||||
speed=config.inactiveDigSpeed,
|
||||
|
||||
@@ -31,6 +31,10 @@ local function registerElectricDrill(config)
|
||||
local definition={
|
||||
description=config.displayName,
|
||||
inventory_image="industrialtest_"..config.name..".png",
|
||||
after_use=function()
|
||||
-- Hack to make sure that drill won't be destroyed when has 0 EU
|
||||
return nil
|
||||
end,
|
||||
_industrialtest_powerStorage=true,
|
||||
_industrialtest_powerCapacity=10000,
|
||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||
@@ -64,10 +68,6 @@ local function registerElectricDrill(config)
|
||||
tool=1,
|
||||
dig_speed_class=config.digSpeedClass
|
||||
}
|
||||
definition.after_use=function()
|
||||
-- Hack to make sure that drill won't be destroyed when has 0 EU in MCL
|
||||
return nil
|
||||
end
|
||||
definition._mcl_diggroups={
|
||||
pickaxey={
|
||||
speed=config.inactiveDigSpeed,
|
||||
|
||||
@@ -31,6 +31,10 @@ local function registerElectricSaber(config)
|
||||
local definition={
|
||||
description=config.displayName,
|
||||
inventory_image="industrialtest_"..config.name..".png",
|
||||
after_use=function()
|
||||
-- Hack to make sure that saber won't be destroyed when has 0 EU
|
||||
return nil
|
||||
end,
|
||||
_industrialtest_powerStorage=true,
|
||||
_industrialtest_powerCapacity=10000,
|
||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||
@@ -62,10 +66,6 @@ local function registerElectricSaber(config)
|
||||
max_drop_level=config.maxDropLevel,
|
||||
damage_groups={fleshy=config.inactiveDamage}
|
||||
}
|
||||
definition.after_use=function()
|
||||
-- Hack to make sure that saber won't be destroyed when has 0 EU in MCL
|
||||
return nil
|
||||
end
|
||||
definition._mcl_toollike_wield=true
|
||||
definition._mcl_diggroups={
|
||||
swordy={
|
||||
|
||||
Reference in New Issue
Block a user