Automatic mod names for all but rotary, hack for sz_heat fire sfx.
This commit is contained in:
parent
bd49896452
commit
b4a2a1345f
@ -3,7 +3,9 @@ dofile(minetest.get_modpath(minetest.get_current_modname())
|
||||
.. "/sz_class.lua");
|
||||
|
||||
-- Load subclasses defined in this mod.
|
||||
sz_class:loadsubclasses("sz_table")
|
||||
sz_class:loadsubclasses(
|
||||
"sz_table"
|
||||
)
|
||||
sz_table:loadsubclasses(
|
||||
"sz_pos",
|
||||
"sz_facedir"
|
||||
|
@ -8,7 +8,8 @@ function sz_class:new(init)
|
||||
end
|
||||
|
||||
function sz_class:loadlibs(...)
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname()) .. "/";
|
||||
local modname = minetest.get_current_modname()
|
||||
local modpath = minetest.get_modpath(modname) .. "/";
|
||||
for i, class in ipairs({...}) do
|
||||
dofile(modpath .. class .. ".lua")
|
||||
end
|
||||
|
@ -240,7 +240,7 @@ end
|
||||
-- A safe accessor to get the groups for the node definition
|
||||
-- at this location that will always return a table.
|
||||
function sz_pos:groups()
|
||||
return (self:nodedef() or { }).groups or { }
|
||||
return sz_table:new((self:nodedef() or { }).groups or { })
|
||||
end
|
||||
|
||||
-- Return true if this location contains only air.
|
||||
|
Loading…
x
Reference in New Issue
Block a user