sorcery  Check-in [d08d3d2bd8]

Overview
Comment:remove debugging shim oops
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d08d3d2bd8029117a50575104ec9c30cbd1f26b9add789e8645dd6a0572e9ab5
User & Date: lexi on 2021-07-05 19:17:56
Other Links: manifest | tags
Context
2021-07-05
20:43
add support for instantiation callbacks, god tweaks and bug fixes check-in: 3354e2aa29 user: lexi tags: trunk
19:17
remove debugging shim oops check-in: d08d3d2bd8 user: lexi tags: trunk
16:47
add new god, add idol crafting recipes, fix bugs check-in: 6e7b450ec7 user: lexi tags: trunk
Changes

Modified altar.lua from [235fbb7fc6] to [e0cdcfa7d5].

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

Modified data/gods.lua from [a732e194a1] to [6a04c7ee36].

     7      7   			legend tells that a foolish mortal king once conspired to steal away Sulavri's staff, knowing it to be the apex of the sorcerer's art and desirous of its might. wise Sulavri however saw the warnings on the wind and in the dances of the birds, and so on the fateful day he fashioned an imitation staff that held no power at all, his wife concealing his true staff by turning into a shawl and casting it about her shoulders. sure enough, when Sulavri laid down to rest at his favored mountain stream, a master thief in the employ of the king stole away the false staff, bringing it to his master. at first delighted, the king found the staff would not answer his will, and soon went mad seeking to unlock the secrets of its power.
     8      8   
     9      9   			Sulavri is the patron of elders, men, and Wand-Working.
    10     10   		]];
    11     11   		laziness = 7;
    12     12   		generosity = 4;
    13     13   		stinginess = 1;
           14  +		freq = 1.2;
    14     15   		color = {255,34,123};
    15     16   		idol = {
    16     17   			desc = 'Mystic Idol';
    17     18   			width = 0.7;
    18     19   			height = 1;
    19     20   			tex = {
    20     21   				"default_obsidian.png";
................................................................................
    40     41   			["sorcery:potion_water"] = {4, "sorcery:holy_water"};
    41     42   			["default:paper"] = function(ctx)
    42     43   				local stack = ItemStack('sorcery:recipe')
    43     44   				local mode = select(2,L.tbl.pick{'cook','craft','infuse','grind','enchant'})
    44     45   				sorcery.cookbook.setrecipe(stack, mode, nil, {
    45     46   					pred = function(c)
    46     47   						local me = ctx.god
    47         -						if mode == 'enchant' or
           48  +						if (mode == 'enchant' or
    48     49   							minetest.get_item_group(c.item, 'sorcery_magical') ~= 0 or
    49     50   							minetest.get_item_group(c.item, 'sorcery_magitech') ~= 0 or
    50     51   							minetest.get_item_group(c.item, 'sorcery_ley_device') ~= 0 or
    51     52   							minetest.get_item_group(c.item, 'sorcery_tech') ~= 0 or
    52     53   							minetest.get_item_group(c.item, 'crafttool') ~= 0 or
    53     54   							me.sacrifice [c.item] or
    54         -							me.consecrate[c.item]
           55  +							me.consecrate[c.item]) and
           56  +							mod ~= 'farming'
    55     57   								then return true end
    56     58   					end;
    57     59   				})
    58         -				return 1, stack
           60  +				return 6, stack
    59     61   			end;
    60     62   			-- ["default:gold_ingot"] = {15, "sorcery:holy_token_magic"};
    61     63   		};
    62     64   		sacrifice = {
    63     65   			['sorcery:essence_frost'] = 25;
    64     66   			['sorcery:essence_flame'] = 25;
    65     67   			['sorcery:essence_force'] = 30;
................................................................................
   136    138   			legend says that a barbarian lord high on opium once wandered into a temple of Irix and left the severed head of a local shepherd on the her altar. this desecration so enraged the goddess that the barbarian's entire tribe soon starved horribly to death, their crops refusing to take root, and their stolen breads turning to ash in their mouths.
   137    139   
   138    140   			Irix is the patron of maidens, mothers, and Alchemy. it is said that Irix Irimentari herself invented alchemy when she brewed the first mead.
   139    141   		]];
   140    142   		laziness = 5;
   141    143   		stinginess = 3;
   142    144   		generosity = 10;
          145  +		freq = 1;
   143    146   		color = {214, 255, 146};
   144    147   		idol = {
   145    148   			desc = "Harvest Idol";
   146    149   			width = 0.7;
   147    150   			height = 1;
   148    151   			tex = {
   149    152   				"default_grass.png",