2016-07-12 06:29:12 +02:00
|
|
|
--some code taken from moreblocks(the collision and selection boxes), license below:
|
|
|
|
--Copyright (c) 2011-2015 Calinou and contributors.
|
|
|
|
--Licensed under the zlib license.
|
|
|
|
|
|
|
|
function scifi_nodes.register_slope(name, desc, texture, light)
|
|
|
|
minetest.register_node("scifi_nodes:slope_"..name, {
|
|
|
|
description = desc.." Slope",
|
|
|
|
sunlight_propagates = false,
|
|
|
|
drawtype = "mesh",
|
2019-07-13 23:11:34 +02:00
|
|
|
mesh = "scifi_nodes_slope.obj",
|
2016-07-12 06:29:12 +02:00
|
|
|
tiles = texture,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
|
|
|
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
|
|
|
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
|
|
|
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
collision_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
|
|
|
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
|
|
|
|
{-0.5, 0, 0, 0.5, 0.25, 0.5},
|
|
|
|
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2021-03-20 13:33:39 +01:00
|
|
|
use_texture_alpha = "clip",
|
2016-07-12 06:29:12 +02:00
|
|
|
light_source = light,
|
2022-02-27 05:57:13 +01:00
|
|
|
groups = {cracky=1, dig_generic = 3},
|
2016-07-12 06:29:12 +02:00
|
|
|
on_place = minetest.rotate_node
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2018-12-23 18:02:57 +01:00
|
|
|
-- register some blocks in stairsplus if available (part of moreblocks)
|
2017-03-06 20:27:51 +01:00
|
|
|
scifi_nodes.register_slope("white2", "Plastic", {"scifi_nodes_white2.png",}, 0)
|
2019-01-27 15:23:45 +01:00
|
|
|
scifi_nodes.register_slope("super_white", "Super Plastic", {"scifi_nodes_super_white.png",}, 11)
|
2021-08-27 09:22:15 +02:00
|
|
|
scifi_nodes.register_slope("ultra_white", "Super Plastic", {"scifi_nodes_ultra_white.png",}, minetest.LIGHT_MAX)
|
2016-11-22 23:29:17 +01:00
|
|
|
scifi_nodes.register_slope("black", "Black", {"scifi_nodes_black.png",}, 0)
|
2019-01-26 22:33:18 +01:00
|
|
|
scifi_nodes.register_slope("white", "White", {"scifi_nodes_white.png",}, 0)
|
2016-11-22 23:29:17 +01:00
|
|
|
scifi_nodes.register_slope("grey", "Grey", {"scifi_nodes_grey.png",}, 0)
|
2017-03-06 20:27:51 +01:00
|
|
|
scifi_nodes.register_slope("bluebars", "Blue bars", {"scifi_nodes_bluebars.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("mesh2", "Metal floormesh", {"scifi_nodes_mesh2.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("mesh", "Metal mesh", {"scifi_nodes_mesh.png",}, 0)
|
2016-11-22 23:29:17 +01:00
|
|
|
scifi_nodes.register_slope("vent", "Vent", {"scifi_nodes_vent2.png",}, 0)
|
2017-03-06 14:35:32 +01:00
|
|
|
scifi_nodes.register_slope("rlight", "Red light", {"scifi_nodes_redlight.png",}, 10)
|
|
|
|
scifi_nodes.register_slope("blight", "Blue light", {"scifi_nodes_light.png",}, 10)
|
|
|
|
scifi_nodes.register_slope("glight", "Green light", {"scifi_nodes_greenlight.png",}, 10)
|
2016-11-22 23:29:17 +01:00
|
|
|
scifi_nodes.register_slope("holes", "Holes", {"scifi_nodes_holes.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("pipe", "Pipe", {"scifi_nodes_pipe.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("stripes", "Stripes", {"scifi_nodes_stripes.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("screen", "Screen", {"scifi_nodes_screen3.png",}, 5)
|
2021-08-27 09:22:15 +02:00
|
|
|
scifi_nodes.register_slope("lightstripe", "Lightstripe", {"scifi_nodes_lightstripe.png",}, minetest.LIGHT_MAX)
|
|
|
|
scifi_nodes.register_slope("blight2", "Blue Light 2", {"scifi_nodes_capsule3.png",}, minetest.LIGHT_MAX)
|
2016-11-22 23:29:17 +01:00
|
|
|
scifi_nodes.register_slope("wallpipe", "Alien Pipe", {"scifi_nodes_wallpipe.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("alien", "Alien Wall", {"scifi_nodes_alnslp.png",}, 0)
|
2017-03-06 20:27:51 +01:00
|
|
|
scifi_nodes.register_slope("purple", "Purple", {"scifi_nodes_purple.png",}, 0)
|
2017-03-06 14:35:32 +01:00
|
|
|
scifi_nodes.register_slope("gblock", "Gblock", {"scifi_nodes_gblock2_front1.png",}, 0)
|
2017-03-06 20:27:51 +01:00
|
|
|
scifi_nodes.register_slope("greenmetal", "Green metal", {"scifi_nodes_greenmetal.png",}, 0)
|
|
|
|
scifi_nodes.register_slope("bluemetal", "Blue metal", {"scifi_nodes_bluemetal.png",}, 0)
|
|
|
|
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)
|
2019-01-26 22:47:48 +01:00
|
|
|
|
|
|
|
-- Register Nodes for Stairsplus
|
|
|
|
local node = {}
|
|
|
|
|
|
|
|
node.types = {
|
2021-03-20 13:33:39 +01:00
|
|
|
{"blue", "blue lines"},
|
|
|
|
{"holes", "metal with holes"},
|
|
|
|
{"white2", "plastic",},
|
|
|
|
{"super_white", "Super Plastic", 11},
|
2021-08-27 09:22:15 +02:00
|
|
|
{"ultra_white", "Ultra Plastic", minetest.LIGHT_MAX},
|
2019-01-26 22:47:48 +01:00
|
|
|
-- {"engine", "engine", "engine"},
|
2021-03-20 13:33:39 +01:00
|
|
|
{"wall", "metal wall"},
|
|
|
|
{"white", "plastic wall"},
|
|
|
|
{"stripes2top", "dirty metal block"},
|
|
|
|
{"rough", "rough metal"},
|
|
|
|
{"lighttop", "metal block"},
|
|
|
|
{"red", "red lines"},
|
|
|
|
{"green", "green lines"},
|
|
|
|
{"vent2", "vent"},
|
|
|
|
{"stripes", "hazard stripes"},
|
|
|
|
{"rust", "rusty metal"},
|
|
|
|
{"mesh", "metal mesh"},
|
|
|
|
{"black", "black wall"},
|
|
|
|
{"blackoct", "black octagon"},
|
|
|
|
{"blackpipe", "black pipe"},
|
|
|
|
{"blacktile", "black tile"},
|
|
|
|
{"blacktile2", "black tile 2"},
|
|
|
|
{"blackvent", "black vent"},
|
|
|
|
{"bluebars", "blue bars"},
|
|
|
|
{"bluemetal", "blue metal"},
|
|
|
|
{"bluetile", "blue tile"},
|
|
|
|
{"greytile", "grey tile"},
|
|
|
|
{"mesh2", "metal floormesh"},
|
|
|
|
{"pipe", "wall pipe"},
|
|
|
|
{"pipeside", "side pipe"},
|
|
|
|
{"tile", "white tile"},
|
|
|
|
{"whiteoct", "white octagon"},
|
|
|
|
{"whitetile", "white tile2"},
|
|
|
|
{"black_detail", "black detail"},
|
|
|
|
{"green_square", "green metal block"},
|
|
|
|
{"red_square", "red metal block"},
|
|
|
|
{"grey_square", "grey metal block"},
|
|
|
|
{"blue_square", "blue metal block"},
|
|
|
|
{"black_mesh", "black vent block"},
|
|
|
|
{"dent", "dented metal block"},
|
|
|
|
{"greenmetal", "green metal wall"},
|
|
|
|
{"greenmetal2", "green metal wall2"},
|
|
|
|
{"greenlights", "green wall lights", 10},
|
|
|
|
{"greenlights2", "green wall lights2", 10},
|
|
|
|
{"greenbar", "green light bar", 10},
|
|
|
|
{"green2", "green wall panel"},
|
|
|
|
{"greentubes", "green pipes"},
|
|
|
|
{"grey", "grey wall"},
|
|
|
|
{"greybolts", "grey wall bolts"},
|
|
|
|
{"greybars", "grey bars"},
|
|
|
|
{"greydots", "grey wall dots"},
|
|
|
|
{"greygreenbar", "gray power pipe", 10},
|
|
|
|
{"octofloor", "Doom floor"},
|
|
|
|
{"octofloor2", "Brown Doom floor"},
|
|
|
|
{"doomwall1", "Doom wall 1"},
|
|
|
|
{"doomwall2", "Doom wall 2"},
|
|
|
|
{"doomwall3", "Doom wall 3"},
|
|
|
|
{"doomwall4", "Doom wall 4"},
|
|
|
|
{"doomwall41", "Doom wall 4.1"},
|
|
|
|
{"doomwall42", "Doom wall 4.2"},
|
|
|
|
{"doomwall43", "Doom wall 4.3"},
|
|
|
|
{"doomwall431", "Doom wall 4.3.1"},
|
|
|
|
{"doomwall44", "Doom wall 4.4"},
|
|
|
|
{"blackdmg", "Damaged black wall"},
|
|
|
|
{"blackdmgstripe", "Damaged black wall(stripes)"},
|
|
|
|
{"doomengine", "Doom engine wall"},
|
2019-01-26 22:47:48 +01:00
|
|
|
-- {"monitorwall", "Wall monitors", "monitorwall"},
|
2021-03-20 13:33:39 +01:00
|
|
|
{"screen3", "Wall monitor"},
|
|
|
|
{"doomlight", "Doom light", 12},
|
2021-08-27 09:22:15 +02:00
|
|
|
{"bluwllight", "Blue wall light", minetest.LIGHT_MAX},
|
2021-03-20 13:33:39 +01:00
|
|
|
{"bluegrid", "Blue Grid", 5},
|
|
|
|
{"fan", "Fan"},
|
2021-08-27 09:22:15 +02:00
|
|
|
{"ppllght", "Purple wall light", minetest.LIGHT_MAX},
|
2021-03-20 13:33:39 +01:00
|
|
|
{"pplwll", "Purple wall"},
|
|
|
|
{"pplwll2", "Purple wall2"},
|
|
|
|
{"pplwll3", "Purple wall3"},
|
|
|
|
{"pplwll4", "Purple wall4"},
|
|
|
|
{"pplblk", "Purple tile"},
|
|
|
|
{"purple", "Purple node"},
|
|
|
|
{"rock", "Moonstone"},
|
|
|
|
{"rock2", "Moonstone2"},
|
|
|
|
{"blackvnt", "Black vent"},
|
|
|
|
{"blackplate", "Black plate"},
|
2019-01-26 22:47:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if minetest.global_exists("stairsplus") then
|
|
|
|
for _, row in ipairs(node.types) do
|
|
|
|
local name = row[1]
|
2021-03-20 13:33:39 +01:00
|
|
|
|
2019-01-26 22:47:48 +01:00
|
|
|
-- Node Definition
|
2021-03-20 13:33:39 +01:00
|
|
|
stairsplus:register_all("scifi_nodes", name, "scifi_nodes:"..name, {
|
|
|
|
description = row[2],
|
2019-01-26 22:47:48 +01:00
|
|
|
tiles = {"scifi_nodes_"..name..".png"},
|
2021-03-20 13:33:39 +01:00
|
|
|
use_texture_alpha = "clip",
|
2022-02-27 05:57:13 +01:00
|
|
|
groups = {cracky=1, dig_generic = 3},
|
2019-01-26 22:47:48 +01:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
2021-03-20 13:33:39 +01:00
|
|
|
light_source = row[3],
|
2019-01-26 22:47:48 +01:00
|
|
|
})
|
|
|
|
end
|
|
|
|
end
|