starlit  Diff

Differences From Artifact [513c94b946]:

To Artifact [de1b489a19]:


     7      7   function starlit.world.tier.fabsum(name, ty)
     8      8   	local dest = fab {}
     9      9   	local t = starlit.world.tier.db[name]
    10     10   	assert(t, 'reference to nonexisting tier '..name)
    11     11   	if t.super then
    12     12   		dest = dest+starlit.world.tier.fabsum(t.super, ty)*(t.cost or 1)
    13     13   	end
    14         -	if t.fabclasses and t.fabclasses[ty] then
    15         -		dest = dest + t.fabclasses[ty]
           14  +	if t.fabclass and (t.fabclass[ty] or t.fabclass.basis) then
           15  +		dest = dest + (t.fabclass[ty] or t.fabclass.basis)
    16     16   	end
    17     17   	return dest
    18     18   end
    19     19   
    20     20   function starlit.world.tier.tech(name, tech)
    21     21   	local t = starlit.world.tier.db[name]
    22     22   	if t.techs and t.techs[tech] ~= nil then return t.techs[tech] end
................................................................................
    37     37   	------------------
    38     38   	-- tier classes --
    39     39   	------------------
    40     40   
    41     41   	lesser = {
    42     42   		name = 'Lesser', adj = 'Lesser';
    43     43   		super = 'base';
    44         -		fabclasses = {
           44  +		fabclass = {
    45     45   			basis = fab {
    46         -				metal = {aluminum=4};
           46  +				element = {aluminum=4};
    47     47   			};
    48     48   		};
    49     49   	};
    50     50   	greater = {
    51     51   		name = 'Greater', adj = 'Greater';
    52     52   		super = 'base';
    53         -		fabclasses = {
           53  +		fabclass = {
    54     54   			basis = fab {
    55         -				metal = {vanadium=2};
           55  +				element = {vanadium=2};
    56     56   			};
    57     57   		};
    58     58   	};
    59     59   	starlit = {
    60         -		name = 'Starsoul', adj = 'Starsoul';
           60  +		name = 'Starlit', adj = 'Starlit';
    61     61   		super = 'base';
    62         -		fabclasses = {
           62  +		fabclass = {
    63     63   			basis = fab {
    64         -				metal = {osmiridium=1};
           64  +				element = {iridium=1};
    65     65   			};
    66     66   		};
    67     67   	};
    68     68   	forevanished = {
    69     69   		name = 'Forevanished One', adj = 'Forevanished';
    70     70   		super = 'base';
    71         -		fabclasses = {
           71  +		fabclass = {
    72     72   			basis = fab {
    73     73   				metal = {elusium=1};
    74     74   			};
    75     75   		};
    76     76   	};
    77     77   
    78     78   	------------------
................................................................................
    83     83   		name = 'Makeshift', adj = 'Makeshift';
    84     84   		super = 'lesser';
    85     85   		techs = {tool = true, prim = true, electric = true};
    86     86   		power = 0.5;
    87     87   		efficiency = 0.3;
    88     88   		reliability = 0.2;
    89     89   		cost = 0.3;
    90         -		fabclasses = { -- characteristic materials
           90  +		fabclass = { -- characteristic materials
    91     91   			basis = fab { -- fallback
    92         -				metal = {iron=3};
           92  +				element = {aluminum=4};
    93     93   			};
    94     94   		};
    95     95   	};
    96     96   
    97     97   	imperial = { --powerful trash
    98     98   		name = 'Imperial', adj = 'Imperial';
    99     99   		super = 'lesser';
   100    100   		techs = {tool = true, electric = true, electronic = true, suit = true, combatSuit = true, weapon = true, hover='ion'};
   101    101   		power = 2.0;
   102    102   		efficiency = 0.5;
   103    103   		reliability = 0.5;
   104    104   		cost = 1.0;
   105         -		fabclasses = {
          105  +		fabclass = {
   106    106   			basis = fab {
   107         -				metal = {steel=2};
          107  +				element = {iron=2};
   108    108   			};
   109    109   		};
   110    110   	};
   111    111   
   112    112   	commune = { --reliability
   113    113   		name = 'Commune', adj = 'Commune';
   114    114   		super = 'lesser';
   115    115   		techs = {tool = true, electric = true, electronic = true, suit = true, combatSuit = true, weapon = true, gravitic = true, hover='grav'};
   116    116   		power = 1.0;
   117    117   		efficiency = 2.0;
   118    118   		reliability = 3.0;
   119    119   		cost = 1.5;
   120         -		fabclasses = {
          120  +		fabclass = {
   121    121   			basis = fab {
   122         -				metal = {titanium=1};
          122  +				element = {titanium=1};
   123    123   				time = {print = 1.2}; -- commune stuff is intricate
   124    124   			};
   125    125   		};
   126    126   	};
   127    127   
   128    128   	-------------------
   129    129   	-- Greater Races --
................................................................................
   138    138   		name = 'Su\'ikuri', adj = "Su'ikuruk";
   139    139   		super = 'starlit';
   140    140   		techs = {psi = true, prim = true, bioSuit = true, psiSuit = true};
   141    141   		power = 1.5;
   142    142   		efficiency = 1.0;
   143    143   		reliability = 3.0;
   144    144   		cost = 2.0;
   145         -		fabclasses = {
          145  +		fabclass = {
   146    146   			psi = fab {
   147         -				metal = {numinium = 2.0};
   148         -				crystal = {beryllium = 1.0};
          147  +				element = {numinium = 2.0};
   149    148   			};
   150    149   			bio = fab {
   151         -				crystal = {beryllium = 1.0};
          150  +				element = {beryllium = 1.0};
   152    151   			};
   153    152   		};
   154    153   	};
   155    154   
   156    155   	usukwinya = { --value for 'money'; no weapons; no hovertech (they are birds)
   157    156   		-- NOTA BENE: the ususkwinya *do* have weapons of their own; however,
   158    157   		-- they are extremely restricted and never made available except to a
   159         -		-- very select number of that species. consequently, usuk players
          158  +		-- very select number of that species, those members who need stronger
          159  +		-- defenses than their native psionics can provide. consequently, usuk players
   160    160   		-- of a certain scenario may have usuk starting weapons, but these must
   161    161   		-- be manually encoded to avoid injecting them into the overall crafting
   162    162   		-- /loot system. because there are so few of these weapons in existence,
   163    163   		-- all so tightly controlled, the odds of the weapons or plans winding
   164    164   		-- up on Farthest Shadow are basically zero unless you bring them yourself
   165    165   		name = 'Usukwinya', adj = 'Usuk';
   166    166   		super = 'starlit';
   167    167   		techs = lib.tbl.set('tool', 'electric', 'electronic', 'suit', 'gravitic');
   168    168   		power = 2.0;
   169    169   		efficiency = 2.0;
   170    170   		reliability = 2.0;
   171    171   		cost = 0.5;
   172         -		fabclasses = {
          172  +		fabclass = {
   173    173   			basis = fab {
   174         -				crystal = {aluminum = 5}; -- ruby
          174  +				element = {cobalt=2};
   175    175   			};
   176    176   		};
   177    177   	};
   178    178   
   179    179   	eluthrai = { --super-tier
   180    180   		name = 'Eluthrai', adj = 'Eluthran';
   181    181   		super = 'starlit';
   182    182   		techs = {tool = true, electric = true, electronic = true, weapon = true, gravitic = true, gravweapon = true, suit = true, combatSuit = true, hover = 'grav'};
   183    183   		power = 4.0;
   184    184   		efficiency = 4.0;
   185    185   		reliability = 4.0;
   186    186   		cost = 4.0;
   187         -		fabclasses = {
          187  +		fabclass = {
   188    188   			basis = fab {
   189         -				crystal = {carbon = 5}; -- diamond
          189  +				element = {scandium = 1};
          190  +			};
          191  +			weapon = {
          192  +				metal = {cinderstone = 1};
   190    193   			};
   191    194   			special	= fab {
   192         -				metal = {technetium=1, cinderstone=1}
          195  +				element = {technetium=1};
   193    196   			};
   194    197   		};
   195    198   	};
   196    199   
   197    200   	-----------------------
   198    201   	-- Forevanished Ones --
   199    202   	-----------------------
................................................................................
   202    205   		name = 'Firstborn', adj = 'Firstborn';
   203    206   		super = 'forevanished';
   204    207   		techs = {tool = true, electric = true, electronic = true, suit = true, psi = true, combatSuit = true, weapon = true, gravitic = true, gravweapon = true};
   205    208   		power = 10.0;
   206    209   		efficiency = 5.0;
   207    210   		reliability = 3.0;
   208    211   		cost = 10.0;
   209         -		fabclasses = {
          212  +		fabclass = {
   210    213   			basis = fab {
   211         -				metal = {technetium=2, neodymium=3, sunsteel=1};
   212         -				crystal = {astrite=1};
          214  +				element = {technetium=2, neodymium=3};
          215  +-- 				metal = {sunsteel=1};
          216  +-- 				crystal = {astrite=1};
   213    217   			};
   214    218   		};
   215    219   	};
   216    220   
   217    221   	forevanisher = { --godslayer-tier
   218    222   		name = 'Forevanisher', adj = 'Forevanisher';
   219    223   		super = 'forevanished';
   220    224   		techs = {tool = true, electric = true, electronic = true, suit = true, psi = true, combatSuit = true, weapon = true, gravitic = true, gravweapon = true};
   221    225   		power = 20.0;
   222    226   		efficiency = 1.0;
   223    227   		reliability = 2.0;
   224    228   		cost = 100.0;
   225         -		fabclasses = {
          229  +		fabclass = {
   226    230   			basis = fab {
   227    231   				metal = {};
   228         -				crystal = {};
   229    232   			};
   230    233   		};
   231    234   	};
   232    235   
   233    236   }