Thread:Killroy1080/@comment-34929636-20191108223848

First thing, there are two separate parts here:
 * Template:Weapon Upgrades
 * Module:Weapon Upgrades

The call on the actual page links to the template, then injects the result into the page flow. This is normal for every template call.

The template checks a few things before passing the call to the module. The switch statement is for adding the "Legacy Weapon" link for the old upgrade values (Legacies are weapons and robots purchased before update 4.0). This label is also turned off for the MK-2 table, so that is the other check.

Note the 🇨🇴 line. This transfers loading to the module. Everything from this point on is best explained as code documentation. 