don't show cashticks when there is no refund

This commit is contained in:
Chris Forbes
2011-05-16 20:22:16 +12:00
committed by Paul Chote
parent b0fd954b80
commit 668dfa1f6f

View File

@@ -33,8 +33,11 @@ namespace OpenRA.Mods.RA.Activities
foreach (var ns in self.TraitsImplementing<INotifySold>())
ns.Sold(self);
if (self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally)
self.World.AddFrameEndTask(w => w.Add(new CashTick(refund, 30, 2, self.CenterLocation, self.Owner.ColorRamp.GetColor(0))));
if (refund > 0 && self.World.LocalPlayer != null && self.Owner.Stances[self.World.LocalPlayer] == Stance.Ally)
self.World.AddFrameEndTask(
w => w.Add(new CashTick(refund, 30, 2,
self.CenterLocation,
self.Owner.ColorRamp.GetColor(0))));
self.Destroy();
return this;