From f651cb367785275199ee197edc0e3111a8c0266f Mon Sep 17 00:00:00 2001 From: Pavlos Touboulidis Date: Thu, 15 May 2014 04:12:29 +0300 Subject: [PATCH] Final style & rebase fixes --- OpenRA.Game/GameRules/Ruleset.cs | 16 ++++++++-------- OpenRA.Game/Graphics/SequenceProvider.cs | 2 -- OpenRA.Game/Sound.cs | 2 +- OpenRA.Mods.D2k/Render/WithDockingOverlay.cs | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/OpenRA.Game/GameRules/Ruleset.cs b/OpenRA.Game/GameRules/Ruleset.cs index 576b5cd54c..caac78e4a1 100644 --- a/OpenRA.Game/GameRules/Ruleset.cs +++ b/OpenRA.Game/GameRules/Ruleset.cs @@ -37,14 +37,14 @@ namespace OpenRA IDictionary tileSets, IDictionary sequences) { - this.Actors = new ReadOnlyDictionary(actors); - this.Weapons = new ReadOnlyDictionary(weapons); - this.Voices = new ReadOnlyDictionary(voices); - this.Notifications = new ReadOnlyDictionary(notifications); - this.Music = new ReadOnlyDictionary(music); - this.Movies = new ReadOnlyDictionary(movies); - this.TileSets = new ReadOnlyDictionary(tileSets); - this.Sequences = new ReadOnlyDictionary(sequences); + Actors = new ReadOnlyDictionary(actors); + Weapons = new ReadOnlyDictionary(weapons); + Voices = new ReadOnlyDictionary(voices); + Notifications = new ReadOnlyDictionary(notifications); + Music = new ReadOnlyDictionary(music); + Movies = new ReadOnlyDictionary(movies); + TileSets = new ReadOnlyDictionary(tileSets); + Sequences = new ReadOnlyDictionary(sequences); } public IEnumerable> InstalledMusic { get { return Music.Where(m => m.Value.Exists); } } diff --git a/OpenRA.Game/Graphics/SequenceProvider.cs b/OpenRA.Game/Graphics/SequenceProvider.cs index 73ee8ef1ac..1adfa14d19 100644 --- a/OpenRA.Game/Graphics/SequenceProvider.cs +++ b/OpenRA.Game/Graphics/SequenceProvider.cs @@ -96,9 +96,7 @@ namespace OpenRA.Graphics Lazy> t; if (sequenceCache.TryGetValue(key, out t)) - { items.Add(node.Key, t); - } else { t = Exts.Lazy(() => (IReadOnlyDictionary)new ReadOnlyDictionary( diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs index 3da54058d5..ae8274b7e7 100644 --- a/OpenRA.Game/Sound.cs +++ b/OpenRA.Game/Sound.cs @@ -385,7 +385,7 @@ namespace OpenRA return PlayPredefined(voicedUnit.World.Map.Rules, null, voicedUnit, type, phrase, variant, false, pos, volume, true); } - public static bool PlayNotification(MapRuleset rules, Player player, string type, string notification, string variant) + public static bool PlayNotification(Ruleset rules, Player player, string type, string notification, string variant) { if (rules == null) throw new ArgumentNullException("rules"); diff --git a/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs b/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs index f995b0b0f1..cbe0182420 100644 --- a/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs +++ b/OpenRA.Mods.D2k/Render/WithDockingOverlay.cs @@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA.Render buildComplete = !self.HasTrait(); // always render instantly for units - overlay = new Animation(rs.GetImage(self)); + overlay = new Animation(self.World, rs.GetImage(self)); overlay.Play(info.Sequence); rs.anims.Add("docking_overlay_{0}".F(info.Sequence), new AnimationWithOffset(overlay,