Template:Cell performance for charge: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(fix gyrocopter backpack and similar liquid-fueled objects showing up here unintentionally)
 
Line 1: Line 1:
<includeonly>{{#vardefine:charge_consumed|{{{1}}}}}{{Tooltip
<includeonly>{{#vardefine:charge_consumed|{{{1}}}}}{{Tooltip
|{{#cargo_query:
|{{#cargo_query:
   |tables=ArtifactData=AD,PhysicalProperties=PP
   |tables=ArtifactData=AD,PhysicalProperties=PP,GeneralData=GD
   |join on=AD.JoinKey=PP.JoinKey
   |join on=AD.JoinKey=PP.JoinKey,AD.JoinKey=GD.JoinKey
   |fields=AD._pageName,CONCAT(CASE WHEN AD.MaxCharge IS NOT NULL THEN AD.MaxCharge ELSE AD.ChargePerDram * PP.Volume END)=MaxCharge,FLOOR((CASE WHEN AD.MaxCharge IS NOT NULL THEN AD.MaxCharge ELSE AD.ChargePerDram * PP.Volume END) / {{#var:charge_consumed}})=Uses
   |fields=AD._pageName,CONCAT(CASE WHEN AD.MaxCharge IS NOT NULL THEN AD.MaxCharge ELSE AD.ChargePerDram * PP.Volume END)=MaxCharge,FLOOR((CASE WHEN AD.MaxCharge IS NOT NULL THEN AD.MaxCharge ELSE AD.ChargePerDram * PP.Volume END) / {{#var:charge_consumed}})=Uses
   |where=AD.MaxCharge IS NOT NULL OR (AD.ChargePerDram IS NOT NULL AND PP.Volume IS NOT NULL)
   |where=AD.MaxCharge IS NOT NULL OR (AD.ChargePerDram IS NOT NULL AND PP.Volume IS NOT NULL AND GD.Categories = 'Liquid Fueled Energy Cells')
   |order by=Uses ASC
   |order by=Uses ASC
   |format=template
   |format=template

Latest revision as of 19:39, 17 November 2021


Specify an item's charge use as the first parameter.

Shows how many uses can be obtained from each type of energy cell as a hoverable tooltip.

Example

{{cell performance for charge | 7500 }}

7500 Combustion cell: not functionalLead-acid cell: not functionalSolar cell: not functionalFidget cell: not functionalChem cell: 1 useThermoelectric cell: 5 usesBiodynamic cell: 8 usesNuclear cell: 13 usesAntimatter cell: 26 usesMecha power core: 66 uses