Template:Buildings

From Oxygen Not Included Wiki
Jump to navigation Jump to search


Template-info.svg Documentation Edit this documentation at Template:Buildings/doc.

The Buildings Footer uses Javascript from Common.js.


Template:Buildings

This Template is used as a Footer for any Buildings and is called without any Parameters.

Template:NavboxSection

NavboxSection is a cargo query from the Buildings cargo table, as defined by Template:Infobox Building. It gets its strings from what was clicked.

var toParse = '{{NavboxSection|category=' + curCategory + dlcStr + '}}';
  • curCategory - the current Category is, for example "Refinement"
  • dlcStr - the DLC-string, for now, since there is only Spaced Out! as a DLC is either empty or has "|SO=yes"

So the Template will be parsed for example like {{NavboxSection |category=Refinement|SO=yes}}, which it will then turn into a cargo query.

Template:NavboxDlcItem

NavboxDlcItem is currently exclusively for Spaced Out! which is called as {{NavboxDlcItem |SO}}. It'll display the DLC image as depending on it's parameter (here: SO)
More importantly, the parameter will be used by the javascript for NavboxSection to hand out the DLC-String. in this case "|SO=yes".

Template:NavboxCategoryItem

Will display a File according to it's parameter [[File:{{parameter}}_Menu.png]] with the parameter underneath. This parameter will also be used in the javascript to hand out the category for NavboxSection to hand out the category to find it's matches the category handed out in Template:Infobox Building.

If future DLCs adds more categories, like Spaced Out! did Radiation, the styling of lower and upper tabber needs to be changed in the .css (currently they are made to house 8 and 7 items respectively).