From 104bbf67dd0cf73df45d9be9b773c6446fdcc8a5 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Thu, 12 Jul 2012 17:52:35 -0400 Subject: [PATCH] first commit --- README | 28 ++ init.lua | 672 +++++++++++++++++++++++++++++ init.lua~ | 69 +++ textures/pipes_pipe_end.png | Bin 0 -> 423 bytes textures/pipes_plain.png | Bin 0 -> 296 bytes textures/pipes_windowed_empty.png | Bin 0 -> 335 bytes textures/pipes_windowed_loaded.png | Bin 0 -> 345 bytes 7 files changed, 769 insertions(+) create mode 100644 README create mode 100644 init.lua create mode 100644 init.lua~ create mode 100644 textures/pipes_pipe_end.png create mode 100644 textures/pipes_plain.png create mode 100644 textures/pipes_windowed_empty.png create mode 100644 textures/pipes_windowed_loaded.png diff --git a/README b/README new file mode 100644 index 0000000..397b13d --- /dev/null +++ b/README @@ -0,0 +1,28 @@ +This simple mod uses nodeboxes to supply a complete set of 3D flanged +pipes. There are enough nodes defined here to bend from any axis +(X/Y/Z) to any other, or to join multiple pipes together from any or all +axes. There are 10 unique nodes defined, times two versions for each +(for a total of 20). Getting them into the right orientation is handled +with the usual facedir parameter. + +One version bears one or more dark windows on each pipe, suggesting +they're empty, while the other version bears green-tinted windows, as if +full (the two colors should also be easy to select if you want to change +them in a paint program). + +This mod requires a recent git pull or build of Minetest dated June 17, +2012 or later. + +There are no crafting recipes, however, you can use the usual /give +commands with names such as pipes:vertical, pipes:crossing_xy, and so +on, if you want to add them to your world for decorative purposes. See +init.lua for more details. + +The overall format of the code is borrowed from the game and written by +me. 16x16 textures by me also. + +This mod is intended to be used as a basis or at least as sort of a +model for something else to build on (perhaps a nicer-looking oil mod?), +and does not provide any of the code necessary to cause the pipes to +rotate around as they're placed. I may add such code later, but not +right now. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..a8c3897 --- /dev/null +++ b/init.lua @@ -0,0 +1,672 @@ +-- Pipes mod by VanessaE +-- 2012-06-12 +-- + +-- Entirely my own code. This mod merely supplies enough nodes to build +-- a bunch of pipes in all directions and with all types of junctions. +-- +-- License: WTFPL +-- + +local DEBUG = 1 + +-- Local Functions + +local dbg = function(s) + if DEBUG == 1 then + print('[PIPES] ' .. s) + end +end + +-- Nodes (empty) + +minetest.register_node("pipes:vertical", { + description = "Pipe (vertical)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_plain.png", + "pipes_windowed_empty.png", + "pipes_windowed_empty.png" + }, + paramtype = "light", +-- paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:horizontal", { + description = "Pipe (horizontal)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_empty.png", + "pipes_windowed_empty.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_plain.png" + }, + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:junction_xy", { + description = "Pipe (junction between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_empty.png", + "pipes_windowed_empty.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + { 0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:junction_xz", { + description = "Pipe (junction between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_empty.png", + "pipes_windowed_empty.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + { -0.1 , -0.1 , 0.1 , 0.1 , 0.1 , 0.45 }, + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xy_down", { + description = "Pipe (downward bend between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_empty.png", + "pipes_windowed_empty.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.5, 0.15, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.1 , 0.1 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xy_up", { + description = "Pipe (upward bend between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_empty.png", + "pipes_windowed_empty.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.15, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, 0.45 , -0.15, 0.15, 0.5, 0.15 }, + { -0.1 , -0.1 , -0.1 , 0.1 , 0.45, 0.1 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xz", { + description = "Pipe (bend between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_empty.png", + "pipes_windowed_empty.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_plain.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.15, -0.15, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + { -0.1 , -0.1 , 0.1 , 0.1 , 0.1 , 0.45 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xz", { + description = "Pipe (4-way crossing between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_empty.png", + "pipes_windowed_empty.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png" + }, + + paramtype = "light", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.5, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + { -0.15, -0.15, -0.5 , 0.15, 0.15, -0.45 }, + { -0.1 , -0.1 , -0.45, 0.1 , 0.1 , 0.45 }, + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xy", { + description = "Pipe (4-way crossing between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_windowed_empty.png", + "pipes_windowed_empty.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xyz", { + description = "Pipe (6-way crossing between X/Y/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png" + }, + + paramtype = "light", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + { -0.15, -0.15, -0.5 , 0.15, 0.15, -0.45 }, + { -0.1 , -0.1 , -0.45, 0.1 , 0.1 , 0.45 }, + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + + +-- Nodes (full/loaded) + +minetest.register_node("pipes:vertical_loaded", { + description = "Pipe (vertical)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_plain.png", + "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png" + }, + paramtype = "light", +-- paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:horizontal_loaded", { + description = "Pipe (horizontal)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_plain.png" + }, + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:junction_xy_loaded", { + description = "Pipe (junction between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + { 0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:junction_xz_loaded", { + description = "Pipe (junction between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + { -0.1 , -0.1 , 0.1 , 0.1 , 0.1 , 0.45 }, + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xy_down_loaded", { + description = "Pipe (downward bend between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.5, 0.15, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.1 , 0.1 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xy_up_loaded", { + description = "Pipe (upward bend between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.15, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, 0.45 , -0.15, 0.15, 0.5, 0.15 }, + { -0.1 , -0.1 , -0.1 , 0.1 , 0.45, 0.1 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:bend_xz_loaded", { + description = "Pipe (bend between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png", + "pipes_pipe_end.png", + "pipes_plain.png", + "pipes_pipe_end.png", + "pipes_plain.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.15, -0.15, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + { -0.1 , -0.1 , 0.1 , 0.1 , 0.1 , 0.45 }, + { -0.1 , -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xz_loaded", { + description = "Pipe (4-way crossing between X/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png" + }, + + paramtype = "light", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.5, 0.5, 0.15, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + { -0.15, -0.15, -0.5 , 0.15, 0.15, -0.45 }, + { -0.1 , -0.1 , -0.45, 0.1 , 0.1 , 0.45 }, + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xy_loaded", { + description = "Pipe (4-way crossing between X/Y axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_windowed_loaded.png", + "pipes_windowed_loaded.png" + }, + + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.15, 0.5, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:crossing_xyz_loaded", { + description = "Pipe (6-way crossing between X/Y/Z axes)", + drawtype = "nodebox", + tile_images = { "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png", + "pipes_pipe_end.png" + }, + + paramtype = "light", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, + }, + node_box = { + type = "fixed", + fixed = { + + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + + { -0.15, -0.15, -0.5 , 0.15, 0.15, -0.45 }, + { -0.1 , -0.1 , -0.45, 0.1 , 0.1 , 0.45 }, + { -0.15, -0.15, 0.45, 0.15, 0.15, 0.5 }, + + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +print("[Pipes] Loaded!") diff --git a/init.lua~ b/init.lua~ new file mode 100644 index 0000000..a101686 --- /dev/null +++ b/init.lua~ @@ -0,0 +1,69 @@ +-- Pipes mod by VanessaE +-- 2012-06-12 +-- + +-- Entirely my own code. This mod merely supplies enough nodes to build +-- a bunch of pipes in all directions and with all types of junctions. +-- +-- License: WTFPL +-- + +local DEBUG = 1 + +-- Local Functions + +local dbg = function(s) + if DEBUG == 1 then + print('[PIPES] ' .. s) + end +end + +-- Nodes + +minetest.register_node("pipes:vertical", { + description = "Pipe (vertical)", + drawtype = "nodebox", + tile_images = {"pipes_pipe_side_empty.png"}, + paramtype = "light", +-- paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 }, + { -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 }, + { -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +minetest.register_node("pipes:horizontal", { + description = "Pipe (horizontal)", + drawtype = "nodebox", + tile_images = {"pipes_pipe_side_empty.png"}, + paramtype = "light", + paramtype2 = "facedir", + selection_box = { + type = "fixed", + fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.15 }, + }, + node_box = { + type = "fixed", + fixed = { + { -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 }, + { -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 }, + { 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 }, + } + }, + groups = {snappy=3}, + sounds = default.node_sound_wood_defaults(), + walkable = true, +}) + +print("[Pipes] Loaded!") diff --git a/textures/pipes_pipe_end.png b/textures/pipes_pipe_end.png new file mode 100644 index 0000000000000000000000000000000000000000..61ec0a1ff19cf521052c6039adeece9531c17d60 GIT binary patch literal 423 zcmV;Y0a*TtP)UO>V+45Cz}|85=v$ zN<`watT+}IDqDgC_Oo%6F7oRJs;ZH)h?Q^Vjc3)iZQC>ry!RjplJMU5FG2e8j2zCo z?-(Owjy*lR>rr21#36uwDjs8m)*8YYW{>?39712jPo0%ku+~C6do;t$IurEFu~H~) z*%j!1Ty`djloDbHS!|^g%Cf`87_6rYn{WsL&*u})J@9zAx40X@zwUgwe4(yyAPKD% z_WKH2>kJ!Xh7qQjhpp804X4uy0B}4WU*a)Am=#GW;eNk^B!*|e1DqFGozLgiIoB2G zN4Q?E2!Tkcfz}#TRpD?rEbx>d5RTKHi(-wBk56p3TkLi_SZkq_!e+C{u(cNJagDP* z7lmY4L>72RldW;SDq{>p1R}DC{UX8pJ^zNs1pmdx7)Xo}T4~tQ{t0DR1mBu3k2Q#c RC<6ch002ovPDHLkV1l|IuPgun literal 0 HcmV?d00001 diff --git a/textures/pipes_plain.png b/textures/pipes_plain.png new file mode 100644 index 0000000000000000000000000000000000000000..0c5753b33ca295998d55c672621f6cdbd4828dd3 GIT binary patch literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#4x0o6GvoXB^9zAO$30yfLp09!UcAlMtRTR0;fhX5`~Ux8X*Z7CVAs2~W!qE6 zsdG~G?fM?y_&#@uil>aX(C_CrR3-@~dIzV-o-cG-wYBm<#|g{X%ff7hzihwevWeZr z>BJzx3XzI#{aml;;Hdc9=b smAzk1eAr)B-rX_B=-uu;W(jHjOhMD0Rp%~q1A2+U)78&qol`;+00O>!?EnA( literal 0 HcmV?d00001 diff --git a/textures/pipes_windowed_empty.png b/textures/pipes_windowed_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..c0f8e04f9665bf8de483268c260e7a41492b0dc2 GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61SBU+%rFB|oCO|{#S9GG!XV7ZFl&wkP>{XE z)7O>#4x0o6i^}U&cRvD!-g&w>hG?AcofO#DY{26ZYA{ju<9%B*_XiTTLgEcGT@=14 zb6%LT&P?7f$+mhxr1ujEP1=eYha4-HM~Sy%im fbA(B}-Eu6{1-oD!M<@~4Ky literal 0 HcmV?d00001 diff --git a/textures/pipes_windowed_loaded.png b/textures/pipes_windowed_loaded.png new file mode 100644 index 0000000000000000000000000000000000000000..e6ceb2a00c696cbe529b681007b696e30482e98c GIT binary patch literal 345 zcmV-f0jB#A^IEnS_?|kJl&+{}*07#NVStPMsOCSN{oMoj! zAeFsj0J_%%a?T+HVWpWif#u{*082s6xecwENl~jbx85YU(QO+onwgL*^Q(6)uXK!N zrmBM7sH9vVR4l1}%T?60>$>+ESv*Mu&pbKAovj-kVzg6QRaLcFU8=o5(u+c~{;EGF rS?Qwie_B-~=N#H#A0|0GKtz535uB7(KU(q+00000NkvXXu0mjf7N(5r literal 0 HcmV?d00001