Add critical tables
This commit is contained in:
@ -106,17 +106,24 @@ for file in lfs.dir("./") do
|
||||
for _, key in ipairs(_CRIT_KEYS) do
|
||||
local effects = {}
|
||||
local line = c[key]
|
||||
if not line then
|
||||
break
|
||||
end
|
||||
-- Get description (ie all text befire the first \n)
|
||||
local desc = line:match("([^\n]+)")
|
||||
-- Get the rest of the text
|
||||
local rest = line:match("\n(.+)")
|
||||
if rest:match("with ") then
|
||||
local reasonwith, with, reasonwithout , without = rest:match("(with[^:]*): ([^w]+)(w/o[^:]*): (.+)")
|
||||
print("SPLITTEW WITH", desc)
|
||||
effects[1] = process_values(with, reasonwith)
|
||||
effects[2] = process_values(without, reasonwithout)
|
||||
else
|
||||
effects[1] = process_values(rest)
|
||||
if rest then
|
||||
if rest:match("with ") then
|
||||
local reasonwith, with, reasonwithout , without = rest:match("(with[^:]*): ([^w]+)(w/o[^:]*): (.+)")
|
||||
print("SPLITTEW WITH", desc)
|
||||
effects[1] = process_values(with, reasonwith)
|
||||
effects[2] = process_values(without, reasonwithout)
|
||||
else
|
||||
effects[1] = process_values(rest)
|
||||
end
|
||||
else
|
||||
print("NO REST", desc)
|
||||
end
|
||||
new_crit.levels[key] = {
|
||||
key = key,
|
||||
|
Reference in New Issue
Block a user