From 73441f5aa6e3b23b0d7878fa8425af8348ee87e9 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 19 Jul 2023 00:01:05 +0200 Subject: Pretty nodes for tank car spigots --- advtrains/techage.lua | 50 +++++++++++------------ advtrains/textures/advtrains_ta_spigot_ahead.png | Bin 0 -> 736 bytes advtrains/textures/advtrains_ta_spigot_back.png | Bin 0 -> 621 bytes advtrains/textures/advtrains_ta_spigot_side.png | Bin 0 -> 374 bytes 4 files changed, 25 insertions(+), 25 deletions(-) create mode 100644 advtrains/textures/advtrains_ta_spigot_ahead.png create mode 100644 advtrains/textures/advtrains_ta_spigot_back.png create mode 100644 advtrains/textures/advtrains_ta_spigot_side.png diff --git a/advtrains/techage.lua b/advtrains/techage.lua index abd5987..472c26b 100644 --- a/advtrains/techage.lua +++ b/advtrains/techage.lua @@ -110,12 +110,12 @@ end minetest.register_node("advtrains:ta_liquid_loader", { description = attrans("Tank Car Filling Spigot"), tiles = { - "techage_gaspipe_knee2.png", - "techage_gaspipe_hole2.png^[transformR180", - "techage_gaspipe_knee.png^[transformR270", - "techage_gaspipe_knee.png", - "techage_gaspipe_knee2.png", - "techage_gaspipe_hole2.png", + "advtrains_ta_spigot_back.png^[transformR180", + "advtrains_ta_spigot_ahead.png", + "advtrains_ta_spigot_side.png", + "advtrains_ta_spigot_side.png^[transformR270", + "advtrains_ta_spigot_ahead.png", + "advtrains_ta_spigot_back.png", }, after_dig_node = function(pos, oldnode, oldmetadata, digger) @@ -127,10 +127,10 @@ minetest.register_node("advtrains:ta_liquid_loader", { node_box = { type = "fixed", fixed = { - {-1/8, -4/8, -1/8, 1/8, 1/8, 1/8}, - {-2/8, -0.5, -2/8, 2/8, -13/32, 2/8}, - {-1/8, -1/8, -4/8, 1/8, 1/8, -1/8}, - {-2/8, -2/8, -0.5, 2/8, 2/8, -13/32}, + {-1/8, -7/8, -1/8, 1/8, 1/8, 1/8}, + {-2/8, -5/8, -2/8, 2/8, -1/4, 2/8}, + {-1/8, -1/8, 1/8, 1/8, 1/8, 4/8}, + {-2/8, -2/8, 13/32, 2/8, 2/8, 1/2}, }, }, on_rotate = screwdriver.disallow, -- important! @@ -144,9 +144,9 @@ minetest.register_node("advtrains:ta_liquid_loader", { }) liquid.register_nodes({"advtrains:ta_liquid_loader"}, - Pipe, "tank", nil, { - capa = 42, -- should provide the type of liquid anyway, because pump uses it to check whether it can pump here - peek = function(pos, indir) + Pipe, "tank", {"B"}, { + capa = 42, -- capa is ignored by put function, but needs to be given anyway. + peek = function(pos, indir) -- should provide the type of liquid anyway, because pump uses it to check whether it can pump here local lic, capa, wid = get_tank_car_liquidinfo(loader_relpos(pos)) --atdebug("loader peeked: ", lic, capa) if lic and lic.name and lic.amount > 0 then @@ -169,12 +169,12 @@ liquid.register_nodes({"advtrains:ta_liquid_loader"}, minetest.register_node("advtrains:ta_liquid_unloader", { description = attrans("Tank Car Unloading Drain Funnel"), tiles = { - "techage_gaspipe_knee2.png", - "techage_gaspipe_hole2.png^[transformR180", - "techage_gaspipe_knee.png^[transformR270", - "techage_gaspipe_knee.png", - "techage_gaspipe_knee2.png", - "techage_gaspipe_hole2.png", + "advtrains_ta_spigot_ahead.png^[transformR180", + "advtrains_ta_spigot_back.png", + "advtrains_ta_spigot_side.png^[transformR90", + "advtrains_ta_spigot_side.png^[transformR180", + "advtrains_ta_spigot_ahead.png^[transformR180", + "advtrains_ta_spigot_back.png^[transformR180", }, after_dig_node = function(pos, oldnode, oldmetadata, digger) @@ -186,10 +186,10 @@ minetest.register_node("advtrains:ta_liquid_unloader", { node_box = { type = "fixed", fixed = { - {-1/8, -4/8, -1/8, 1/8, 1/8, 1/8}, - {-2/8, -0.5, -2/8, 2/8, -13/32, 2/8}, - {-1/8, -1/8, -4/8, 1/8, 1/8, -1/8}, - {-2/8, -2/8, -0.5, 2/8, 2/8, -13/32}, + {-1/8, -1/8, -1/8, 1/8, 5/8, 1/8}, + {-2/8, 1/4, -2/8, 2/8, 5/8, 2/8}, + {-1/8, -1/8, 1/8, 1/8, 1/8, 4/8}, + {-2/8, -2/8, 13/32, 2/8, 2/8, 4/8}, }, }, on_rotate = screwdriver.disallow, -- important! @@ -203,8 +203,8 @@ minetest.register_node("advtrains:ta_liquid_unloader", { }) liquid.register_nodes({"advtrains:ta_liquid_unloader"}, - Pipe, "tank", nil, { - capa = 42, -- should be ignored, lets see if it really is + Pipe, "tank", {"B"}, { + capa = 42, -- capa is ignored by put function, but needs to be given anyway. peek = function(pos, indir) local lic, capa, wid = get_tank_car_liquidinfo(unloader_relpos(pos)) --atdebug("unloader peeked: ", lic, capa) diff --git a/advtrains/textures/advtrains_ta_spigot_ahead.png b/advtrains/textures/advtrains_ta_spigot_ahead.png new file mode 100644 index 0000000..ab3233e Binary files /dev/null and b/advtrains/textures/advtrains_ta_spigot_ahead.png differ diff --git a/advtrains/textures/advtrains_ta_spigot_back.png b/advtrains/textures/advtrains_ta_spigot_back.png new file mode 100644 index 0000000..12ee739 Binary files /dev/null and b/advtrains/textures/advtrains_ta_spigot_back.png differ diff --git a/advtrains/textures/advtrains_ta_spigot_side.png b/advtrains/textures/advtrains_ta_spigot_side.png new file mode 100644 index 0000000..97c87df Binary files /dev/null and b/advtrains/textures/advtrains_ta_spigot_side.png differ -- cgit v1.2.3