Add ShowTicks to InfiltrateForCash
This commit is contained in:
committed by
reaperrr
parent
c762453607
commit
bb600620a9
@@ -32,6 +32,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
[Desc("Sound the victim will hear when they get robbed.")]
|
[Desc("Sound the victim will hear when they get robbed.")]
|
||||||
public readonly string Notification = null;
|
public readonly string Notification = null;
|
||||||
|
|
||||||
|
[Desc("Whether to show the cash tick indicators rising from the actor.")]
|
||||||
|
public readonly bool ShowTicks = true;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
|
public object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +59,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
if (info.Notification != null)
|
if (info.Notification != null)
|
||||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.Notification, self.Owner.Faction.InternalName);
|
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.Notification, self.Owner.Faction.InternalName);
|
||||||
|
|
||||||
|
if (info.ShowTicks)
|
||||||
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, infiltrator.Owner.Color.RGB, FloatingText.FormatCashTick(toGive), 30)));
|
self.World.AddFrameEndTask(w => w.Add(new FloatingText(self.CenterPosition, infiltrator.Owner.Color.RGB, FloatingText.FormatCashTick(toGive), 30)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user