|
|
|
@ -53,16 +53,19 @@ do |
|
|
|
|
function(a, b) return vector.equals(a.f, b.r) and vector.equals(a.r, b.f) end) |
|
|
|
|
|
|
|
|
|
for _, lens_state in ipairs({ "", "_on", "_glow", "_glow_start" }) do |
|
|
|
|
register_rotatable("nc_optics:lens" .. lens_state, LENS_FILTERED_LOOKUP) end |
|
|
|
|
register_rotatable("nc_optics:lens" .. lens_state, nil, LENS_FILTERED_LOOKUP) end |
|
|
|
|
for _, prism_state in ipairs({ "", "_on", "_gated" }) do |
|
|
|
|
register_rotatable("nc_optics:prism" .. prism_state, PRISM_FILTERED_LOOKUP) end |
|
|
|
|
register_rotatable("nc_optics:prism" .. prism_state, nil, PRISM_FILTERED_LOOKUP) end |
|
|
|
|
|
|
|
|
|
-- Register all existing door panels. |
|
|
|
|
nodecore.register_on_register_item({ |
|
|
|
|
retroactive = true, |
|
|
|
|
func = function(name, def) |
|
|
|
|
-- NOTE: This function is actually called BEFORE the item is registered with Minetest. |
|
|
|
|
-- Because of this, looking up the node definition by name does not work. |
|
|
|
|
name = name:gsub("^:", "") -- Fix for older versions of NodeCore. |
|
|
|
|
if def.groups and def.groups.door_panel and (not def.groups.door) |
|
|
|
|
then register_rotatable(name, PANEL_FILTERED_LOOKUP) end |
|
|
|
|
then register_rotatable(name, def, PANEL_FILTERED_LOOKUP) end |
|
|
|
|
end, |
|
|
|
|
}) |
|
|
|
|
end |
|
|
|
|