Template talk:Tag/Keeps Warm

From RimWorld Wiki
Jump to navigation Jump to search

I updated this using a quick little python script to generate the table for this tag. Attached below:

# use template instead of .format() to avoid weirdness with {}
from string import Template
o = Template('''\
|-
    ! $header
    ! style='text-align: right; font-size: 0.8em' | [[$mat]]
    | +{{#expr:{{Q|$mat|Insulation - Heat Factor}}*{{{1|0}}}}}°C\
''')

fabrics = [
    "Alpaca wool",
    "Camelhair",
    "Cloth",
    "Devilstrand",
    "Hyperweave",
    "Megasloth wool",
    "Muffalo wool",
    "Synthread"
]
leathers = [
    "Bearskin",
    "Birdskin",
    "Bluefur",
    "Camelhide",
    "Chinchilla fur",
    "Dog leather",
    "Elephant leather",
    "Foxfur",
    "Heavy fur",
    "Human leather",
    "Lightleather",
    "Lizardskin",
    "Panthera fur",
    "Patchleather",
    "Plainleather",
    "Rhinoceros leather",
    "Thrumbofur",
    "Wolfskin"
]

print(o.substitute(header="style='text-align: left' | Fabric", mat=fabrics[0]))
for fabric in fabrics[1:]:
    print(o.substitute(header="", mat = fabric))

print(o.substitute(header="style='text-align: left' | Leather", mat=leathers[0]))
for leather in leathers[1:]:
    print(o.substitute(header="", mat = leather))