Line 1: |
Line 1: |
| local BaseData = require("Module:BaseData") | | local BaseData = require("Module:BaseData") |
| + | local Formatting = require('Module:Formatting') |
| local Equipment | | local Equipment |
| local EquipmentFrom | | local EquipmentFrom |
− | local EquipmentCompatibility --lazily loaded when equippable() is called | + | local EquipmentCompatibility |
− | local Formatting = require('Module:Formatting')
| |
| | | |
| local EquipmentData = BaseData({ | | local EquipmentData = BaseData({ |
Line 11: |
Line 11: |
| _display_none_css = {display = "none"}, | | _display_none_css = {display = "none"}, |
| _constructor_module = "Module:Equipment", | | _constructor_module = "Module:Equipment", |
− | _from_api_module = "Module:EquipmentFrom",
| |
| }) | | }) |
| | | |
Line 259: |
Line 258: |
| and equipment_type ~= 45 and equipment_type ~= 47 and equipment_type ~= 48 and equipment_type ~= 94) then | | and equipment_type ~= 45 and equipment_type ~= 47 and equipment_type ~= 48 and equipment_type ~= 94) then |
| Equipment = Equipment or require(self._constructor_module) | | Equipment = Equipment or require(self._constructor_module) |
− | EquipmentFrom = EquipmentFrom or require(self._from_api_module) | + | EquipmentFrom = EquipmentFrom or require("Module:Collection/EquipmentByApiId") |
− | return Equipment(EquipmentFrom:api_id_lookup{api_id - 500}):cg() | + | return Equipment(EquipmentFrom[api_id - 500]):cg() |
| end | | end |
| end | | end |