From 697b50c1496059ba1892d12e485d0bc216302854 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Mon, 13 Jan 2014 22:15:14 +1300 Subject: [PATCH] Add Guard support to Aircraft. --- CHANGELOG | 2 +- OpenRA.Mods.RA/Activities/Follow.cs | 6 +++--- OpenRA.Mods.RA/Guard.cs | 2 +- mods/cnc/rules/defaults.yaml | 1 + mods/ra/rules/defaults.yaml | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6cee18b887..c306222b44 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ NEW: All Mods: An error dialog is now displayed when server connections are lost. + Added AttackMove and Guard abilities to Aircraft and Helicopters. Unified the main menu navigation between TD and other mods: Moved Create Game and Direct Connect facilities to the server browser. Added skirmish mode to RA and D2k to complement TD's skirmish mode. @@ -18,7 +19,6 @@ NEW: Fixed transparency glitches in the sniper icon. Tiberian Dawn: Commando can now plant C4 on bridges. - Helicopters can now AttackMove. Engine: Converted Aircraft CruiseAltitude to world coordinates. Converted Health Radius to world coordinates. diff --git a/OpenRA.Mods.RA/Activities/Follow.cs b/OpenRA.Mods.RA/Activities/Follow.cs index 4795202509..ec82a8ca09 100644 --- a/OpenRA.Mods.RA/Activities/Follow.cs +++ b/OpenRA.Mods.RA/Activities/Follow.cs @@ -16,7 +16,7 @@ namespace OpenRA.Mods.RA.Activities public class Follow : Activity { Target target; - Mobile mobile; + IMove move; WRange range; int nextPathTime; @@ -26,7 +26,7 @@ namespace OpenRA.Mods.RA.Activities public Follow(Actor self, Target target, WRange range) { this.target = target; - mobile = self.Trait(); + move = self.Trait(); this.range = range; } @@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Activities nextPathTime = self.World.SharedRandom.Next(delayBetweenPathingAttempts - delaySpread, delayBetweenPathingAttempts + delaySpread); - return Util.SequenceActivities(mobile.MoveWithinRange(target, range), this); + return Util.SequenceActivities(move.MoveWithinRange(target, range), this); } } } diff --git a/OpenRA.Mods.RA/Guard.cs b/OpenRA.Mods.RA/Guard.cs index 89fed40e7e..9014c2baf2 100644 --- a/OpenRA.Mods.RA/Guard.cs +++ b/OpenRA.Mods.RA/Guard.cs @@ -18,7 +18,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { - class GuardInfo : TraitInfo, Requires { } + class GuardInfo : TraitInfo { } class Guard : IResolveOrder, IOrderVoice { diff --git a/mods/cnc/rules/defaults.yaml b/mods/cnc/rules/defaults.yaml index b14b7fc1bc..e4777efd81 100644 --- a/mods/cnc/rules/defaults.yaml +++ b/mods/cnc/rules/defaults.yaml @@ -116,6 +116,7 @@ EmptyWeapon: HeliExplode CombatDebugOverlay: AttackMove: + Guard: BodyOrientation: UpdatesPlayerStatistics: Huntable: diff --git a/mods/ra/rules/defaults.yaml b/mods/ra/rules/defaults.yaml index fd6766c6c1..486a910bb3 100644 --- a/mods/ra/rules/defaults.yaml +++ b/mods/ra/rules/defaults.yaml @@ -197,6 +197,7 @@ GroundedTargetTypes: Ground HiddenUnderFog: AttackMove: + Guard: GainsExperience: GivesExperience: DrawLineToTarget: