forked from mrkubax10/industrialtest
Compare commits
7 Commits
feat/encha
...
1.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a607bedfe | |||
| 4ac7210f40 | |||
| 5b5816a65c | |||
| 36549e9a49 | |||
| bea76ecc62 | |||
| fd569985da | |||
| 3fcefc5888 |
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
|
||||||
|
|||||||
@@ -530,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"},
|
||||||
|
|||||||
@@ -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