forked from mrkubax10/industrialtest
Normalize power flow
This commit is contained in:
parent
70db00304f
commit
8da3968a46
6
api.lua
6
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
|
||||
|
@ -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)
|
||||
|
@ -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",
|
||||
|
10
machines.lua
10
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
|
||||
|
Loading…
Reference in New Issue
Block a user