diff --git a/OpenRA.Game/Map/Map.cs b/OpenRA.Game/Map/Map.cs index 45ccb07ec8..19148d4405 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 a9601b338b..0f86bbdc35 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 353498888d..28175c6bd6 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -157,17 +157,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 c1b9ec5313..d9412b941e 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 26f4c99b3a..28d3202018 100644 --- a/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj +++ b/OpenRA.Mods.Common/OpenRA.Mods.Common.csproj @@ -581,7 +581,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 065ee7a850..12c695b705 100644 --- a/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs @@ -392,29 +392,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 65f40d5e5c..9f381f2e73 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Lobby/LobbyLogic.cs @@ -373,15 +373,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 d319185c6f..9ccbb3ed33 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/GpsPower.cs @@ -33,7 +33,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 { readonly GpsPowerInfo info; GpsWatcher owner; @@ -76,11 +76,6 @@ namespace OpenRA.Mods.RA.Traits owner.GpsRemove(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/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/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..e5659c63b6 100644 --- a/mods/d2k/chrome/lobby-options.yaml +++ b/mods/d2k/chrome/lobby-options.yaml @@ -18,58 +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: 150 - Width: 140 - Height: 20 - Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 150 - Y: 35 - Width: 140 + X: 170 + Width: 225 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 290 - Width: 140 + X: 170 + Y: 35 + Width: 225 Height: 20 Text: Build off Allies' ConYards - Checkbox@FRAGILEALLIANCES_CHECKBOX: - X: 290 - Y: 35 - Width: 140 + Checkbox@SHORTGAME_CHECKBOX: + X: 400 + Width: 150 Height: 20 - Text: Diplomacy Changes + 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: 150 - Y: 70 - 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: @@ -81,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 @@ -95,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 @@ -112,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 @@ -121,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/d2k/mod.yaml b/mods/d2k/mod.yaml index 71e61e6fb7..f5147ab525 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -67,7 +67,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..eea655dd8a 100644 --- a/mods/ra/chrome/lobby-options.yaml +++ b/mods/ra/chrome/lobby-options.yaml @@ -18,39 +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: 150 - Width: 140 - Height: 20 - Text: Short Game Checkbox@CRATES_CHECKBOX: - X: 150 - Y: 35 - Width: 140 + X: 170 + Width: 225 Height: 20 Text: Crates Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X: 290 - Width: 140 + X: 170 + Y: 35 + Width: 225 Height: 20 Text: Build off Allies' ConYards - Checkbox@FRAGILEALLIANCES_CHECKBOX: - X: 290 - Y: 35 - Width: 140 + Checkbox@SHORTGAME_CHECKBOX: + X: 400 + Width: 150 Height: 20 - Text: Diplomacy Changes + Text: Short Game Checkbox@ALLOWCHEATS_CHECKBOX: - Y: 70 - Width: 140 + X: 400 + Y: 35 + Width: 150 Height: 20 Text: Debug Menu Label@DIFFICULTY_DESC: diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 367a9da05d..ccffdaf38e 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 diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 368f4995ce..94c8dc2961 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -80,7 +80,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 b2782587f2..283f92dfa4 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -132,7 +132,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