Differences From
Artifact [db0300e682]:
86 86 flush()
87 87
88 88 for _, i in ipairs(l) do
89 89 local bw = w/max
90 90 if i.cfg then w = w - rh end
91 91
92 92 table.insert(bar, {
93 - kind = 'button', close = i.close;
93 + kind = i.img and 'contact' or 'button', close = i.close;
94 94 color = i.color;
95 95 fg = i.fg;
96 96 label = i.label;
97 - icon = i.img;
97 + img = i.img;
98 98 id = i.id;
99 99 w = bw, h = rh;
100 100 })
101 101 if i.cfg then
102 102 table.insert(bar, {
103 103 kind = 'button';
104 104 color = i.color;
105 105 fg = i.fg;
106 106 label = "CFG";
107 - icon = i.img;
107 + img = i.img;
108 108 id = i.id .. '_cfg';
109 109 w = rh, h = rh;
110 110 })
111 111 end
112 112
113 113 if bar[max] then flush() end
114 114 end
................................................................................
353 353 local statBars = {'nutrition', 'hydration', 'fatigue', 'morale', 'irradiation', 'illness'}
354 354 for idx, id in ipairs(statBars) do
355 355 local s = starlit.world.stats[id]
356 356 local amt, sv = user:effectiveStat(id)
357 357 local min, max = starlit.world.species.statRange(user.persona.species, user.persona.speciesVariant, id)
358 358 local st = string.format('%s / %s', s.desc(amt, true), s.desc(max))
359 359 table.insert(tb, {kind = 'hztl', padding = 0.25;
360 - {kind = 'label', w=2, h=barh, text = s.name};
360 + {kind = 'label', w=2, h=barh, text = lib.str.capitalize(s.name)};
361 361 {kind = 'hbar', w=4, h=barh, fac = sv, text = st, color=s.color};
362 362 })
363 363 end
364 364 local abilities = {
365 365 maneuver = {};
366 366 direct = {};
367 367 passive = {};
................................................................................
370 370 for i, a in pairs(user:species().abilities) do
371 371 local id = 'abl_'..a.id;
372 372 state.abilityMap[id] = a;
373 373 table.insert(abilities[a.powerKind], {
374 374 id = id;
375 375 label = a.name;
376 376 desc = a.desc;
377 - img = a.img;
377 +-- img = a.img;
378 378
379 379 -- HACK
380 380 color = pptrMatch(user.power.maneuver, {ref=a}) and
381 381 {hue = 150, sat = 0, lum = .3} or nil;
382 382 });
383 383 end
384 384 for i, n in ipairs {'maneuver', 'direct', 'passive'} do