345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
local tb = {
kind = 'vert', mode = 'sw';
padding = 0.5,
{kind = 'hztl', padding = 0.25;
{kind = 'label', text = 'Name', w = 2, h = barh};
{kind = 'label', text = user.persona.name, w = 4, h = barh}};
}
local statBars = {'hunger', 'thirst', 'fatigue', 'morale', 'irradiation', 'illness'}
for idx, id in ipairs(statBars) do
local s = starlit.world.stats[id]
local amt, sv = user:effectiveStat(id)
local min, max = starlit.world.species.statRange(user.persona.species, user.persona.speciesVariant, id)
local st = string.format('%s / %s', s.desc(amt, true), s.desc(max))
table.insert(tb, {kind = 'hztl', padding = 0.25;
{kind = 'label', w=2, h=barh, text = s.name};
|
|
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
|
local tb = {
kind = 'vert', mode = 'sw';
padding = 0.5,
{kind = 'hztl', padding = 0.25;
{kind = 'label', text = 'Name', w = 2, h = barh};
{kind = 'label', text = user.persona.name, w = 4, h = barh}};
}
local statBars = {'nutrition', 'hydration', 'fatigue', 'morale', 'irradiation', 'illness'}
for idx, id in ipairs(statBars) do
local s = starlit.world.stats[id]
local amt, sv = user:effectiveStat(id)
local min, max = starlit.world.species.statRange(user.persona.species, user.persona.speciesVariant, id)
local st = string.format('%s / %s', s.desc(amt, true), s.desc(max))
table.insert(tb, {kind = 'hztl', padding = 0.25;
{kind = 'label', w=2, h=barh, text = s.name};
|