Add additional notification support to infiltration.
This commit is contained in:
committed by
atlimit8
parent
2c7a56625c
commit
73a2b59c2c
@@ -23,6 +23,14 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
|
||||
public readonly BitSet<TargetableType> Types = default(BitSet<TargetableType>);
|
||||
|
||||
[NotificationReference("Speech")]
|
||||
[Desc("Sound the victim will hear when technology gets stolen.")]
|
||||
public readonly string InfiltratedNotification = null;
|
||||
|
||||
[NotificationReference("Speech")]
|
||||
[Desc("Sound the perpetrator will hear after successful infiltration.")]
|
||||
public readonly string InfiltrationNotification = null;
|
||||
|
||||
public object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
||||
}
|
||||
|
||||
@@ -40,6 +48,12 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
if (!info.Types.Overlaps(types))
|
||||
return;
|
||||
|
||||
if (info.InfiltratedNotification != null)
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, self.Owner, "Speech", info.InfiltratedNotification, self.Owner.Faction.InternalName);
|
||||
|
||||
if (info.InfiltrationNotification != null)
|
||||
Game.Sound.PlayNotification(self.World.Map.Rules, infiltrator.Owner, "Speech", info.InfiltrationNotification, infiltrator.Owner.Faction.InternalName);
|
||||
|
||||
infiltrator.World.AddFrameEndTask(w => w.CreateActor(info.Proxy, new TypeDictionary
|
||||
{
|
||||
new OwnerInit(infiltrator.Owner)
|
||||
|
||||
Reference in New Issue
Block a user