diff --git a/OpenRA.Game/Widgets/ScrollItemWidget.cs b/OpenRA.Game/Widgets/ScrollItemWidget.cs index df9f845c1b..717db47cb6 100644 --- a/OpenRA.Game/Widgets/ScrollItemWidget.cs +++ b/OpenRA.Game/Widgets/ScrollItemWidget.cs @@ -65,9 +65,10 @@ namespace OpenRA.Widgets return w; } - public static ScrollItemWidget Setup(string key, ScrollItemWidget template, Func isSelected, Action onClick) + public static ScrollItemWidget Setup(string key, ScrollItemWidget template, Func isSelected, Action onClick, Action onDoubleClick) { var w = Setup(template, isSelected, onClick); + w.OnDoubleClick = onDoubleClick; w.ItemKey = key; return w; } diff --git a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs index df448c1701..1a74fc5d17 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MapChooserLogic.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic { var item = ScrollItemWidget.Setup(template, () => gameMode == ii.First, - () => { gameMode = ii.First; EnumerateMaps(); }); + () => { gameMode = ii.First; EnumerateMaps(onSelect); }); item.Get("LABEL").GetText = () => showItem(ii); return item; }; @@ -83,10 +83,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic randomMapButton.IsDisabled = () => visibleMaps == null || visibleMaps.Count == 0; } - EnumerateMaps(); + EnumerateMaps(onSelect); } - void EnumerateMaps() + void EnumerateMaps(Action onSelect) { var maps = Game.modData.AvailableMaps .Where(kv => kv.Value.Selectable) @@ -98,7 +98,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic foreach (var kv in maps) { var m = kv.Value; - var item = ScrollItemWidget.Setup(kv.Key, itemTemplate, () => m == map, () => map = m); + var item = ScrollItemWidget.Setup(kv.Key, itemTemplate, () => m == map, () => map = m, () => { Ui.CloseWindow(); onSelect(m); }); var titleLabel = item.Get("TITLE"); titleLabel.GetText = () => m.Title; diff --git a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs index 4fb5f5039a..56b1af0cf1 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MusicPlayerLogic.cs @@ -98,7 +98,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic currentSong = song; // TODO: We leak the currentSong MusicInfo across map load, so compare the Filename instead. - var item = ScrollItemWidget.Setup(song.Filename, itemTemplate, () => currentSong.Filename == song.Filename, () => { currentSong = song; Play(); }); + var item = ScrollItemWidget.Setup(song.Filename, itemTemplate, () => currentSong.Filename == song.Filename, () => { currentSong = song; Play(); }, () => {}); item.Get("TITLE").GetText = () => song.Title; item.Get("LENGTH").GetText = () => SongLengthLabel(song); musicList.AddChild(item); diff --git a/mods/cnc/maps/deterring_democracy.oramap b/mods/cnc/maps/deterring_democracy.oramap index 231a6695f6..736bf9ad0c 100644 Binary files a/mods/cnc/maps/deterring_democracy.oramap and b/mods/cnc/maps/deterring_democracy.oramap differ diff --git a/mods/cnc/maps/eastwest3.oramap b/mods/cnc/maps/eastwest3.oramap new file mode 100644 index 0000000000..dc1ff0e87e Binary files /dev/null and b/mods/cnc/maps/eastwest3.oramap differ diff --git a/mods/cnc/maps/eastwest3/map.bin b/mods/cnc/maps/eastwest3/map.bin deleted file mode 100644 index da705c7dcb..0000000000 Binary files a/mods/cnc/maps/eastwest3/map.bin and /dev/null differ diff --git a/mods/cnc/maps/eastwest3/map.yaml b/mods/cnc/maps/eastwest3/map.yaml deleted file mode 100644 index 6a0a65752d..0000000000 --- a/mods/cnc/maps/eastwest3/map.yaml +++ /dev/null @@ -1,289 +0,0 @@ -Selectable: True - -MapFormat: 5 - -RequiresMod: cnc - -Title: East vs West 3 - -Description: 3v3 Team Map - -Author: Paul Chote - -Tileset: WINTER - -MapSize: 96,56 - -Bounds: 8,8,76,40 - -UseAsShellmap: False - -Type: Conquest - -Players: - PlayerReference@Neutral: - Name: Neutral - Palette: neutral - OwnsWorld: True - NonCombatant: True - Race: gdi - PlayerReference@Multi0: - Name: Multi0 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Multi1: - Name: Multi1 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Multi2: - Name: Multi2 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Multi3: - Name: Multi3 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Multi4: - Name: Multi4 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Multi5: - Name: Multi5 - Playable: True - DefaultStartingUnits: True - Race: Random - Enemies: Creeps - PlayerReference@Creeps: - Name: Creeps - NonCombatant: True - Race: Random - Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5 - -Actors: - wp7: mpspawn - Location: 73,33 - Owner: Neutral - Actor5: mpspawn - Location: 17,20 - Owner: Neutral - wp1: mpspawn - Location: 73,20 - Owner: Neutral - Actor7: mpspawn - Location: 63,27 - Owner: Neutral - Actor8: mpspawn - Location: 17,33 - Owner: Neutral - Actor40: mpspawn - Location: 27,27 - Owner: Neutral - Actor0: bio - Location: 45,34 - Owner: Neutral - Actor1: split3 - Location: 15,12 - Owner: Neutral - Actor2: split3 - Location: 15,41 - Owner: Neutral - Actor3: split3 - Location: 33,18 - Owner: Neutral - Actor4: split3 - Location: 33,35 - Owner: Neutral - Actor6: split3 - Location: 58,35 - Owner: Neutral - Actor9: split3 - Location: 58,18 - Owner: Neutral - Actor10: split3 - Location: 75,12 - Owner: Neutral - Actor11: split3 - Location: 75,41 - Owner: Neutral - Actor50: tc04 - Location: 41,16 - Owner: Neutral - Actor18: brik - Location: 43,32 - Owner: Neutral - Actor12: gtwr - Location: 44,33 - Owner: Creeps - Actor15: brik - Location: 41,32 - Owner: Neutral - Actor16: brik - Location: 42,32 - Owner: Neutral - Actor14: brik - Location: 40,32 - Owner: Neutral - Actor13: gtwr - Location: 47,33 - Owner: Creeps - Actor51: tc04 - Location: 49,16 - Owner: Neutral - Actor20: brik - Location: 48,32 - Owner: Neutral - Actor21: brik - Location: 49,32 - Owner: Neutral - Actor22: brik - Location: 50,32 - Owner: Neutral - Actor23: brik - Location: 51,32 - Owner: Neutral - Actor34: t16 - Location: 48,35 - Owner: Neutral - Actor30: t14 - Location: 49,33 - Owner: Neutral - Actor25: tc04 - Location: 42,36 - Owner: Neutral - Actor24: tc04 - Location: 40,37 - Owner: Neutral - Actor26: t02 - Location: 41,35 - Owner: Neutral - Actor31: brik - Location: 45,36 - Owner: Neutral - Actor32: brik - Location: 44,36 - Owner: Neutral - Actor33: brik - Location: 46,36 - Owner: Neutral - Actor29: t11 - Location: 49,35 - Owner: Neutral - Actor27: t10 - Location: 42,34 - Owner: Neutral - Actor28: t11 - Location: 41,33 - Owner: Neutral - Actor37: brik - Location: 47,36 - Owner: Neutral - Actor38: brik - Location: 48,33 - Owner: Neutral - Actor39: brik - Location: 48,34 - Owner: Neutral - Actor41: brik - Location: 47,34 - Owner: Neutral - Actor42: brik - Location: 44,34 - Owner: Neutral - Actor43: brik - Location: 43,34 - Owner: Neutral - Actor44: brik - Location: 43,33 - Owner: Neutral - Actor46: brik - Location: 44,35 - Owner: Neutral - Actor47: brik - Location: 47,35 - Owner: Neutral - Actor48: tc04 - Location: 45,36 - Owner: Neutral - Actor49: tc04 - Location: 48,36 - Owner: Neutral - Actor35: tc02 - Location: 49,38 - Owner: Neutral - Actor36: v17 - Location: 43,22 - Owner: Neutral - Actor45: v16 - Location: 43,21 - Owner: Neutral - Actor17: tc02 - Location: 40,15 - Owner: Neutral - Actor53: tc02 - Location: 45,17 - Owner: Neutral - Actor52: tc04 - Location: 43,16 - Owner: Neutral - Actor19: tc02 - Location: 50,15 - Owner: Neutral - Actor54: tc04 - Location: 47,16 - Owner: Neutral - Actor55: tc03 - Location: 49,19 - Owner: Neutral - Actor56: tc01 - Location: 41,18 - Owner: Neutral - Actor57: tc04 - Location: 43,18 - Owner: Neutral - Actor58: tc05 - Location: 46,18 - Owner: Neutral - Actor59: v01 - Location: 45,20 - Owner: Neutral - Actor60: v06 - Location: 41,20 - Owner: Neutral - Actor62: v17 - Location: 42,22 - Owner: Neutral - Actor66: v11 - Location: 48,21 - Owner: Neutral - Actor65: v17 - Location: 41,22 - Owner: Neutral - Actor63: v16 - Location: 41,21 - Owner: Neutral - Actor64: v03 - Location: 49,21 - Owner: Neutral - Actor61: v16 - Location: 42,21 - Owner: Neutral - -Smudges: - -Rules: - -Sequences: - -Weapons: - -Voices: diff --git a/mods/cnc/maps/haos_ridges_cnc.oramap b/mods/cnc/maps/haos_ridges_cnc.oramap new file mode 100644 index 0000000000..066fe2ff5d Binary files /dev/null and b/mods/cnc/maps/haos_ridges_cnc.oramap differ