From 5c0b82e65b651b259e74db0b61280056a108b16d Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 2 Mar 2025 16:57:20 +0000 Subject: [PATCH] Remove unused MapPreview ctor. --- OpenRA.Game/Map/MapPreview.cs | 48 ----------------------------------- 1 file changed, 48 deletions(-) diff --git a/OpenRA.Game/Map/MapPreview.cs b/OpenRA.Game/Map/MapPreview.cs index 26882d2ef8..e4c511aaf1 100644 --- a/OpenRA.Game/Map/MapPreview.cs +++ b/OpenRA.Game/Map/MapPreview.cs @@ -317,54 +317,6 @@ namespace OpenRA }; } - // For linting purposes only! - public MapPreview(Map map, ModData modData) - { - this.modData = modData; - cache = modData.MapCache; - - Uid = map.Uid; - PackageName = map.Package.Name; - - var mapPlayers = new MapPlayers(map.PlayerDefinitions); - var spawns = new List(); - foreach (var kv in map.ActorDefinitions.Where(d => d.Value.Value == "mpspawn")) - { - var s = new ActorReference(kv.Value.Value, kv.Value.ToDictionary()); - spawns.Add(s.Get().Value); - } - - innerData = new InnerData - { - MapFormat = map.MapFormat, - Title = map.Title, - Categories = map.Categories, - Author = map.Author, - TileSet = map.Tileset, - Players = mapPlayers, - PlayerCount = mapPlayers.Players.Count(x => x.Value.Playable), - SpawnPoints = spawns.ToArray(), - GridType = map.Grid.Type, - Bounds = map.Bounds, - Preview = null, - Status = MapStatus.Available, - Class = MapClassification.Unknown, - Visibility = map.Visibility, - }; - - innerData.SetCustomRules(modData, this, new Dictionary() - { - { "Rules", map.RuleDefinitions }, - { "FluentMessages", map.FluentMessageDefinitions }, - { "Weapons", map.WeaponDefinitions }, - { "Voices", map.VoiceDefinitions }, - { "Music", map.MusicDefinitions }, - { "Notifications", map.NotificationDefinitions }, - { "Sequences", map.SequenceDefinitions }, - { "ModelSequences", map.ModelSequenceDefinitions } - }, null); - } - public void UpdateFromMap(IReadOnlyPackage p, IReadOnlyPackage parent, MapClassification classification, string[] mapCompatibility, MapGridType gridType, IEnumerable> modDataRules) {