add CashTick to building refunds

This commit is contained in:
Chris Forbes
2011-03-19 18:57:59 +13:00
parent 0236da0a28
commit 708cdcd855
3 changed files with 16 additions and 15 deletions

View File

@@ -9,7 +9,8 @@
#endregion
using System.Collections.Generic;
using OpenRA.Traits;
using OpenRA.Traits;
using OpenRA.Mods.RA.Effects;
namespace OpenRA.Mods.RA.Buildings
{
@@ -34,7 +35,10 @@ namespace OpenRA.Mods.RA.Buildings
pr.GiveCash(refund);
foreach (var ns in self.TraitsImplementing<INotifySold>())
ns.Sold(self);
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))));
self.Destroy();
}

View File

@@ -10,8 +10,7 @@
using System.Collections.Generic;
using System.Drawing;
using OpenRA.Effects;
using OpenRA.GameRules;
using OpenRA.Effects;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects

View File

@@ -6,18 +6,16 @@
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Buildings;
#endregion
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Effects;
using OpenRA.Mods.RA.Move;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits;
using OpenRA.Mods.RA.Render;
using OpenRA.Mods.RA.Move;
using System.Drawing;
using OpenRA.Mods.RA.Effects;
namespace OpenRA.Mods.RA
{