It's a bit tedious using IsKindOf and IsInherited when scripting cargo exceptions for clothing, as it doesn't really scale well. I'm attaching a simple proposal to make this a lot easier for modders. Please advise these changes. I only included changes I made, and left Clothing#SmershException for backwards compatibility, as some mods use and overwrite this.
Description
Description
Details
Details
- Severity
- Tweak
- Resolution
- Open
- Reproducibility
- N/A
- Operating System
- Windows 10 x64
- Category
- Modding
Additional Information
class Clothing { bool CanReceiveItemIntoCargoClothingConditions(EntityAI item) { EntityAI hierarchyParent = GetHierarchyParent(); return !hierarchyParent || hierarchyParent.IsMan() || SmershException(hierarchyParent) || parent.HasClothingCargoException(); } bool CanLoadItemIntoCargoClothingConditions(EntityAI item) { EntityAI parent = GetHierarchyParent(); return !parent || parent.IsMan() || SmershException(parent) || parent.HasClothingCargoException(); } } class EntityAI { bool HasClothingCargoException() { return false; } } class SmershVest { override bool HasClothingCargoException() { return true; } } class UndergroundStash { override bool HasClothingCargoException() { return true; } }
Event Timeline
Comment Actions
Hello OfficialWardog.
Thank you for your feedback, this indeed could be a solution, however, we believe it is not a proper solution to the problem. We are aware of this and it needs more work on our side.
Regards,
Geez