diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index a7beed5d53..8c0ce94545 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -192,7 +192,6 @@ namespace OpenRA.Network public int OrderLatency = 3; // net tick frames (x 120 = ms) public int RandomSeed = 0; public bool AllowSpectators = true; - public string Difficulty; public string GameSpeedType = "default"; public bool AllowVersionMismatch; public string GameUid; diff --git a/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs index 351035e8b9..55618624f5 100644 --- a/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs @@ -105,7 +105,18 @@ namespace OpenRA.Mods.Common.Scripting public bool IsSinglePlayer { get { return Context.World.LobbyInfo.IsSinglePlayer; } } [Desc("Returns the difficulty selected by the player before starting the mission.")] - public string Difficulty { get { return Context.World.LobbyInfo.GlobalSettings.Difficulty; } } + public string Difficulty + { + get + { + Game.Debug("Map script is using deprecated Map.Difficulty API. This should be changed to Map.LobbyOption(\"difficulty\")."); + Log.Write("lua", "Map script is using deprecated Map.Difficulty API. This should be changed to Map.LobbyOption(\"difficulty\")."); + var option = Context.World.WorldActor.TraitsImplementing() + .FirstOrDefault(sld => sld.Info.ID == "difficulty"); + + return option != null ? option.Info.Values[option.Value] : null; + } + } [Desc("Returns the value of a `ScriptLobbyDropdown` selected in the game lobby.")] public LuaValue LobbyOption(string id) diff --git a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs index 7375ffd4de..0755851d30 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -506,39 +506,6 @@ namespace OpenRA.Mods.Common.Server return true; } }, - { "difficulty", - s => - { - if (server.LobbyInfo.GlobalSettings.Difficulty == s) - return true; - - if (!client.IsAdmin) - { - server.SendOrderTo(conn, "Message", "Only the host can set that option."); - return true; - } - - var mapOptions = server.Map.Rules.Actors["world"].TraitInfo(); - if (mapOptions.DifficultyLocked || !mapOptions.Difficulties.Any()) - { - server.SendOrderTo(conn, "Message", "Map has disabled difficulty configuration."); - return true; - } - - if (s != null && !mapOptions.Difficulties.Contains(s)) - { - server.SendOrderTo(conn, "Message", "Invalid difficulty selected: {0}".F(s)); - server.SendOrderTo(conn, "Message", "Supported values: {0}".F(mapOptions.Difficulties.JoinWith(", "))); - return true; - } - - server.LobbyInfo.GlobalSettings.Difficulty = s; - server.SyncLobbyGlobalSettings(); - server.SendMessage("{0} changed difficulty to {1}.".F(client.Name, s)); - - return true; - } - }, { "gamespeed", s => { diff --git a/OpenRA.Mods.Common/Traits/World/MapOptions.cs b/OpenRA.Mods.Common/Traits/World/MapOptions.cs index 70cb14b88d..114b4a0294 100644 --- a/OpenRA.Mods.Common/Traits/World/MapOptions.cs +++ b/OpenRA.Mods.Common/Traits/World/MapOptions.cs @@ -30,15 +30,6 @@ namespace OpenRA.Mods.Common.Traits [Desc("Prevent the tech level from being changed in the lobby.")] public readonly bool TechLevelLocked = false; - [Desc("Difficulty levels supported by the map.")] - public readonly string[] Difficulties = { }; - - [Desc("Default difficulty level.")] - public readonly string Difficulty = null; - - [Desc("Prevent the difficulty from being changed in the lobby.")] - public readonly bool DifficultyLocked = false; - IEnumerable ILobbyOptions.LobbyOptions(Ruleset rules) { yield return new LobbyBooleanOption("shortgame", "Short Game", ShortGameEnabled, ShortGameLocked); diff --git a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs index 98878fcba7..c64ca21234 100644 --- a/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs +++ b/OpenRA.Mods.Common/UtilityCommands/UpgradeRules.cs @@ -94,6 +94,8 @@ namespace OpenRA.Mods.Common.UtilityCommands internal static void UpgradeActorRules(int engineVersion, ref List nodes, MiniYamlNode parent, int depth) { + var addNodes = new List(); + foreach (var node in nodes) { if (engineVersion < 20160515) @@ -146,8 +148,48 @@ namespace OpenRA.Mods.Common.UtilityCommands } } + // Map difficulty configuration was split to a generic trait + if (engineVersion < 20160614 && node.Key.StartsWith("MapOptions")) + { + var difficultiesNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "Difficulties"); + if (difficultiesNode != null) + { + var difficulties = FieldLoader.GetValue("Difficulties", difficultiesNode.Value.Value) + .ToDictionary(d => d.Replace(" ", "").ToLowerInvariant(), d => d); + node.Value.Nodes.Remove(difficultiesNode); + + var childNodes = new List() + { + new MiniYamlNode("ID", "difficulty"), + new MiniYamlNode("Label", "Difficulty"), + new MiniYamlNode("Values", new MiniYaml("", difficulties.Select(kv => new MiniYamlNode(kv.Key, kv.Value)).ToList())) + }; + + var difficultyNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "Difficulty"); + if (difficultyNode != null) + { + childNodes.Add(new MiniYamlNode("Default", difficultyNode.Value.Value.Replace(" ", "").ToLowerInvariant())); + node.Value.Nodes.Remove(difficultyNode); + } + else + childNodes.Add(new MiniYamlNode("Default", difficulties.Keys.First())); + + var lockedNode = node.Value.Nodes.FirstOrDefault(n => n.Key == "DifficultyLocked"); + if (lockedNode != null) + { + childNodes.Add(new MiniYamlNode("Locked", lockedNode.Value.Value)); + node.Value.Nodes.Remove(lockedNode); + } + + addNodes.Add(new MiniYamlNode("ScriptLobbyDropdown@difficulty", new MiniYaml("", childNodes))); + } + } + UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1); } + + foreach (var a in addNodes) + nodes.Add(a); } internal static void UpgradeWeaponRules(int engineVersion, ref List nodes, MiniYamlNode parent, int depth) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index c2a4dcd39f..182f09c3f5 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -368,6 +368,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic { "TECHLEVEL", "techlevel" }, { "STARTINGUNITS", "startingunits" }, { "STARTINGCASH", "startingcash" }, + { "DIFFICULTY", "difficulty" } }; var allOptions = new CachedTransform( @@ -423,35 +424,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - var difficulty = optionsBin.GetOrNull("DIFFICULTY_DROPDOWNBUTTON"); - if (difficulty != null) - { - var mapOptions = new CachedTransform( - map => map.Rules.Actors["world"].TraitInfo()); - - difficulty.IsVisible = () => Map.RulesLoaded && mapOptions.Update(Map).Difficulties.Any(); - difficulty.IsDisabled = () => configurationDisabled() || mapOptions.Update(Map).DifficultyLocked; - difficulty.GetText = () => orderManager.LobbyInfo.GlobalSettings.Difficulty; - difficulty.OnMouseDown = _ => - { - var options = mapOptions.Update(Map).Difficulties.Select(d => new DropDownOption - { - Title = d, - IsSelected = () => orderManager.LobbyInfo.GlobalSettings.Difficulty == d, - OnClick = () => orderManager.IssueOrder(Order.Command("difficulty {0}".F(d))) - }); - Func setupItem = (option, template) => - { - var item = ScrollItemWidget.Setup(template, option.IsSelected, option.OnClick); - item.Get("LABEL").GetText = () => option.Title; - return item; - }; - difficulty.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", options.Count() * 30, options, setupItem); - }; - - optionsBin.Get("DIFFICULTY_DESC").IsVisible = difficulty.IsVisible; - } - var gameSpeed = optionsBin.GetOrNull("GAMESPEED_DROPDOWNBUTTON"); if (gameSpeed != null) { diff --git a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs index 50297c4532..430b78d60a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/MissionBrowserLogic.cs @@ -196,7 +196,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic // Cache the rules on a background thread to avoid jank var difficultyDisabled = true; - var difficulties = new string[0]; + var difficulties = new Dictionary(); var briefingVideo = ""; var briefingVideoVisible = false; @@ -206,11 +206,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic new Thread(() => { - var mapOptions = preview.Rules.Actors["world"].TraitInfo(); + var mapDifficulty = preview.Rules.Actors["world"].TraitInfos() + .FirstOrDefault(sld => sld.ID == "difficulty"); - difficulty = mapOptions.Difficulty ?? mapOptions.Difficulties.FirstOrDefault(); - difficulties = mapOptions.Difficulties; - difficultyDisabled = mapOptions.DifficultyLocked || mapOptions.Difficulties.Length <= 1; + if (mapDifficulty != null) + { + difficulty = mapDifficulty.Default; + difficulties = mapDifficulty.Values; + difficultyDisabled = mapDifficulty.Locked; + } var missionData = preview.Rules.Actors["world"].TraitInfoOrDefault(); if (missionData != null) @@ -245,15 +249,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (difficultyButton != null) { + var difficultyName = new CachedTransform(id => id == null || !difficulties.ContainsKey(id) ? "Normal" : difficulties[id]); difficultyButton.IsDisabled = () => difficultyDisabled; - difficultyButton.GetText = () => difficulty ?? "Normal"; + difficultyButton.GetText = () => difficultyName.Update(difficulty); difficultyButton.OnMouseDown = _ => { - var options = difficulties.Select(d => new DropDownOption + var options = difficulties.Select(kv => new DropDownOption { - Title = d, - IsSelected = () => difficulty == d, - OnClick = () => difficulty = d + Title = kv.Value, + IsSelected = () => difficulty == kv.Key, + OnClick = () => difficulty = kv.Key }); Func setupItem = (option, template) => @@ -361,7 +366,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var orders = new[] { Order.Command("gamespeed {0}".F(gameSpeed)), - Order.Command("difficulty {0}".F(difficulty)), + Order.Command("option difficulty {0}".F(difficulty)), Order.Command("state {0}".F(Session.ClientState.Ready)) }; diff --git a/mods/cnc/maps/funpark01/rules.yaml b/mods/cnc/maps/funpark01/rules.yaml index e3481c0e83..3902c173c5 100644 --- a/mods/cnc/maps/funpark01/rules.yaml +++ b/mods/cnc/maps/funpark01/rules.yaml @@ -8,9 +8,15 @@ World: BriefingVideo: generic.vqa StartVideo: dino.vqa MapOptions: - Difficulties: Easy, Normal ShortGameLocked: True ShortGameEnabled: False + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + Default: easy Player: EnemyWatcher: diff --git a/mods/cnc/maps/gdi05a/rules.yaml b/mods/cnc/maps/gdi05a/rules.yaml index 7dda4d4989..b340c04c74 100644 --- a/mods/cnc/maps/gdi05a/rules.yaml +++ b/mods/cnc/maps/gdi05a/rules.yaml @@ -11,7 +11,6 @@ World: WinVideo: nodlose.vqa LossVideo: gdilose.vqa MapOptions: - Difficulties: Easy, Normal, Hard ShortGameLocked: True ShortGameEnabled: False SmudgeLayer@SCORCH: @@ -27,6 +26,14 @@ World: 41,54: cr1,0 13,52: cr1,0 11,51: cr1,0 + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy Player: EnemyWatcher: diff --git a/mods/cnc/maps/gdi06/rules.yaml b/mods/cnc/maps/gdi06/rules.yaml index 73d3de5b31..56ac3c5523 100644 --- a/mods/cnc/maps/gdi06/rules.yaml +++ b/mods/cnc/maps/gdi06/rules.yaml @@ -31,9 +31,16 @@ World: WinVideo: sabotage.vqa LossVideo: gdilose.vqa MapOptions: - Difficulties: Easy, Normal, Hard ShortGameLocked: True ShortGameEnabled: True + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy Player: PlayerResources: diff --git a/mods/cnc/maps/nod09/rules.yaml b/mods/cnc/maps/nod09/rules.yaml index fa55a0e344..cd3188b36b 100644 --- a/mods/cnc/maps/nod09/rules.yaml +++ b/mods/cnc/maps/nod09/rules.yaml @@ -9,7 +9,6 @@ World: LossVideo: banner.vqa BriefingVideo: nod9.vqa MapOptions: - Difficulties: Easy, Normal, Hard SmudgeLayer@SCORCH: InitialSmudges: 20,55: sc2,0 @@ -29,6 +28,14 @@ World: 8,55: cr1,0 8,54: cr1,0 7,54: cr1,0 + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy Player: PlayerResources: diff --git a/mods/d2k/maps/atreides-01a/rules.yaml b/mods/d2k/maps/atreides-01a/rules.yaml index 836d030b18..837a7c28e5 100644 --- a/mods/d2k/maps/atreides-01a/rules.yaml +++ b/mods/d2k/maps/atreides-01a/rules.yaml @@ -10,7 +10,14 @@ World: BriefingVideo: A_BR01_E.VQA MapOptions: TechLevel: Low - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy construction_yard: Production: diff --git a/mods/d2k/maps/atreides-01b/rules.yaml b/mods/d2k/maps/atreides-01b/rules.yaml index 36aefe379e..dea5776dcb 100644 --- a/mods/d2k/maps/atreides-01b/rules.yaml +++ b/mods/d2k/maps/atreides-01b/rules.yaml @@ -10,7 +10,14 @@ World: BriefingVideo: A_BR01_E.VQA MapOptions: TechLevel: Low - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy construction_yard: Production: diff --git a/mods/d2k/maps/atreides-02a/rules.yaml b/mods/d2k/maps/atreides-02a/rules.yaml index 88ce27827c..778382f4d8 100644 --- a/mods/d2k/maps/atreides-02a/rules.yaml +++ b/mods/d2k/maps/atreides-02a/rules.yaml @@ -10,7 +10,14 @@ World: BriefingVideo: A_BR02_E.VQA MapOptions: TechLevel: Low - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy carryall.reinforce: Cargo: diff --git a/mods/d2k/maps/atreides-02b/rules.yaml b/mods/d2k/maps/atreides-02b/rules.yaml index 3e0ae34184..4bc0043e98 100644 --- a/mods/d2k/maps/atreides-02b/rules.yaml +++ b/mods/d2k/maps/atreides-02b/rules.yaml @@ -10,7 +10,14 @@ World: BriefingVideo: A_BR02_E.VQA MapOptions: TechLevel: Low - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy carryall.reinforce: Cargo: diff --git a/mods/d2k/maps/atreides-03a/rules.yaml b/mods/d2k/maps/atreides-03a/rules.yaml index 15a6692025..cac1d75756 100644 --- a/mods/d2k/maps/atreides-03a/rules.yaml +++ b/mods/d2k/maps/atreides-03a/rules.yaml @@ -10,7 +10,14 @@ World: BriefingVideo: A_BR03_E.VQA MapOptions: TechLevel: Low - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy carryall.reinforce: Cargo: diff --git a/mods/ra/maps/allies-02/rules.yaml b/mods/ra/maps/allies-02/rules.yaml index 7fc8d3fbfd..2a36600d53 100644 --- a/mods/ra/maps/allies-02/rules.yaml +++ b/mods/ra/maps/allies-02/rules.yaml @@ -12,11 +12,18 @@ World: WinVideo: montpass.vqa LossVideo: frozen.vqa MapOptions: - Difficulties: Easy, Normal, Hard, Real tough guy SmudgeLayer@CRATER: InitialSmudges: 60,79: cr1,0 - + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + realtoughguy: Real tough guy + Default: easy HARV: Buildable: diff --git a/mods/ra/maps/allies-03a/rules.yaml b/mods/ra/maps/allies-03a/rules.yaml index 57ecd05659..cb5a3953e6 100644 --- a/mods/ra/maps/allies-03a/rules.yaml +++ b/mods/ra/maps/allies-03a/rules.yaml @@ -7,7 +7,13 @@ World: WinVideo: toofar.vqa LossVideo: sovtstar.vqa MapOptions: - Difficulties: Easy, Normal + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + Default: easy ^Building: Capturable: diff --git a/mods/ra/maps/allies-03b/rules.yaml b/mods/ra/maps/allies-03b/rules.yaml index 4c1c5e20aa..96fec64cf1 100644 --- a/mods/ra/maps/allies-03b/rules.yaml +++ b/mods/ra/maps/allies-03b/rules.yaml @@ -7,7 +7,13 @@ World: WinVideo: toofar.vqa LossVideo: sovtstar.vqa MapOptions: - Difficulties: Easy, Normal + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + Default: easy ^Building: Capturable: diff --git a/mods/ra/maps/allies-05a/rules.yaml b/mods/ra/maps/allies-05a/rules.yaml index f5c8b2d79f..66430303e6 100644 --- a/mods/ra/maps/allies-05a/rules.yaml +++ b/mods/ra/maps/allies-05a/rules.yaml @@ -9,7 +9,15 @@ World: LossVideo: grvestne.vqa MapOptions: TechLevel: Medium - Difficulties: Easy, Normal, Hard, Real tough guy + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + realtoughguy: Real tough guy + Default: easy Camera.Truk: AlwaysVisible: diff --git a/mods/ra/maps/evacuation/rules.yaml b/mods/ra/maps/evacuation/rules.yaml index c64b72e243..b44cd061b3 100644 --- a/mods/ra/maps/evacuation/rules.yaml +++ b/mods/ra/maps/evacuation/rules.yaml @@ -13,8 +13,13 @@ World: Scripts: evacuation.lua MapOptions: TechLevelLocked: True - Difficulties: Easy, Normal - Difficulty: Normal + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + Default: normal ^Tanks: Demolishable: @@ -214,4 +219,3 @@ powerproxy.paras2: AlwaysVisible: ParatroopersPower: DropItems: E1,E1,E1,E2,E2 - diff --git a/mods/ra/maps/fort-lonestar/rules.yaml b/mods/ra/maps/fort-lonestar/rules.yaml index 1784b269a9..235fe5dc42 100644 --- a/mods/ra/maps/fort-lonestar/rules.yaml +++ b/mods/ra/maps/fort-lonestar/rules.yaml @@ -38,9 +38,19 @@ World: MapOptions: TechLevelLocked: True TechLevel: Unrestricted - Difficulties: Hard (4P), Normal (3P), Easy (2P), Very Easy (1P), Real tough guy, Endless mode ShortGameLocked: True ShortGameEnabled: False + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + hard(4p): Hard (4P) + normal(3p): Normal (3P) + easy(2p): Easy (2P) + veryeasy(1p): Very Easy (1P) + realtoughguy: Real tough guy + endlessmode: Endless mode + Default: hard(4p) FORTCRATE: Inherits: ^Crate diff --git a/mods/ra/maps/intervention/rules.yaml b/mods/ra/maps/intervention/rules.yaml index 851bc9886d..133399d7d9 100644 --- a/mods/ra/maps/intervention/rules.yaml +++ b/mods/ra/maps/intervention/rules.yaml @@ -8,7 +8,13 @@ World: MissionData: Briefing: The Soviet Air Force is flying air raids against a civilian village.\n\nWe have to do everything in our power to stop them!\n\nYour job is to establish a base on the mainland ASAP. We can prevent the village's destruction by capturing the enemy's Air Force Headquarters building. The enemy base is heavily guarded, though. You will not have enough time to build a force big enough to overpower the Soviet defences. You will have to find a way to sneak in!\n\nGood luck, Commander!\n MapOptions: - Difficulties: Medium, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + medium: Medium + hard: Hard + Default: medium CAMERA: RevealsShroud: diff --git a/mods/ra/maps/soviet-03/rules.yaml b/mods/ra/maps/soviet-03/rules.yaml index 25d307faa5..6cff7d7a6e 100644 --- a/mods/ra/maps/soviet-03/rules.yaml +++ b/mods/ra/maps/soviet-03/rules.yaml @@ -8,7 +8,14 @@ World: WinVideo: execute.vqa LossVideo: take_off.vqa MapOptions: - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy ^TechBuilding: AutoTargetIgnore: diff --git a/mods/ra/maps/soviet-04a/rules.yaml b/mods/ra/maps/soviet-04a/rules.yaml index 8dcbf3a21b..22a3a26d34 100644 --- a/mods/ra/maps/soviet-04a/rules.yaml +++ b/mods/ra/maps/soviet-04a/rules.yaml @@ -13,7 +13,14 @@ World: LossVideo: allymorf.vqa MapOptions: TechLevel: Medium - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy AFLD: ParatroopersPower@paratroopers: diff --git a/mods/ra/maps/soviet-04b/rules.yaml b/mods/ra/maps/soviet-04b/rules.yaml index 27c50c796d..15e8348355 100644 --- a/mods/ra/maps/soviet-04b/rules.yaml +++ b/mods/ra/maps/soviet-04b/rules.yaml @@ -13,7 +13,14 @@ World: LossVideo: allymorf.vqa MapOptions: TechLevel: Medium - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy AFLD: ParatroopersPower@paratroopers: diff --git a/mods/ra/maps/soviet-05/rules.yaml b/mods/ra/maps/soviet-05/rules.yaml index b15129ce44..b68da7a676 100644 --- a/mods/ra/maps/soviet-05/rules.yaml +++ b/mods/ra/maps/soviet-05/rules.yaml @@ -13,7 +13,14 @@ World: LossVideo: sovbatl.vqa MapOptions: TechLevel: Medium - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy AFLD: ParatroopersPower@paratroopers: diff --git a/mods/ra/maps/soviet-06a/rules.yaml b/mods/ra/maps/soviet-06a/rules.yaml index 7ac9163cb1..a6346339fa 100644 --- a/mods/ra/maps/soviet-06a/rules.yaml +++ b/mods/ra/maps/soviet-06a/rules.yaml @@ -12,7 +12,14 @@ World: WinVideo: sitduck.vqa LossVideo: dpthchrg.vqa MapOptions: - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy APWR: Buildable: diff --git a/mods/ra/maps/soviet-06b/rules.yaml b/mods/ra/maps/soviet-06b/rules.yaml index 390a0e16b0..cdc548d08f 100644 --- a/mods/ra/maps/soviet-06b/rules.yaml +++ b/mods/ra/maps/soviet-06b/rules.yaml @@ -12,7 +12,14 @@ World: WinVideo: sitduck.vqa LossVideo: dpthchrg.vqa MapOptions: - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy APWR: Buildable: diff --git a/mods/ra/maps/soviet-07/rules.yaml b/mods/ra/maps/soviet-07/rules.yaml index 7f87055a45..dcc84d54ec 100644 --- a/mods/ra/maps/soviet-07/rules.yaml +++ b/mods/ra/maps/soviet-07/rules.yaml @@ -8,7 +8,14 @@ World: WinVideo: averted.vqa LossVideo: nukestok.vqa MapOptions: - Difficulties: Easy, Normal, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + normal: Normal + hard: Hard + Default: easy ^Infantry: -GivesBounty: diff --git a/mods/ra/maps/survival01/rules.yaml b/mods/ra/maps/survival01/rules.yaml index 56578e9aee..ac186dab20 100644 --- a/mods/ra/maps/survival01/rules.yaml +++ b/mods/ra/maps/survival01/rules.yaml @@ -8,7 +8,14 @@ World: MissionData: Briefing: LANDCOM 66 HQS.\nTOP SECRET.\nTO: FIELD COMMANDER A34\n\nTHE SOVIETS STARTED HEAVY ATTACKS AT OUR POSITION.\n SURVIVE AND HOLD THE BASE UNTIL OUR FRENCH ALLIES ARRIVE.\n\nCONFIRMATION CODE 5593.\n\nTRANSMISSION ENDS. MapOptions: - Difficulties: Easy, Medium, Hard + ScriptLobbyDropdown@difficulty: + ID: difficulty + Label: Difficulty + Values: + easy: Easy + medium: Medium + hard: Hard + Default: easy powerproxy.paratroopers: ParatroopersPower: