Due to ticket T152125 being closed, I am opening this new ticket to keep track of when the logic in clothing class will be fixed.
[Mostly a copy of message i posted under T152125 ]
I'll bring more light to this issue as the reason for ticket T152125 wasn't made clear enough and it hasn't been emphasised why we need this to be done ASAP. DayZ Team made a change to CanPutInCargo, CanReceiveItemIntoCargo and CanLoadItemIntoCargo for Clothing_Base class due to a bug i reported: T151500 to avoid allowing players to take items from ground into inventory of clothes that are in cargo of player.
Most of us thought it would just make it easier for us to give us access to have our own rules for clothing but your team can fix it for us instead. 1.09 has brought even more issues with this logic put in place in Clothing class.
Behaviour description as patches changed the logic inside these "events":
1.07 Behaviour:
2 examples->
A.) A storage item (locker) has slot for body (jacket). Player can attach Jacket to the locker and they can add more items inside jacket to store them over time.
B.) )A backpack with an attachment of another container. Player is able to attach this container to the bag and add items to it to carry around.
1.08 Behaviour:
A.) The locker is able to receive the jacket(with or without items inside) in the slot. But the player is not able to add items inside the jacket while it's being attached to the locker.
B.) The bag is able to receive the container(with or without items inside) in slot. But the player is not able to add more items inside the container while it's attached to backpack
For most instances of attachments of type B, players also lost items inside those containers attached to other clothes.
1.09 Behaviour:
Both A and B have same behaviour as before with the exception now it WILL ALWAYS delete or spit out the items from the jacket or container attached to backpack.
With the help from MDC I've been able to override the class Clothing and make a mod fix. These conditions satisfy ALL bugs encountered, including the one I reported during 1.08 experimental. During my tests, there was no loss of items inside cargo. I might have missed something as I'm not perfect either but hopefully we can work together in fixing this. This is causing immense grief to a lot of players and modders.
With the current conditions in Clothing, players lose all items inside clothes stored on attachment of a container, which is why this is so urgent to be fixed by BI. While we can run a mod to help us with it it shouldn't be the way to go. And to be honest I don't understand why your team went to such lengths to check if the parent is man and if that and that. Seems absolutely pointless.
This is the solution that has been used now by several big community servers, with the mod having over 25k subscribers on workshop (plus more as they can repack the pbo).
override bool CanPutInCargo( EntityAI parent ) { bool is_hidden_stash_exception = false; if ( parent.IsInherited( UndergroundStash ) ) return super.CanPutInCargo( parent ); if ( GetNumberOfItems() != 0) return false; return super.CanPutInCargo( parent ); } override bool CanReceiveItemIntoCargo( EntityAI item ) { if (GetInventory().IsInCargo()) return false; return super.CanReceiveItemIntoCargo(item); } override bool CanLoadItemIntoCargo(EntityAI item) { if (GetInventory().IsInCargo()) return false; return super.CanLoadItemIntoCargo(item); }