voices now support prefixes
required for d2k
This commit is contained in:
@@ -18,8 +18,10 @@ namespace OpenRA.GameRules
|
||||
public class VoiceInfo
|
||||
{
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Variants;
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Prefixes;
|
||||
[FieldLoader.Ignore] public readonly Dictionary<string,string[]> Voices;
|
||||
public readonly string DefaultVariant = ".aud" ;
|
||||
public readonly string DefaultPrefix = "" ;
|
||||
public readonly string[] DisableVariants = { };
|
||||
|
||||
static Dictionary<string, string[]> Load( MiniYaml y, string name )
|
||||
@@ -37,6 +39,7 @@ namespace OpenRA.GameRules
|
||||
{
|
||||
FieldLoader.Load( this, y );
|
||||
Variants = Load(y, "Variants");
|
||||
Prefixes = Load(y, "Prefixes");
|
||||
Voices = Load(y, "Voices");
|
||||
|
||||
if (!Voices.ContainsKey("Attack"))
|
||||
|
||||
@@ -259,7 +259,9 @@ namespace OpenRA
|
||||
|
||||
var variantExt = (vi.Variants.ContainsKey(variant) && !vi.DisableVariants.Contains(phrase)) ?
|
||||
vi.Variants[variant][voicedUnit.ActorID % vi.Variants[variant].Length] : vi.DefaultVariant;
|
||||
Play(clip + variantExt);
|
||||
var prefix = (vi.Prefixes.ContainsKey(variant)) ?
|
||||
vi.Prefixes[variant][voicedUnit.ActorID % vi.Prefixes[variant].Length] : vi.DefaultPrefix;
|
||||
Play(prefix + clip + variantExt);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
ROT: 5
|
||||
SelectionDecorations:
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Voice: VehicleVoice
|
||||
TargetableUnit:
|
||||
TargetTypes: Ground
|
||||
Passenger:
|
||||
@@ -54,7 +54,7 @@
|
||||
ROT: 5
|
||||
SelectionDecorations:
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Voice: VehicleVoice
|
||||
TargetableUnit:
|
||||
TargetTypes: Ground
|
||||
Passenger:
|
||||
@@ -102,7 +102,7 @@
|
||||
Rough: 60
|
||||
SelectionDecorations:
|
||||
Selectable:
|
||||
Voice: GenericVoice
|
||||
Voice: InfantryVoice
|
||||
TargetableUnit:
|
||||
TargetTypes: Ground
|
||||
RenderInfantry:
|
||||
|
||||
@@ -202,7 +202,8 @@
|
||||
-RenderBuilding:
|
||||
OreRefinery:
|
||||
StoresOre:
|
||||
PipCount: 17
|
||||
PipColor: Green
|
||||
PipCount: 20
|
||||
Capacity: 2000
|
||||
CustomSellValue:
|
||||
Value: 600
|
||||
@@ -234,6 +235,7 @@
|
||||
-RenderBuilding:
|
||||
RenderBuildingSilo:
|
||||
StoresOre:
|
||||
PipColor: Green
|
||||
PipCount: 5
|
||||
Capacity: 1500
|
||||
-EmitInfantryOnSell:
|
||||
|
||||
@@ -148,7 +148,7 @@ World:
|
||||
SpriteNames: spice0
|
||||
ValuePerUnit: 35
|
||||
Name: Spice
|
||||
PipColor: Yellow
|
||||
PipColor: Green
|
||||
AllowedTerrainTypes: Sand
|
||||
AllowUnderActors: false
|
||||
SmudgeLayer@CRATER:
|
||||
|
||||
@@ -908,32 +908,21 @@ deviatortank:
|
||||
Start: 0
|
||||
Facings: 32
|
||||
|
||||
#TODO: add Dune 2000 SHPs
|
||||
pips:
|
||||
groups:
|
||||
Start: 8
|
||||
Length: 10
|
||||
medic:
|
||||
Start: 20
|
||||
ready:
|
||||
Start: 3
|
||||
hold:
|
||||
Start: 4
|
||||
tag-fake:
|
||||
Start: 18
|
||||
tag-primary:
|
||||
Start: 2
|
||||
pip-empty: dots
|
||||
Start: 0
|
||||
pip-green: dots
|
||||
Start: 1
|
||||
pip-yellow: dots
|
||||
Start: 1
|
||||
pip-gray: dots
|
||||
Start: 0
|
||||
pip-red: dots
|
||||
Start: 1
|
||||
pip-blue: dots
|
||||
Start: 1
|
||||
|
||||
clock:
|
||||
idle:
|
||||
|
||||
@@ -1,87 +1,49 @@
|
||||
# requires Dune 2000/DATA/GAMESFX copied to ~/.openra/Content/d2k
|
||||
|
||||
GenericVoice:
|
||||
Variants:
|
||||
atreides: .AUD
|
||||
harkonnen: .AUD
|
||||
ordos: .AUD
|
||||
DefaultVariant: .AUD
|
||||
Voices:
|
||||
Select: G_SSEL1,G_SSEL2,G_SSEL3
|
||||
Move: G_SCONF1,G_SCONF2,G_SCONF3
|
||||
|
||||
AtreidesVehicleVoice:
|
||||
Variants:
|
||||
atreides: .AUD
|
||||
VehicleVoice:
|
||||
DefaultVariant: .AUD
|
||||
Prefixes:
|
||||
atreides: A
|
||||
ordos: O
|
||||
harkonnen: H
|
||||
Voices:
|
||||
Select: A_VSEL1,A_VSEL2,A_VSEL3
|
||||
Move: A_VCONF1,A_VCONF2,A_VCONF3
|
||||
Select: _VSEL1,_VSEL2,_VSEL3
|
||||
Move: _VCONF1,_VCONF2,_VCONF3
|
||||
|
||||
AtreidesInfantryVoice:
|
||||
Variants:
|
||||
atreides: .AUD
|
||||
InfantryVoice:
|
||||
DefaultVariant: .AUD
|
||||
Prefixes:
|
||||
atreides: A
|
||||
ordos: O
|
||||
harkonnen: H
|
||||
Voices:
|
||||
Select: A_ISEL1,A_ISEL2,A_ISEL3
|
||||
Move: A_ICONF1,A_ICONF2,A_ICONF3
|
||||
Select: _ISEL1,_ISEL2,_ISEL3
|
||||
Move: _ICONF1,_ICONF2,_ICONF3
|
||||
|
||||
AtreidesEngineerVoice:
|
||||
Variants:
|
||||
atreides: .AUD
|
||||
EngineerVoice:
|
||||
DefaultVariant: .AUD
|
||||
Prefixes:
|
||||
atreides: A
|
||||
ordos: O
|
||||
harkonnen: H
|
||||
Voices:
|
||||
Select: A_ESEL1,A_ESEL2,A_ESEL3
|
||||
Move: A_ECONF1,A_ECONF2,A_ECONF3
|
||||
Select: _ESEL1,_ESEL2,_ESEL3
|
||||
Move: _ECONF1,_ECONF2,_ECONF3
|
||||
|
||||
FremenVoice:
|
||||
Variants:
|
||||
atreides: .AUD
|
||||
DefaultVariant: .AUD
|
||||
Voices:
|
||||
Select: A_FSEL1,A_FSEL2,A_FSEL3
|
||||
Move: A_FCONF1,A_FCONF2,A_FCONF3
|
||||
|
||||
HarkonnenVehicleVoice:
|
||||
Variants:
|
||||
harkonnen: .AUD
|
||||
Voices:
|
||||
Select: H_VSEL1,H_VSEL2,H_VSEL3
|
||||
Move: H_VCONF1,H_VCONF2,H_VCONF3
|
||||
|
||||
HarkonnenInfantryVoice:
|
||||
Variants:
|
||||
harkonnen: .AUD
|
||||
Voices:
|
||||
Select: H_ISEL1,H_ISEL2,H_ISEL3
|
||||
Move: H_ICONF1,H_ICONF2,H_ICONF3
|
||||
|
||||
HarkonnenEngineerVoice:
|
||||
Variants:
|
||||
harkonnen: .AUD
|
||||
Voices:
|
||||
Select: H_ESEL1,H_ESEL2,H_ESEL3
|
||||
Move: H_ECONF1,H_ECONF2,H_ECONF3
|
||||
|
||||
OrdosVehicleVoice:
|
||||
Variants:
|
||||
ordos: .AUD
|
||||
Voices:
|
||||
Select: O_VSEL1,O_VSEL2,O_VSEL3
|
||||
Move: O_VCONF1,O_VCONF2,O_VCONF3
|
||||
|
||||
OrdosInfantryVoice:
|
||||
Variants:
|
||||
ordos: .AUD
|
||||
Voices:
|
||||
Select: O_ISEL1,O_ISEL2,O_ISEL3
|
||||
Move: O_ICONF1,O_ICONF2,O_ICONF3
|
||||
|
||||
OrdosEngineerVoice:
|
||||
Variants:
|
||||
ordos: .AUD
|
||||
Voices:
|
||||
Select: O_ESEL1,O_ESEL2,O_ESEL3
|
||||
Move: O_ECONF1,O_ECONF2,O_ECONF3
|
||||
|
||||
SaboteurVoice:
|
||||
Variants:
|
||||
ordos: .AUD
|
||||
DefaultVariant: .AUD
|
||||
Voices:
|
||||
Select: O_SSEL1,O_SSEL2,O_SSEL3
|
||||
Move: O_SCONF1,O_SCONF2,O_SCONF3
|
||||
Reference in New Issue
Block a user