modded classes based on classes which define protected static methods (and reference them through the original class name) will cause the static method calls in the original class to fail to be resolved (Method 'whatever' is protected).
Description
Description
Details
Details
- Severity
- Minor
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Steps To Reproduce
If modding class SCR_WeaponInfo from Scripts/Game/UI/HUD/WeaponInfo/SCR_WeaponInfo.c the line
modded class SCR_WeaponInfo : SCR_InfoDisplayExtended {}
will cause the error Method 'GetInventoryManager' is protected for SCR_WeaponInfo.c.
Additional Information
I've managed to work around this by manually "forwarding" the static method via
override static InventoryStorageManagerComponent GetInventoryManager() { return SCR_WeaponInfo.GetInventoryManager(); }
in my modded class, although this solution does not scale well, and can't guess why it works when the original code didn't.