starlit  Diff

Differences From Artifact [523263fc9a]:

To Artifact [c485cf1b8a]:


     1      1   local lib = starlit.mod.lib
            2  +local T,G = lib.marshal.t, lib.marshal.g
     2      3   
     3      4   local function U(unit, prec, fixed)
     4      5   	local trunc = 2
     5      6   	if fixed then
     6      7   		return function(amt, excludeUnit)
     7      8   			local ta = lib.math.trim(amt/prec, trunc)
     8      9   			if excludeUnit then return tostring(ta) end
     9         -			return string.format("%s %s", ta, unit)
           10  +			return string.format("%s%s", ta, unit)
    10     11   		end
    11     12   	else
    12     13   		return function(amt, excludeUnit)
    13     14   			local ta = lib.math.trim(amt/prec, trunc)
    14     15   			if excludeUnit then return tostring(ta) end
    15     16   			return lib.math.si(unit, amt/prec, nil, nil, trunc)
    16     17   		end
................................................................................
    20     21   local function C(h, s, l)
    21     22   	return lib.color {hue = h, sat = s or 1, lum = l or .7}
    22     23   end
    23     24   starlit.world.stats = {
    24     25   	psi        = {min = 0, max = 500, base = 0, desc = U('ψ', 10), color = C(320), name = 'Numina'};
    25     26   	-- numina is measured in daψ
    26     27   	warmth     = {min = -1000, max = 1000, base = 0, desc = U('°C', 10, true), color = C(5), name = 'Warmth'};
    27         -	-- warmth in measured in °C×10
           28  +	-- warmth in measured in d°C
    28     29   	fatigue    = {min = 0, max = 76 * 60, base = 0, desc = U('hr', 60, true), color = C(288,.3,.5), name = 'Fatigue'};
    29     30   	-- fatigue is measured in minutes one needs to sleep to cure it
    30     31   	stamina    = {min = 0, max = 20 * 100, base = true, desc = U('m', 100), color = C(88), name = 'Stamina'};
    31     32   	-- stamina is measured in how many 10th-nodes (== cm) one can sprint
    32         -	hunger     = {min = 0, max = 2000e3, base = 0, desc = U('kCal', 1000, true), color = C(43,.5,.4), name = 'Hunger'};
    33         -	-- hunger is measured in calories one must consume to cure it. at a 2kCal deficit, you start dying
    34         -	thirst     = {min = 0, max = 4e3, base = 0, desc = U('L', 1e3), color = C(217, .25,.4), name = 'Thirst'};
    35         -	-- thirst is measured in mL of H²O required to cure it
           33  +	nutrition  = {min = 0, max = 8000, base = 0, desc = U('kCal', 1, true), color = C(43,.5,.4), name = 'Nutrition', srzType = T.decimal};
           34  +	-- hunger is measured in kcalories one must consume to cure it. at 0, you start dying
           35  +	hydration  = {min = 0, max = 4, base = 0, desc = U('L', 1), color = C(217, .25,.4), name = 'Hydration', srzType = T.decimal};
           36  +	-- thirst is measured in L of H²O required to cure it
    36     37   	morale     = {min = 0, max = 24 * 60 * 10, base = true, desc = U('hr', 60, true), color = C(0,0,.8), name = 'Morale'};
    37     38   	-- morale is measured in minutes. e.g. at base rate morale degrades by
    38     39   	-- 60 points every hour. morale can last up to 10 days
    39         -	irradiation = {min = 0, max = 20000, base = 0, desc = U('Gy', 1000), color = C(141,1,.5), name = 'Irradiation'};
           40  +	irradiation = {min = 0, max = 10, base = 0, desc = U('Gy', 1), color = C(141,1,.5), name = 'Irradiation', srzType = T.decimal};
    40     41   	-- irrad is measured is milligreys
    41     42   	-- 1Gy counters natural healing
    42     43   	-- ~3Gy counters basic nanomedicine
    43     44   	-- 5Gy causes death within two weeks without nanomedicine
    44     45   	-- radiation speeds up psi regen
    45     46   	-- morale drain doubles with each 2Gy
    46     47   	illness    = {min = 0, max = 1000, base = 0, desc = U('%', 10, true), color = C(71,.4,.25), name = 'Illness'};
    47     48   	-- as illness increases, maximum stamina and health gain a corresponding limit
    48     49   	-- illness is increased by certain conditions, and decreases on its own as your
    49     50   	-- body heals when those conditions wear off. some drugs can lower accumulated illness
    50     51   	-- but illness-causing conditions require specific cures
    51     52   	-- illness also causes thirst and fatigue to increase proportionately
    52     53   }