forked from mrkubax10/industrialtest
Compare commits
9 Commits
cell-textu
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a607bedfe | |||
| 4ac7210f40 | |||
| 5b5816a65c | |||
| 36549e9a49 | |||
| bea76ecc62 | |||
| fd569985da | |||
| 67f503758f | |||
| 3fcefc5888 | |||
| b2df6edeaf |
3
api.lua
3
api.lua
@@ -514,6 +514,9 @@ end
|
|||||||
|
|
||||||
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
industrialtest.api.removeNodeFromNetwork=function(pos,nodePos)
|
||||||
local meta=minetest.get_meta(pos)
|
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 network=minetest.deserialize(meta:get_string("industrialtest.network"))
|
||||||
local removed=false
|
local removed=false
|
||||||
for key,node in ipairs(network) do
|
for key,node in ipairs(network) do
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
|
minetest.register_tool("industrialtest:"..material.."_pickaxe",{
|
||||||
description=S(materialDisplayName.." Pickaxe"),
|
description=S(materialDisplayName.." Pickaxe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_pickaxe.png",
|
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={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_drop_level=config.dropLevel,
|
max_drop_level=config.dropLevel,
|
||||||
@@ -218,7 +218,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_shovel",{
|
minetest.register_tool("industrialtest:"..material.."_shovel",{
|
||||||
description=S(materialDisplayName.." Shovel"),
|
description=S(materialDisplayName.." Shovel"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_shovel.png",
|
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={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_drop_level=config.dropLevel,
|
max_drop_level=config.dropLevel,
|
||||||
@@ -270,7 +270,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_axe",{
|
minetest.register_tool("industrialtest:"..material.."_axe",{
|
||||||
description=S(materialDisplayName.." Axe"),
|
description=S(materialDisplayName.." Axe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_axe.png",
|
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={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
max_level_drop=config.levelDrop,
|
max_level_drop=config.levelDrop,
|
||||||
@@ -287,7 +287,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_sword",{
|
minetest.register_tool("industrialtest:"..material.."_sword",{
|
||||||
description=S(materialDisplayName.." Sword"),
|
description=S(materialDisplayName.." Sword"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_sword.png",
|
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={
|
tool_capabilities={
|
||||||
full_punch_interval=0.625,
|
full_punch_interval=0.625,
|
||||||
max_drop_level=config.maxDropLevel,
|
max_drop_level=config.maxDropLevel,
|
||||||
@@ -304,7 +304,7 @@ if industrialtest.mclAvailable then
|
|||||||
minetest.register_tool("industrialtest:"..material.."_hoe",{
|
minetest.register_tool("industrialtest:"..material.."_hoe",{
|
||||||
description=S(materialDisplayName.." Hoe"),
|
description=S(materialDisplayName.." Hoe"),
|
||||||
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
|
inventory_image="industrialtest_mcl_"..material.."_hoe.png",
|
||||||
groups={tool=1,hoe=1},
|
groups={tool=1,hoe=1,enchantability=config.enchantability},
|
||||||
tool_capabilities={
|
tool_capabilities={
|
||||||
full_punch_interval=1,
|
full_punch_interval=1,
|
||||||
damage_groups={fleshy=1}
|
damage_groups={fleshy=1}
|
||||||
@@ -372,6 +372,7 @@ if industrialtest.mclAvailable then
|
|||||||
cook_material=config.armorCookMaterial,
|
cook_material=config.armorCookMaterial,
|
||||||
sound_equip=config.armorEquipSound,
|
sound_equip=config.armorEquipSound,
|
||||||
sound_unequip=config.armorUnequipSound,
|
sound_unequip=config.armorUnequipSound,
|
||||||
|
enchantability=config.enchantability,
|
||||||
textures={
|
textures={
|
||||||
head="industrialtest_mcl_"..material.."_helmet.png",
|
head="industrialtest_mcl_"..material.."_helmet.png",
|
||||||
torso="industrialtest_mcl_"..material.."_chestplate.png",
|
torso="industrialtest_mcl_"..material.."_chestplate.png",
|
||||||
@@ -529,7 +530,7 @@ if industrialtest.mclAvailable then
|
|||||||
})
|
})
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type="shaped",
|
type="shaped",
|
||||||
output="industrialcraft:bronze_ingot 9",
|
output="industrialtest:bronze_ingot 9",
|
||||||
recipe={
|
recipe={
|
||||||
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"},
|
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"},
|
||||||
{"mcl_copper:copper_ingot","industrialtest:tin_ingot","mcl_copper:copper_ingot"},
|
{"mcl_copper:copper_ingot","industrialtest:tin_ingot","mcl_copper:copper_ingot"},
|
||||||
@@ -575,7 +576,8 @@ if industrialtest.mclAvailable then
|
|||||||
},
|
},
|
||||||
armorCookMaterial="industrialtest:bronze_nugget",
|
armorCookMaterial="industrialtest:bronze_nugget",
|
||||||
armorEquipSound="mcl_armor_equip_iron",
|
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
|
--register other blocks that are not availabe in MCL
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ local transformer={}
|
|||||||
transformer.onPowerFlow=function(pos,side,amount)
|
transformer.onPowerFlow=function(pos,side,amount)
|
||||||
local normalized=industrialtest.api.normalizeSide(pos,side)
|
local normalized=industrialtest.api.normalizeSide(pos,side)
|
||||||
local def=minetest.registered_nodes[minetest.get_node(pos).name]
|
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)
|
minetest.remove_node(pos)
|
||||||
industrialtest.internal.explode(pos,2)
|
industrialtest.internal.explode(pos,2)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ local function registerElectricChainsaw(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
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_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -70,10 +74,6 @@ local function registerElectricChainsaw(config)
|
|||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
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={
|
definition._mcl_diggroups={
|
||||||
axey={
|
axey={
|
||||||
speed=config.inactiveDigSpeed,
|
speed=config.inactiveDigSpeed,
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ local function registerElectricDrill(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
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_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -64,10 +68,6 @@ local function registerElectricDrill(config)
|
|||||||
tool=1,
|
tool=1,
|
||||||
dig_speed_class=config.digSpeedClass
|
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={
|
definition._mcl_diggroups={
|
||||||
pickaxey={
|
pickaxey={
|
||||||
speed=config.inactiveDigSpeed,
|
speed=config.inactiveDigSpeed,
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ local function registerElectricSaber(config)
|
|||||||
local definition={
|
local definition={
|
||||||
description=config.displayName,
|
description=config.displayName,
|
||||||
inventory_image="industrialtest_"..config.name..".png",
|
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_powerStorage=true,
|
||||||
_industrialtest_powerCapacity=10000,
|
_industrialtest_powerCapacity=10000,
|
||||||
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
_industrialtest_powerFlow=industrialtest.api.lvPowerFlow,
|
||||||
@@ -62,10 +66,6 @@ local function registerElectricSaber(config)
|
|||||||
max_drop_level=config.maxDropLevel,
|
max_drop_level=config.maxDropLevel,
|
||||||
damage_groups={fleshy=config.inactiveDamage}
|
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_toollike_wield=true
|
||||||
definition._mcl_diggroups={
|
definition._mcl_diggroups={
|
||||||
swordy={
|
swordy={
|
||||||
|
|||||||
Reference in New Issue
Block a user