Module:DamageType/doc

This module formats the name of a damage type and prepends an icon. Its primary use is in Template:DamageType.

Loading the module
To load this module and make its method available for use, Add this line of code to the start of your module:

The methods documented below will be available for use under the variable name you loaded this module in.

Alternatively, you can use this module using the code below by using Module:LoadLib.

Depending on the settings you used in, the methods of this module may be available under their respective variables in the module this module was loaded in.

Methods
The methods documented below will be available for use under the variable name you loaded this module in.

This method calls ._getDamageType, directly unpacking the frame.

This method calls ._getDamageType, with the isShort value set to true and otherwise directly unpacking the frame.

This method returns a formatted damage type, based on the string provided in. If the damage type does not exist in Module:DamageType/Data, the function will return an error. is then used to define the text that appears before 'Damage' or 'Dmg'. determines whether the word damage is displayed as 'Damage' or 'Dmg'.