unit-lost sounds through voice

This commit is contained in:
Chris Forbes
2010-07-20 17:39:35 +12:00
parent cb44844639
commit 2684284c27
4 changed files with 35 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ namespace OpenRA.GameRules
public readonly string[] Move = { };
public readonly string[] Attack = null;
public readonly string[] Die = { };
public readonly string[] Lost = { };
public readonly Lazy<Dictionary<string, VoicePool>> Pools;
@@ -35,6 +36,7 @@ namespace OpenRA.GameRules
{ "Move", new VoicePool(Move) },
{ "Attack", new VoicePool( Attack ?? Move ) },
{ "Die", new VoicePool(Die) },
{ "Lost", new VoicePool(Lost) },
});
}
}

View File

@@ -16,7 +16,7 @@ namespace OpenRA.Traits
public readonly int ROT = 255;
public readonly int Speed = 1;
public object Create( ActorInitializer init ) { return new Unit( init.self ); }
public object Create( ActorInitializer init ) { return new Unit(); }
}
public class Unit : INotifyDamage
@@ -26,14 +26,11 @@ namespace OpenRA.Traits
[Sync]
public int Altitude;
public Unit(Actor self) { }
public void Damaged(Actor self, AttackInfo e)
{
var eva = self.World.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
if (e.DamageState == DamageState.Dead)
Sound.PlayToPlayer(self.Owner,
self.Info.Traits.Get<OwnedActorInfo>().WaterBound ? eva.NavalUnitLost : eva.UnitLost);
Sound.PlayVoice("Lost", self);
}
}
}

View File

@@ -389,6 +389,8 @@ SS:
Chronoshiftable:
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
MSUB:
Inherits: ^Ship
@@ -419,6 +421,8 @@ MSUB:
Chronoshiftable:
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
DD:
Inherits: ^Ship
@@ -448,6 +452,8 @@ DD:
Chronoshiftable:
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
CA:
Inherits: ^Ship
@@ -481,6 +487,8 @@ CA:
Chronoshiftable:
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
LST:
Inherits: ^Ship
@@ -503,6 +511,8 @@ LST:
Passengers: 5
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
PT:
Inherits: ^Ship
@@ -532,6 +542,8 @@ PT:
Chronoshiftable:
IronCurtainable:
RepairableNear:
Selectable:
Voice: ShipVoice
MIG:
Inherits: ^Plane

View File

@@ -6,57 +6,75 @@ GenericVoice:
Select: await1,ready,report1,yessir1
Move: ackno,affirm1,noprob,overout,ritaway,roger,ugotit
Die: dedman1.aud,dedman2.aud,dedman3.aud,dedman4.aud,dedman5.aud,dedman6.aud,dedman7.aud,dedman8.aud,dedman10.aud
Lost: unitlst1.aud
VehicleVoice:
SovietVariants: .r00,.r02
AlliedVariants: .v00,.v02
Select: vehic1,yessir1,report1,await1
Move: ackno,affirm1
Lost: unitlst1.aud
ShipVoice:
SovietVariants: .r00,.r02
AlliedVariants: .v00,.v02
Select: vehic1,yessir1,report1,await1
Move: ackno,affirm1
Lost: navylst1.aud
EngineerVoice:
Select: eengin1,eyessir1
Move: eaffirm1,emovout1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
MedicVoice:
Select: mrespon1,myessir1
Move: maffirm1,mmovout1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
TanyaVoice:
Select: yo1,yes1,yeah1
Move: rokroll1,onit1,cmon1
Attack: tuffguy1,bombit1,gotit1
Die: tandeth1
Lost: unitlst1.aud
DogVoice:
Select:
Move: dogy1
Attack: dogg5p,dogw3px
Die: dogw5,dogw6,dogw7
Lost: unitlst1.aud
SpyVoice:
Select: syessir1,scomnd1
Move: sonway1,sindeed1
Attack: sking1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
ThiefVoice:
Select: swhat1,syeah1
Move: saffirm1,smout1,sokay1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
CivilianMaleVoice:
Select: guyyeah1
Move: guyokay1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
CivilianFemaleVoice:
Select: girlyeah
Move: girlokay
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud
EinsteinVoice:
Select: einah1,einok1,einyes1
Move: einah1,einok1,einyes1
Die: dedman1,dedman2,dedman3,dedman4,dedman5,dedman6,dedman7,dedman8,dedman10
Lost: unitlst1.aud