hacked in selling to F3
This commit is contained in:
@@ -18,7 +18,11 @@ namespace OpenRa.Game.Traits.Activities
|
||||
|
||||
self.Owner.GiveCash((int)refund);
|
||||
self.Health = 0;
|
||||
foreach (var ns in self.traits.WithInterface<INotifySold>())
|
||||
ns.Sold(self);
|
||||
Game.world.Remove(self);
|
||||
|
||||
// todo: give dudes
|
||||
}
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
|
||||
@@ -5,7 +5,7 @@ using OpenRa.Game.Effects;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class RenderBuilding : RenderSimple, INotifyDamage
|
||||
class RenderBuilding : RenderSimple, INotifyDamage, INotifySold
|
||||
{
|
||||
const int SmallBibStart = 1;
|
||||
const int LargeBibStart = 5;
|
||||
@@ -88,5 +88,7 @@ namespace OpenRa.Game.Traits
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Sold(Actor self) { DoBib(self, true); }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
interface ITick { void Tick(Actor self); }
|
||||
interface IRender { IEnumerable<Renderable> Render(Actor self); }
|
||||
interface INotifySold { void Sold(Actor self); }
|
||||
interface INotifyDamage { void Damaged(Actor self, AttackInfo e); }
|
||||
interface INotifyBuildComplete { void BuildingComplete (Actor self); }
|
||||
interface INotifyProduction { void UnitProduced(Actor self, Actor other); }
|
||||
|
||||
Reference in New Issue
Block a user