Template:Cell performance for charge

From Caves of Qud Wiki
Revision as of 17:20, 7 October 2021 by Egocarib (talk | contribs) (Update to use new Cargo table)
Jump to navigation Jump to search


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

Error 1052: Column '_pageName' in field list is ambiguous (localhost)

Function: CargoSQLQuery::run Query: SELECT `_pageName` AS `_pageName`,CONCAT(CASE WHEN `AD`.`MaxCharge` IS NOT NULL THEN `AD`.`MaxCharge` ELSE `AD`.`ChargePerDram` * `PP`.`MaxVolume` END) AS `MaxCharge`,FLOOR((CASE WHEN `AD`.`MaxCharge` IS NOT NULL THEN `AD`.`MaxCharge` ELSE `AD`.`ChargePerDram` * `PP`.`MaxVolume` END) / 7500) AS `Uses` FROM `ArtifactData` `AD` LEFT OUTER JOIN `PhysicalProperties` `PP` ON ((`AD`.`JoinKey`=`PP`.`JoinKey`)) WHERE `AD`.`MaxCharge` IS NOT NULL OR (`AD`.`ChargePerDram` IS NOT NULL AND `PP`.`MaxVolume` IS NOT NULL) ORDER BY `Uses` LIMIT 100