60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
-- can't mutate table while we're iterating it
if not minetest.registered_nodes[g] then bad[#bad+1] = g end
end
for _, g in ipairs(bad) do god.gifts[g] = nil end
end
end)
local god_interval = 1
for name, god in pairs(sorcery.data.gods) do
local hitbox = {
0-(god.idol.width / 2.0), 0-(god.idol.height / 2.0), -0.15,
god.idol.width / 2.0, god.idol.height / 2.0, 0.15
} -- {xmin, ymin, zmin,
-- xmax, ymax, zmax} in nodes from node center.
................................................................................
paramtype = "light";
if god.idol.craft then
minetest.register_craft {
output = 'sorcery:idol_' .. name;
recipe = god.idol.craft;
};
end
sorcery.lib.node.reg_autopreserve('sorcery:idol_' .. name, {
description = god.idol.desc;
drawtype = "mesh";
mesh = 'sorcery-idol-' .. name .. '.obj';
paramtype = 'light';
paramtype2 = 'facedir';
sunlight_propagates = true;
|
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
-- can't mutate table while we're iterating it
if not minetest.registered_nodes[g] then bad[#bad+1] = g end
end
for _, g in ipairs(bad) do god.gifts[g] = nil end
end
end)
local std_god_interval = 70
for name, god in pairs(sorcery.data.gods) do
local hitbox = {
0-(god.idol.width / 2.0), 0-(god.idol.height / 2.0), -0.15,
god.idol.width / 2.0, god.idol.height / 2.0, 0.15
} -- {xmin, ymin, zmin,
-- xmax, ymax, zmax} in nodes from node center.
................................................................................
paramtype = "light";
if god.idol.craft then
minetest.register_craft {
output = 'sorcery:idol_' .. name;
recipe = god.idol.craft;
};
end
local god_interval = std_god_interval * (god.freq or 1)
sorcery.lib.node.reg_autopreserve('sorcery:idol_' .. name, {
description = god.idol.desc;
drawtype = "mesh";
mesh = 'sorcery-idol-' .. name .. '.obj';
paramtype = 'light';
paramtype2 = 'facedir';
sunlight_propagates = true;
|