public virtual void GiveSoldThingToTrader(Thing toGive, int countToGive, Pawn playerNegotiator) { Thing thing = toGive.SplitOff(countToGive); thing.PreTraded(TradeAction.PlayerSells, playerNegotiator, this); Thing thing2 = TradeUtility.ThingFromStockToMergeWith(this, thing); if (thing2 != null && !thing2.TryAbsorbStack(thing, respectStackLimit: false)) { thing.Destroy(); } }
public void GiveSoldThingToTrader(Thing toGive, int countToGive, Pawn playerNegotiator) { Thing thing = toGive.SplitOff(countToGive); thing.PreTraded(TradeAction.PlayerSells, playerNegotiator, this); Thing thing2 = TradeUtility.ThingFromStockToMergeWith(this, thing); if (thing2 != null) { if (!thing2.TryAbsorbStack(thing, false)) { thing.Destroy(DestroyMode.Vanish); } } else { this.things.TryAdd(thing, false); } }