diff --git a/api.lua b/api.lua index 017b7ea..8422bfa 100644 --- a/api.lua +++ b/api.lua @@ -21,6 +21,12 @@ industrialtest.api.maceratorRecipes={} industrialtest.api.compressorRecipes={} industrialtest.api.extractorRecipes={} +industrialtest.api.lvPowerFlow=600 +industrialtest.api.mvPowerFlow=2400 +industrialtest.api.hvPowerFlow=10200 +industrialtest.api.evPowerFlow=40800 +industrialtest.api.ivPowerFlow=163800 + local function clamp(num,min,max) return math.max(math.min(num,max),min) end diff --git a/cables.lua b/cables.lua index 0b34235..19df34e 100644 --- a/cables.lua +++ b/cables.lua @@ -196,4 +196,4 @@ local function registerCable(name,displayName,material,size,flow) }) end -registerCable("copper","Copper",industrialtest.elementKeys.copperIngot,0.15,216) +registerCable("copper","Copper",industrialtest.elementKeys.copperIngot,0.15,industrialtest.api.mvPowerFlow) diff --git a/craftitems.lua b/craftitems.lua index 2949f48..7cdd92c 100644 --- a/craftitems.lua +++ b/craftitems.lua @@ -22,7 +22,7 @@ minetest.register_tool("industrialtest:re_battery",{ inventory_image="industrialtest_re_battery.png", _industrialtest_powerStorage=true, _industrialtest_powerCapacity=7000, - _industrialtest_powerFlow=200 + _industrialtest_powerFlow=industrialtest.api.lvPowerFlow }) minetest.register_craft({ type="shaped", diff --git a/machines.lua b/machines.lua index 7e4885a..d49132f 100644 --- a/machines.lua +++ b/machines.lua @@ -92,7 +92,7 @@ local definition={ meta:set_string("formspec",generatorFormspec(0,0)) meta:set_int("fuelTime",0) meta:set_int("maxFuelTime",1) - industrialtest.api.addPowerStorage(meta,7000,100,"oooooo") + industrialtest.api.addPowerStorage(meta,7000,industrialtest.api.lvPowerFlow,"oooooo") minetest.get_node_timer(pos):start(industrialtest.updateDelay) end, on_timer=function(pos,elapsed) @@ -734,7 +734,7 @@ registerSimpleElectricItemProcessor({ name="electric_furnace", displayName="Electric Furnace", capacity=416, - flow=390, + flow=industrialtest.api.lvPowerFlow, opPower=60, method="cooking", efficiency=0.5 @@ -762,7 +762,7 @@ registerSimpleElectricItemProcessor({ name="macerator", displayName="Macerator", capacity=1200, - flow=600, + flow=industrialtest.api.lvPowerFlow, opPower=100, method="industrialtest.macerating", efficiency=1 @@ -781,7 +781,7 @@ registerSimpleElectricItemProcessor({ name="compressor", displayName="Compressor", capacity=1400, - flow=600, + flow=industrialtest.api.lvPowerFlow, opPower=120, method="industrialtest.compressing", efficiency=1 @@ -800,7 +800,7 @@ registerSimpleElectricItemProcessor({ name="extractor", displayName="Extractor", capacity=900, - flow=600, + flow=industrialtest.api.lvPowerFlow, opPower=100, method="industrialtest.extracting", efficiency=1