From 3b4753d9a8310de572a69ea34cb07b0044f1b313 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 13 Jun 2010 16:40:27 +1200 Subject: [PATCH] Fix aircraft targeting; add veterancy --- OpenRA.Game/Traits/Player/EvaAlerts.cs | 2 ++ OpenRA.Mods.RA/GainsExperience.cs | 4 ++-- mods/cnc/defaults.yaml | 27 +++++++++++++++++-------- mods/cnc/levelup.shp | Bin 0 -> 345 bytes mods/cnc/sequences.xml | 4 ++++ mods/cnc/system.yaml | 1 + 6 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 mods/cnc/levelup.shp diff --git a/OpenRA.Game/Traits/Player/EvaAlerts.cs b/OpenRA.Game/Traits/Player/EvaAlerts.cs index e88b409b97..ffc8074689 100644 --- a/OpenRA.Game/Traits/Player/EvaAlerts.cs +++ b/OpenRA.Game/Traits/Player/EvaAlerts.cs @@ -59,6 +59,8 @@ namespace OpenRA.Traits // Special powers public readonly string AbilityInsufficientPower = "nopowr1.aud"; + + public readonly string LevelUp = "hydrod1.aud"; } public class EvaAlerts {} diff --git a/OpenRA.Mods.RA/GainsExperience.cs b/OpenRA.Mods.RA/GainsExperience.cs index 265ccb2466..a48ff09715 100644 --- a/OpenRA.Mods.RA/GainsExperience.cs +++ b/OpenRA.Mods.RA/GainsExperience.cs @@ -67,8 +67,8 @@ namespace OpenRA.Mods.RA Level++; // Game.Debug("{0} became Level {1}".F(self.Info.Name, Level)); - - Sound.PlayToPlayer(self.Owner, "hydrod1.aud", self.CenterLocation); + var eva = self.World.WorldActor.Info.Traits.Get(); + Sound.PlayToPlayer(self.Owner, eva.LevelUp, self.CenterLocation); self.World.AddFrameEndTask(w => w.Add(new CrateEffect(self, "levelup", new int2(0,-24)))); } } diff --git a/mods/cnc/defaults.yaml b/mods/cnc/defaults.yaml index 2b3606cd7b..0b167e693d 100644 --- a/mods/cnc/defaults.yaml +++ b/mods/cnc/defaults.yaml @@ -12,6 +12,8 @@ IronCurtainable: HiddenUnderFog: RevealsShroud: + GainsExperience: + GivesExperience: ^Infantry: Category: Infantry @@ -27,6 +29,8 @@ HiddenUnderFog: PoisonedByTiberium: RevealsShroud: + GainsExperience: + GivesExperience: ^Ship: Category: Ship @@ -36,13 +40,18 @@ Selectable: HiddenUnderFog: RevealsShroud: + GainsExperience: + GivesExperience: ^Plane: Category: Plane Unit: + TargetType: Air Selectable: HiddenUnderFog: RevealsShroud: + GainsExperience: + GivesExperience: ^Building: Category: Building @@ -60,14 +69,7 @@ EmitInfantryOnSell: ActorTypes: c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,e1,e1,e1,e1,e1,e1,e1 MustBeDestroyed: - -^Tree: - Category: Building - RenderBuilding: - Palette: terrain - Building: - Footprint: __ x_ - Dimensions: 2,2 + GivesExperience: ^Wall: Category: Building @@ -90,6 +92,15 @@ HasMakeAnimation: false Palette: terrain DamageStates: 2 + GivesExperience: + +^Tree: + Category: Building + RenderBuilding: + Palette: terrain + Building: + Footprint: __ x_ + Dimensions: 2,2 ^Husk: Category: Vehicle diff --git a/mods/cnc/levelup.shp b/mods/cnc/levelup.shp new file mode 100644 index 0000000000000000000000000000000000000000..eec8a7f72c5cd0757cb0b22008897cfd4af77d92 GIT binary patch literal 345 zcmZQ&009Lc1OYb&h6WH_3#GR}>DN$Ni4h_n$p}(~0RP$<85-w1unTZ7umEYM02u`d z1#Sl>2EhOY0iKg>i~%wMCJHiVmouK6&KTfw<2B>ITR@}!xdXM$gKC?Hq0J4ZEuHaX zI7r)S#(z>wKyBK$ or0q4szgs|U05C^T00000 literal 0 HcmV?d00001 diff --git a/mods/cnc/sequences.xml b/mods/cnc/sequences.xml index 6d165faad5..d5690b186a 100644 --- a/mods/cnc/sequences.xml +++ b/mods/cnc/sequences.xml @@ -81,6 +81,9 @@ + + + @@ -119,6 +122,7 @@ + diff --git a/mods/cnc/system.yaml b/mods/cnc/system.yaml index 4e07a75f1b..2c2bd2a682 100644 --- a/mods/cnc/system.yaml +++ b/mods/cnc/system.yaml @@ -244,6 +244,7 @@ World: NavalUnitLost: unitlost.aud PrimaryBuildingSelected: pribldg1.aud AbilityInsufficientPower: nopower1.aud + LevelUp: text2.aud SpatialBins: BinSize: 4 Shroud: \ No newline at end of file