I recently found the CanDisplayCargo() function in the EntityAI class. I wanted to make use of it and wanted to put it into my Items Class and let it return false. I noticed, that the function is never actually called by the Inventory Manager Classes. Would be great to have this option. I know that there is the option to hide the whole inventory from vicinity, but I only want to hide the Cargo Part. Attachments should still be available.
Description
Description
Details
Details
- Severity
- Feature
- Resolution
- Open
- Reproducibility
- Always
- Operating System
- Windows 10 x64
- Category
- General
Steps To Reproduce
create a class of modify an excisting one and overwrite the CanDisplayCargo(). The Cargo will still be visible
Related Objects
Related Objects
- Duplicates Merged Here
- T160303: CanDisplayCargo not working as intended
Event Timeline
Comment Actions
Hello LBmaster.
Can you please check the vanilla scripts? As we are using this for barrels, stashes or vehicles.
Regards,
Geez
Comment Actions
Clothing attached to 'CoatRack' still show the cargo when attached.
modded class Clothing { override bool CanDisplayCargo() { if (!super.CanDisplayCargo()) return false; if (GetHierarchyParent().IsKindOf("CoatRack")) return false; return true; } }
Comment Actions
Alternative solution, which is incorrect and a workaround, is to lock inventory from script on child items, which is unnecessary.
Comment Actions
This is correct it's being used for those entities, but it's not being handled in the inventory UI, unless this is somehow handled via the engine in some weird way. I've been unable to get this method to work as intended.
Comment Actions
modded class Clothing { override bool CanDisplayCargo() { return false; } }
thats the code i tried and nothing changed. The cargo was still shown.
This comment was removed by BIS_fnc_KK.