Start work on glass tank.

This commit is contained in:
Aaron Suen 2019-12-07 22:45:34 -05:00
parent dd0cf19784
commit a54d868cc3
3 changed files with 40 additions and 0 deletions

View File

@ -11,3 +11,4 @@ include("lens")
include("prism")
include("cooking")
include("crafting")
include("shelf")

39
mods/nc_optics/shelf.lua Normal file
View File

@ -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
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 B