starlit  Diff

Differences From Artifact [1cb802f20f]:

To Artifact [f0b5b90e43]:


298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
313
314
315
316
317

318
319
320
321
322
323
324
...
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
						}) end
					end
				end
				local menu = { kind = 'vert', mode = 'sw', padding = 0.5 }
				if swm then table.insert(menu, abilityMenu(swm)) end

				local inv = user.entity:get_inventory()

				local cans = inv:get_list 'starlit_suit_canisters'
				if cans and next(cans) then for i, st in ipairs(cans) do
					local id = string.format('starlit_canister_%u_elem', i)
					local esz = inv:get_size(id)
					if esz > 0 then
						local eltW, eltH = listWrap(esz, 5)
						table.insert(menu, {kind = 'hztl',
							{kind = 'img', desc='Elements', img = 'starlit-ui-icon-element.png', w=1,h=1};
							{kind = 'list', target = 'current_player', inv = id,
								listContent = 'element', w = eltW, h = eltH, spacing = 0.1};
						})
					end
				end end


				if #menu == 0 then
					table.insert(menu, {
						kind = 'img';
						img = 'starlit-ui-alert.png';
						w=2, h=2;
					})
................................................................................
				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'}
				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};







>













>







 







|







298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
...
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
						}) end
					end
				end
				local menu = { kind = 'vert', mode = 'sw', padding = 0.5 }
				if swm then table.insert(menu, abilityMenu(swm)) end

				local inv = user.entity:get_inventory()
				--[[
				local cans = inv:get_list 'starlit_suit_canisters'
				if cans and next(cans) then for i, st in ipairs(cans) do
					local id = string.format('starlit_canister_%u_elem', i)
					local esz = inv:get_size(id)
					if esz > 0 then
						local eltW, eltH = listWrap(esz, 5)
						table.insert(menu, {kind = 'hztl',
							{kind = 'img', desc='Elements', img = 'starlit-ui-icon-element.png', w=1,h=1};
							{kind = 'list', target = 'current_player', inv = id,
								listContent = 'element', w = eltW, h = eltH, spacing = 0.1};
						})
					end
				end end
				]]

				if #menu == 0 then
					table.insert(menu, {
						kind = 'img';
						img = 'starlit-ui-alert.png';
						w=2, h=2;
					})
................................................................................
				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};