@@ -32,8 +32,9 @@
flower = { caption = 'Any Flower', cnitem = 'flowers:rose' };
mushroom = { caption = 'Any Mushroom', cnitem = 'flowers:mushroom_brown' };
water_bucket = { caption = 'Water Bucket', cnitem = 'bucket:bucket_water' };
sorcery_ley_cable = { caption = 'Cable', cnitem = 'sorcery:cable_vidrium' };
+ scissors = { caption = 'Scissors', cnitem = 'sorcery:scissors_steel' };
};
}
sorcery.cookbook.constants = constants
@@ -155,17 +156,19 @@
end;
local bookadjs = { -- sets are in reverse order!
{'Celestial', 'Divine', 'Inspired', 'Heavenly';
- 'Mystic', 'Diabolic', 'Luminous', 'Forsaken'};
+ 'Mystic', 'Diabolic', 'Luminous', 'Forsaken',
+ 'Ethereal'};
{'Dark', 'Perfected', 'Flawless', 'Unthinkable';
- 'Impossible', 'Worrisome', 'Unimpeachable'};
+ 'Impossible', 'Worrisome', 'Unimpeachable', 'Fulsome',
+ 'Wise'};
{'Splendid', 'Magnificent', 'Sublime', 'Grand';
'Beneficent', 'Mysterious', 'Peculiar', 'Eerie';
'Fulsome', 'Fearsome', 'Curious', 'Fascinating';
- 'Notorious', 'Infamous'};
+ 'Notorious', 'Infamous', 'Wondrous'};
}
local cache = {
populate_grindables = function(cache)
@@ -315,14 +318,32 @@
en = en.recipe
for i,e in pairs(en) do
if e.lens then
rec[i] = 'sorcery:lens_' .. e.lens .. '_' .. e.gem
+ elseif e.item then
+ rec[i] = e.item
+ end
+ if e.consume or (e.item and not e.dmg) then
+ rec[i] = rec[i] .. ' ' .. tostring(e.consume or 1) -- :/
end
end
return rec
end;
props = function(name)
- return sorcery.data.enchants[name].info or {}
+ local ench = sorcery.data.enchants[name]
+ local p = ench.info
+ local desc = ''
+ if ench.cost ~= 0 then
+ desc = string.format('%s %i thaum-second%s of charge when tool is used',
+ ench.cost > 0 and 'Consumes' or 'Generates',
+ math.abs(ench.cost),
+ ench.cost ~= 1 and 's' or ''
+ )
+ end
+
+ if p == nil then return {note = desc} end
+ if p.note then return p end
+ return sorcery.lib.tbl.proto({note = desc},p)
end;
slots = {
{0.5,0};
{0,1}, {1,1}
@@ -329,12 +350,21 @@
};
title = function(name) return sorcery.data.enchants[name].name end;
outdesc = function(name,suffix)
local e = sorcery.data.enchants[name]
+ local cap = sorcery.lib.str.capitalize
+ local aff = sorcery.data.affinities[e.affinity]
return sorcery.lib.ui.tooltip {
title = e.name;
- desc = sorcery.lib.str.capitalize(e.desc);
- color = sorcery.lib.color(e.tone):readable();
+ desc = cap(e.desc);
+ color = sorcery.lib.color(e.tone);
+ props = {
+ {
+ title = string.format('%s affinity', cap(e.affinity));
+ desc = aff.desc;
+ color = sorcery.lib.color(aff.color);
+ };
+ };
}
end;
};
-- spells = {
@@ -401,13 +431,14 @@
local img, ot
if props.note then
local nx, ny, nw, nh
if notes_right then
- nx = 5.25 ny = 0
- nw = 4 nh = 3
+ nx = 5.25 - (3 - k.w) -- :/
+ ny = 0
+ nw = 4 nh = k.h
else
nx = 0 ny = 3
- nw = 4 nh = 1
+ nw = 4 nh = k,h
end
t = t .. string.format([[
hypertext[%f,%f;%f,%f;note;%s]
]], nx,ny,nw,nh, minetest.formspec_escape(props.note))
@@ -416,14 +447,14 @@
if k.outdesc then ot = k.outdesc(result) else ot = desc_builtin(result) end
-- image[%f,%f;1,1;gui_furnace_arrow_bg.png^[transformR270]
return t .. string.format([[
item_image[%f,%f;1,1;%s]tooltip[%f,%f;1,1;%s]
- ]] --[[box[%f,%f;1,1;#850083A0]] .. [[
+ box[%f,%f;1.1,1.1;#1a001650]
%s[%f,%f;1,1;%s]
tooltip[%f,%f;1,1;%s]
]], k.w, k.h/2 - 0.5, k.node,
k.w, k.h/2 - 0.5, minetest.formspec_escape(minetest.registered_nodes[k.node].description),
- -- k.w+1, k.h/2 - 0.5,
+ k.w+1.05, k.h/2 - 0.55,
img and 'image' or 'item_image',
k.w+1.1, k.h/2 - 0.5, minetest.formspec_escape(img or result),
k.w+1.1, k.h/2 - 0.5, minetest.formspec_escape(ot))
end;