changed AttackSequence to DefaultAttackSequence

This commit is contained in:
abc013
2016-10-14 14:53:02 +02:00
parent 78305ca7d6
commit 268dcd7d41
12 changed files with 56 additions and 45 deletions

View File

@@ -24,9 +24,9 @@ namespace OpenRA.Mods.Common.Traits.Render
public readonly int MaxIdleDelay = 110;
[SequenceReference] public readonly string MoveSequence = "run";
[SequenceReference] public readonly string AttackSequence = null;
[SequenceReference] public readonly string DefaultAttackSequence = null;
// TODO: [SequenceReference] isn't smart enough to use Dictionarys.
// TODO: [SequenceReference] isn't smart enough to use Dictionaries.
[Desc("Attack sequence to use for each armament.")]
[FieldLoader.LoadUsing("LoadWeaponSequences")]
public readonly Dictionary<string, string> AttackSequences = new Dictionary<string, string>();
@@ -114,7 +114,7 @@ namespace OpenRA.Mods.Common.Traits.Render
{
string sequence;
if (!Info.AttackSequences.TryGetValue(a.Info.Name, out sequence))
sequence = Info.AttackSequence;
sequence = Info.DefaultAttackSequence;
if (!string.IsNullOrEmpty(sequence) && DefaultAnimation.HasSequence(NormalizeInfantrySequence(self, sequence)))
{

View File

@@ -386,6 +386,17 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Renamed AttackSequence to DefaultAttackSequence in WithInfantryBody.
if (engineVersion < 20161014)
{
if (node.Key == "WithInfantryBody")
{
var attackSequence = node.Value.Nodes.FirstOrDefault(n => n.Key == "AttackSequence");
if (attackSequence != null)
attackSequence.Key = "DefaultAttackSequence";
}
}
UpgradeActorRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}

View File

@@ -320,7 +320,7 @@
Weapon: Pistol
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
^DINO:
Inherits@1: ^ExistsInWorld
@@ -365,7 +365,7 @@
QuantizeFacingsFromSequence:
Sequence: stand
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
WithDeathAnimation:
UseDeathTypeSuffix: false
AutoTarget:

View File

@@ -17,7 +17,7 @@ E1:
AttackFrontal:
WithInfantryBody:
IdleSequences: idle1,idle2,idle3,idle4
AttackSequence: shoot
DefaultAttackSequence: shoot
E2:
Inherits: ^Soldier
@@ -40,7 +40,7 @@ E2:
FireDelay: 15
AttackFrontal:
WithInfantryBody:
AttackSequence: throw
DefaultAttackSequence: throw
Explodes:
Weapon: GrenadierExplode
EmptyWeapon: GrenadierExplode
@@ -68,7 +68,7 @@ E3:
FireDelay: 5
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
E4:
Inherits: ^Soldier
@@ -93,7 +93,7 @@ E4:
AttackFrontal:
WithMuzzleOverlay:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
E5:
Inherits: ^Soldier
@@ -124,7 +124,7 @@ E5:
WithMuzzleOverlay:
-DamagedByTerrain:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
E6:
Inherits: ^Soldier
@@ -185,7 +185,7 @@ RMBO:
AttackMove:
Voice: Attack
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
IdleSequences: idle1,idle2,idle3
AnnounceOnBuild:
AnnounceOnKill:

View File

@@ -18,7 +18,7 @@ light_inf:
Weapon: LMG
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
engineer:
Inherits: ^Infantry
@@ -73,7 +73,7 @@ trooper:
LocalOffset: 128,0,256
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
thumper:
Inherits: ^Infantry
@@ -154,7 +154,7 @@ fremen:
Weapon: Fremen_L
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
Cloak:
InitialDelay: 85
CloakDelay: 85
@@ -188,7 +188,7 @@ grenadier:
FireDelay: 3
AttackFrontal:
WithInfantryBody:
AttackSequence: throw
DefaultAttackSequence: throw
Explodes:
Weapon: GrenDeath
EmptyWeapon: GrenDeath
@@ -213,7 +213,7 @@ sardaukar:
RevealsShroud:
Range: 4c768
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
Armament@PRIMARY:
Weapon: M_LMG
Armament@SECONDARY:

View File

@@ -303,7 +303,7 @@
Weapon: Pistol
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
^Ship:
Inherits@1: ^ExistsInWorld

View File

@@ -37,7 +37,7 @@ DOG:
Targetable:
TargetTypes: Ground, Infantry
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
StandSequences: stand
IgnoresDisguise:
DetectCloaked:
@@ -68,7 +68,7 @@ E1:
MuzzleSequence: garrison-muzzle
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -98,7 +98,7 @@ E2:
FireDelay: 15
AttackFrontal:
WithInfantryBody:
AttackSequence: throw
DefaultAttackSequence: throw
Explodes:
Weapon: UnitExplodeSmall
Chance: 50
@@ -131,7 +131,7 @@ E3:
Weapon: Dragon
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -158,7 +158,7 @@ E4:
Weapon: Flamer
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -288,7 +288,7 @@ E7:
MuzzleSequence: garrison-muzzle
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
StandSequences: stand
AnnounceOnBuild:
AnnounceOnKill:
@@ -324,7 +324,7 @@ MEDI:
AttackFrontal:
WithInfantryBody:
StandSequences: stand
AttackSequence: heal
DefaultAttackSequence: heal
Voiced:
VoiceSet: MedicVoice
@@ -361,7 +361,7 @@ MECH:
CaptureTypes: husk
PlayerExperience: 25
WithInfantryBody:
AttackSequence: repair
DefaultAttackSequence: repair
StandSequences: stand
Voiced:
VoiceSet: MechanicVoice
@@ -510,7 +510,7 @@ SHOK:
Guard:
Voice: Move
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
Voiced:
VoiceSet: ShokVoice
ProducibleWithLevel:
@@ -545,7 +545,7 @@ SNIPER:
MuzzleSequence: garrison-muzzle
AttackFrontal:
WithInfantryBody:
AttackSequence: shoot
DefaultAttackSequence: shoot
Cloak:
InitialDelay: 250
CloakDelay: 120
@@ -580,7 +580,7 @@ Zombie:
ScanRadius: 5
AttackFrontal:
WithInfantryBody:
AttackSequence: bite
DefaultAttackSequence: bite
IdleSequences: idle1
Armament:
Weapon: claw
@@ -618,7 +618,7 @@ Ant:
ScanRadius: 5
AttackFrontal:
WithInfantryBody:
AttackSequence: bite
DefaultAttackSequence: bite
Armament:
Weapon: mandible
Targetable:

View File

@@ -44,7 +44,7 @@ UMAGON:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -99,7 +99,7 @@ MUTANT:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -123,7 +123,7 @@ MWMN:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -147,7 +147,7 @@ MUTANT3:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -168,7 +168,7 @@ TRATOS:
Range: 4c0
-AutoTarget:
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
OXANNA:
Inherits: ^Soldier
@@ -186,7 +186,7 @@ OXANNA:
Range: 4c0
-AutoTarget:
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
SLAV:
Inherits: ^Soldier
@@ -204,7 +204,7 @@ SLAV:
Range: 4c0
-AutoTarget:
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
DOGGIE:
Inherits@1: ^Infantry
@@ -279,7 +279,7 @@ VISC_LRG:
CIV1:
Inherits: ^CivilianInfantry
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
Armament:
Weapon: Pistola
AttackFrontal:
@@ -292,7 +292,7 @@ CIV2:
CIV3:
Inherits: ^CivilianInfantry
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
Armament:
Weapon: Pistola
AttackFrontal:

View File

@@ -396,7 +396,7 @@
MustBeDestroyed:
WithPermanentInjury:
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
IdleSequences: idle1,idle2
UpgradeOnDamageState@CRITICAL:
Upgrades: criticalspeed

View File

@@ -20,7 +20,7 @@ E2:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -53,7 +53,7 @@ MEDIC:
OutsideRangeCursor: heal
AttackFrontal:
WithInfantryBody:
AttackSequence: heal
DefaultAttackSequence: heal
SelfHealing:
Delay: 60
Passenger:
@@ -88,7 +88,7 @@ JUMPJET:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
-TakeCover:
ProducibleWithLevel:
Prerequisites: barracks.upgraded
@@ -128,6 +128,6 @@ GHOST:
DetonationDelay: 45
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded

View File

@@ -21,7 +21,7 @@ E3:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded

View File

@@ -25,7 +25,7 @@ E1:
AttackFrontal:
Voice: Attack
WithInfantryBody:
AttackSequence: attack
DefaultAttackSequence: attack
ProducibleWithLevel:
Prerequisites: barracks.upgraded
RenderSprites: