starlit  Diff

Differences From Artifact [50792bb85d]:

To Artifact [edafa25ca2]:


   302    302   -- makeshift: cheap, weak, low quality
   303    303   -- imperial ("da red wunz go fasta"): powerful, low quality
   304    304   -- commune ("snooty sophisticates"): limited power, high quality, expensive
   305    305   -- usukwinya ("value engineering"): high power, mid quality, affordable
   306    306   -- eluthrai ("uncompromising"): high power, high quality, wildly expensive
   307    307   -- firstborn ("god-tier"): exceptional
   308    308   
          309  +		print(dump(starlit.world.tier.fabsum('commune', 'battery')))
   309    310   local batteryTiers = {
   310    311   	makeshift = {
   311    312   		name = 'Makeshift'; capacity = .5, decay = 3, leak = 2, dischargeRate = 1,
   312         -		fab = starlit.type.fab {
   313         -			element = {copper=10};
   314         -			cost = {power = 0.3};
   315         -			time = {print = .25};
   316         -		};
          313  +-- 		fab = starlit.type.fab {
          314  +-- 			element = {copper=10};
          315  +-- 			cost = {power = 0.3};
          316  +-- 			time = {print = .25};
          317  +-- 		};
          318  +		fab = starlit.world.tier.fabsum('makeshift', 'battery');
   317    319   		desc = "Every attosecond this electrical abomination doesn't explode in your face is but the unearned grace of the Wild Gods.";
   318    320   		complexity = 1;
   319    321   		sw = {rarity = 1};
   320    322   	};
   321    323   	imperial  = {
   322    324   		name = 'Imperial'; capacity = 2, decay = 2, leak = 2, dischargeRate = 2; 
   323         -		fab = starlit.type.fab {
   324         -			element = {copper=15, iron = 20};
   325         -			size = { print = 0.1 };
   326         -			cost = {power = 2};
   327         -			time = {print = .5};
   328         -		};
          325  +-- 		fab = starlit.type.fab {
          326  +-- 			element = {iron = 20};
          327  +-- 			size = { print = 0.1 };
          328  +-- 			cost = {power = 2};
          329  +-- 			time = {print = .5};
          330  +-- 		};
          331  +		fab = starlit.world.tier.fabsum('imperial', 'battery');
   329    332   		desc = "The Empire's native technology is a lumbering titan: bulky, inefficient, unreliable, ugly, and awesomely powerful. Their batteries are no exception, with raw capacity and throughput that exceed even Usukinwya designs.";
   330    333   		drm = 1;
   331    334   		complexity = 2;
   332    335   		sw = {rarity = 2};
   333    336   	};
   334    337   	commune   = {
   335    338   		name = 'Commune'; capacity = 1, decay = .5, leak = .2, dischargeRate = 1; 
   336         -		fab = starlit.type.fab {
   337         -			element = {vanadium = 50};
   338         -			metal = {steel=10};
   339         -			size = { print = 0.05 };
   340         -			cost = {power = 1};
   341         -		};
          339  +		fab = starlit.world.tier.fabsum('commune', 'battery');
          340  +-- 		fab = starlit.type.fab {
          341  +-- 			element = {vanadium=10};
          342  +-- 			metal = {aluminum=10};
          343  +-- 			size = { print = 0.05 };
          344  +-- 			cost = {power = 1};
          345  +-- 		};
   342    346   		desc = "The Commune's proprietary battery designs prioritize reliability, compactness, and maintenance concerns above raw throughput, with an elegance of engineering and design that would make a Su'ikuri cry.";
   343    347   		complexity = 5;
   344    348   		sw = {rarity = 3};
   345    349   	};
   346    350   	usukwinya = {
   347    351   		name = 'Usukwinya'; capacity = 2, decay = 1, leak = 1, dischargeRate = 1.5,
   348         -		fab = starlit.type.fab {
   349         -			element = {argon=10};
   350         -			metal = {vanadium=30};
   351         -			size = { print = 0.07 };
   352         -			cost = {power = .8};
   353         -		};
          352  +		fab = starlit.world.tier.fabsum('usukwinya', 'battery');
          353  +-- 		fab = starlit.type.fab {
          354  +-- 			element = {argon=10, vanadium=10};
          355  +-- 			size = { print = 0.07 };
          356  +-- 			cost = {power = .8};
          357  +-- 		};
   354    358   		desc = "A race of consummate value engineers, the Usukwinya have spent thousands of years refining their tech to be as cheap to build as possible, without compromising much on quality. The Tradebirds drive an infamously hard bargain, but their batteries are more than worth their meagre cost.";
   355    359   		drm = 2;
   356    360   		sw = {rarity = 10};
   357    361   		complexity = 15;
   358    362   	};
   359    363   	eluthrai  = {
   360    364   		name = 'Eluthrai'; capacity = 3, decay = .4, leak = .1, dischargeRate = 1.5,
   361         -		fab = starlit.type.fab {
   362         -			element = {beryllium=20, platinum=20, technetium = 1};
   363         -			metal = {cinderstone = 10};
   364         -			size = { print = 0.03 };
   365         -			cost = {power = 10};
   366         -			time = {print = 2};
   367         -		};
          365  +		fab = starlit.world.tier.fabsum('eluthrai', 'battery');
          366  +-- 		fab = starlit.type.fab {
          367  +-- 			element = {beryllium=20, platinum=20, technetium = 1};
          368  +-- 			metal = {cinderstone = 10};
          369  +-- 			size = { print = 0.03 };
          370  +-- 			cost = {power = 10};
          371  +-- 			time = {print = 2};
          372  +-- 		};
   368    373   		desc = "The uncompromising Eluthrai are never satisfied until every quantifiable characteristic of their tech is maximally optimised down to the picoscale. Their batteries are some of the best in the Reach, and unquestionably the most expensive -- especially for those lesser races trying to copy the designs without the benefit of the sublime autofabricator ecosystem of the Eluthrai themselves.";
   369    374   		complexity = 200;
   370    375   		sw = {rarity = 0}; -- you think you're gonna buy eluthran schematics on SuperDiscountNanoWare.space??
   371    376   	};
   372    377   	firstborn = {
   373    378   		name = 'Firstborn'; capacity = 5, decay = 0.1, leak = 0, dischargeRate = 3;
   374         -		fab = starlit.type.fab {
   375         -			element = {neodymium=20, xenon=150, technetium=5};
   376         -			metal = {sunsteel = 10};
   377         -			crystal = {astrite = 1};
   378         -			size = { print = 0.05 };
   379         -			cost = {power = 50};
   380         -			time = {print = 4};
   381         -		};
          379  +		fab = starlit.world.tier.fabsum('firstborn', 'battery');
          380  +-- 		fab = starlit.type.fab {
          381  +-- 			element = {neodymium=20, xenon=150, technetium=5};
          382  +-- 			metal = {sunsteel = 10};
          383  +-- 			crystal = {astrite = 1};
          384  +-- 			size = { print = 0.05 };
          385  +-- 			cost = {power = 50};
          386  +-- 			time = {print = 4};
          387  +-- 		};
   382    388   		desc = "Firstborn engineering seamlessly merges psionic effects with a mastery of the physical universe unattained by even the greatest of the living Starsouls. Their batteries reach levels of performance that strongly imply Quantum Gravity Theory -- and several major holy books -- need to be rewritten. From the ground up.";
   383    389   		complexity = 1000;
   384    390   		sw = {rarity = 0}; -- lol no
   385    391   	};
   386    392   }
   387    393   
   388    394   local batterySizes = {
................................................................................
   395    401   	huge  = {name = 'Huge',  capacity =  3, dischargeRate =   2, complexity = 1, matMult = 2,
   396    402   		fab = starlit.type.fab {size={print=0.8},cost={power=8},time={print=120}}};
   397    403   }
   398    404   
   399    405   local batteryTypes = {
   400    406   	supercapacitor = {
   401    407   		name = 'Supercapacitor';
   402         -		desc = 'Room-temperature superconductors make for very reliable, high-dischargeRate, but low-capacity batteries.';
          408  +		desc = 'Room-temperature superconductors make for very reliable, high-discharge rate, but low-capacity batteries.';
   403    409   		fab = starlit.type.fab {
   404    410   			metal = { enodium = 5 };
   405    411   			size = {print=0.8};
   406    412   			cost = {power = 1e3};
   407    413   		};
   408    414   		sw = {
   409    415   			cost = {
................................................................................
   499    505   for bTierName, bTier in pairs(batteryTiers) do
   500    506   for bSizeName, bSize in pairs(batterySizes) do
   501    507   	-- elemath(elementCost, bType.fab.element or {}, bSize.matMult)
   502    508   	-- elemath(elementCost, bTier.fab.element or {}, bSize.matMult)
   503    509   	-- elemath(metalCost, bType.fab.metal or {}, bSize.matMult)
   504    510   	-- elemath(metalCost, bTier.fab.metal or {}, bSize.matMult)
   505    511   	local fab = bType.fab + bTier.fab + bSize.fab + starlit.type.fab {
   506         -		element = {copper = 10, silicon = 5};
          512  +		element = {copper = 10};
   507    513   	}
   508    514   	local baseID = string.format('battery_%s_%s_%s',
   509    515   		bTypeName, bTierName, bSizeName)
   510    516   	local id = 'starlit_electronics:'..baseID
   511    517   	local name = string.format('%s %s Battery', bTier.name, bType.name)
   512    518   	if bSize.name then name = bSize.name .. ' ' .. name end
   513    519   	local function batStat(s)