diff --git a/mods/nc_optics/init.lua b/mods/nc_optics/init.lua index b9479b53..74d2c76b 100644 --- a/mods/nc_optics/init.lua +++ b/mods/nc_optics/init.lua @@ -11,3 +11,4 @@ include("lens") include("prism") include("cooking") include("crafting") +include("shelf") diff --git a/mods/nc_optics/shelf.lua b/mods/nc_optics/shelf.lua new file mode 100644 index 00000000..edce28d5 --- /dev/null +++ b/mods/nc_optics/shelf.lua @@ -0,0 +1,39 @@ +-- LUALOCALS < --------------------------------------------------------- +local minetest, nodecore + = minetest, nodecore +-- LUALOCALS > --------------------------------------------------------- + +local modname = minetest.get_current_modname() + +local po = 0.5 +local no = -0.5 +local pi = 7/16 +local ni = -7/16 +minetest.register_node(modname .. ":shelf", { + description = "Glass Tank", + drawtype = "nodebox", + node_box = nodecore.fixedbox( + {no, no, no, po, ni, po}, + {no, no, no, po, po, ni}, + {no, no, pi, po, po, po}, + {no, no, no, ni, po, po}, + {pi, no, no, po, po, po} + ), + tiles = {modname .. "_glass_glare.png^" .. modname + .. "_glass_edges.png^(nc_lode_annealed.png^[mask:" + .. modname .. "_tank_mask.png)"}, + selection_box = nodecore.fixedbox(), + collision_box = nodecore.fixedbox(), + groups = { + silica = 1, + silica_clear = 1, + cracky = 3, + visinv = 1, + shelf = 1, + totable = 1 + }, + paramtype = "light", + sunlight_propagates = true, + sounds = nodecore.sounds("nc_optics_glassy"), + shelf_access = function(pt) return pt.above.y > pt.under.y end + }) diff --git a/mods/nc_optics/textures/nc_optics_tank_mask.png b/mods/nc_optics/textures/nc_optics_tank_mask.png new file mode 100644 index 00000000..ee97079a Binary files /dev/null and b/mods/nc_optics/textures/nc_optics_tank_mask.png differ