diff --git a/CHANGELOG b/CHANGELOG index a771dd506d..04eac83e0d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -103,6 +103,7 @@ NEW: Removed Mobile Radar Jammer's jamming effect for allied missiles. Increased the HP of husks from 140 to 280. Fixed incorrect Red Alert dialog corners. + Added a singleplayer mission menu. Tiberian Dawn: Engineers can now regain control over husks. Chinook rotors now counter-rotate. @@ -132,6 +133,7 @@ NEW: The chance of artillery exploding on death has been reduced from 100% to 75%. Fixed Chinook being unable to land on tiberium. Commando will no longer shoot at vehicles or buildings. + Added a singleplayer mission menu. Engine: The contents of OpenRA.FileFormats.dll have been merged into OpenRA.Game.exe, and namespaces reorganized. Converted Aircraft CruiseAltitude to world coordinates. diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 7f491a36bd..17d589b786 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -45,10 +45,12 @@ namespace OpenRA public static DatabaseReader GeoIpDatabase; - public static void JoinServer(string host, int port, string password) + public static OrderManager JoinServer(string host, int port, string password) { - JoinInner(new OrderManager(host, port, password, - new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename))); + var om = new OrderManager(host, port, password, + new ReplayRecorderConnection(new NetworkConnection(host, port), ChooseReplayFilename)); + JoinInner(om); + return om; } static string ChooseReplayFilename() diff --git a/OpenRA.Game/Manifest.cs b/OpenRA.Game/Manifest.cs index b45bb00f9f..017a9175b1 100644 --- a/OpenRA.Game/Manifest.cs +++ b/OpenRA.Game/Manifest.cs @@ -24,7 +24,7 @@ namespace OpenRA Folders, MapFolders, Rules, ServerTraits, Sequences, VoxelSequences, Cursors, Chrome, Assemblies, ChromeLayout, Weapons, Voices, Notifications, Music, Movies, Translations, TileSets, - ChromeMetrics, PackageContents, LuaScripts, MapCompatibility; + ChromeMetrics, PackageContents, LuaScripts, MapCompatibility, Missions; public readonly Dictionary Packages; public readonly MiniYaml LoadScreen; @@ -62,6 +62,7 @@ namespace OpenRA ChromeMetrics = YamlList(yaml, "ChromeMetrics"); PackageContents = YamlList(yaml, "PackageContents"); LuaScripts = YamlList(yaml, "LuaScripts"); + Missions = YamlList(yaml, "Missions"); LoadScreen = yaml["LoadScreen"]; LobbyDefaults = yaml["LobbyDefaults"]; diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index cfd7d67fc1..2d55d9f16b 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -381,6 +381,7 @@ + diff --git a/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs index 1f6a40e15d..8e39d981ca 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/MainMenuLogic.cs @@ -8,6 +8,7 @@ */ #endregion +using System.Linq; using System.Net; using OpenRA.Widgets; @@ -15,7 +16,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic { public class MainMenuLogic { - protected enum MenuType { Main, Extras, None } + protected enum MenuType { Main, Singleplayer, Extras, None } protected MenuType menuType = MenuType.Main; Widget rootMenu; @@ -30,7 +31,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var mainMenu = widget.Get("MAIN_MENU"); mainMenu.IsVisible = () => menuType == MenuType.Main; - mainMenu.Get("SINGLEPLAYER_BUTTON").OnClick = StartSkirmishGame; + mainMenu.Get("SINGLEPLAYER_BUTTON").OnClick = () => menuType = MenuType.Singleplayer; mainMenu.Get("MULTIPLAYER_BUTTON").OnClick = () => { @@ -61,6 +62,26 @@ namespace OpenRA.Mods.RA.Widgets.Logic mainMenu.Get("QUIT_BUTTON").OnClick = Game.Exit; + // Singleplayer menu + var singleplayerMenu = widget.Get("SINGLEPLAYER_MENU"); + singleplayerMenu.IsVisible = () => menuType == MenuType.Singleplayer; + + var missionsButton = singleplayerMenu.Get("MISSIONS_BUTTON"); + missionsButton.OnClick = () => + { + menuType = MenuType.None; + Ui.OpenWindow("MISSIONBROWSER_PANEL", new WidgetArgs + { + { "onExit", () => menuType = MenuType.Singleplayer }, + { "onStart", RemoveShellmapUI } + }); + }; + missionsButton.Disabled = !Game.modData.Manifest.Missions.Any(); + + singleplayerMenu.Get("SKIRMISH_BUTTON").OnClick = StartSkirmishGame; + + singleplayerMenu.Get("BACK_BUTTON").OnClick = () => menuType = MenuType.Main; + // Extras menu var extrasMenu = widget.Get("EXTRAS_MENU"); extrasMenu.IsVisible = () => menuType == MenuType.Extras; diff --git a/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs new file mode 100644 index 0000000000..b0d8e2598e --- /dev/null +++ b/OpenRA.Mods.RA/Widgets/Logic/MissionBrowserLogic.cs @@ -0,0 +1,110 @@ +#region Copyright & License Information +/* + * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) + * This file is part of OpenRA, which is free software. It is made + * available to you under the terms of the GNU General Public License + * as published by the Free Software Foundation. For more information, + * see COPYING. + */ +#endregion + +using System; +using System.IO; +using System.Linq; +using System.Net; +using OpenRA.FileFormats; +using OpenRA.Graphics; +using OpenRA.Network; +using OpenRA.Widgets; + +namespace OpenRA.Mods.RA.Widgets.Logic +{ + public class MissionBrowserLogic + { + readonly Action onStart; + readonly ScrollPanelWidget descriptionPanel; + readonly LabelWidget description; + readonly SpriteFont descriptionFont; + + MapPreview selectedMapPreview; + + [ObjectCreator.UseCtor] + public MissionBrowserLogic(Widget widget, Action onStart, Action onExit) + { + this.onStart = onStart; + + var missionList = widget.Get("MISSION_LIST"); + var template = widget.Get("MISSION_TEMPLATE"); + + widget.Get("MISSION_INFO").IsVisible = () => selectedMapPreview != null; + + var previewWidget = widget.Get("MISSION_PREVIEW"); + previewWidget.Preview = () => selectedMapPreview; + + descriptionPanel = widget.Get("MISSION_DESCRIPTION_PANEL"); + description = widget.Get("MISSION_DESCRIPTION"); + descriptionFont = Game.Renderer.Fonts[description.Font]; + + var yaml = new MiniYaml(null, Game.modData.Manifest.Missions.Select(MiniYaml.FromFile).Aggregate(MiniYaml.MergeLiberal)).NodesDict; + + var missionMapPaths = yaml["Missions"].Nodes.Select(n => Path.GetFullPath(n.Key)); + + var maps = Game.modData.MapCache + .Where(p => p.Status == MapStatus.Available && missionMapPaths.Contains(Path.GetFullPath(p.Map.Path))) + .Select(p => p.Map); + + missionList.RemoveChildren(); + foreach (var m in maps) + { + var map = m; + + var item = ScrollItemWidget.Setup(template, + () => selectedMapPreview != null && selectedMapPreview.Uid == map.Uid, + () => SelectMap(map), + StartMission); + + item.Get("TITLE").GetText = () => map.Title; + missionList.AddChild(item); + } + + if (maps.Any()) + SelectMap(maps.First()); + + widget.Get("STARTGAME_BUTTON").OnClick = StartMission; + + widget.Get("BACK_BUTTON").OnClick = () => + { + Game.Disconnect(); + Ui.CloseWindow(); + onExit(); + }; + } + + void SelectMap(Map map) + { + selectedMapPreview = Game.modData.MapCache[map.Uid]; + + var text = map.Description != null ? map.Description.Replace("\\n", "\n") : ""; + text = WidgetUtils.WrapText(text, description.Bounds.Width, descriptionFont); + description.Text = text; + description.Bounds.Height = descriptionFont.Measure(text).Y; + descriptionPanel.Layout.AdjustChildren(); + } + + void StartMission() + { + OrderManager om = null; + + Action lobbyReady = null; + lobbyReady = () => + { + Game.LobbyInfoChanged -= lobbyReady; + onStart(); + om.IssueOrder(Order.Command("state {0}".F(Session.ClientState.Ready))); + }; + Game.LobbyInfoChanged += lobbyReady; + + om = Game.JoinServer(IPAddress.Loopback.ToString(), Game.CreateLocalServer(selectedMapPreview.Uid), ""); + } + } +} diff --git a/mods/cnc/chrome/mainmenu.yaml b/mods/cnc/chrome/mainmenu.yaml index 894a29b861..48f160e3cc 100644 --- a/mods/cnc/chrome/mainmenu.yaml +++ b/mods/cnc/chrome/mainmenu.yaml @@ -110,6 +110,38 @@ Container@MENU_BACKGROUND: Width:140 Height:35 Text:Quit + Container@SINGLEPLAYER_MENU: + Width:PARENT_RIGHT + Visible:False + Children: + Label@SINGLEPLAYER_MENU_TITLE: + X:0 + Y:0-30 + Width:PARENT_RIGHT + Height:20 + Text:Singleplayer + Align:Center + Font:Bold + Contrast:True + Button@SKIRMISH_BUTTON: + X:150 + Y:0 + Width:140 + Height:35 + Text:Skirmish + Button@MISSIONS_BUTTON: + X:300 + Y:0 + Width:140 + Height:35 + Text:Missions + Button@BACK_BUTTON: + Key:escape + X:600 + Y:0 + Width:140 + Height:35 + Text:Back Container@EXTRAS_MENU: Width:PARENT_RIGHT Visible:False diff --git a/mods/cnc/chrome/missionbrowser.yaml b/mods/cnc/chrome/missionbrowser.yaml new file mode 100644 index 0000000000..dcfb2ad7ae --- /dev/null +++ b/mods/cnc/chrome/missionbrowser.yaml @@ -0,0 +1,82 @@ +Container@MISSIONBROWSER_PANEL: + Logic:MissionBrowserLogic + X:(WINDOW_RIGHT - WIDTH)/2 + Y:(WINDOW_BOTTOM - HEIGHT)/2 + Width:629 + Height:399 + Children: + Label@MISSIONBROWSER_LABEL_TITLE: + Y:0-25 + Width:PARENT_RIGHT + Text:Missions + Align:Center + Font:BigBold + Background@BG: + Width:629 + Height:360 + Background:panel-black + Children: + ScrollPanel@MISSION_LIST: + X:15 + Y:15 + Width:260 + Height:330 + Children: + ScrollItem@MISSION_TEMPLATE: + Width:PARENT_RIGHT-27 + Height:25 + X:2 + Y:0 + Visible:False + Children: + Label@TITLE: + X:10 + Width:PARENT_RIGHT-20 + Height:25 + Container@MISSION_INFO: + X:290 + Y:15 + Width:324 + Height:334 + Children: + Background@MISSION_BG: + X:0 + Y:0 + Width:324 + Height:160 + Background:panel-gray + Children: + MapPreview@MISSION_PREVIEW: + X:2 + Y:2 + Width:PARENT_RIGHT-4 + Height:PARENT_BOTTOM-4 + IgnoreMouseOver:True + IgnoreMouseInput:True + ShowSpawnPoints:False + ScrollPanel@MISSION_DESCRIPTION_PANEL: + X:0 + Y:171 + Width:324 + Height:159 + Children: + Label@MISSION_DESCRIPTION: + X:5 + Y:5 + Width:290 + VAlign:Top + Button@BACK_BUTTON: + X:0 + Y:359 + Width:140 + Height:35 + Text:Back + Font:Bold + Key:escape + Button@STARTGAME_BUTTON: + X:PARENT_RIGHT - 140 + Y:359 + Width:140 + Height:35 + Text:Start Game + Font:Bold \ No newline at end of file diff --git a/mods/cnc/maps/gdi01/map.png b/mods/cnc/maps/gdi01/map.png new file mode 100644 index 0000000000..e0f20803e4 Binary files /dev/null and b/mods/cnc/maps/gdi01/map.png differ diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index c18d68c3f3..c3a9195a2a 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Storm the Beachhead -Description: Conversion of the first GDI Mission +Description: Use the units provided to protect the Mobile Construction Vehicle. (MCV)\n\nYou should then deploy the MCV by double clicking on it.\n\nThen you can begin to build up a base. Start with a Power Plant.\n\nFinally, search out and destroy all enemy Nod units in the surrounding area. Author: Westwood Studios diff --git a/mods/cnc/maps/gdi02/map.png b/mods/cnc/maps/gdi02/map.png new file mode 100644 index 0000000000..6b2ae51c7c Binary files /dev/null and b/mods/cnc/maps/gdi02/map.png differ diff --git a/mods/cnc/maps/gdi02/map.yaml b/mods/cnc/maps/gdi02/map.yaml index a797dc96e9..a4e8489c03 100644 --- a/mods/cnc/maps/gdi02/map.yaml +++ b/mods/cnc/maps/gdi02/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,6 +6,8 @@ RequiresMod: cnc Title: Knock out the Refinery +Description: Defend your position, deploy the MCV, then build a sizable force to search out and destroy the Nod base in the area.\n\nAll Nod units and structures must be either destroyed or captured to complete objective. + Author: Westwood Studios Tileset: TEMPERAT diff --git a/mods/cnc/maps/gdi03/map.png b/mods/cnc/maps/gdi03/map.png new file mode 100644 index 0000000000..bed8513e57 Binary files /dev/null and b/mods/cnc/maps/gdi03/map.png differ diff --git a/mods/cnc/maps/gdi03/map.yaml b/mods/cnc/maps/gdi03/map.yaml index 355e39aca1..64a24899f6 100644 --- a/mods/cnc/maps/gdi03/map.yaml +++ b/mods/cnc/maps/gdi03/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Destroy The SAM Sites -Description: Build up forces to destroy Nod base. Once all Nod SAM sites are neutralized then air support will be provided to combat obstacles such as turrets. Destroy all units and structures to complete the mission objective. +Description: Build up forces to destroy Nod base.\n\nOnce all Nod SAM sites are neutralized then air support will be provided to combat obstacles such as turrets.\n\nDestroy all units and structures to complete the mission objective. Author: Westwood Studios diff --git a/mods/cnc/maps/gdi04a/map.png b/mods/cnc/maps/gdi04a/map.png new file mode 100644 index 0000000000..ff6a235a34 Binary files /dev/null and b/mods/cnc/maps/gdi04a/map.png differ diff --git a/mods/cnc/maps/gdi04a/map.yaml b/mods/cnc/maps/gdi04a/map.yaml index 82152b3445..f03ef094ee 100644 --- a/mods/cnc/maps/gdi04a/map.yaml +++ b/mods/cnc/maps/gdi04a/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Get the Rods back (a) -Description: Nod has captured classified GDI property. You must find and retrieve the stolen equipment. It is being transported in a shipping crate. Use the new APC to strategically transport infantry through Nod forces. +Description: Nod has captured classified GDI property.\n\nYou must find and retrieve the stolen equipment.\n\nIt is being transported in a shipping crate.\n\nUse the new APC to strategically transport infantry through Nod forces. Author: Westwood Studios diff --git a/mods/cnc/maps/nod01/map.png b/mods/cnc/maps/nod01/map.png new file mode 100644 index 0000000000..0b920ef21d Binary files /dev/null and b/mods/cnc/maps/nod01/map.png differ diff --git a/mods/cnc/maps/nod01/map.yaml b/mods/cnc/maps/nod01/map.yaml index a152fa964a..fc6b415d6e 100644 --- a/mods/cnc/maps/nod01/map.yaml +++ b/mods/cnc/maps/nod01/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Nikoomba's Demise -Description: In order for the Brotherhood to gain a foothold, we must begin by eliminating certain elements. Nikoomba, the nearby village's leader, is one such element. His views and ours do not coincide. He and his whole group must be eliminated. +Description: In order for the Brotherhood to gain a foothold, we must begin by eliminating certain elements.\n\nNikoomba, the nearby village's leader, is one such element.\n\nHis views and ours do not coincide.\n\nHe and his whole group must be eliminated. Author: Westwood Studios diff --git a/mods/cnc/maps/nod03a/map.png b/mods/cnc/maps/nod03a/map.png new file mode 100644 index 0000000000..7ea08b2445 Binary files /dev/null and b/mods/cnc/maps/nod03a/map.png differ diff --git a/mods/cnc/maps/nod03a/map.yaml b/mods/cnc/maps/nod03a/map.yaml index 5af37e76bd..628d3a6278 100644 --- a/mods/cnc/maps/nod03a/map.yaml +++ b/mods/cnc/maps/nod03a/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Sudanese Prison Break (a) -Description: GDI has established a prison camp, where they are detaining some of the local political leaders. Kane wishes to liberate these victims. Destroy the GDI forces and capture the prison, do not destroy it. +Description: GDI has established a prison camp, where they are detaining some of the local political leaders.\n\nKane wishes to liberate these victims.\n\nDestroy the GDI forces and capture the prison, do not destroy it. Author: Westwood Studios diff --git a/mods/cnc/maps/nod03b/map.png b/mods/cnc/maps/nod03b/map.png new file mode 100644 index 0000000000..f1bf88f868 Binary files /dev/null and b/mods/cnc/maps/nod03b/map.png differ diff --git a/mods/cnc/maps/nod03b/map.yaml b/mods/cnc/maps/nod03b/map.yaml index f72b40b26b..c79e9c5865 100644 --- a/mods/cnc/maps/nod03b/map.yaml +++ b/mods/cnc/maps/nod03b/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: cnc Title: Sudanese Prison Break (b) -Description: GDI has established a prison camp, where they are detaining some of the local political leaders. Kane wishes to liberate these victims. Destroy the GDI forces and capture the prison, do not destroy it. +Description: GDI has established a prison camp, where they are detaining some of the local political leaders.\n\nKane wishes to liberate these victims.\n\nDestroy the GDI forces and capture the prison, do not destroy it. Author: Westwood Studios diff --git a/mods/cnc/missions.yaml b/mods/cnc/missions.yaml new file mode 100644 index 0000000000..cbe0779331 --- /dev/null +++ b/mods/cnc/missions.yaml @@ -0,0 +1,8 @@ +Missions: + mods/cnc/maps/gdi01 + mods/cnc/maps/gdi02 + mods/cnc/maps/gdi03 + mods/cnc/maps/gdi04a + mods/cnc/maps/nod01 + mods/cnc/maps/nod03a + mods/cnc/maps/nod03b \ No newline at end of file diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index a4b85d32b1..2c64413dee 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -98,6 +98,7 @@ ChromeLayout: mods/cnc/chrome/tooltips.yaml mods/cnc/chrome/irc.yaml mods/cnc/chrome/assetbrowser.yaml + mods/cnc/chrome/missionbrowser.yaml Weapons: mods/cnc/weapons.yaml @@ -184,3 +185,6 @@ LuaScripts: mods/common/lua/rules.lua mods/common/lua/production.lua mods/common/lua/facing.lua + +Missions: + mods/cnc/missions.yaml \ No newline at end of file diff --git a/mods/d2k/chrome/mainmenu.yaml b/mods/d2k/chrome/mainmenu.yaml index a74639271f..0d03554056 100644 --- a/mods/d2k/chrome/mainmenu.yaml +++ b/mods/d2k/chrome/mainmenu.yaml @@ -67,6 +67,40 @@ Container@MAINMENU: Height:30 Text:Quit Font:Bold + Background@SINGLEPLAYER_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@SINGLEPLAYER_MENU_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:Singleplayer + Align:Center + Font:Bold + Button@SKIRMISH_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Skirmish + Font:Bold + Button@MISSIONS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Missions + Font:Bold + Button@BACK_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Key:escape + Y:260 + Width:140 + Height:30 + Text:Back + Font:Bold Background@EXTRAS_MENU: Width:PARENT_RIGHT Height:PARENT_BOTTOM diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index a3cf63a300..f7ee596e72 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -85,6 +85,7 @@ ChromeLayout: mods/d2k/chrome/tooltips.yaml mods/ra/chrome/assetbrowser.yaml mods/ra/chrome/irc.yaml + mods/ra/chrome/missionbrowser.yaml Weapons: mods/d2k/weapons.yaml diff --git a/mods/ra/chrome/mainmenu.yaml b/mods/ra/chrome/mainmenu.yaml index 5a4418a77d..415d781ce9 100644 --- a/mods/ra/chrome/mainmenu.yaml +++ b/mods/ra/chrome/mainmenu.yaml @@ -80,6 +80,40 @@ Container@MAINMENU: Height:30 Text:Quit Font:Bold + Background@SINGLEPLAYER_MENU: + Width:PARENT_RIGHT + Height:PARENT_BOTTOM + Children: + Label@SINGLEPLAYER_MENU_TITLE: + X:0 + Y:20 + Width:200 + Height:30 + Text:Singleplayer + Align:Center + Font:Bold + Button@SKIRMISH_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:60 + Width:140 + Height:30 + Text:Skirmish + Font:Bold + Button@MISSIONS_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Y:100 + Width:140 + Height:30 + Text:Missions + Font:Bold + Button@BACK_BUTTON: + X:PARENT_RIGHT/2-WIDTH/2 + Key:escape + Y:260 + Width:140 + Height:30 + Text:Back + Font:Bold Background@EXTRAS_MENU: Width:PARENT_RIGHT Height:PARENT_BOTTOM diff --git a/mods/ra/chrome/missionbrowser.yaml b/mods/ra/chrome/missionbrowser.yaml new file mode 100644 index 0000000000..3651078e21 --- /dev/null +++ b/mods/ra/chrome/missionbrowser.yaml @@ -0,0 +1,78 @@ +Background@MISSIONBROWSER_PANEL: + Logic:MissionBrowserLogic + X:(WINDOW_RIGHT - WIDTH)/2 + Y:(WINDOW_BOTTOM - HEIGHT)/2 + Width:634 + Height:440 + Children: + Label@MISSIONBROWSER_LABEL_TITLE: + X:0 + Y:20 + Width:PARENT_RIGHT + Height:25 + Text:Missions + Align:Center + Font:Bold + ScrollPanel@MISSION_LIST: + X:20 + Y:50 + Width:260 + Height:330 + Children: + ScrollItem@MISSION_TEMPLATE: + Width:PARENT_RIGHT-27 + Height:25 + X:2 + Y:0 + Children: + Label@TITLE: + X:10 + Width:PARENT_RIGHT-20 + Height:25 + Container@MISSION_INFO: + X:290 + Y:50 + Width:324 + Height:330 + Children: + Background@MISSION_BG: + X:0 + Y:0 + Width:324 + Height:160 + Background:dialog3 + Children: + MapPreview@MISSION_PREVIEW: + X:2 + Y:2 + Width:PARENT_RIGHT-4 + Height:PARENT_BOTTOM-4 + IgnoreMouseOver:True + IgnoreMouseInput:True + ShowSpawnPoints:False + ScrollPanel@MISSION_DESCRIPTION_PANEL: + X:0 + Y:170 + Width:324 + Height:160 + Children: + Label@MISSION_DESCRIPTION: + X:5 + Y:5 + Width:290 + VAlign:Top + Button@STARTGAME_BUTTON: + X:PARENT_RIGHT - 140 - 130 + Y:PARENT_BOTTOM - 45 + Width:120 + Height:25 + Text:Start Game + Font:Bold + Button@BACK_BUTTON: + X:PARENT_RIGHT - 140 + Y:PARENT_BOTTOM - 45 + Width:120 + Height:25 + Text:Back + Font:Bold + Key:escape \ No newline at end of file diff --git a/mods/ra/maps/allies-01-classic/map.png b/mods/ra/maps/allies-01-classic/map.png new file mode 100644 index 0000000000..20080e725c Binary files /dev/null and b/mods/ra/maps/allies-01-classic/map.png differ diff --git a/mods/ra/maps/allies-01-classic/map.yaml b/mods/ra/maps/allies-01-classic/map.yaml index ceccf30c61..dcb3e119e7 100644 --- a/mods/ra/maps/allies-01-classic/map.yaml +++ b/mods/ra/maps/allies-01-classic/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: ra Title: Allies 01: In the thick of it -Description: In the thick of it +Description: Rescue Einstein from the Headquarters inside this Soviet complex.\n\nOnce found, evacuate him via the helicopter at the signal flare.\n\nEinstein and Tanya must be kept alive at all costs.\n\nBeware the Soviet's Tesla Coils.\n\nDirect Tanya to destroy the westmost power plants to take them off-line. Author: Westwood Studios diff --git a/mods/ra/maps/allies-02-classic/map.png b/mods/ra/maps/allies-02-classic/map.png new file mode 100644 index 0000000000..e9dcb2a0a4 Binary files /dev/null and b/mods/ra/maps/allies-02-classic/map.png differ diff --git a/mods/ra/maps/allies-02-classic/map.yaml b/mods/ra/maps/allies-02-classic/map.yaml index bcde5590f4..0f69327aa6 100644 --- a/mods/ra/maps/allies-02-classic/map.yaml +++ b/mods/ra/maps/allies-02-classic/map.yaml @@ -1,4 +1,4 @@ -Selectable: True +Selectable: False MapFormat: 6 @@ -6,7 +6,7 @@ RequiresMod: ra Title: Allies 02: Five to one -Description: Five to one +Description: A critical supply convoy is due through this area in 25 minutes, but Soviet forces have blocked the road in several places.\n\nUnless you can clear them out, those supplies will never make it to the front.\n\nThe convoy will come from the northwest, and time is short so work quickly. Author: Westwood Studios diff --git a/mods/ra/missions.yaml b/mods/ra/missions.yaml new file mode 100644 index 0000000000..9e9b2c6375 --- /dev/null +++ b/mods/ra/missions.yaml @@ -0,0 +1,3 @@ +Missions: + mods/ra/maps/allies-01-classic + mods/ra/maps/allies-02-classic \ No newline at end of file diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 82aaa851eb..ac7c802bd8 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -99,6 +99,7 @@ ChromeLayout: mods/ra/chrome/tooltips.yaml mods/ra/chrome/assetbrowser.yaml mods/ra/chrome/irc.yaml + mods/ra/chrome/missionbrowser.yaml Weapons: mods/ra/weapons.yaml @@ -181,3 +182,6 @@ LuaScripts: mods/common/lua/rules.lua mods/common/lua/production.lua mods/common/lua/facing.lua + +Missions: + mods/ra/missions.yaml \ No newline at end of file diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 4c63838675..1c899c455a 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -124,6 +124,7 @@ ChromeLayout: mods/ra/chrome/tooltips.yaml mods/ra/chrome/assetbrowser.yaml mods/ra/chrome/irc.yaml + mods/ra/chrome/missionbrowser.yaml Weapons: mods/ts/weapons.yaml