CanWeaponApplyUpgrade

Tracking Issue: #260

This function will be used to cycle through DLCInfos that will allow mods to check generally whether or not a weapon is compatible with an upgrade. X2WeaponUpgradeTemplate::CanApplyUpgradeToWeapon still exists as the "can this upgrade be applied to this weapon RIGHT NOW?"

  • The best use case for this is to bar your weapon from applying upgrades that don't meet your criteria, without having to edit those upgrades directly.
  • Note that this check is /in addition to/, and not /in lieu of/, CanApplyUpgradeToWeapon. This means you cannot use it to override that function's return value.

Source code references