From d15b46235079c608a68293d8d295970d85135f04 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 22 Mar 2018 23:01:06 +0100 Subject: [PATCH] Remove the deprecated Difficulty member from MapGlobal (lua) --- OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs index 82b3d042f3..f00b7efb43 100644 --- a/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/MapGlobal.cs @@ -110,20 +110,6 @@ namespace OpenRA.Mods.Common.Scripting [Desc("Returns true if there is only one human player.")] public bool IsSinglePlayer { get { return Context.World.LobbyInfo.NonBotPlayers.Count() == 1; } } - [Desc("Returns the difficulty selected by the player before starting the mission.")] - 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) {