sorcery  Diff

Differences From Artifact [47c34e0cc8]:

  • File lib/tbl.lua — part of check-in [ea6e475e44] at 2020-10-19 09:52:11 on branch trunk — continue dev on celestial mechanics, add melding+division spells (resonance), refine itemclasses, add keypunch and punchcards, add paper pulp, add a shitload of visuals, add convenience scripts for working with the wiki, make the flamebolt spell actually useful instead of just a pretty lightshow, add essences, inferno crystal, and other goodies; iterate on wands, lots of shit i can't remember, various bugfixes (user: lexi, size: 3607) [annotate] [blame] [check-ins using]

To Artifact [eefda5e589]:


90
91
92
93
94
95
96
97
98



99

100
101
102
103
104
105
106
	return new
end

fn.capitalize = function(str)
	return string.upper(string.sub(str, 1,1)) .. string.sub(str, 2)
end

fn.has = function(tbl,value)
	for k,v in pairs(tbl) do



		if value == v then return true, k end

	end
	return false, nil
end

fn.keys = function(lst)
	local ks = {}
	for k,_ in pairs(lst) do







|

>
>
>
|
>







90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
	return new
end

fn.capitalize = function(str)
	return string.upper(string.sub(str, 1,1)) .. string.sub(str, 2)
end

fn.has = function(tbl,value,eqfn)
	for k,v in pairs(tbl) do
		if eqfn then
			if eqfn(v,value,tbl) then return true, k end
		else
			if value == v then return true, k end
		end
	end
	return false, nil
end

fn.keys = function(lst)
	local ks = {}
	for k,_ in pairs(lst) do