moved all fluid transfer stuff to fluid_lib

This commit is contained in:
Evert Prants 2018-12-12 21:06:41 +02:00
parent c734b34e53
commit 8bf9903476
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
15 changed files with 34 additions and 225 deletions

View File

@ -5,26 +5,3 @@ ele.register_conduit("elepower_dynamics:conduit", {
tiles = {"elepower_conduit.png"}, tiles = {"elepower_conduit.png"},
groups = {oddly_breakable_by_hand = 1, cracky = 1} groups = {oddly_breakable_by_hand = 1, cracky = 1}
}) })
-- Fluids
elefluid.register_transfer_node("elepower_dynamics:fluid_transfer_node", {
description = "Fluid Transfer Node\nPunch to start pumping",
tiles = {"elepower_fluid_transporter.png"},
drawtype = "mesh",
mesh = "elepower_transport_node.obj",
groups = {oddly_breakable_by_hand = 1, cracky = 1},
paramtype = "light",
selection_box = {
type = "fixed",
fixed = {
{-0.4375, -0.4375, -0.5000, 0.4375, 0.4375, 0.000},
{-0.1875, -0.1875, 0.000, 0.1875, 0.1875, 0.5000}
}
}
})
elefluid.register_transfer_duct("elepower_dynamics:fluid_duct", {
description = "Fluid Duct",
tiles = {"elepower_duct.png"},
groups = {oddly_breakable_by_hand = 1, cracky = 1}
})

View File

@ -125,16 +125,6 @@ minetest.register_craft({
} }
}) })
-- Duct
minetest.register_craft({
output = "elepower_dynamics:fluid_duct 8",
recipe = {
{"default:glass", "default:glass", "default:glass"},
{"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"},
{"default:glass", "default:glass", "default:glass"},
}
})
-- Portable Tank -- Portable Tank
minetest.register_craft({ minetest.register_craft({
output = "elepower_dynamics:portable_tank", output = "elepower_dynamics:portable_tank",
@ -223,8 +213,9 @@ minetest.register_craft({
}) })
-- Fluid Transfer Node -- Fluid Transfer Node
minetest.clear_craft({output = "fluid_transfer:fluid_transfer_pump"})
minetest.register_craft({ minetest.register_craft({
output = "elepower_dynamics:fluid_transfer_node 3", output = "fluid_transfer:fluid_transfer_pump 3",
recipe = { recipe = {
{"group:stone", "elepower_dynamics:control_circuit", "group:stone"}, {"group:stone", "elepower_dynamics:control_circuit", "group:stone"},
{"elepower_dynamics:electrum_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:electrum_gear"}, {"elepower_dynamics:electrum_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:electrum_gear"},

View File

@ -253,3 +253,6 @@ minetest.register_craftitem("elepower_dynamics:pv_cell", {
--------------- ---------------
-- Overrides -- -- Overrides --
--------------- ---------------
minetest.register_alias("elepower_dynamics:fluid_transfer_node", "fluid_transfer:fluid_transfer_pump")
minetest.register_alias("elepower_dynamics:fluid_duct", "fluid_transfer:fluid_duct")

View File

@ -1,5 +1,4 @@
elepower_papi elepower_papi
elepower_fapi
default default
fluid_tanks fluid_tanks
dye? dye?

View File

@ -1,4 +1,4 @@
name = elepower_dynamics name = elepower_dynamics
description = Elepower Dynamics. Conduits and materials! description = Elepower Dynamics. Conduits and materials!
depends = elepower_papi,elepower_fapi,default,fluid_tanks depends = elepower_papi,default,fluid_tanks
optional_depends = moreores,basic_materials,dye optional_depends = moreores,basic_materials,dye

View File

@ -1,185 +0,0 @@
o Node
v 0.400000 0.400000 -0.370263
v 0.400000 0.400000 -0.497499
v -0.400000 0.400000 -0.497499
v -0.400000 0.400000 -0.370263
v 0.400000 -0.400000 -0.370263
v 0.400000 -0.400000 -0.497499
v -0.400000 -0.400000 -0.497499
v -0.400000 -0.400000 -0.370263
v 0.320000 0.320000 -0.243027
v 0.320000 0.320000 -0.370263
v -0.320000 0.320000 -0.370263
v -0.320000 0.320000 -0.243027
v 0.320000 -0.320000 -0.243027
v 0.320000 -0.320000 -0.370263
v -0.320000 -0.320000 -0.370263
v -0.320000 -0.320000 -0.243027
v 0.256000 0.256000 -0.115790
v 0.256000 0.256000 -0.243027
v -0.256000 0.256000 -0.243027
v -0.256000 0.256000 -0.115790
v 0.256000 -0.256000 -0.115790
v 0.256000 -0.256000 -0.243026
v -0.256000 -0.256000 -0.243026
v -0.256000 -0.256000 -0.115790
v 0.204800 0.204800 0.008210
v 0.204800 0.204800 -0.119027
v -0.204800 0.204800 -0.119027
v -0.204800 0.204800 0.008210
v 0.204800 -0.204800 0.008210
v 0.204800 -0.204800 -0.119026
v -0.204800 -0.204800 -0.119026
v -0.204800 -0.204800 0.008210
v 0.146894 0.146894 0.503596
v 0.146894 0.146894 -0.002413
v -0.146894 0.146894 -0.002413
v -0.146894 0.146894 0.503596
v 0.146894 -0.146894 0.503596
v 0.146894 -0.146894 -0.002413
v -0.146894 -0.146894 -0.002413
v -0.146894 -0.146894 0.503596
v 0.320665 0.320665 -0.497499
v -0.320665 0.320665 -0.497499
v 0.320664 -0.320665 -0.497499
v -0.320665 -0.320665 -0.497499
vt 0.712514 0.681510
vt 0.975774 0.681510
vt 0.975774 0.944770
vt 0.712514 0.944770
vt 0.712514 0.681510
vt 0.975774 0.681510
vt 0.975774 0.944770
vt 0.712514 0.944770
vt 0.975774 0.681510
vt 0.975774 0.944770
vt 0.712514 0.944770
vt 0.315390 0.302988
vt 0.315390 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.712514 0.681510
vt 0.975774 0.681510
vt 0.975774 0.944770
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.052130 0.302988
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.315390 0.039728
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.113358 0.155808
vt 0.139491 0.183677
vt 0.052150 0.175815
vt 0.070263 0.158170
vt 0.118317 0.113646
vt 0.075071 0.114371
vt 0.052211 0.096257
vt 0.139491 0.086694
vt 0.975306 0.069495
vt 0.371324 0.069495
vt 0.371324 0.276848
vt 0.975306 0.276848
vt 0.975306 0.069495
vt 0.975306 0.276848
vt 0.371324 0.276849
vt 0.371324 0.069495
vt 0.975125 0.070933
vt 0.975125 0.278286
vt 0.371143 0.278286
vt 0.371143 0.070933
vt 0.371143 0.070933
vt 0.371143 0.278286
vt 0.975125 0.278286
vt 0.975125 0.070933
vt 0.043937 0.339371
vt 0.658425 0.339371
vt 0.658425 0.953858
vt 0.043937 0.953858
vt 0.052130 0.302988
vt 0.315390 0.302988
vt 0.315390 0.302988
vt 0.052130 0.302988
vt 0.315390 0.039728
vt 0.052130 0.039728
vt 0.052130 0.039728
vt 0.315390 0.039728
vt 0.052130 0.302988
vt 0.315390 0.302988
vt 0.315390 0.302988
vt 0.052130 0.302988
vn 0.0000 1.0000 -0.0000
vn 0.0000 -1.0000 0.0000
vn 1.0000 -0.0000 -0.0000
vn 0.0000 0.0000 -1.0000
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
s off
f 1/1/1 2/2/1 3/3/1 4/4/1
f 5/5/2 8/6/2 7/7/2 6/8/2
f 1/1/3 5/9/3 6/10/3 2/11/3
f 3/12/4 2/13/4 41/14/4 42/15/4
f 3/16/5 7/17/5 8/18/5 4/4/5
f 5/19/6 1/20/6 4/21/6 8/22/6
f 9/23/1 10/24/1 11/25/1 12/26/1
f 13/27/2 16/28/2 15/29/2 14/30/2
f 9/23/3 13/31/3 14/32/3 10/33/3
f 10/34/4 14/35/4 15/29/4 11/36/4
f 11/37/5 15/38/5 16/39/5 12/26/5
f 13/27/6 9/40/6 12/41/6 16/42/6
f 17/43/1 18/44/1 19/45/1 20/46/1
f 21/47/2 24/48/2 23/49/2 22/50/2
f 17/43/3 21/51/3 22/52/3 18/53/3
f 18/54/4 22/55/4 23/49/4 19/56/4
f 19/57/5 23/58/5 24/59/5 20/46/5
f 21/47/6 17/60/6 20/61/6 24/62/6
f 25/63/1 26/64/1 27/65/1 28/66/1
f 29/67/2 32/68/2 31/69/2 30/70/2
f 25/63/3 29/67/3 30/70/3 26/64/3
f 27/65/5 31/69/5 32/68/5 28/66/5
f 29/67/6 25/63/6 28/66/6 32/68/6
f 33/71/1 34/72/1 35/73/1 36/74/1
f 37/75/2 40/76/2 39/77/2 38/78/2
f 33/79/3 37/80/3 38/81/3 34/82/3
f 35/83/5 39/84/5 40/85/5 36/86/5
f 41/87/4 43/88/4 44/89/4 42/90/4
f 6/91/4 7/92/4 44/93/4 43/94/4
f 7/95/4 3/96/4 42/97/4 44/98/4
f 2/99/4 6/100/4 43/101/4 41/102/4

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

View File

@ -1,5 +1,4 @@
elepower_papi elepower_papi
elepower_fapi
bucket bucket
farming farming
fluid_tanks fluid_tanks

View File

@ -1,4 +1,4 @@
name = elepower_farming name = elepower_farming
description = Electric Farming Automation! description = Electric Farming Automation!
depends = elepower_papi, elepower_fapi, bucket, farming, fluid_tanks depends = elepower_papi, bucket, farming, fluid_tanks
optional_depends = mobs, mobs_animal, mobs_monster, moretrees, ethereal optional_depends = mobs, mobs_animal, mobs_monster, moretrees, ethereal

View File

@ -51,8 +51,8 @@ local function calculate_fitness(pos)
local dp = minetest.get_name_from_content_id(data[i]) local dp = minetest.get_name_from_content_id(data[i])
if excession <= 16 and (ele.helpers.get_item_group(dp, "ele_reactor_component") or if excession <= 16 and (ele.helpers.get_item_group(dp, "ele_reactor_component") or
ele.helpers.get_item_group(dp, "ele_neutron_absorbant") or ele.helpers.get_item_group(dp, "ele_neutron_absorbant") or
ele.helpers.get_item_group(dp, "elefluid_transport_source") or ele.helpers.get_item_group(dp, "fluid_transport_source") or
ele.helpers.get_item_group(dp, "elefluid_transport") or ele.helpers.get_item_group(dp, "fluid_transport") or
ele.helpers.get_item_group(dp, "tube") or ele.helpers.get_item_group(dp, "tube") or
ele.helpers.get_item_group(dp, "tubedevice")) then ele.helpers.get_item_group(dp, "tubedevice")) then
hu = hu - 1 hu = hu - 1

View File

@ -58,3 +58,28 @@ function ele.formspec.power_meter(capacitor)
minetest.colorize("#0399c6", ele.capacity_text(capacitor.capacity, capacitor.storage)).. minetest.colorize("#0399c6", ele.capacity_text(capacitor.capacity, capacitor.storage))..
minetest.colorize("#565656", "\nPower Used / Generated: " .. usage .. " " .. ele.unit) .. "]" minetest.colorize("#565656", "\nPower Used / Generated: " .. usage .. " " .. ele.unit) .. "]"
end end
-- Fluid bar for formspec
function ele.formspec.fluid_bar(x, y, fluid_buffer)
local texture = "default_water.png"
local metric = 0
local tooltip = ("tooltip[%d,%d;1,2.5;%s]"):format(x, y, "Empty Buffer")
if fluid_buffer and fluid_buffer.fluid and fluid_buffer.fluid ~= "" and
minetest.registered_nodes[fluid_buffer.fluid] ~= nil then
texture = minetest.registered_nodes[fluid_buffer.fluid].tiles[1]
if type(texture) == "table" then
texture = texture.name
end
local fdesc = fluid_lib.cleanse_node_description(fluid_buffer.fluid)
metric = math.floor(100 * fluid_buffer.amount / fluid_buffer.capacity)
tooltip = ("tooltip[%d,%d;1,2.5;%s\n%s / %s %s]"):format(x, y, fdesc,
ele.helpers.comma_value(fluid_buffer.amount), ele.helpers.comma_value(fluid_buffer.capacity), fluid_lib.unit)
end
return "image["..x..","..y..";1,2.8;elepower_gui_barbg.png"..
"\\^[lowpart\\:"..metric.."\\:"..texture.."\\\\^[resize\\\\:64x128]"..
"image["..x..","..y..";1,2.8;elepower_gui_gauge.png]"..
tooltip
end