diff --git a/init.lua b/init.lua index 5256eda..2b4db46 100644 --- a/init.lua +++ b/init.lua @@ -849,109 +849,3 @@ dofile(minetest.get_modpath("scifi_nodes").."/doors.lua") dofile(minetest.get_modpath("scifi_nodes").."/nodeboxes.lua") dofile(minetest.get_modpath("scifi_nodes").."/models.lua") dofile(minetest.get_modpath("scifi_nodes").."/crafts.lua") - --- Register Nodes for Stairsplus -local node = {} - -node.types = { - {"blue", "blue lines", "blue"}, - {"holes", "metal with holes","holes"}, - {"white2", "plastic", "white2"}, --- {"engine", "engine", "engine"}, - {"wall", "metal wall", "wall"}, - {"white", "plastic wall", "white"}, - {"stripes2top", "dirty metal block","metal2"}, - {"rough", "rough metal", "rough"}, - {"lighttop", "metal block", "metal"}, - {"red", "red lines", "red"}, - {"green", "green lines", "green"}, - {"vent2", "vent", "vent"}, - {"stripes", "hazard stripes", "stripes"}, - {"rust", "rusty metal", "rust"}, - {"mesh", "metal mesh", "mesh"}, - {"black", "black wall", "black"}, - {"blackoct", "black octagon", "blackoct"}, - {"blackpipe", "black pipe", "blackpipe"}, - {"blacktile", "black tile", "blktl"}, - {"blacktile2", "black tile 2", "blktl2"}, - {"blackvent", "black vent", "blkvnt"}, - {"bluebars", "blue bars", "bluebars"}, - {"bluemetal", "blue metal", "blumtl"}, - {"bluetile", "blue tile", "blutl"}, - {"greytile", "grey tile", "grytl"}, - {"mesh2", "metal floormesh", "mesh2"}, - {"white", "plastic wall", "white"}, - {"pipe", "wall pipe", "pipe2"}, - {"pipeside", "side pipe", "pipe3"}, - {"tile", "white tile", "tile"}, - {"whiteoct", "white octagon", "whiteoct"}, - {"whitetile", "white tile2", "whttl"}, - {"black_detail", "black detail", "blckdtl"}, - {"green_square", "green metal block", "grnblck"}, - {"red_square", "red metal block", "redblck"}, - {"grey_square", "grey metal block", "greyblck"}, - {"blue_square", "blue metal block", "blublck"}, - {"black_mesh", "black vent block", "blckmsh"}, - {"dent", "dented metal block", "dent"}, - {"greenmetal", "green metal wall", "grnmetl"}, - {"greenmetal2", "green metal wall2", "grnmetl2"}, - {"greenlights", "green wall lights", "grnlt", 10}, - {"greenlights2", "green wall lights2", "grnlt2", 10}, - {"greenbar", "green light bar", "grnlghtbr", 10}, - {"green2", "green wall panel", "grn2"}, - {"greentubes", "green pipes", "grntubes"}, - {"grey", "grey wall", "gry"}, - {"greybolts", "grey wall bolts", "gryblts"}, - {"greybars", "grey bars", "grybrs"}, - {"greydots", "grey wall dots", "grydts"}, - {"greygreenbar", "gray power pipe", "grygrnbr", 10}, - {"octofloor", "Doom floor", "octofloor"}, - {"octofloor2", "Brown Doom floor", "octofloor2"}, - {"doomwall1", "Doom wall 1", "doomwall1"}, - {"doomwall2", "Doom wall 2", "doomwall2"}, - {"doomwall3", "Doom wall 3", "doomwall3"}, - {"doomwall4", "Doom wall 4", "doomwall4"}, - {"doomwall41", "Doom wall 4.1", "doomwall4.1"}, - {"doomwall42", "Doom wall 4.2", "doomwall4.2"}, - {"doomwall43", "Doom wall 4.3", "doomwall4.3"}, - {"doomwall431", "Doom wall 4.3.1", "doomwall4.3.1"}, - {"doomwall44", "Doom wall 4.4", "doomwall4.4"}, - {"blackdmg", "Damaged black wall", "blckdmg"}, - {"blackdmgstripe", "Damaged black wall(stripes)", "blckdmgstripe"}, - {"doomengine", "Doom engine wall", "doomengine"}, --- {"monitorwall", "Wall monitors", "monitorwall"}, - {"screen3", "Wall monitor", "screen3"}, - {"doomlight", "Doom light", "doomlight", 12}, - {"bluwllight", "Blue wall light", "capsule3", 20}, - {"bluegrid", "Blue Grid", "bluegrid", 5}, - {"fan", "Fan", "fan"}, - {"ppllght", "Purple wall light", "", 50}, - {"pplwll", "Purple wall", "", 0}, - {"pplwll2", "Purple wall2", "", 0}, - {"pplwll3", "Purple wall3", "", 0}, - {"pplwll4", "Purple wall4", "", 0}, - {"pplblk", "Purple tile", "", 0}, - {"purple", "Purple node", "", 0}, - {"rock", "Moonstone", "", 0}, - {"rock2", "Moonstone2", "", 0}, - {"blackvnt", "Black vent", "", 0}, - {"blackplate", "Black plate", "", 0}, -} - -if minetest.global_exists("stairsplus") then - - for _, row in ipairs(node.types) do - local name = row[1] - local desc = row[2] - local light = row[4] - -- Node Definition - stairsplus:register_all("scifi_nodes", row[1], "scifi_nodes:"..name, { - description = desc, - tiles = {"scifi_nodes_"..name..".png"}, - groups = {cracky=1}, - paramtype = "light", - paramtype2 = "facedir", - light_source = light, - }) - end -end diff --git a/models.lua b/models.lua index 12b1543..7865e35 100644 --- a/models.lua +++ b/models.lua @@ -37,31 +37,7 @@ minetest.register_node("scifi_nodes:slope_"..name, { }) end - -- register some blocks in stairsplus if available (part of moreblocks) -local has_moreblocks = minetest.get_modpath("moreblocks") -if has_moreblocks then - -- register black tile 2 in stairsplus - stairsplus:register_all("scifi_nodes", "blacktile2", "scifi_nodes:blacktile2", { - description = "black tile 2", - tiles = {"scifi_nodes_blacktile2.png"}, - groups = {cracky=1} - }) - - -- register white block in stairsplus - -- previous "local" slope has the same name and does not need to be aliased - stairsplus:register_all("scifi_nodes", "white", "scifi_nodes:white", { - description = "White", - tiles = {"scifi_nodes_white.png"}, - groups = {cracky=1} - }) - - -else - -- register local slope - scifi_nodes.register_slope("white", "White", {"scifi_nodes_white.png",}, 0) -end - scifi_nodes.register_slope("white2", "Plastic", {"scifi_nodes_white2.png",}, 0) scifi_nodes.register_slope("black", "Black", {"scifi_nodes_black.png",}, 0) scifi_nodes.register_slope("white", "White", {"scifi_nodes_white.png",}, 0) @@ -88,3 +64,110 @@ scifi_nodes.register_slope("bluemetal", "Blue metal", {"scifi_nodes_bluemetal.pn scifi_nodes.register_slope("wall", "Metal wall", {"scifi_nodes_wall.png",}, 0) scifi_nodes.register_slope("rough", "Rough metal", {"scifi_nodes_rough.png",}, 0) scifi_nodes.register_slope("blklt2", "Black stripe light", {"scifi_nodes_black_light2.png",}, 10) + +-- Register Nodes for Stairsplus +local node = {} + +node.types = { + {"blue", "blue lines", "blue"}, + {"holes", "metal with holes","holes"}, + {"white2", "plastic", "white2"}, +-- {"engine", "engine", "engine"}, + {"wall", "metal wall", "wall"}, + {"white", "plastic wall", "white"}, + {"stripes2top", "dirty metal block","metal2"}, + {"rough", "rough metal", "rough"}, + {"lighttop", "metal block", "metal"}, + {"red", "red lines", "red"}, + {"green", "green lines", "green"}, + {"vent2", "vent", "vent"}, + {"stripes", "hazard stripes", "stripes"}, + {"rust", "rusty metal", "rust"}, + {"mesh", "metal mesh", "mesh"}, + {"black", "black wall", "black"}, + {"blackoct", "black octagon", "blackoct"}, + {"blackpipe", "black pipe", "blackpipe"}, + {"blacktile", "black tile", "blktl"}, + {"blacktile2", "black tile 2", "blktl2"}, + {"blackvent", "black vent", "blkvnt"}, + {"bluebars", "blue bars", "bluebars"}, + {"bluemetal", "blue metal", "blumtl"}, + {"bluetile", "blue tile", "blutl"}, + {"greytile", "grey tile", "grytl"}, + {"mesh2", "metal floormesh", "mesh2"}, + {"white", "plastic wall", "white"}, + {"pipe", "wall pipe", "pipe2"}, + {"pipeside", "side pipe", "pipe3"}, + {"tile", "white tile", "tile"}, + {"whiteoct", "white octagon", "whiteoct"}, + {"whitetile", "white tile2", "whttl"}, + {"black_detail", "black detail", "blckdtl"}, + {"green_square", "green metal block", "grnblck"}, + {"red_square", "red metal block", "redblck"}, + {"grey_square", "grey metal block", "greyblck"}, + {"blue_square", "blue metal block", "blublck"}, + {"black_mesh", "black vent block", "blckmsh"}, + {"dent", "dented metal block", "dent"}, + {"greenmetal", "green metal wall", "grnmetl"}, + {"greenmetal2", "green metal wall2", "grnmetl2"}, + {"greenlights", "green wall lights", "grnlt", 10}, + {"greenlights2", "green wall lights2", "grnlt2", 10}, + {"greenbar", "green light bar", "grnlghtbr", 10}, + {"green2", "green wall panel", "grn2"}, + {"greentubes", "green pipes", "grntubes"}, + {"grey", "grey wall", "gry"}, + {"greybolts", "grey wall bolts", "gryblts"}, + {"greybars", "grey bars", "grybrs"}, + {"greydots", "grey wall dots", "grydts"}, + {"greygreenbar", "gray power pipe", "grygrnbr", 10}, + {"octofloor", "Doom floor", "octofloor"}, + {"octofloor2", "Brown Doom floor", "octofloor2"}, + {"doomwall1", "Doom wall 1", "doomwall1"}, + {"doomwall2", "Doom wall 2", "doomwall2"}, + {"doomwall3", "Doom wall 3", "doomwall3"}, + {"doomwall4", "Doom wall 4", "doomwall4"}, + {"doomwall41", "Doom wall 4.1", "doomwall4.1"}, + {"doomwall42", "Doom wall 4.2", "doomwall4.2"}, + {"doomwall43", "Doom wall 4.3", "doomwall4.3"}, + {"doomwall431", "Doom wall 4.3.1", "doomwall4.3.1"}, + {"doomwall44", "Doom wall 4.4", "doomwall4.4"}, + {"blackdmg", "Damaged black wall", "blckdmg"}, + {"blackdmgstripe", "Damaged black wall(stripes)", "blckdmgstripe"}, + {"doomengine", "Doom engine wall", "doomengine"}, +-- {"monitorwall", "Wall monitors", "monitorwall"}, + {"screen3", "Wall monitor", "screen3"}, + {"doomlight", "Doom light", "doomlight", 12}, + {"bluwllight", "Blue wall light", "capsule3", 20}, + {"bluegrid", "Blue Grid", "bluegrid", 5}, + {"fan", "Fan", "fan"}, + {"ppllght", "Purple wall light", "", 50}, + {"pplwll", "Purple wall", "", 0}, + {"pplwll2", "Purple wall2", "", 0}, + {"pplwll3", "Purple wall3", "", 0}, + {"pplwll4", "Purple wall4", "", 0}, + {"pplblk", "Purple tile", "", 0}, + {"purple", "Purple node", "", 0}, + {"rock", "Moonstone", "", 0}, + {"rock2", "Moonstone2", "", 0}, + {"blackvnt", "Black vent", "", 0}, + {"blackplate", "Black plate", "", 0}, +} + +if minetest.global_exists("stairsplus") then + + for _, row in ipairs(node.types) do + local name = row[1] + local desc = row[2] + local light = row[4] + -- Node Definition + stairsplus:register_all("scifi_nodes", row[1], "scifi_nodes:"..name, { + description = desc, + tiles = {"scifi_nodes_"..name..".png"}, + groups = {cracky=1}, + paramtype = "light", + paramtype2 = "facedir", + light_source = light, + }) + end +end +