PAYDAY-2-BeardLib
PAYDAY-2-BeardLib copied to clipboard
Modules module doesnt function (when using XML Module)
Describe the bug Modules module doesnt work at all in the main.xml, copying the custom module to beardlib addons makes it functional.
To Reproduce Steps to reproduce the behavior:
<Modules directory="modules">
<module file="SpecialEquipmentsModule.lua" name="SpecialEquipmentsModule" type_name="SpecialEquipments"/>
</Modules>
SpecialEquipmentsModule = SpecialEquipmentsModule or BeardLib:ModuleClass("SpecialEquipments", ModuleBase)
-- Adds an equipments to tweak_data.equipments.specials
function SpecialEquipmentsModule:init(...)
self.required_params = table.add(clone(self.required_params), {"id"})
return SpecialEquipmentsModule.super.init(self, ...)
end
function SpecialEquipmentsModule:Load()
if not self._config.id then
self:Err("Equipments does not contain a definition for id!")
return
end
TweakDataHelper:ModifyTweak(table.merge({custom = true}, self._config), "equipments", "specials", self._config.id)
end
It's possible your mod needs a high priority
It's possible your mod needs a high priority
Changing priority doesnt seem to fix the issue.
Issue discovered, but not completely resolved. Modules is non-functional in the XML module.
Test project for any future attempts at fixing this issue.
Is this still relevant?