diff --git a/README.md b/README.md index 99dad57..c92fb0a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,8 @@ Stained glass Minetest mod by Shara RedCat which adds: 2. Patterned stained glass. 3. Glass lights. 4. One way windows. -5. Hidden light node. +5. Portholes. +6. Hidden light node. Crafting diff --git a/nodes.lua b/nodes.lua index 92a4444..aab33c1 100644 --- a/nodes.lua +++ b/nodes.lua @@ -106,6 +106,39 @@ for i in ipairs(pattern_list) do end +-- portholes +local port_list = { + {"wood",}, {"junglewood",}, +} + +for i in ipairs(port_list) do + local name = port_list[i][1] + + minetest.register_node("abriglass:porthole_"..name, { + description = "Porthole", + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {choppy = 2, flammable = 2, wood = 1}, + tiles = {"default_"..name.. ".png", -- up + "default_"..name.. ".png", -- down + "default_"..name.. ".png", -- right + "default_"..name.. ".png", -- left + "abriglass_porthole_"..name..".png", -- back + "abriglass_porthole_"..name..".png", -- front + }, + is_ground_content = false, + sunlight_propagates = true, + }) +end + + -- one-way glass local oneway_list = { {"dark", "Dark", "oneway_face.png", "abriglass_oneway_wall.png",}, diff --git a/textures/abriglass_porthole_junglewood.png b/textures/abriglass_porthole_junglewood.png new file mode 100644 index 0000000..02c7123 Binary files /dev/null and b/textures/abriglass_porthole_junglewood.png differ diff --git a/textures/abriglass_porthole_wood.png b/textures/abriglass_porthole_wood.png new file mode 100644 index 0000000..25d5ec5 Binary files /dev/null and b/textures/abriglass_porthole_wood.png differ