From aa491a35c8273a2adff60b0a3c9b188cb32392c8 Mon Sep 17 00:00:00 2001 From: Oliver Brakmann Date: Sat, 30 Jan 2016 21:39:18 +0100 Subject: [PATCH 1/3] Fix Monster Tank Madness to not use Player.SetStance --- mods/ra/maps/monster-tank-madness/map.yaml | 8 +++++++- .../ra/maps/monster-tank-madness/monster-tank-madness.lua | 5 ++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index ec9951cb2f..b2148f3ee1 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -42,7 +42,7 @@ Players: Color: ABB7E4 LockSpawn: True LockTeam: True - Enemies: BadGuy, USSR, Ukraine, Turkey + Enemies: BadGuy, USSR, Ukraine, Turkey, FriendlyMadTanks PlayerReference@BadGuy: Name: BadGuy Faction: soviet @@ -71,6 +71,12 @@ Players: Faction: soviet Color: D1987C Enemies: Greece, BadGuy, USSR, Ukraine, Outpost + PlayerReference@FriendlyMadTanks: + Name: FriendlyMadTanks + Faction: soviet + Color: D1987C + Allies: Greece + Enemies: BadGuy, USSR, Ukraine PlayerReference@Outpost: Name: Outpost NonCombatant: True diff --git a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua index 2249f7cf28..74fd14a786 100644 --- a/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua +++ b/mods/ra/maps/monster-tank-madness/monster-tank-madness.lua @@ -124,11 +124,9 @@ LandingPossible = function() end SuperTankDomeInfiltrated = function() - turkey.SetStance(player, "Ally") - turkey.SetStance(neutral, "Ally") - SuperTankAttack = true Utils.Do(SuperTanks, function(tnk) + tnk.Owner = friendlyMadTanks if not tnk.IsDead then Trigger.ClearAll(tnk) tnk.Stop() @@ -276,6 +274,7 @@ InitPlayers = function() ussr = Player.GetPlayer("USSR") ukraine = Player.GetPlayer("Ukraine") turkey = Player.GetPlayer("Turkey") + friendlyMadTanks = Player.GetPlayer("FriendlyMadTanks") player.Cash = 0 ussr.Cash = 2000 From 73b3f20921d517c6ac63f4353e073733d87beaab Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 30 Jan 2016 18:12:35 +0000 Subject: [PATCH 2/3] Remove fragile alliances feature. --- OpenRA.Game/Map/Map.cs | 3 - OpenRA.Game/Network/Session.cs | 1 - OpenRA.Game/Network/UnitOrders.cs | 23 ---- OpenRA.Game/Player.cs | 11 -- OpenRA.Game/Traits/TraitsInterfaces.cs | 6 - OpenRA.Mods.Common/OpenRA.Mods.Common.csproj | 1 - .../Properties/DiplomacyProperties.cs | 8 -- .../ServerTraits/LobbyCommands.cs | 23 ---- .../ServerTraits/LobbySettingsNotification.cs | 3 - .../Widgets/Logic/Ingame/DiplomacyLogic.cs | 108 ------------------ .../Widgets/Logic/Lobby/LobbyLogic.cs | 9 -- .../Traits/SupportPowers/GpsPower.cs | 7 +- mods/d2k/chrome/ingame-player.yaml | 18 --- mods/d2k/chrome/lobby-options.yaml | 16 +-- mods/d2k/mod.yaml | 1 - mods/ra/chrome/ingame-diplomacy.yaml | 91 --------------- mods/ra/chrome/ingame-player.yaml | 19 --- mods/ra/chrome/lobby-options.yaml | 15 +-- mods/ra/mod.yaml | 1 - mods/ts/chrome/ingame-player.yaml | 20 ---- mods/ts/mod.yaml | 1 - 21 files changed, 11 insertions(+), 374 deletions(-) delete mode 100644 OpenRA.Mods.Common/Widgets/Logic/Ingame/DiplomacyLogic.cs delete mode 100644 mods/ra/chrome/ingame-diplomacy.yaml diff --git a/OpenRA.Game/Map/Map.cs b/OpenRA.Game/Map/Map.cs index 230c794bf4..f8c16039c4 100644 --- a/OpenRA.Game/Map/Map.cs +++ b/OpenRA.Game/Map/Map.cs @@ -63,7 +63,6 @@ namespace OpenRA public bool? Fog; public bool? Shroud; public bool? AllyBuildRadius; - public bool? FragileAlliances; public int? StartingCash; public string TechLevel; public bool ConfigurableStartingUnits = true; @@ -86,8 +85,6 @@ namespace OpenRA settings.AllyBuildRadius = AllyBuildRadius.Value; if (StartingCash.HasValue) settings.StartingCash = StartingCash.Value; - if (FragileAlliances.HasValue) - settings.FragileAlliances = FragileAlliances.Value; if (ShortGame.HasValue) settings.ShortGame = ShortGame.Value; } diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index e452f09a07..2c7c469844 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -179,7 +179,6 @@ namespace OpenRA.Network public int Timestep = 40; public int OrderLatency = 3; // net tick frames (x 120 = ms) public int RandomSeed = 0; - public bool FragileAlliances = false; // Allow diplomatic stance changes after game start. public bool AllowCheats = false; public bool AllowSpectators = true; public bool Dedicated; diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index 53cff53af5..e596d89bae 100644 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -265,29 +265,6 @@ namespace OpenRA.Network break; } - case "SetStance": - { - if (!Game.OrderManager.LobbyInfo.GlobalSettings.FragileAlliances) - return; - - var targetPlayer = order.Player.World.Players.FirstOrDefault(p => p.InternalName == order.TargetString); - var newStance = (Stance)order.ExtraData; - - order.Player.SetStance(targetPlayer, newStance); - - Game.Debug("{0} has set diplomatic stance vs {1} to {2}", - order.Player.PlayerName, targetPlayer.PlayerName, newStance); - - // automatically declare war reciprocally - if (newStance == Stance.Enemy && targetPlayer.Stances[order.Player] == Stance.Ally) - { - targetPlayer.SetStance(order.Player, newStance); - Game.Debug("{0} has reciprocated", targetPlayer.PlayerName); - } - - break; - } - case "Ping": { orderManager.IssueOrder(Order.Pong(order.TargetString)); diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 1e21983465..b45c1b3008 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -141,17 +141,6 @@ namespace OpenRA return p == null || Stances[p] == Stance.Ally || (p.Spectating && !NonCombatant); } - public void SetStance(Player target, Stance s) - { - var oldStance = Stances[target]; - Stances[target] = s; - target.Shroud.UpdatePlayerStance(World, this, oldStance, s); - Shroud.UpdatePlayerStance(World, target, oldStance, s); - - foreach (var nsc in World.ActorsWithTrait()) - nsc.Trait.StanceChanged(nsc.Actor, this, target, oldStance, s); - } - public bool CanViewActor(Actor a) { return a.CanBeViewedByPlayer(this); diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index e346d4191a..71dfc1627a 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -364,12 +364,6 @@ namespace OpenRA.Traits IEnumerable TargetablePositions(Actor self); } - public interface INotifyStanceChanged - { - void StanceChanged(Actor self, Player a, Player b, - Stance oldStance, Stance newStance); - } - public interface ILintPass { void Run(Action emitError, Action emitWarning); } public interface ILintMapPass { void Run(Action emitError, Action emitWarning, Map map); } public interface ILintRulesPass { void Run(Action emitError, Action emitWarning, Ruleset rules); } diff --git a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj index a6952e89d7..a19f9186f2 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -582,7 +582,6 @@ - diff --git a/OpenRA.Mods.Common/Scripting/Properties/DiplomacyProperties.cs b/OpenRA.Mods.Common/Scripting/Properties/DiplomacyProperties.cs index 96f5a88909..15b9d9b7be 100644 --- a/OpenRA.Mods.Common/Scripting/Properties/DiplomacyProperties.cs +++ b/OpenRA.Mods.Common/Scripting/Properties/DiplomacyProperties.cs @@ -24,13 +24,5 @@ namespace OpenRA.Mods.Common.Scripting { return Player.IsAlliedWith(targetPlayer); } - - [Desc("Changes the current stance of the player against the target player. " + - "Allowed keywords for new stance: Ally, Neutral, Enemy.")] - public void SetStance(Player targetPlayer, string newStance) - { - var emergingStance = Enum.Parse(newStance); - Player.SetStance(targetPlayer, emergingStance); - } } } \ No newline at end of file diff --git a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs index 86dc76dfb8..bce93fa560 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -381,29 +381,6 @@ namespace OpenRA.Mods.Common.Server return true; } }, - { "fragilealliance", - s => - { - if (!client.IsAdmin) - { - server.SendOrderTo(conn, "Message", "Only the host can set that option."); - return true; - } - - if (server.Map.Options.FragileAlliances.HasValue) - { - server.SendOrderTo(conn, "Message", "Map has disabled alliance configuration."); - return true; - } - - bool.TryParse(s, out server.LobbyInfo.GlobalSettings.FragileAlliances); - server.SyncLobbyGlobalSettings(); - server.SendMessage("{0} {1} Diplomacy Changes." - .F(client.Name, server.LobbyInfo.GlobalSettings.FragileAlliances ? "enabled" : "disabled")); - - return true; - } - }, { "allowcheats", s => { diff --git a/OpenRA.Mods.Common/ServerTraits/LobbySettingsNotification.cs b/OpenRA.Mods.Common/ServerTraits/LobbySettingsNotification.cs index e7072971f2..79954ba1ff 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbySettingsNotification.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbySettingsNotification.cs @@ -25,9 +25,6 @@ namespace OpenRA.Mods.Common.Server var defaults = new Session.Global(); FieldLoader.Load(defaults, Game.ModData.Manifest.LobbyDefaults); - if (server.LobbyInfo.GlobalSettings.FragileAlliances != defaults.FragileAlliances) - server.SendOrderTo(conn, "Message", "Diplomacy Changes: {0}".F(server.LobbyInfo.GlobalSettings.FragileAlliances)); - if (server.LobbyInfo.GlobalSettings.AllowCheats != defaults.AllowCheats) server.SendOrderTo(conn, "Message", "Allow Cheats: {0}".F(server.LobbyInfo.GlobalSettings.AllowCheats)); diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/DiplomacyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/DiplomacyLogic.cs deleted file mode 100644 index f949f53d2b..0000000000 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/DiplomacyLogic.cs +++ /dev/null @@ -1,108 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2015 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.Linq; -using OpenRA.Network; -using OpenRA.Traits; -using OpenRA.Widgets; - -namespace OpenRA.Mods.Common.Widgets.Logic -{ - public class DiplomacyLogic : ChromeLogic - { - readonly World world; - - ScrollPanelWidget diplomacyPanel; - - [ObjectCreator.UseCtor] - public DiplomacyLogic(Widget widget, Action onExit, World world) - { - this.world = world; - - diplomacyPanel = widget.Get("DIPLOMACY_PANEL"); - - LayoutPlayers(); - - var close = widget.GetOrNull("CLOSE"); - if (close != null) - close.OnClick = () => - { - Ui.CloseWindow(); - Ui.Root.RemoveChild(widget); - onExit(); - }; - } - - void LayoutPlayers() - { - var teamTemplate = diplomacyPanel.Get("TEAM_TEMPLATE"); - var players = world.Players.Where(p => p != world.LocalPlayer && !p.NonCombatant); - var teams = players.GroupBy(p => (world.LobbyInfo.ClientWithIndex(p.ClientIndex) ?? new Session.Client()).Team).OrderBy(g => g.Key); - foreach (var t in teams) - { - var team = t; - var tt = ScrollItemWidget.Setup(teamTemplate, () => false, () => { }); - tt.IgnoreMouseOver = true; - tt.Get("TEAM").GetText = () => team.Key == 0 ? "No Team" : "Team " + team.Key; - diplomacyPanel.AddChild(tt); - foreach (var p in team) - { - var player = p; - diplomacyPanel.AddChild(DiplomaticStatus(player)); - } - } - } - - ScrollItemWidget DiplomaticStatus(Player player) - { - var playerTemplate = diplomacyPanel.Get("PLAYER_TEMPLATE"); - var pt = ScrollItemWidget.Setup(playerTemplate, () => false, () => { }); - pt.IgnoreMouseOver = true; - LobbyUtils.AddPlayerFlagAndName(pt, player); - pt.Get("THEIR_STANCE").GetText = () => player.Stances[world.LocalPlayer].ToString(); - var myStance = pt.Get("MY_STANCE"); - myStance.GetText = () => world.LocalPlayer.Stances[player].ToString(); - myStance.IsDisabled = () => !world.LobbyInfo.GlobalSettings.FragileAlliances; - myStance.OnMouseDown = mi => ShowDropDown(player, myStance); - return pt; - } - - void ShowDropDown(Player p, DropDownButtonWidget dropdown) - { - var stances = Enum.GetValues(); - Func setupItem = (s, template) => - { - var item = ScrollItemWidget.Setup(template, - () => s == world.LocalPlayer.Stances[p], - () => SetStance(dropdown, p, s)); - - item.Get("LABEL").GetText = () => s.ToString(); - return item; - }; - - dropdown.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", 150, stances, setupItem); - } - - void SetStance(ButtonWidget bw, Player p, Stance ss) - { - if (!p.World.LobbyInfo.GlobalSettings.FragileAlliances) - return; // stance changes are banned - - world.IssueOrder(new Order("SetStance", world.LocalPlayer.PlayerActor, false) - { - ExtraData = (uint)ss, - TargetString = p.InternalName, - }); - - bw.Text = ss.ToString(); - } - } -} diff --git a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs index 20061830f4..bf3dcbf2ee 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -372,15 +372,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic "allybuildradius {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllyBuildRadius))); } - var fragileAlliance = optionsBin.GetOrNull("FRAGILEALLIANCES_CHECKBOX"); - if (fragileAlliance != null) - { - fragileAlliance.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.FragileAlliances; - fragileAlliance.IsDisabled = () => Map.Status != MapStatus.Available || Map.Map.Options.FragileAlliances.HasValue || configurationDisabled(); - fragileAlliance.OnClick = () => orderManager.IssueOrder(Order.Command( - "fragilealliance {0}".F(!orderManager.LobbyInfo.GlobalSettings.FragileAlliances))); - } - var shortGame = optionsBin.GetOrNull("SHORTGAME_CHECKBOX"); if (shortGame != null) { diff --git a/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs b/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs index 8a5930dd1b..3d5afd817a 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs @@ -118,7 +118,7 @@ namespace OpenRA.Mods.RA.Traits public override object Create(ActorInitializer init) { return new GpsPower(init.Self, this); } } - class GpsPower : SupportPower, INotifyKilled, INotifyStanceChanged, INotifySold, INotifyOwnerChanged + class GpsPower : SupportPower, INotifyKilled, INotifySold, INotifyOwnerChanged { GpsWatcher owner; @@ -159,11 +159,6 @@ namespace OpenRA.Mods.RA.Traits owner.GpsRem(self); } - public void StanceChanged(Actor self, Player a, Player b, Stance oldStance, Stance newStance) - { - owner.RefreshGps(self); - } - public void OnOwnerChanged(Actor self, Player oldOwner, Player newOwner) { RemoveGps(self); diff --git a/mods/d2k/chrome/ingame-player.yaml b/mods/d2k/chrome/ingame-player.yaml index fd414ff4f5..6edba7d1ec 100644 --- a/mods/d2k/chrome/ingame-player.yaml +++ b/mods/d2k/chrome/ingame-player.yaml @@ -109,24 +109,6 @@ Container@PLAYER_WIDGETS: X: 0 Y: 0 ImageCollection: order-icons - MenuButton@DIPLOMACY_BUTTON: - MenuContainer: INGAME_DIPLOMACY_BG - HideIngameUI: false - Pause: false - Key: P - X: 159 - Width: 25 - Height: 25 - Background: - TooltipText: Diplomacy - TooltipContainer: TOOLTIP_CONTAINER - VisualHeight: 0 - Children: - Image@ICON: - X: 0 - Y: 0 - ImageCollection: order-icons - ImageName: diplomacy MenuButton@OPTIONS_BUTTON: Key: escape X: 78 diff --git a/mods/d2k/chrome/lobby-options.yaml b/mods/d2k/chrome/lobby-options.yaml index 46b4b76476..c91d87da7a 100644 --- a/mods/d2k/chrome/lobby-options.yaml +++ b/mods/d2k/chrome/lobby-options.yaml @@ -27,35 +27,29 @@ Background@LOBBY_OPTIONS_BIN: Height: 20 Text: Fog of War Checkbox@SHORTGAME_CHECKBOX: - X: 150 + X: 180 Width: 140 Height: 20 Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 150 + X: 180 Y: 35 Width: 140 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 290 + X: 350 Width: 140 Height: 20 Text: Build off Allies' ConYards - Checkbox@FRAGILEALLIANCES_CHECKBOX: - X: 290 - Y: 35 - Width: 140 - Height: 20 - Text: Diplomacy Changes Checkbox@CREEPS_CHECKBOX: Y: 70 Width: 140 Height: 20 Text: Worms Checkbox@ALLOWCHEATS_CHECKBOX: - X: 150 - Y: 70 + X: 350 + Y: 35 Width: 140 Height: 20 Text: Debug Menu diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 4a4b283fb0..4cdad1f67d 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -69,7 +69,6 @@ Assemblies: ChromeLayout: d2k:chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml - ./mods/ra/chrome/ingame-diplomacy.yaml ./mods/ra/chrome/ingame-fmvplayer.yaml d2k:chrome/ingame-menu.yaml ./mods/ra/chrome/ingame-info.yaml diff --git a/mods/ra/chrome/ingame-diplomacy.yaml b/mods/ra/chrome/ingame-diplomacy.yaml deleted file mode 100644 index 2b38aa6d2a..0000000000 --- a/mods/ra/chrome/ingame-diplomacy.yaml +++ /dev/null @@ -1,91 +0,0 @@ -Background@INGAME_DIPLOMACY_BG: - Logic: DiplomacyLogic - X: (WINDOW_RIGHT - WIDTH)/2 - Y: (WINDOW_BOTTOM - HEIGHT)/2 - Width: 490 - Height: 355 - Children: - Label@LABEL_TITLE: - X: (PARENT_RIGHT - WIDTH)/2 - Y: 17 - Width: 250 - Height: 20 - Text: Diplomacy - Align: Center - Font: Bold - Container@DIPLOMACY_HEADERS: - X: 20 - Y: 40 - Width: PARENT_RIGHT-40 - Height: PARENT_BOTTOM - Children: - Label@PLAYER_HEADER: - X: 20 - Width: 160 - Height: 25 - Font: Bold - Text: Player - Label@THEIR_STANCE_HEADER: - X: 210 - Width: 80 - Height: 25 - Font: Bold - Text: Their Stance - Align: Center - Label@MY_STANCE_HEADER: - X: 307 - Width: 100 - Height: 25 - Font: Bold - Text: My Stance - Align: Center - ScrollPanel@DIPLOMACY_PANEL: - X: 20 - Y: 67 - Width: PARENT_RIGHT-40 - Height: PARENT_BOTTOM-87-35 - TopBottomSpacing: 5 - ItemSpacing: 5 - Children: - ScrollItem@TEAM_TEMPLATE: - Width: PARENT_RIGHT - Height: 25 - Children: - Label@TEAM: - X: 10 - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Font: Bold - ScrollItem@PLAYER_TEMPLATE: - Width: PARENT_RIGHT-35 - Height: 25 - Children: - Image@FLAG: - X: 20 - Y: 5 - Width: 35 - Height: PARENT_BOTTOM-5 - ImageName: random - ImageCollection: flags - Label@PLAYER: - X: 55 - Width: 160 - Height: PARENT_BOTTOM - Font: Bold - Label@THEIR_STANCE: - X: 210 - Width: 80 - Height: PARENT_BOTTOM - Align: Center - DropDownButton@MY_STANCE: - X: 307 - Width: 100 - Height: PARENT_BOTTOM - Button@CLOSE: - X: PARENT_RIGHT-145 - Y: PARENT_BOTTOM - 45 - Width: 120 - Height: 25 - Text: Close - Key: escape - Font: Bold diff --git a/mods/ra/chrome/ingame-player.yaml b/mods/ra/chrome/ingame-player.yaml index c3339086da..4bdae9a94a 100644 --- a/mods/ra/chrome/ingame-player.yaml +++ b/mods/ra/chrome/ingame-player.yaml @@ -115,25 +115,6 @@ Container@PLAYER_WIDGETS: Y: 6 ImageCollection: order-icons ImageName: debug - MenuButton@DIPLOMACY_BUTTON: - Logic: AddFactionSuffixLogic - MenuContainer: INGAME_DIPLOMACY_BG - HideIngameUI: false - Pause: false - Key: P - X: 160 - Width: 28 - Height: 28 - Background: sidebar-button - TooltipText: Diplomacy - TooltipContainer: TOOLTIP_CONTAINER - VisualHeight: 0 - Children: - Image@ICON: - X: 6 - Y: 6 - ImageCollection: order-icons - ImageName: diplomacy MenuButton@OPTIONS_BUTTON: Logic: AddFactionSuffixLogic Key: escape diff --git a/mods/ra/chrome/lobby-options.yaml b/mods/ra/chrome/lobby-options.yaml index 7740854979..fb67fe2137 100644 --- a/mods/ra/chrome/lobby-options.yaml +++ b/mods/ra/chrome/lobby-options.yaml @@ -27,29 +27,24 @@ Background@LOBBY_OPTIONS_BIN: Height: 20 Text: Fog of War Checkbox@SHORTGAME_CHECKBOX: - X: 150 + X: 180 Width: 140 Height: 20 Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 150 + X: 180 Y: 35 Width: 140 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 290 + X: 350 Width: 140 Height: 20 Text: Build off Allies' ConYards - Checkbox@FRAGILEALLIANCES_CHECKBOX: - X: 290 - Y: 35 - Width: 140 - Height: 20 - Text: Diplomacy Changes Checkbox@ALLOWCHEATS_CHECKBOX: - Y: 70 + X: 350 + Y: 35 Width: 140 Height: 20 Text: Debug Menu diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 20674cec31..c0397fd1c1 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -82,7 +82,6 @@ Assemblies: ChromeLayout: ./mods/ra/chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml - ./mods/ra/chrome/ingame-diplomacy.yaml ./mods/ra/chrome/ingame-fmvplayer.yaml ./mods/ra/chrome/ingame-info.yaml ./mods/ra/chrome/ingame-infoscripterror.yaml diff --git a/mods/ts/chrome/ingame-player.yaml b/mods/ts/chrome/ingame-player.yaml index 68933c7756..32bc04882c 100644 --- a/mods/ts/chrome/ingame-player.yaml +++ b/mods/ts/chrome/ingame-player.yaml @@ -118,26 +118,6 @@ Container@PLAYER_WIDGETS: X: 0 Y: 0 ImageCollection: order-icons - MenuButton@DIPLOMACY_BUTTON: - Logic: AddFactionSuffixLogic - MenuContainer: INGAME_DIPLOMACY_BG - HideIngameUI: false - Pause: false - Key: P - X: 163 - Width: 30 - Height: 31 - Background: sidebar-button - TooltipText: Diplomacy - TooltipContainer: TOOLTIP_CONTAINER - VisualHeight: 0 - Children: - Image@ICON: - Logic: AddFactionSuffixLogic - X: 0 - Y: 0 - ImageCollection: order-icons - ImageName: diplomacy MenuButton@OPTIONS_BUTTON: Logic: AddFactionSuffixLogic Key: escape diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index 9e2eb7b762..ba722d96c9 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -134,7 +134,6 @@ Assemblies: ChromeLayout: ./mods/ra/chrome/ingame.yaml ./mods/ra/chrome/ingame-chat.yaml - ./mods/ra/chrome/ingame-diplomacy.yaml ./mods/ra/chrome/ingame-fmvplayer.yaml ./mods/ra/chrome/ingame-menu.yaml ./mods/ts/chrome/ingame-info.yaml From b387e6a19e2e54921f43e5a5f8b67fd56ea8f061 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 30 Jan 2016 20:36:43 +0000 Subject: [PATCH 3/3] Polish the lobby option bin layout. --- mods/cnc/chrome/lobby-options.yaml | 82 +++++++++++++++--------------- mods/d2k/chrome/lobby-options.yaml | 57 +++++++++++---------- mods/ra/chrome/lobby-options.yaml | 28 +++++----- 3 files changed, 83 insertions(+), 84 deletions(-) diff --git a/mods/cnc/chrome/lobby-options.yaml b/mods/cnc/chrome/lobby-options.yaml index 07316ef02a..eec77b7ad0 100644 --- a/mods/cnc/chrome/lobby-options.yaml +++ b/mods/cnc/chrome/lobby-options.yaml @@ -17,106 +17,104 @@ Background@LOBBY_OPTIONS_BIN: Height: PARENT_BOTTOM-75 Children: Checkbox@EXPLORED_MAP_CHECKBOX: - Width: 230 + Width: 150 Height: 20 Font: Regular Text: Explored Map Checkbox@FOG_CHECKBOX: Y: 35 - Width: 230 + Width: 150 Height: 20 Font: Regular Text: Fog of War Checkbox@CRATES_CHECKBOX: - X: 140 - Width: 230 + X: 170 + Width: 225 Height: 20 Font: Regular Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 140 + X: 170 Y: 35 - Width: 230 + Width: 225 Height: 20 Font: Regular Text: Build off Allies' ConYards Checkbox@SHORTGAME_CHECKBOX: - X: 365 - Width: 230 + X: 400 + Width: 150 Height: 20 Font: Regular Text: Short Game Checkbox@ALLOWCHEATS_CHECKBOX: - X: 365 + X: 400 Y: 35 - Width: 230 + Width: 150 Height: 20 Font: Regular Text: Debug Menu - Label@STARTINGCASH_DESC: - X: 10 - Y: 72 - Width: 70 + Label@DIFFICULTY_DESC: + X: PARENT_RIGHT - WIDTH - 165 + Y: 70 + Width: 160 + Height: 25 + Text: Mission Difficulty: + Align: Right + DropDownButton@DIFFICULTY_DROPDOWNBUTTON: + X: PARENT_RIGHT - WIDTH + Y: 70 + Width: 160 Height: 25 Font: Regular + Label@STARTINGCASH_DESC: + Y: 110 + Width: 80 + Height: 25 Text: Starting Cash: Align: Right DropDownButton@STARTINGCASH_DROPDOWNBUTTON: X: 85 - Y: 72 - Width: 120 + Y: 110 + Width: 160 Height: 25 Font: Regular Text: $5000 Label@STARTINGUNITS_DESC: - X: PARENT_RIGHT - WIDTH - 135 - Y: 72 + X: PARENT_RIGHT - WIDTH - 165 + Y: 110 Width: 120 Height: 25 Text: Starting Units: Align: Right DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: - X: PARENT_RIGHT - WIDTH + 10 - Y: 72 - Width: 140 + X: PARENT_RIGHT - WIDTH + Y: 110 + Width: 160 Height: 25 Font: Regular DropDownButton@TECHLEVEL_DROPDOWNBUTTON: X: 85 - Y: 112 - Width: 120 + Y: 150 + Width: 160 Height: 25 Font: Regular Text: 10 Label@TECHLEVEL_DESC: - Y: 112 + Y: 150 Width: 80 Height: 25 Text: Tech Level: Align: Right Label@GAMESPEED_DESC: - X: PARENT_RIGHT - WIDTH - 135 - Y: 112 + X: PARENT_RIGHT - WIDTH - 165 + Y: 150 Width: 120 Height: 25 Text: Game Speed: Align: Right DropDownButton@GAMESPEED_DROPDOWNBUTTON: - X: PARENT_RIGHT - WIDTH + 10 - Y: 112 - Width: 140 - Height: 25 - Font: Regular - Label@DIFFICULTY_DESC: - X: PARENT_RIGHT - WIDTH - 135 - Y: 152 - Width: 120 - Height: 25 - Text: Mission Difficulty: - Align: Right - DropDownButton@DIFFICULTY_DROPDOWNBUTTON: - X: PARENT_RIGHT - WIDTH + 10 - Y: 152 - Width: 140 + X: PARENT_RIGHT - WIDTH + Y: 150 + Width: 160 Height: 25 Font: Regular diff --git a/mods/d2k/chrome/lobby-options.yaml b/mods/d2k/chrome/lobby-options.yaml index c91d87da7a..e5659c63b6 100644 --- a/mods/d2k/chrome/lobby-options.yaml +++ b/mods/d2k/chrome/lobby-options.yaml @@ -18,52 +18,53 @@ Background@LOBBY_OPTIONS_BIN: Height: PARENT_BOTTOM-75 Children: Checkbox@EXPLORED_MAP_CHECKBOX: - Width: 140 + Width: 150 Height: 20 Text: Explored Map Checkbox@FOG_CHECKBOX: Y: 35 - Width: 140 + Width: 150 Height: 20 Text: Fog of War - Checkbox@SHORTGAME_CHECKBOX: - X: 180 - Width: 140 - Height: 20 - Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 180 - Y: 35 - Width: 140 + X: 170 + Width: 225 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 350 - Width: 140 + X: 170 + Y: 35 + Width: 225 Height: 20 Text: Build off Allies' ConYards + Checkbox@SHORTGAME_CHECKBOX: + X: 400 + Width: 150 + Height: 20 + Text: Short Game + Checkbox@ALLOWCHEATS_CHECKBOX: + X: 400 + Y: 35 + Width: 150 + Height: 20 + Font: Regular + Text: Debug Menu Checkbox@CREEPS_CHECKBOX: Y: 70 - Width: 140 + Width: 150 Height: 20 Text: Worms - Checkbox@ALLOWCHEATS_CHECKBOX: - X: 350 - Y: 35 - Width: 140 - Height: 20 - Text: Debug Menu Label@DIFFICULTY_DESC: - X: PARENT_RIGHT - WIDTH - 145 + X: PARENT_RIGHT - WIDTH - 165 Y: 70 - Width: 120 + Width: 160 Height: 25 Text: Mission Difficulty: Align: Right DropDownButton@DIFFICULTY_DROPDOWNBUTTON: X: PARENT_RIGHT - WIDTH Y: 70 - Width: 140 + Width: 160 Height: 25 Font: Regular Label@STARTINGCASH_DESC: @@ -75,12 +76,12 @@ Background@LOBBY_OPTIONS_BIN: DropDownButton@STARTINGCASH_DROPDOWNBUTTON: X: 85 Y: 110 - Width: 130 + Width: 160 Height: 25 Font: Regular Text: $5000 Label@STARTINGUNITS_DESC: - X: PARENT_RIGHT - WIDTH - 145 + X: PARENT_RIGHT - WIDTH - 165 Y: 110 Width: 120 Height: 25 @@ -89,13 +90,13 @@ Background@LOBBY_OPTIONS_BIN: DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: X: PARENT_RIGHT - WIDTH Y: 110 - Width: 140 + Width: 160 Height: 25 Font: Regular DropDownButton@TECHLEVEL_DROPDOWNBUTTON: X: 85 Y: 150 - Width: 130 + Width: 160 Height: 25 Font: Regular Text: 10 @@ -106,7 +107,7 @@ Background@LOBBY_OPTIONS_BIN: Text: Tech Level: Align: Right Label@GAMESPEED_DESC: - X: PARENT_RIGHT - WIDTH - 145 + X: PARENT_RIGHT - WIDTH - 165 Y: 150 Width: 120 Height: 25 @@ -115,6 +116,6 @@ Background@LOBBY_OPTIONS_BIN: DropDownButton@GAMESPEED_DROPDOWNBUTTON: X: PARENT_RIGHT - WIDTH Y: 150 - Width: 140 + Width: 160 Height: 25 Font: Regular diff --git a/mods/ra/chrome/lobby-options.yaml b/mods/ra/chrome/lobby-options.yaml index fb67fe2137..eea655dd8a 100644 --- a/mods/ra/chrome/lobby-options.yaml +++ b/mods/ra/chrome/lobby-options.yaml @@ -18,34 +18,34 @@ Background@LOBBY_OPTIONS_BIN: Height: PARENT_BOTTOM-75 Children: Checkbox@EXPLORED_MAP_CHECKBOX: - Width: 140 + Width: 150 Height: 20 Text: Explored Map Checkbox@FOG_CHECKBOX: Y: 35 - Width: 140 + Width: 150 Height: 20 Text: Fog of War - Checkbox@SHORTGAME_CHECKBOX: - X: 180 - Width: 140 - Height: 20 - Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 180 - Y: 35 - Width: 140 + X: 170 + Width: 225 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 350 - Width: 140 + X: 170 + Y: 35 + Width: 225 Height: 20 Text: Build off Allies' ConYards + Checkbox@SHORTGAME_CHECKBOX: + X: 400 + Width: 150 + Height: 20 + Text: Short Game Checkbox@ALLOWCHEATS_CHECKBOX: - X: 350 + X: 400 Y: 35 - Width: 140 + Width: 150 Height: 20 Text: Debug Menu Label@DIFFICULTY_DESC: