fluid transfer node model, file changes
This commit is contained in:
parent
704281bb25
commit
0824922879
@ -6,13 +6,22 @@ ele.register_conduit("elepower_dynamics:conduit", {
|
||||
groups = {oddly_breakable_by_hand = 1, cracky = 1}
|
||||
})
|
||||
|
||||
-- Fluids
|
||||
--[[ Fluids
|
||||
elefluid.register_transfer_node("elepower_dynamics:fluid_transfer_node", {
|
||||
description = "Fluid Transfer Node",
|
||||
tiles = {"elepower_fluid_transporter_side.png", "elepower_fluid_transporter_side.png^[transformR180",
|
||||
"elepower_fluid_transporter_side.png^[transformR270", "elepower_fluid_transporter_side.png^[transformFXR90",
|
||||
"elepower_fluid_transporter_back.png", "elepower_fluid_transporter_front.png"},
|
||||
groups = {oddly_breakable_by_hand = 1, cracky = 1}
|
||||
})--]]
|
||||
|
||||
elefluid.register_transfer_node("elepower_dynamics:fluid_transfer_node", {
|
||||
description = "Fluid Transfer Node",
|
||||
tiles = {"elepower_fluid_transporter.png"},
|
||||
drawtype = "mesh",
|
||||
mesh = "elepower_transport_node.obj",
|
||||
groups = {oddly_breakable_by_hand = 1, cracky = 1},
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
elefluid.register_transfer_duct("elepower_dynamics:fluid_duct", {
|
||||
|
@ -119,7 +119,7 @@ minetest.register_craft({
|
||||
|
||||
-- Conduit
|
||||
minetest.register_craft({
|
||||
output = "elepower_dynamics:conduit 6",
|
||||
output = "elepower_dynamics:conduit 8",
|
||||
recipe = {
|
||||
{"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"},
|
||||
{"elepower_dynamics:copper_wire", "elepower_dynamics:copper_wire", "elepower_dynamics:copper_wire"},
|
||||
@ -129,7 +129,7 @@ minetest.register_craft({
|
||||
|
||||
-- Duct
|
||||
minetest.register_craft({
|
||||
output = "elepower_dynamics:fluid_duct 6",
|
||||
output = "elepower_dynamics:fluid_duct 8",
|
||||
recipe = {
|
||||
{"group:glass", "group:glass", "group:glass"},
|
||||
{"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"},
|
||||
@ -236,7 +236,7 @@ if easycrafting then
|
||||
|
||||
-- Fluid Transfer Node
|
||||
minetest.register_craft({
|
||||
output = "elepower_dynamics:fluid_transfer_node",
|
||||
output = "elepower_dynamics:fluid_transfer_node 3",
|
||||
recipe = {
|
||||
{"group:stone", "elepower_dynamics:control_circuit", "group:stone"},
|
||||
{"elepower_dynamics:electrum_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:electrum_gear"},
|
||||
|
@ -90,7 +90,10 @@ minetest.register_node("elepower_dynamics:etching_acid_flowing", {
|
||||
bucket.register_liquid("elepower_dynamics:etching_acid_source", "elepower_dynamics:etching_acid_flowing",
|
||||
"elepower_dynamics:bucket_etching_acid", "#410800", "Etching Acid Bucket")
|
||||
|
||||
-- Virtual "fluid"
|
||||
-----------
|
||||
-- Gases --
|
||||
-----------
|
||||
|
||||
minetest.register_node("elepower_dynamics:steam", {
|
||||
description = "Steam",
|
||||
groups = {not_in_creative_inventory = 1, gas = 1},
|
@ -11,7 +11,7 @@ dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/compat/init.lua")
|
||||
dofile(modpath.."/tools.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
dofile(modpath.."/liquids.lua")
|
||||
dofile(modpath.."/fluids.lua")
|
||||
dofile(modpath.."/gas_container.lua")
|
||||
dofile(modpath.."/tanks.lua")
|
||||
dofile(modpath.."/components.lua")
|
||||
|
185
elepower_dynamics/models/elepower_transport_node.obj
Normal file
185
elepower_dynamics/models/elepower_transport_node.obj
Normal file
@ -0,0 +1,185 @@
|
||||
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
|
BIN
elepower_dynamics/textures/elepower_fluid_transporter.png
Normal file
BIN
elepower_dynamics/textures/elepower_fluid_transporter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
@ -9,5 +9,6 @@ elefarm.modpath = modpath
|
||||
dofile(modpath.."/treecutter.lua")
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
dofile(modpath.."/fluids.lua")
|
||||
dofile(modpath.."/machines/init.lua")
|
||||
dofile(modpath.."/crafting.lua")
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
local mp = elefarm.modpath.."/machines/"
|
||||
|
||||
dofile(mp.."fluids.lua")
|
||||
dofile(mp.."planter.lua")
|
||||
dofile(mp.."harvester.lua")
|
||||
dofile(mp.."tree_extractor.lua")
|
||||
|
@ -8,6 +8,14 @@ elepm.electrolyzer_recipes = {
|
||||
},
|
||||
time = 20
|
||||
},
|
||||
{
|
||||
recipe = "elepower_nuclear:heavy_water 1000",
|
||||
output = {
|
||||
"elepower_nuclear:deuterium 600",
|
||||
"elepower_dynamics:oxygen 400",
|
||||
},
|
||||
time = 20,
|
||||
},
|
||||
{
|
||||
recipe = "elepower_farming:biomass_source 1000",
|
||||
output = {
|
||||
@ -15,7 +23,7 @@ elepm.electrolyzer_recipes = {
|
||||
"elepower_dynamics:oxygen 600",
|
||||
},
|
||||
time = 16,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
local function get_formspec(time, power, input, out1, out2, state)
|
||||
@ -159,17 +167,18 @@ ele.register_machine("elepower_machines:electrolyzer", {
|
||||
on_timer = electrolyzer_timer,
|
||||
fluid_buffers = {
|
||||
input = {
|
||||
accepts = {"default:water_source", "elepower_nuclear:heavy_water", "group:biomass"},
|
||||
accepts = {"default:water_source", "elepower_nuclear:heavy_water",
|
||||
"group:biomass", "group:electrolysis_recipe"},
|
||||
drainable = false,
|
||||
capacity = 8000,
|
||||
},
|
||||
out1 = {
|
||||
accepts = {"group:gas"},
|
||||
accepts = {"group:gas", "group:electrolysis_result"},
|
||||
drainable = true,
|
||||
capacity = 8000,
|
||||
},
|
||||
out2 = {
|
||||
accepts = {"group:gas"},
|
||||
accepts = {"group:gas", "group:electrolysis_result"},
|
||||
drainable = true,
|
||||
capacity = 8000,
|
||||
},
|
||||
|
@ -110,7 +110,7 @@ local function dialler_timer(pos)
|
||||
local usage = ele.helpers.get_node_property(meta, pos, "usage")
|
||||
|
||||
local transmitter = minetest.string_to_pos(meta:get_string("transmitter"))
|
||||
local pow_percent = math.floor((storage / capacity) * 100)
|
||||
local pow_buffer = {capacity = capacity, storage = storage, usage = usage}
|
||||
|
||||
if storage >= usage then
|
||||
ele.helpers.swap_node(pos, "elepower_wireless:dialler_active")
|
||||
@ -124,7 +124,7 @@ local function dialler_timer(pos)
|
||||
receivers = get_player_receivers(player)
|
||||
end
|
||||
|
||||
meta:set_string("formspec", get_formspec(pow_percent, player, transmitters, receivers))
|
||||
meta:set_string("formspec", get_formspec(pow_buffer, player, transmitters, receivers))
|
||||
meta:set_string("infotext", "Dialler\n" .. ele.capacity_text(capacity, storage))
|
||||
|
||||
return false
|
||||
|
@ -29,7 +29,7 @@ local function matter_receiver_timer(pos)
|
||||
local storage = ele.helpers.get_node_property(meta, pos, "storage")
|
||||
local usage = ele.helpers.get_node_property(meta, pos, "usage")
|
||||
|
||||
local pow_percent = math.floor((storage / capacity) * 100)
|
||||
local pow_percent = {capacity = capacity, storage = storage, usage = usage}
|
||||
|
||||
if storage >= usage then
|
||||
ele.helpers.swap_node(pos, "elepower_wireless:matter_receiver_active")
|
||||
|
@ -30,7 +30,7 @@ local function matter_transmitter_timer(pos)
|
||||
local storage = ele.helpers.get_node_property(meta, pos, "storage")
|
||||
local usage = ele.helpers.get_node_property(meta, pos, "usage")
|
||||
|
||||
local pow_percent = math.floor((storage / capacity) * 100)
|
||||
local pow_buffer = {capacity = capacity, storage = storage, usage = usage}
|
||||
local tpos = minetest.string_to_pos(target)
|
||||
|
||||
if storage >= usage and tpos then
|
||||
@ -44,7 +44,7 @@ local function matter_transmitter_timer(pos)
|
||||
extra = "\nDialled to " .. target
|
||||
end
|
||||
|
||||
meta:set_string("formspec", get_formspec(pow_percent, name, player, target))
|
||||
meta:set_string("formspec", get_formspec(pow_buffer, name, player, target))
|
||||
meta:set_string("infotext", name .. "\n" .. ele.capacity_text(capacity, storage) .. extra)
|
||||
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user