diff --git a/sz_util/sz_pos.lua b/sz_util/sz_pos.lua index 06b464e..b6e6ec8 100644 --- a/sz_util/sz_pos.lua +++ b/sz_util/sz_pos.lua @@ -279,10 +279,15 @@ function sz_pos:light(...) end -- Get the metadata reference for this node position. -function sz_pos:meta(n) +function sz_pos:meta() return minetest.get_meta(self) end +-- Get the inventory for this node position. +function sz_pos:inv() + return self:meta():get_inventory() +end + -- Shortcuts for some minetest utility functions. sz_pos.node_swap = minetest.swap_node sz_pos.light = minetest.get_node_light