setup the Guarding voice

This commit is contained in:
Matthias Mailänder
2015-01-03 16:47:15 +01:00
parent e353fe5263
commit a95abd7b38
3 changed files with 43 additions and 7 deletions

View File

@@ -19,10 +19,22 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("The player can give this unit the order to follow and protect friendly units with the Guardable trait.")] [Desc("The player can give this unit the order to follow and protect friendly units with the Guardable trait.")]
public class GuardInfo : TraitInfo<Guard> { } public class GuardInfo : ITraitInfo
{
public readonly string Voice = "Move";
public object Create(ActorInitializer init) { return new Guard(this); }
}
public class Guard : IResolveOrder, IOrderVoice public class Guard : IResolveOrder, IOrderVoice
{ {
readonly GuardInfo info;
public Guard(GuardInfo info)
{
this.info = info;
}
public void ResolveOrder(Actor self, Order order) public void ResolveOrder(Actor self, Order order)
{ {
if (order.OrderString == "Guard") if (order.OrderString == "Guard")
@@ -43,7 +55,7 @@ namespace OpenRA.Mods.Common.Traits
public string VoicePhraseForOrder(Actor self, Order order) public string VoicePhraseForOrder(Actor self, Order order)
{ {
return order.OrderString == "Guard" ? "Move" : null; return order.OrderString == "Guard" ? info.Voice : null;
} }
} }

View File

@@ -31,6 +31,7 @@
RepairBuildings: repaira,repairo,repairh RepairBuildings: repaira,repairo,repairh
CombatDebugOverlay: CombatDebugOverlay:
Guard: Guard:
Voice: Guard
Guardable: Guardable:
RenderUnit: RenderUnit:
BodyOrientation: BodyOrientation:
@@ -83,6 +84,7 @@
RepairBuildings: repaira,repairo,repairh RepairBuildings: repaira,repairo,repairh
CombatDebugOverlay: CombatDebugOverlay:
Guard: Guard:
Voice: Guard
Guardable: Guardable:
RenderUnit: RenderUnit:
BodyOrientation: BodyOrientation:
@@ -209,6 +211,7 @@
CloseEnough: 1 CloseEnough: 1
CombatDebugOverlay: CombatDebugOverlay:
Guard: Guard:
Voice: Guard
Guardable: Guardable:
BodyOrientation: BodyOrientation:
UpdatesPlayerStatistics: UpdatesPlayerStatistics:

View File

@@ -6,11 +6,17 @@ GenericVoice:
atreides: .WAV atreides: .WAV
ordos: .WAV ordos: .WAV
harkonnen: .WAV harkonnen: .WAV
Prefixes:
atreides: A
ordos: O
harkonnen: H
Voices: Voices:
Select: G_SSEL1,G_SSEL2,G_SSEL3 Select: G_SSEL1,G_SSEL2,G_SSEL3
Move: G_SCONF1,G_SCONF2,G_SCONF3 Move: G_SCONF1,G_SCONF2,G_SCONF3
Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9 Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9
DisableVariants: Select, Move Guard: I_GUARD
DisablePrefixes: Select, Move, Die
DisableVariants: Select, Move, Guard
VehicleVoice: VehicleVoice:
DefaultVariant: .AUD DefaultVariant: .AUD
@@ -21,6 +27,7 @@ VehicleVoice:
Voices: Voices:
Select: _VSEL1,_VSEL2,_VSEL3 Select: _VSEL1,_VSEL2,_VSEL3
Move: _VCONF1,_VCONF2,_VCONF3 Move: _VCONF1,_VCONF2,_VCONF3
Guard: I_GUARD
InfantryVoice: InfantryVoice:
DefaultVariant: .AUD DefaultVariant: .AUD
@@ -36,8 +43,9 @@ InfantryVoice:
Select: _ISEL1,_ISEL2,_ISEL3 Select: _ISEL1,_ISEL2,_ISEL3
Move: _ICONF1,_ICONF2,_ICONF3 Move: _ICONF1,_ICONF2,_ICONF3
Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9 Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9
Guard: I_GUARD
DisablePrefixes: Die DisablePrefixes: Die
DisableVariants: Select, Move DisableVariants: Select, Move, Guard
EngineerVoice: EngineerVoice:
DefaultVariant: .AUD DefaultVariant: .AUD
@@ -53,8 +61,9 @@ EngineerVoice:
Select: _ESEL1,_ESEL2,_ESEL3 Select: _ESEL1,_ESEL2,_ESEL3
Move: _ECONF1,_ECONF2,_ECONF3 Move: _ECONF1,_ECONF2,_ECONF3
Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9 Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9
Guard: I_GUARD
DisablePrefixes: Die DisablePrefixes: Die
DisableVariants: Select, Move DisableVariants: Select, Move, Guard
FremenVoice: FremenVoice:
DefaultVariant: .AUD DefaultVariant: .AUD
@@ -62,11 +71,17 @@ FremenVoice:
atreides: .WAV atreides: .WAV
ordos: .WAV ordos: .WAV
harkonnen: .WAV harkonnen: .WAV
Prefixes:
atreides: A
ordos: O
harkonnen: H
Voices: Voices:
Select: A_FSEL1,A_FSEL2,A_FSEL3 Select: A_FSEL1,A_FSEL2,A_FSEL3
Move: A_FCONF1,A_FCONF2,A_FCONF3 Move: A_FCONF1,A_FCONF2,A_FCONF3
Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9 Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9
DisableVariants: Select, Move Guard: I_GUARD
DisablePrefixes: Select, Move, Die
DisableVariants: Select, Move, Guard
SaboteurVoice: SaboteurVoice:
DefaultVariant: .AUD DefaultVariant: .AUD
@@ -74,11 +89,17 @@ SaboteurVoice:
atreides: .WAV atreides: .WAV
ordos: .WAV ordos: .WAV
harkonnen: .WAV harkonnen: .WAV
Prefixes:
atreides: A
ordos: O
harkonnen: H
Voices: Voices:
Select: O_SSEL1,O_SSEL2,O_SSEL3 Select: O_SSEL1,O_SSEL2,O_SSEL3
Move: O_SCONF1,O_SCONF2,O_SCONF3 Move: O_SCONF1,O_SCONF2,O_SCONF3
Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9 Die: KILLGUY1,KILLGUY2,KILLGUY3,KILLGUY4,KILLGUY5,KILLGUY6,KILLGUY7,KILLGUY8,KILLGUY9
DisableVariants: Select, Move Guard: I_GUARD
DisablePrefixes: Select, Move, Die
DisableVariants: Select, Move, Guard
WormVoice: WormVoice:
DefaultVariant: .WAV DefaultVariant: .WAV