Burden ReceiverTintBurden(Burden burden, CharacterBurdenManager sender, CharacterBurdenManager receiver) { //tint based on receiving behaviors of the receiving inventory BurdenProcess receiverOperation = BurdenTools.GetBurdenProcessReceiver(receiverType); if (sender != null) { burden = receiverOperation(burden, sender.burdenInventory, receiver.burdenInventory); } else { burden = receiverOperation(burden, null, receiver.burdenInventory); } return(burden); }
public bool DispatchBurden(Burden burden, BurdenInventory sender, BurdenInventory receiver) { //tint by sender BurdenProcess senderOperation = BurdenTools.GetBurdenProcessSender(senderType); Burden modifiedBurden = senderOperation(burden, this, receiver); //tint by parentburden's pre-send action while still in sender inventory modifiedBurden.BurdenSendAction(burden, sender, receiver); d_heldBurdens[modifiedBurden.category].Remove(modifiedBurden); modifiedBurden.OwnerChangeNotice(burden, sender, false); BurdensCollectionChanged(); burden.BurdenPostSend(burden, this); return(true); }