mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-22 08:00:18 +01:00
octagon glass slope variants
This commit is contained in:
parent
fbd56e67c9
commit
36b0c5cc05
20
common.lua
20
common.lua
@ -18,3 +18,23 @@ function scifi_nodes.get_switch_rules(param2)
|
||||
end
|
||||
return rules
|
||||
end
|
||||
|
||||
scifi_nodes.slope_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}
|
||||
}
|
||||
}
|
||||
|
||||
scifi_nodes.slope_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}
|
||||
}
|
||||
}
|
||||
|
1
init.lua
1
init.lua
@ -30,6 +30,7 @@ dofile(MP.."/nodeboxes.lua")
|
||||
dofile(MP.."/palm_scanner.lua")
|
||||
dofile(MP.."/digicode.lua")
|
||||
dofile(MP.."/octagon_panes.lua")
|
||||
dofile(MP.."/octagon_glass.lua")
|
||||
dofile(MP.."/forcefield.lua")
|
||||
dofile(MP.."/crafts.lua")
|
||||
|
||||
|
20
models.lua
20
models.lua
@ -16,24 +16,8 @@ function scifi_nodes.register_slope(name, desc, texture, light, soundtype)
|
||||
drawtype = "mesh",
|
||||
mesh = "scifi_nodes_slope.obj",
|
||||
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}
|
||||
}
|
||||
},
|
||||
selection_box = scifi_nodes.slope_selection_box,
|
||||
collision_box = scifi_nodes.slope_collision_box,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "clip",
|
||||
|
89
nodes.lua
89
nodes.lua
@ -369,95 +369,6 @@ minetest.register_node("scifi_nodes:grnpipe2", {
|
||||
on_place = minetest.rotate_node
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octrng", {
|
||||
description = "Orange Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octrng.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {cracky=2, dig_generic = 3},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octgrn", {
|
||||
description = "Green Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octgrn.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {cracky=2, dig_generic = 3},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octbl", {
|
||||
description = "Blue Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octbl.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {cracky=2, dig_generic = 3},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:octppl", {
|
||||
description = "Purple Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octppl.png",
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {cracky=2, dig_generic = 3},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
if has_unifieddyes_mod then
|
||||
minetest.register_node("scifi_nodes:octwht", {
|
||||
description = "Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octwht.png",
|
||||
},
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {
|
||||
cracky = 2,
|
||||
dig_generic = 3,
|
||||
ud_param2_colorable = 1
|
||||
},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
on_dig = unifieddyes.on_dig
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("scifi_nodes:tower", {
|
||||
description = "Wind tower",
|
||||
sunlight_propagates = false,
|
||||
|
73
octagon_glass.lua
Normal file
73
octagon_glass.lua
Normal file
@ -0,0 +1,73 @@
|
||||
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
|
||||
|
||||
local function register_glass(key, name)
|
||||
local tiles = {"scifi_nodes_" .. key .. ".png"}
|
||||
|
||||
minetest.register_node("scifi_nodes:" .. key, {
|
||||
description = name .. " Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = tiles,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {
|
||||
cracky = 2,
|
||||
dig_generic = 3
|
||||
},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("scifi_nodes:" .. key .. "_slope", {
|
||||
description = "Octagon Glass slope",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "mesh",
|
||||
mesh = "scifi_nodes_slope.obj",
|
||||
tiles = tiles,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {
|
||||
cracky = 2,
|
||||
dig_generic = 3
|
||||
},
|
||||
selection_box = scifi_nodes.slope_selection_box,
|
||||
collision_box = scifi_nodes.slope_collision_box,
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults()
|
||||
})
|
||||
end
|
||||
|
||||
register_glass("octppl", "Purple")
|
||||
register_glass("octbl", "Blue")
|
||||
register_glass("octgrn", "Green")
|
||||
register_glass("octrng", "Orange")
|
||||
register_glass("octwht", "White")
|
||||
|
||||
if has_unifieddyes_mod then
|
||||
minetest.register_node("scifi_nodes:octwht", {
|
||||
description = "Octagon Glass",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "glasslike",
|
||||
tiles = {
|
||||
"scifi_nodes_octwht.png",
|
||||
},
|
||||
palette = "unifieddyes_palette_extended.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "color",
|
||||
use_texture_alpha = "blend",
|
||||
light_source = 10,
|
||||
groups = {
|
||||
cracky = 2,
|
||||
dig_generic = 3,
|
||||
ud_param2_colorable = 1
|
||||
},
|
||||
is_ground_content = false,
|
||||
sounds = scifi_nodes.node_sound_glass_defaults(),
|
||||
on_construct = unifieddyes.on_construct,
|
||||
on_dig = unifieddyes.on_dig
|
||||
})
|
||||
end
|
Loading…
Reference in New Issue
Block a user