58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
paramtype = 'light';
paramtype2 = 'facedir';
sunlight_propagates = true;
stack_max = 1;
tiles = god.idol.tex;
selection_box = { type = "fixed"; fixed = {hitbox}; };
collision_box = { type = "fixed"; fixed = {hitbox}; };
groups = { cracky = 2, sorcery_idol = 1, heavy = 1};
after_place_node = function(pos, placer, stack, pointat)
local meta = minetest.get_meta(pos)
local stackmeta = stack:get_meta()
meta:set_int('favor', stackmeta:get_int('favor'))
meta:set_string('last_sacrifice', stackmeta:get_string('last_sacrifice'))
................................................................................
local itemname = stack:get_name()
-- loop through the sacrifices accepted by this god and check
-- whether the item on the altar is any of them
for s, value in pairs(god.sacrifice) do
if itemname == s then
if value < 0 then
bestow("new_campfire:ash", sorcery.lib.color(254,117,103))
else
if idolmeta:get_string('last_sacrifice') == s then
-- the gods are getting bored
value = math.floor(value / 2)
end
bestow(nil)
end
................................................................................
fixed = { {-0.5, -0.5, -0.5, 0.5, -0.09, 0.5} }
};
collision_box = {
type = "fixed",
fixed = { {-0.5, -0.5, -0.5, 0.5, -0.09, 0.5} }
};
groups = {cracky = 2, oddly_breakable_by_hand = 2};
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('item', 1)
end;
|
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
...
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
|
paramtype = 'light';
paramtype2 = 'facedir';
sunlight_propagates = true;
stack_max = 1;
tiles = god.idol.tex;
selection_box = { type = "fixed"; fixed = {hitbox}; };
collision_box = { type = "fixed"; fixed = {hitbox}; };
groups = { cracky = 2, sorcery_idol = 1, heavy = 1, sorcery_worship = 1};
after_place_node = function(pos, placer, stack, pointat)
local meta = minetest.get_meta(pos)
local stackmeta = stack:get_meta()
meta:set_int('favor', stackmeta:get_int('favor'))
meta:set_string('last_sacrifice', stackmeta:get_string('last_sacrifice'))
................................................................................
local itemname = stack:get_name()
-- loop through the sacrifices accepted by this god and check
-- whether the item on the altar is any of them
for s, value in pairs(god.sacrifice) do
if itemname == s then
if value < 0 then
bestow("sorcery:ash", sorcery.lib.color(254,117,103))
else
if idolmeta:get_string('last_sacrifice') == s then
-- the gods are getting bored
value = math.floor(value / 2)
end
bestow(nil)
end
................................................................................
fixed = { {-0.5, -0.5, -0.5, 0.5, -0.09, 0.5} }
};
collision_box = {
type = "fixed",
fixed = { {-0.5, -0.5, -0.5, 0.5, -0.09, 0.5} }
};
groups = {cracky = 2, oddly_breakable_by_hand = 2, sorcery_worship = 1};
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('item', 1)
end;
|