Module:ElementTooltip/doc

From Oxygen Not Included Wiki
Jump to navigation Jump to search

This is the documentation page for Module:ElementTooltip

This Module is called by Template:ElementTooltip, given the displayname of an element, it finds the corresponding element from one of the following the gamefiles:

and localization files

After the element is found, all relevant information about it is gathered, including basic information about related elements it can turn into upon phase transition (e.g. a solid melting into a liquid). The data is then sorted into data-attributes of a <span>, which are later read and formatted by the Javascript Tooltip.js.