mirror of
https://github.com/Ezhh/abriglass.git
synced 2024-08-19 19:34:03 +02:00
Tidied one way glass
This commit is contained in:
parent
46f796bc00
commit
a91a2f38d1
58
init.lua
58
init.lua
@ -107,31 +107,20 @@ end
|
|||||||
|
|
||||||
|
|
||||||
-- one-way glass
|
-- one-way glass
|
||||||
minetest.register_node("abriglass:oneway_glass_dark", {
|
local oneway_list = { --{name, description, image}
|
||||||
description = "Dark One-Way Glass",
|
{"dark", "Dark", "oneway_plain_glass", "oneway_face.png", "oneway_wall.png",},
|
||||||
drawtype = "nodebox",
|
{"pale", "White", "oneway_plain_glass", "oneway_face.png^[colorize:#F8F8FF:200", "oneway_wall.png^[colorize:#E6E6FA:200",},
|
||||||
paramtype = "light",
|
}
|
||||||
paramtype2 = "facedir",
|
|
||||||
node_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {
|
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
groups = {cracky = 3},
|
|
||||||
tiles = {"abriglass_oneway_plain_glass.png", -- up
|
|
||||||
"abriglass_oneway_plain_glass.png", -- down
|
|
||||||
"abriglass_oneway_plain_glass.png", -- right
|
|
||||||
"abriglass_oneway_plain_glass.png", -- left
|
|
||||||
"abriglass_oneway_face.png", -- back
|
|
||||||
"abriglass_oneway_wall.png"}, -- front
|
|
||||||
is_ground_content = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
inventory_image = minetest.inventorycube("abriglass_oneway_face.png")
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("abriglass:oneway_glass_pale", {
|
for i in ipairs(oneway_list) do
|
||||||
description = "White One-Way Glass",
|
local name = oneway_list[i][1]
|
||||||
|
local description = oneway_list[i][2]
|
||||||
|
local image1 = oneway_list[i][3]
|
||||||
|
local image2 = oneway_list[i][4]
|
||||||
|
local image3 = oneway_list[i][5]
|
||||||
|
|
||||||
|
minetest.register_node("abriglass:oneway_glass_"..name, {
|
||||||
|
description = description.." One-Way Glass",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -142,16 +131,18 @@ minetest.register_node("abriglass:oneway_glass_pale", {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
tiles = {"abriglass_oneway_plain_glass.png", -- up
|
tiles = {"abriglass_"..image1..".png", -- up
|
||||||
"abriglass_oneway_plain_glass.png", -- down
|
"abriglass_"..image1..".png", -- down
|
||||||
"abriglass_oneway_plain_glass.png", -- right
|
"abriglass_"..image1..".png", -- right
|
||||||
"abriglass_oneway_plain_glass.png", -- left
|
"abriglass_"..image1..".png", -- left
|
||||||
"abriglass_oneway_face.png^[colorize:#F8F8FF:200", -- back
|
"abriglass_"..image2, -- back
|
||||||
"abriglass_oneway_wall.png^[colorize:#E6E6FA:200"}, -- front
|
"abriglass_"..image3 -- front
|
||||||
|
},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
inventory_image = minetest.inventorycube("abriglass_oneway_face.png^[colorize:#F8F8FF:200")
|
inventory_image = minetest.inventorycube("abriglass_"..image2)
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- normal nodes to match one-way glass
|
-- normal nodes to match one-way glass
|
||||||
@ -169,6 +160,7 @@ minetest.register_node("abriglass:oneway_wall_pale", {
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- crystal, for later use in crafting recipes
|
-- crystal, for later use in crafting recipes
|
||||||
minetest.register_node("abriglass:ghost_crystal", {
|
minetest.register_node("abriglass:ghost_crystal", {
|
||||||
description = "Ghost Crystal",
|
description = "Ghost Crystal",
|
||||||
@ -182,6 +174,7 @@ minetest.register_node("abriglass:ghost_crystal", {
|
|||||||
sounds = default.node_sound_glass_defaults(),
|
sounds = default.node_sound_glass_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- hidden light node
|
-- hidden light node
|
||||||
minetest.register_node("abriglass:hidden_light", {
|
minetest.register_node("abriglass:hidden_light", {
|
||||||
description = "Hidden Light",
|
description = "Hidden Light",
|
||||||
@ -193,6 +186,3 @@ minetest.register_node("abriglass:hidden_light", {
|
|||||||
light_source = 7,
|
light_source = 7,
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user