Difference between revisions of "Template:Building Stats Table Row"

From RimWorld Wiki
Jump to navigation Jump to search
m (structure)
(fixed beauty calculation for non-normal quality. Added explanations for beauty calculation)
Line 68: Line 68:
 
}}<!--
 
}}<!--
  
Beauty, Comfort, Work, HP and Flammability -->
+
Beauty --><!--
<td {{#var:collapseMaterial}}> {{#vardefineecho:tempBeauty|{{#expr: {{#ifexpr: {{#vardefineecho:preBeauty | {{Q|{{{1}}}|Beauty Offset|0}} + {{#ifexpr: {{#var:beauty|}} < 0 | 1 | {{Q|{{{1}}}|Beauty Factor}} }}*{{#var:beauty|}} {{#ifexpr: {{Q|{{{1}}}|Beauty Factor}}*{{#var:beauty|}} > 0 | - 0.000000001}} }} > 0 | {{#var:preBeauty}} * {{#var:beautyFactor}} | {{#var:preBeauty}} }} round 0}} }} </td><!--
+
-->{{#vardefine:preBeauty | {{#expr: {{#var:beauty}} <!-- base beauty of the building -->
 +
  * {{#ifexpr: {{#var:beauty}} < 0 | 1 | {{Q|{{{1}}}|Beauty Factor}} }} <!-- beauty factor provided by the material. Set to 1 if base beauty of the building is negative -->
 +
  + {{Q|{{{1}}}|Beauty Offset|0}} <!-- beauty offset provided by the material -->
 +
  - {{#ifexpr: {{Q|{{{1}}}|Beauty Factor}} * {{#var:beauty}} > 0 | 0.000000001 | 0}} <!-- apply small offset so 0.5 is rounded down -->
 +
}} }}
 +
<td {{#var:collapseMaterial}}> {{#vardefineecho:tempBeauty|
 +
  {{#expr: {{#ifexpr: {{#var:preBeauty}} > 0 | {{#var:preBeauty}} * {{#var:beautyFactor}} | {{#var:preBeauty}} }} round 0}}
 +
}} </td><!--
  
 
Comfort -->
 
Comfort -->

Revision as of 15:41, 8 November 2023