From ca90b2e6f15e32a5e13374cff3a941a21391a2b4 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 10:03:57 +1200 Subject: [PATCH 1/8] Add FieldLoader support for Nullable. --- OpenRA.FileFormats/FieldLoader.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OpenRA.FileFormats/FieldLoader.cs b/OpenRA.FileFormats/FieldLoader.cs index d48ac4ed94..6698a60d89 100755 --- a/OpenRA.FileFormats/FieldLoader.cs +++ b/OpenRA.FileFormats/FieldLoader.cs @@ -276,6 +276,13 @@ namespace OpenRA.FileFormats return fieldType.GetConstructor(argTypes).Invoke(argValues); } + else if (fieldType.IsGenericType && fieldType.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + var innerType = fieldType.GetGenericArguments().First(); + var innerValue = GetValue("Nullable", innerType, x); + return fieldType.GetConstructor(new []{ innerType }).Invoke(new []{ innerValue }); + } + UnknownFieldAction("[Type] {0}".F(x), fieldType); return null; } From d76a8c29502ed2a3ef8ffa32ee5f2b0d03369d32 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 10:54:54 +1200 Subject: [PATCH 2/8] Allow maps to override options. Closes #3646. Also set sensible defaults for most of the maps and mini games. --- OpenRA.Game/Map.cs | 41 ++- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 46 +++- OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 16 +- mods/cnc/maps/gdi01/map.yaml | 7 +- mods/cnc/maps/nod01/map.yaml | 7 +- mods/cnc/maps/the-hot-box.oramap | Bin 2208 -> 0 bytes mods/cnc/maps/the-hot-box/map.bin | Bin 0 -> 20485 bytes mods/cnc/maps/the-hot-box/map.yaml | 245 ++++++++++++++++++ mods/ra/maps/Fort-Lonestar/map.yaml | 6 + mods/ra/maps/Survival01/map.yaml | 11 +- mods/ra/maps/Survival02/map.yaml | 8 +- mods/ra/maps/allies-01/map.yaml | 7 +- mods/ra/maps/allies-02/map.yaml | 6 + mods/ra/maps/allies-03/map.yaml | 7 +- mods/ra/maps/allies-04/map.yaml | 7 +- mods/ra/maps/bomber-john/map.yaml | 6 + .../maps/drop-zone-battle-of-tikiaki/map.yaml | 9 +- mods/ra/maps/drop-zone-w/map.yaml | 9 +- mods/ra/maps/drop-zone/map.yaml | 9 +- mods/ra/maps/monster-tank-madness/map.yaml | 6 + mods/ra/maps/soviet-01-classic/map.yaml | 6 + mods/ra/maps/training-camp/map.yaml | 6 + 22 files changed, 437 insertions(+), 28 deletions(-) delete mode 100644 mods/cnc/maps/the-hot-box.oramap create mode 100755 mods/cnc/maps/the-hot-box/map.bin create mode 100755 mods/cnc/maps/the-hot-box/map.yaml diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index f792d41884..1e3bc30bcc 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -16,10 +16,36 @@ using System.Linq; using System.Security.Cryptography; using System.Text; using OpenRA.FileFormats; +using OpenRA.Network; using OpenRA.Traits; namespace OpenRA { + public class MapOptions + { + public bool? Cheats; + public bool? Crates; + public bool? Fog; + public bool? Shroud; + public bool? FragileAlliances; + public bool ConfigurableStartingUnits = true; + public string[] Difficulties; + + public void UpdateServerSettings(Session.Global settings) + { + if (Cheats.HasValue) + settings.AllowCheats = Cheats.Value; + if (Crates.HasValue) + settings.Crates = Crates.Value; + if (Fog.HasValue) + settings.Fog = Fog.Value; + if (Shroud.HasValue) + settings.Shroud = Shroud.Value; + if (FragileAlliances.HasValue) + settings.FragileAlliances = FragileAlliances.Value; + } + } + public class Map { [FieldLoader.Ignore] IFolder container; @@ -37,9 +63,20 @@ namespace OpenRA public string Description; public string Author; public string Tileset; - public string[] Difficulties; public bool AllowStartUnitConfig = true; + [FieldLoader.LoadUsing("LoadOptions")] + public MapOptions Options; + + static object LoadOptions(MiniYaml y) + { + var options = new MapOptions(); + if (y.NodesDict.ContainsKey("Options")) + FieldLoader.Load(options, y.NodesDict["Options"]); + + return options; + } + [FieldLoader.Ignore] public Lazy> Actors; public int PlayerCount { get { return Players.Count(p => p.Value.Playable); } } @@ -177,7 +214,7 @@ namespace OpenRA "Description", "Author", "Tileset", - "Difficulties", + "Options", "MapSize", "Bounds", "UseAsShellmap", diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 9d500e0cc5..c9db7aa6ee 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -309,6 +309,12 @@ namespace OpenRA.Mods.RA.Server 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.SyncLobbyInfo(); return true; @@ -322,6 +328,12 @@ namespace OpenRA.Mods.RA.Server return true; } + if (server.Map.Options.Cheats.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled cheat configuration"); + return true; + } + bool.TryParse(s, out server.lobbyInfo.GlobalSettings.AllowCheats); server.SyncLobbyInfo(); return true; @@ -335,6 +347,12 @@ namespace OpenRA.Mods.RA.Server return true; } + if (server.Map.Options.Shroud.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled shroud configuration"); + return true; + } + bool.TryParse(s, out server.lobbyInfo.GlobalSettings.Shroud); server.SyncLobbyInfo(); return true; @@ -348,6 +366,13 @@ namespace OpenRA.Mods.RA.Server return true; } + if (server.Map.Options.Fog.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled fog configuration"); + return true; + } + + bool.TryParse(s, out server.lobbyInfo.GlobalSettings.Fog); server.SyncLobbyInfo(); return true; @@ -402,6 +427,12 @@ namespace OpenRA.Mods.RA.Server return true; } + if (server.Map.Options.Crates.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled crate configuration"); + return true; + } + bool.TryParse(s, out server.lobbyInfo.GlobalSettings.Crates); server.SyncLobbyInfo(); return true; @@ -414,10 +445,11 @@ namespace OpenRA.Mods.RA.Server server.SendOrderTo(conn, "Message", "Only the host can set that option"); return true; } - if ((server.Map.Difficulties == null && s != null) || (server.Map.Difficulties != null && !server.Map.Difficulties.Contains(s))) + + if ((server.Map.Options.Difficulties == null && s != null) || (server.Map.Options.Difficulties != null && !server.Map.Options.Difficulties.Contains(s))) { server.SendOrderTo(conn, "Message", "Unsupported difficulty selected: {0}".F(s)); - server.SendOrderTo(conn, "Message", "Supported difficulties: {0}".F(server.Map.Difficulties.JoinWith(","))); + server.SendOrderTo(conn, "Message", "Supported difficulties: {0}".F(server.Map.Options.Difficulties.JoinWith(","))); return true; } @@ -434,7 +466,7 @@ namespace OpenRA.Mods.RA.Server return true; } - if (!server.Map.AllowStartUnitConfig) + if (!server.Map.Options.ConfigurableStartingUnits) { server.SendOrderTo(conn, "Message", "Map has disabled start unit configuration"); return true; @@ -636,14 +668,16 @@ namespace OpenRA.Mods.RA.Server .Select(p => MakeSlotFromPlayerReference(p.Value)) .Where(s => s != null) .ToDictionary(s => s.PlayerReference, s => s); + + server.Map.Options.UpdateServerSettings(server.lobbyInfo.GlobalSettings); } static void SetDefaultDifficulty(S server) { - if (server.Map.Difficulties != null && server.Map.Difficulties.Any()) + if (server.Map.Options.Difficulties != null && server.Map.Options.Difficulties.Any()) { - if (!server.Map.Difficulties.Contains(server.lobbyInfo.GlobalSettings.Difficulty)) - server.lobbyInfo.GlobalSettings.Difficulty = server.Map.Difficulties.First(); + if (!server.Map.Options.Difficulties.Contains(server.lobbyInfo.GlobalSettings.Difficulty)) + server.lobbyInfo.GlobalSettings.Difficulty = server.Map.Options.Difficulties.First(); } else server.lobbyInfo.GlobalSettings.Difficulty = null; } diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index fb2e025eac..b0c5d1ce20 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -272,7 +272,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (allowCheats != null) { allowCheats.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.AllowCheats; - allowCheats.IsDisabled = configurationDisabled; + allowCheats.IsDisabled = () => Map.Options.Cheats.HasValue || configurationDisabled(); allowCheats.OnClick = () => orderManager.IssueOrder(Order.Command( "allowcheats {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllowCheats))); } @@ -281,7 +281,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (crates != null) { crates.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.Crates; - crates.IsDisabled = configurationDisabled; + crates.IsDisabled = () => Map.Options.Crates.HasValue || configurationDisabled(); crates.OnClick = () => orderManager.IssueOrder(Order.Command( "crates {0}".F(!orderManager.LobbyInfo.GlobalSettings.Crates))); } @@ -290,7 +290,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (fragileAlliance != null) { fragileAlliance.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.FragileAlliances; - fragileAlliance.IsDisabled = configurationDisabled; + fragileAlliance.IsDisabled = () => Map.Options.FragileAlliances.HasValue || configurationDisabled(); fragileAlliance.OnClick = () => orderManager.IssueOrder(Order.Command( "fragilealliance {0}".F(!orderManager.LobbyInfo.GlobalSettings.FragileAlliances))); }; @@ -298,12 +298,12 @@ namespace OpenRA.Mods.RA.Widgets.Logic var difficulty = optionsBin.GetOrNull("DIFFICULTY_DROPDOWNBUTTON"); if (difficulty != null) { - difficulty.IsVisible = () => Map != null && Map.Difficulties != null && Map.Difficulties.Any(); + difficulty.IsVisible = () => Map.Options.Difficulties != null && Map.Options.Difficulties.Any(); difficulty.IsDisabled = configurationDisabled; difficulty.GetText = () => orderManager.LobbyInfo.GlobalSettings.Difficulty; difficulty.OnMouseDown = _ => { - var options = Map.Difficulties.Select(d => new DropDownOption + var options = Map.Options.Difficulties.Select(d => new DropDownOption { Title = d, IsSelected = () => orderManager.LobbyInfo.GlobalSettings.Difficulty == d, @@ -336,7 +336,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic .Select(a => a.Class).Distinct(); startingUnits.IsDisabled = configurationDisabled; - startingUnits.IsVisible = () => Map.AllowStartUnitConfig; + startingUnits.IsVisible = () => Map.Options.ConfigurableStartingUnits; startingUnits.GetText = () => className(orderManager.LobbyInfo.GlobalSettings.StartingUnitsClass); startingUnits.OnMouseDown = _ => { @@ -364,7 +364,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (enableShroud != null) { enableShroud.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.Shroud; - enableShroud.IsDisabled = configurationDisabled; + enableShroud.IsDisabled = () => Map.Options.Shroud.HasValue || configurationDisabled(); enableShroud.OnClick = () => orderManager.IssueOrder(Order.Command( "shroud {0}".F(!orderManager.LobbyInfo.GlobalSettings.Shroud))); }; @@ -373,7 +373,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic if (enableFog != null) { enableFog.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.Fog; - enableFog.IsDisabled = configurationDisabled; + enableFog.IsDisabled = () => Map.Options.Fog.HasValue || configurationDisabled(); enableFog.OnClick = () => orderManager.IssueOrder(Order.Command( "fog {0}".F(!orderManager.LobbyInfo.GlobalSettings.Fog))); }; diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index 8a0cd32357..c5907cc2f6 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -20,7 +20,12 @@ UseAsShellmap: False Type: Campaign -AllowStartUnitConfig: False +Options: + Crates: false + Fog: false + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@BadGuy: diff --git a/mods/cnc/maps/nod01/map.yaml b/mods/cnc/maps/nod01/map.yaml index 9c0e8c69ac..40897c2a68 100644 --- a/mods/cnc/maps/nod01/map.yaml +++ b/mods/cnc/maps/nod01/map.yaml @@ -20,7 +20,12 @@ UseAsShellmap: False Type: Campaign -AllowStartUnitConfig: False +Options: + Crates: false + Fog: false + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@Neutral: diff --git a/mods/cnc/maps/the-hot-box.oramap b/mods/cnc/maps/the-hot-box.oramap deleted file mode 100644 index 8039ef8356961b038f41dbc8b1aec1b5e3847747..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2208 zcmZ{mXHe4%7R5tH5CjYgibNp*O~J9$pNY=+@RMN%nVr#A+;vw})t)4qLV2q* z(&(FxvQRNWSFuFpo=&~Wg)jK z_K;}e{nE@*jb^JA#hYE-V?Zzif-T0#l~rHeLpoBkDe}Qo=)&iSUzlr22uHxEVmoGs)0R+OA`usIjMgJzvo`W48xdWYTN+ z5Avm=`hk$83dAj#~_`=50&k>zca~?3+ob zxjfzKz+ug{5oB9Qg6RTGdzEwa1lSTFMnBG=XjfQ&iBa`;NOvvoDhye*w!)2v6nO1W zll$8P?3PgVp{|`@qcULEpWU<*v{l{*Dm z7Xh=~%&MAVizi`i)D=@?v|3Nytbh9XmCK5Ls&8e*`@o%x5gM#*fG**PS20b$kRFnb zR3;{=%QrkN3=TLu&yLO9KN6lk4K@ZGorsJ|PlES0jrDTM;ZvSGS)3Ec(m5O$o09k5 z)9`Njm<4|)5^%izDLpM&#)at|S-E#_Td5dabrdJHwzE?}F<(?-AifFI%@Y$n859{u zH>XA_yMy=Lx~WD$Iy@|fsGv1n3M^WEG+=e4-kn3jS)+NG!Y@$UTSUX{#Vwy1V$#Vf z$tnoWV8bS+bt1FQ${swi>$%g?9;z{{A)rxl?50cC{2YbA95^IU4TPu@pX6Z6JT@1E~LWCT2`}uXiu)n zYypR;G5slx;mb!>5pzcdAv1FHWq`4OBgR22091FNs`~Nm@5JtVdAss)XH6E2gE)T7 zeTV3HK{>p<9#MChqtp^#C=}LvbiYcRjTHBX-Wqy*Z^v|*xWRE)CjRA{0EDhk45GmH zEckzkt}MV~`(J$U_IXsvIN*by_%CAon-2tcj9;6>u>bHyu?Sr%0x|}wNAB5o1YY3# zS?aFfa%a?wAR(M?tYV^PPK_koKxIpOcj@Eized*coW`1E+6(b{9Ig<~aIC53i#}G% zG4qONvV_HIq(yNw@JmPV&cgI^{$?1|mzd)S{1N`wz-o zeItF2o-v;A;gZ9}AJrslrcI-laQZN5#OE`KJ9MC@cUG$tf4K|2srZND zU2hrmZL|S89LOmITq7coujhnEk;oPK9XV^{`tW+pXp!3BdK=XR8SI99F=xqn()a+F zk>-1y9R=6nJc^nvgMJ7Wwbr^exqS|@5Fayd^*i5Nd1g(=^+HkWeA2V)Eje7Z!zBGv zBd2J&Uf7zbFrF3c!le@<^J5&4!P3WlQQ7tJ=KC4>QKYC9x6OY>nSNw!(2P$VSRV@W zE-#IBHrc<7+?+&bZdF!(#@h&%>u-MG8Q;JcN`<4@WzM8ZO@s5!5GW78qA9k{lx%^>hSSwP!tSO&jpB_w!CGb} zFxuFUUT(uFvBak67BK8u{(uitU2Y2AWT7c3H7mtqJZ?yvSR8kitNSK}eB{ zRom2+^0@mp%3PW&^t!AYc@WtxZjZ5m1_Ad%w!9Lp#2a#Gr357i|_!wXl=L>QghqbCfL zLtPp{`~^QPuhEk^hPIYm+*+XjUl0x$@R#{dUHE(G@6`A+ahmr}hS*y2 R@&9tT57zfUA-@0v`WMQQHTwVn diff --git a/mods/cnc/maps/the-hot-box/map.bin b/mods/cnc/maps/the-hot-box/map.bin new file mode 100755 index 0000000000000000000000000000000000000000..b34b6f4f1ba98887691cb4772a597acb36536435 GIT binary patch literal 20485 zcmeI2%WC6T5Qe`a$(P*INq0~8%rMgfbAh?Mz--cCh5;|K>UAzoS%5u=>bH0>a@0lmph6(^dh6fR%ua zfMv9;fMUREz-GWQ+IB!GU@c%PU>R-0|6*fj8JUm!yo}7peK!0X{^LAnwc{);qiy&% z{AXo8zJ3{*kNcdB{{x7IIv^bMQGE)1DZjIwli&JmHUF*K2UxeGkJXp*dx5<}oTaDj znE&FvAx4S?8}0=_7`!Mp0*=+Lh;4<8yTT*V|#~v)V?&QbL}s(aT{S1%I@?j z-{9PcZ)1DseXM&=P2|q*rE2xS%FW&{{Sm%*_ihU}^EIwr8 zKMj*jXks_T)nSZOuqrYm-vxE3W`l-sB_PFpk|VY`l1r&yN&8JUmAOKN)-_8#v2R}>yHAKGmS zZAmN-Yot1*y1?^rK6@eqN+GmF;+XM4o>G$?GzOlS^b%Yf6cmPNAphegXU+=?>*>Y@1gc2 zPSqv$CB-XIK752ii*i+-Yj9Twt0VCnjs@_qDQPw|yPEf!A2q*d{^+54I6aYc^HThG zE+hLN_#z{8ek3lka~_@$^7c4hvhk*|G-b`E=C$Tq%?Hh|nm>D3JqkU_U*Qt#QnVeg z{RMRa7xKAeyDQ!LY`ke~&5CAA^G5TX<|oZ>n!kLCKI=X^KJUJYpCh^bLLR}nkWXY} ze%hKR?sGQ&HI8Ogv#oin`Tm|^pOVjp&#uq=d(PuI{DQ)TB+^`%kNZ51tK@kt4kU2s zQ})^PdHsO%`ocVF~ zT~U!sEF^QDhP^JTi_?wre7N3a-DT$i|B2_E!I>nYgg8oEKk>{d`46$_Vs-EGyi3Vt z!)5oD+o+Nm%k~-SOg1it{{}R$8xc0Q`P>!p%PyO)SxbH`~~p;8K;42 z$p28iLAI#&pW|BlkE%O|1*UKRzv=W@(yCh#c^46*-olYlH=>-Ztq04 zllR`=8||Hj|LFE%Z|hQUS#x=nGM}HIPI9Y-GUxoe+lRjw^1!3$vF=I!8O}e8ojK<} z=GH@blsq;($v>(1zmJ`n*Qa6Zi8UUUN7-Z3dsP37viih1Q^mqG{6FB_!}eJ5*z)e` zpPX`g8s9SWpHtq>>)ssrpPAuVe3%E5&v|AV#$NK8yf|FcIkT|$681hPtMj<)C9|Ez zw?%QA*S#-+;aPl`2b0fvW*Wv`?i$RWQNSo*6fg=H1&jhl0i%FXz$jo8FbWt2i~>dh jqkvJsC}0#Y3K#{90!9I&fKk9GU=%P47zK<1ORvEHq6EF} literal 0 HcmV?d00001 diff --git a/mods/cnc/maps/the-hot-box/map.yaml b/mods/cnc/maps/the-hot-box/map.yaml new file mode 100755 index 0000000000..7eafb51baf --- /dev/null +++ b/mods/cnc/maps/the-hot-box/map.yaml @@ -0,0 +1,245 @@ +Selectable: True + +MapFormat: 5 + +Title: The Hot Box + +Description: Drop Zone for CnC + +Author: Dan9550 + +Tileset: DESERT + +MapSize: 64,64 + +Bounds: 16,16,36,36 + +UseAsShellmap: False + +Type: Drop Zone + +Options: + Fog: false + Shroud: false + Crates: true + FragileAlliances: false + ConfigurableStartingUnits: false + +Players: + PlayerReference@Neutral: + Name: Neutral + OwnsWorld: True + NonCombatant: True + Race: gdi + PlayerReference@Multi0: + Name: Multi0 + Playable: True + LockRace: True + Race: nod + Enemies: Multi9,Multi1,Multi2,Multi3,Multi4,Multi5,Multi6,Multi7,Multi8 + PlayerReference@Multi1: + Name: Multi1 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi2,Multi3,Multi4,Multi5,Multi6,Multi7,Multi8,Multi9 + PlayerReference@Multi2: + Name: Multi2 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi3,Multi4,Multi5,Multi6,Multi7,Multi8,Multi9 + PlayerReference@Multi3: + Name: Multi3 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi4,Multi5,Multi6,Multi7,Multi8,Multi9 + PlayerReference@Multi4: + Name: Multi4 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi5,Multi6,Multi7,Multi8,Multi9 + PlayerReference@Multi5: + Name: Multi5 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi6,Multi7,Multi8,Multi9 + PlayerReference@Multi6: + Name: Multi6 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5,Multi7,Multi8,Multi9 + PlayerReference@Multi7: + Name: Multi7 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5,Multi6,Multi8,Multi9 + PlayerReference@Multi8: + Name: Multi8 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5,Multi6,Multi7,Multi9 + PlayerReference@Multi9: + Name: Multi9 + Playable: True + LockRace: True + Race: nod + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5,Multi6,Multi7,Multi8 + PlayerReference@Creeps: + Name: Creeps + NonCombatant: True + Race: gdi + Enemies: Multi0,Multi1,Multi2,Multi3,Multi4,Multi5,Multi6,Multi7,Multi8,Multi9 + +Actors: + Actor0: apc + Location: 40,17 + Owner: Multi0 + Actor1: apc + Location: 42,17 + Owner: Multi1 + Actor2: apc + Location: 40,19 + Owner: Multi2 + Actor3: apc + Location: 46,21 + Owner: Multi3 + Actor4: apc + Location: 48,21 + Owner: Multi4 + Actor5: apc + Location: 50,19 + Owner: Multi5 + Actor6: apc + Location: 50,21 + Owner: Multi6 + Actor7: apc + Location: 50,17 + Owner: Multi7 + Actor8: apc + Location: 39,21 + Owner: Multi8 + Actor9: apc + Location: 47,17 + Owner: Multi9 + Actor10: tc02 + Location: 22,43 + Owner: Neutral + Actor11: v20 + Location: 44,38 + Owner: Neutral + Actor12: v34 + Location: 28,38 + Owner: Neutral + Actor13: v35 + Location: 29,39 + Owner: Neutral + Actor14: v36 + Location: 38,35 + Owner: Neutral + Actor15: v23 + Location: 46,39 + Owner: Neutral + Actor16: v27 + Location: 22,28 + Owner: Neutral + Actor17: t02 + Location: 26,26 + Owner: Neutral + Actor18: t07 + Location: 26,27 + Owner: Neutral + Actor19: tc04 + Location: 25,16 + Owner: Neutral + Actor20: tc03 + Location: 26,17 + Owner: Neutral + Actor21: mpspawn + Location: 40,18 + Owner: Neutral + Actor22: mpspawn + Location: 42,18 + Owner: Neutral + Actor23: mpspawn + Location: 40,20 + Owner: Neutral + Actor24: mpspawn + Location: 39,22 + Owner: Neutral + Actor25: mpspawn + Location: 47,18 + Owner: Neutral + Actor26: mpspawn + Location: 50,18 + Owner: Neutral + Actor27: mpspawn + Location: 50,20 + Owner: Neutral + Actor28: mpspawn + Location: 50,22 + Owner: Neutral + Actor29: mpspawn + Location: 48,22 + Owner: Neutral + Actor30: mpspawn + Location: 46,22 + Owner: Neutral + +Smudges: + +Rules: + World: + CrateSpawner: + Maximum: 4 + SpawnInterval: 5 + -SpawnMPUnits: + -MPStartLocations: + CRATE: + -HealUnitsCrateAction: + -LevelUpCrateAction: + -GiveMcvCrateAction: + -RevealMapCrateAction: + -HideMapCrateAction: + -CloakCrateAction: + -ExplodeCrateAction@nuke: + -ExplodeCrateAction@boom: + -ExplodeCrateAction@fire: + -SupportPowerCrateAction@parabombs: + -GiveCashCrateAction: + GiveUnitCrateAction@stnk: + SelectionShares: 4 + Unit: stnk + GiveUnitCrateAction@bike: + SelectionShares: 6 + Unit: bike + GiveUnitCrateAction@htnk: + SelectionShares: 1 + Unit: htnk + GiveUnitCrateAction@e5: + SelectionShares: 1 + Unit: e5 + GiveUnitCrateAction@e1: + SelectionShares: 1 + Unit: e1 + APC: + Health: + HP: 1000 + RevealsShroud: + Range: 40 + MustBeDestroyed: + -AttackMove: + +Sequences: + +Weapons: + +Voices: + +Notifications: diff --git a/mods/ra/maps/Fort-Lonestar/map.yaml b/mods/ra/maps/Fort-Lonestar/map.yaml index ae6717ca6c..3072dfd7cf 100644 --- a/mods/ra/maps/Fort-Lonestar/map.yaml +++ b/mods/ra/maps/Fort-Lonestar/map.yaml @@ -18,6 +18,12 @@ UseAsShellmap: False Type: Minigame +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@Neutral: Name: Neutral diff --git a/mods/ra/maps/Survival01/map.yaml b/mods/ra/maps/Survival01/map.yaml index 94d5de6714..faf43728bb 100644 --- a/mods/ra/maps/Survival01/map.yaml +++ b/mods/ra/maps/Survival01/map.yaml @@ -10,15 +10,20 @@ Author: Nuke'm Bro. Tileset: TEMPERAT -Difficulties: Easy,Normal,Hard - MapSize: 96,64 Bounds: 4,4,88,56 UseAsShellmap: False -Type: Campaign +Type: Minigame + +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Difficulties: Easy,Normal,Hard Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/Survival02/map.yaml b/mods/ra/maps/Survival02/map.yaml index 8a0364911d..9ce437abd4 100644 --- a/mods/ra/maps/Survival02/map.yaml +++ b/mods/ra/maps/Survival02/map.yaml @@ -16,7 +16,13 @@ Bounds: 2,2,76,76 UseAsShellmap: False -Type: Campaign +Type: Minigame + +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index 090e4c3216..fa3769a3d7 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -20,7 +20,12 @@ UseAsShellmap: False Type: Campaign -Difficulties: Easy, Normal +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Difficulties: Easy, Normal Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index d6bfc8b1c5..93ff88674a 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -20,6 +20,12 @@ UseAsShellmap: False Type: Campaign +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@Neutral: Name: Neutral diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index ba17a52b0f..c48aeecae4 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -20,7 +20,12 @@ UseAsShellmap: False Type: Campaign -Difficulties: Easy, Normal, Hard +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Difficulties: Easy, Normal, Hard Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index 203621ca06..d96b91c28c 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -12,7 +12,12 @@ Author: Scott_NZ Tileset: TEMPERAT -Difficulties: Easy,Normal,Hard +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Difficulties: Easy,Normal,Hard MapSize: 128,128 diff --git a/mods/ra/maps/bomber-john/map.yaml b/mods/ra/maps/bomber-john/map.yaml index fdf8001184..a1e75707d8 100644 --- a/mods/ra/maps/bomber-john/map.yaml +++ b/mods/ra/maps/bomber-john/map.yaml @@ -18,6 +18,12 @@ UseAsShellmap: False Type: Minigame +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@Neutral: Name: Neutral diff --git a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml index 2e06646c14..646afc9323 100644 --- a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml +++ b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml @@ -16,7 +16,14 @@ Bounds: 16,16,32,32 UseAsShellmap: False -Type: Minigame +Type: Drop Zone + +Options: + Fog: false + Shroud: false + Crates: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/drop-zone-w/map.yaml b/mods/ra/maps/drop-zone-w/map.yaml index 0aee39dc1d..60b8045f8c 100644 --- a/mods/ra/maps/drop-zone-w/map.yaml +++ b/mods/ra/maps/drop-zone-w/map.yaml @@ -16,7 +16,14 @@ Bounds: 16,16,32,32 UseAsShellmap: False -Type: Minigame +Type: Drop Zone + +Options: + Fog: false + Shroud: false + Crates: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/drop-zone/map.yaml b/mods/ra/maps/drop-zone/map.yaml index aaac395510..561a2bab06 100644 --- a/mods/ra/maps/drop-zone/map.yaml +++ b/mods/ra/maps/drop-zone/map.yaml @@ -16,7 +16,14 @@ Bounds: 16,16,32,32 UseAsShellmap: False -Type: Minigame +Type: Drop Zone + +Options: + Fog: false + Shroud: false + Crates: true + FragileAlliances: false + ConfigurableStartingUnits: false Players: PlayerReference@Neutral: diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 8cdf0571be..68a204951f 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -20,6 +20,12 @@ UseAsShellmap: False Type: Campaign +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@Greece: Name: Greece diff --git a/mods/ra/maps/soviet-01-classic/map.yaml b/mods/ra/maps/soviet-01-classic/map.yaml index 2eafc08291..558f52ec1e 100644 --- a/mods/ra/maps/soviet-01-classic/map.yaml +++ b/mods/ra/maps/soviet-01-classic/map.yaml @@ -20,6 +20,12 @@ UseAsShellmap: False Type: Campaign +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@GoodGuy: Name: GoodGuy diff --git a/mods/ra/maps/training-camp/map.yaml b/mods/ra/maps/training-camp/map.yaml index 58e2436397..f1a5a0fd65 100644 --- a/mods/ra/maps/training-camp/map.yaml +++ b/mods/ra/maps/training-camp/map.yaml @@ -18,6 +18,12 @@ UseAsShellmap: False Type: Minigame +Options: + Fog: true + Shroud: true + FragileAlliances: false + ConfigurableStartingUnits: false + Players: PlayerReference@Neutral: Name: Neutral From 059c88ca1bf7b98261035edff661d69885140331 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 11:17:58 +1200 Subject: [PATCH 3/8] Reorganize map options panel. --- OpenRA.Game/Map.cs | 2 +- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 12 +- OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 7 +- mods/cnc/chrome/dialogs.yaml | 107 ++++++++++-------- mods/ra/chrome/lobby-dialogs.yaml | 113 ++++++++++--------- 5 files changed, 127 insertions(+), 114 deletions(-) diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index 1e3bc30bcc..9305dbf739 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -29,7 +29,7 @@ namespace OpenRA public bool? Shroud; public bool? FragileAlliances; public bool ConfigurableStartingUnits = true; - public string[] Difficulties; + public string[] Difficulties = { }; public void UpdateServerSettings(Session.Global settings) { diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index c9db7aa6ee..68628381b3 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -446,7 +446,7 @@ namespace OpenRA.Mods.RA.Server return true; } - if ((server.Map.Options.Difficulties == null && s != null) || (server.Map.Options.Difficulties != null && !server.Map.Options.Difficulties.Contains(s))) + if (s != null && !server.Map.Options.Difficulties.Contains(s)) { server.SendOrderTo(conn, "Message", "Unsupported difficulty selected: {0}".F(s)); server.SendOrderTo(conn, "Message", "Supported difficulties: {0}".F(server.Map.Options.Difficulties.JoinWith(","))); @@ -674,12 +674,14 @@ namespace OpenRA.Mods.RA.Server static void SetDefaultDifficulty(S server) { - if (server.Map.Options.Difficulties != null && server.Map.Options.Difficulties.Any()) + if (!server.Map.Options.Difficulties.Any()) { - if (!server.Map.Options.Difficulties.Contains(server.lobbyInfo.GlobalSettings.Difficulty)) - server.lobbyInfo.GlobalSettings.Difficulty = server.Map.Options.Difficulties.First(); + server.lobbyInfo.GlobalSettings.Difficulty = null; + return; } - else server.lobbyInfo.GlobalSettings.Difficulty = null; + + if (!server.Map.Options.Difficulties.Contains(server.lobbyInfo.GlobalSettings.Difficulty)) + server.lobbyInfo.GlobalSettings.Difficulty = server.Map.Options.Difficulties.First(); } } } diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index b0c5d1ce20..a8bbac988a 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -298,7 +298,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic var difficulty = optionsBin.GetOrNull("DIFFICULTY_DROPDOWNBUTTON"); if (difficulty != null) { - difficulty.IsVisible = () => Map.Options.Difficulties != null && Map.Options.Difficulties.Any(); + difficulty.IsVisible = () => Map.Options.Difficulties.Any(); difficulty.IsDisabled = configurationDisabled; difficulty.GetText = () => orderManager.LobbyInfo.GlobalSettings.Difficulty; difficulty.OnMouseDown = _ => @@ -335,9 +335,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic var classes = Rules.Info["world"].Traits.WithInterface() .Select(a => a.Class).Distinct(); - startingUnits.IsDisabled = configurationDisabled; - startingUnits.IsVisible = () => Map.Options.ConfigurableStartingUnits; - startingUnits.GetText = () => className(orderManager.LobbyInfo.GlobalSettings.StartingUnitsClass); + startingUnits.IsDisabled = () => !Map.Options.ConfigurableStartingUnits || configurationDisabled(); + startingUnits.GetText = () => !Map.Options.ConfigurableStartingUnits ? "Not Available" : className(orderManager.LobbyInfo.GlobalSettings.StartingUnitsClass); startingUnits.OnMouseDown = _ => { var options = classes.Select(c => new DropDownOption diff --git a/mods/cnc/chrome/dialogs.yaml b/mods/cnc/chrome/dialogs.yaml index a0ebdc245a..5d2c15a685 100644 --- a/mods/cnc/chrome/dialogs.yaml +++ b/mods/cnc/chrome/dialogs.yaml @@ -206,57 +206,66 @@ Background@LOBBY_OPTIONS_BIN: Children: Label@TITLE: X:0 - Y:40 + Y:30 Width:PARENT_RIGHT Height:25 Font:Bold Align:Center Text: Map Options - Checkbox@ALLOWCHEATS_CHECKBOX: - X:80 - Y:75 - Width:230 - Height:20 - Text:Cheats / Debug Menu - Checkbox@CRATES_CHECKBOX: - X:80 - Y:110 - Width:230 - Height:20 - Text:Crates - Checkbox@SHROUD_CHECKBOX: - X:310 - Y:75 - Width:230 - Height:20 - Text:Shroud - Checkbox@FOG_CHECKBOX: - X:310 - Y:110 - Width:230 - Height:20 - Text:Fog of War - Label@STARTINGUNITS_DESC: - X:135 - Y:142 - Width:120 - Height:25 - Text:Starting Units: - DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: - X:230 - Y:142 - Width:140 - Height:25 - Font:Bold - Label@DIFFICULTY_DESC: - X:125 - Y:177 - Width:120 - Height:25 - Text:Mission Difficulty: - DropDownButton@DIFFICULTY_DROPDOWNBUTTON: - X:230 - Y:177 - Width:100 - Height:25 - Font:Bold + Container: + X:20 + Y:65 + Width: PARENT_RIGHT-40 + Height: PARENT_BOTTOM-75 + Children: + Checkbox@ALLOWCHEATS_CHECKBOX: + Width:230 + Height:20 + Text:Debug Menu + Checkbox@FRAGILEALLIANCES_CHECKBOX: + Y:35 + Width:220 + Height:20 + Text:Team Changes + Checkbox@SHROUD_CHECKBOX: + X:155 + Width:230 + Height:20 + Text:Shroud + Checkbox@FOG_CHECKBOX: + X:155 + Y:35 + Width:230 + Height:20 + Text:Fog of War + Checkbox@CRATES_CHECKBOX: + X:280 + Width:230 + Height:20 + Text:Crates Appear + Label@STARTINGUNITS_DESC: + X:PARENT_RIGHT - WIDTH - 145 + Y:72 + Width:120 + Height:25 + Text:Starting Units: + Align:Right + DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: + X:PARENT_RIGHT - WIDTH + Y:72 + Width:140 + Height:25 + Font:Bold + Label@DIFFICULTY_DESC: + X:PARENT_RIGHT - WIDTH - 145 + Y:107 + Width:120 + Height:25 + Text:Mission Difficulty: + Align:Right + DropDownButton@DIFFICULTY_DROPDOWNBUTTON: + X:PARENT_RIGHT - WIDTH + Y:107 + Width:140 + Height:25 + Font:Bold \ No newline at end of file diff --git a/mods/ra/chrome/lobby-dialogs.yaml b/mods/ra/chrome/lobby-dialogs.yaml index f26378c3b4..249fce701d 100644 --- a/mods/ra/chrome/lobby-dialogs.yaml +++ b/mods/ra/chrome/lobby-dialogs.yaml @@ -59,63 +59,66 @@ Background@LOBBY_OPTIONS_BIN: Children: Label@TITLE: X:0 - Y:40 + Y:30 Width:PARENT_RIGHT Height:25 Font:Bold Align:Center Text: Map Options - Checkbox@ALLOWCHEATS_CHECKBOX: - X:80 - Y:75 - Width:230 - Height:20 - Text:Cheats / Debug Menu - Checkbox@FRAGILEALLIANCES_CHECKBOX: - X:80 - Y:110 - Width:220 - Height:20 - Text:Allow Team Changes - Checkbox@CRATES_CHECKBOX: - X:80 - Y:145 - Width:230 - Height:20 - Text:Crates - Checkbox@SHROUD_CHECKBOX: - X:310 - Y:75 - Width:230 - Height:20 - Text:Shroud - Checkbox@FOG_CHECKBOX: - X:310 - Y:110 - Width:230 - Height:20 - Text:Fog of War - Label@STARTINGUNITS_DESC: - X:215 - Y:142 - Width:120 - Height:25 - Text:Starting Units: - DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: - X:310 - Y:142 - Width:140 - Height:25 - Font:Bold - Label@DIFFICULTY_DESC: - X:195 - Y:177 - Width:120 - Height:25 - Text:Mission Difficulty: - DropDownButton@DIFFICULTY_DROPDOWNBUTTON: - X:310 - Y:177 - Width:100 - Height:25 - Font:Bold + Container: + X:30 + Y:70 + Width: PARENT_RIGHT-60 + Height: PARENT_BOTTOM-75 + Children: + Checkbox@ALLOWCHEATS_CHECKBOX: + Width:230 + Height:20 + Text:Debug Menu + Checkbox@FRAGILEALLIANCES_CHECKBOX: + Y:40 + Width:220 + Height:20 + Text:Team Changes + Checkbox@SHROUD_CHECKBOX: + X:175 + Width:230 + Height:20 + Text:Shroud + Checkbox@FOG_CHECKBOX: + X:175 + Y:40 + Width:230 + Height:20 + Text:Fog of War + Checkbox@CRATES_CHECKBOX: + X:310 + Width:230 + Height:20 + Text:Crates Appear + Label@STARTINGUNITS_DESC: + X:PARENT_RIGHT - WIDTH - 145 + Y:87 + Width:120 + Height:25 + Text:Starting Units: + Align:Right + DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: + X:PARENT_RIGHT - WIDTH + Y:87 + Width:140 + Height:25 + Font:Bold + Label@DIFFICULTY_DESC: + X:PARENT_RIGHT - WIDTH - 145 + Y:122 + Width:120 + Height:25 + Text:Mission Difficulty: + Align:Right + DropDownButton@DIFFICULTY_DROPDOWNBUTTON: + X:PARENT_RIGHT - WIDTH + Y:122 + Width:140 + Height:25 + Font:Bold From ce41eb2361857bde1469a426243e753383073a13 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 12:28:40 +1200 Subject: [PATCH 4/8] Add "Build off Ally ConYards" option. Fixes #2464. --- OpenRA.Game/Map.cs | 3 +++ OpenRA.Game/Network/Session.cs | 1 + OpenRA.Mods.RA/Buildings/BaseProvider.cs | 10 ++++++++-- OpenRA.Mods.RA/Buildings/Building.cs | 16 ++++++++++++---- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 19 +++++++++++++++++++ OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 9 +++++++++ mods/cnc/chrome/dialogs.yaml | 6 ++++++ mods/cnc/maps/gdi01/map.yaml | 1 + mods/cnc/maps/nod01/map.yaml | 1 + mods/cnc/maps/the-hot-box/map.yaml | 1 + mods/ra/chrome/lobby-dialogs.yaml | 6 ++++++ mods/ra/maps/Fort-Lonestar/map.yaml | 1 + mods/ra/maps/Survival01/map.yaml | 1 + mods/ra/maps/Survival02/map.yaml | 1 + mods/ra/maps/allies-01/map.yaml | 1 + mods/ra/maps/allies-02/map.yaml | 1 + mods/ra/maps/allies-03/map.yaml | 1 + mods/ra/maps/allies-04/map.yaml | 1 + mods/ra/maps/bomber-john/map.yaml | 1 + .../maps/drop-zone-battle-of-tikiaki/map.yaml | 1 + mods/ra/maps/drop-zone-w/map.yaml | 1 + mods/ra/maps/drop-zone/map.yaml | 1 + mods/ra/maps/monster-tank-madness/map.yaml | 1 + mods/ra/maps/soviet-01-classic/map.yaml | 1 + mods/ra/maps/training-camp/map.yaml | 1 + 25 files changed, 81 insertions(+), 6 deletions(-) diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index 9305dbf739..2e9179aeb6 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -27,6 +27,7 @@ namespace OpenRA public bool? Crates; public bool? Fog; public bool? Shroud; + public bool? AllyBuildRadius; public bool? FragileAlliances; public bool ConfigurableStartingUnits = true; public string[] Difficulties = { }; @@ -41,6 +42,8 @@ namespace OpenRA settings.Fog = Fog.Value; if (Shroud.HasValue) settings.Shroud = Shroud.Value; + if (AllyBuildRadius.HasValue) + settings.AllyBuildRadius = AllyBuildRadius.Value; if (FragileAlliances.HasValue) settings.FragileAlliances = FragileAlliances.Value; } diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index 32c9df85a2..6c6483239a 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -94,6 +94,7 @@ namespace OpenRA.Network public bool Crates = true; public bool Shroud = true; public bool Fog = true; + public bool AllyBuildRadius = true; public string StartingUnitsClass = "none"; public bool AllowVersionMismatch; } diff --git a/OpenRA.Mods.RA/Buildings/BaseProvider.cs b/OpenRA.Mods.RA/Buildings/BaseProvider.cs index 880a3b0089..e0f6fdc284 100755 --- a/OpenRA.Mods.RA/Buildings/BaseProvider.cs +++ b/OpenRA.Mods.RA/Buildings/BaseProvider.cs @@ -56,11 +56,17 @@ namespace OpenRA.Mods.RA.Buildings return devMode.FastBuild || progress == 0; } + bool ValidRenderPlayer() + { + var allyBuildRadius = self.World.LobbyInfo.GlobalSettings.AllyBuildRadius; + return self.Owner == self.World.RenderPlayer || (allyBuildRadius && self.Owner.IsAlliedWith(self.World.RenderPlayer)); + } + // Range circle public void RenderAfterWorld(WorldRenderer wr) { // Visible to player and allies - if (!self.Owner.IsAlliedWith(self.World.RenderPlayer)) + if (!ValidRenderPlayer()) return; wr.DrawRangeCircleWithContrast( @@ -73,7 +79,7 @@ namespace OpenRA.Mods.RA.Buildings public float GetValue() { // Visible to player and allies - if (!self.Owner.IsAlliedWith(self.World.RenderPlayer)) + if (!ValidRenderPlayer()) return 0f; // Ready or delay disabled diff --git a/OpenRA.Mods.RA/Buildings/Building.cs b/OpenRA.Mods.RA/Buildings/Building.cs index ef99c3eb38..be027171d7 100755 --- a/OpenRA.Mods.RA/Buildings/Building.cs +++ b/OpenRA.Mods.RA/Buildings/Building.cs @@ -43,7 +43,8 @@ namespace OpenRA.Mods.RA.Buildings var center = topLeft.CenterPosition + FootprintUtils.CenterOffset(this); foreach (var bp in world.ActorsWithTrait()) { - if (bp.Actor.Owner.Stances[p] != Stance.Ally || !bp.Trait.Ready()) + var validOwner = bp.Actor.Owner == p || (world.LobbyInfo.GlobalSettings.AllyBuildRadius && bp.Actor.Owner.Stances[p] == Stance.Ally); + if (!validOwner || !bp.Trait.Ready()) continue; // Range is counted from the center of the actor, not from each cell. @@ -72,14 +73,21 @@ namespace OpenRA.Mods.RA.Buildings var nearnessCandidates = new List(); var bi = world.WorldActor.Trait(); + var allyBuildRadius = world.LobbyInfo.GlobalSettings.AllyBuildRadius; for (var y = scanStart.Y; y < scanEnd.Y; y++) + { for (var x = scanStart.X; x < scanEnd.X; x++) { - var at = bi.GetBuildingAt(new CPos(x, y)); - if (at != null && at.Owner.Stances[p] == Stance.Ally && at.HasTrait()) - nearnessCandidates.Add(new CPos(x, y)); + var pos = new CPos(x, y); + var at = bi.GetBuildingAt(pos); + if (at == null || !at.HasTrait()) + continue; + + if (at.Owner == p || (allyBuildRadius && at.Owner.Stances[p] == Stance.Ally)) + nearnessCandidates.Add(pos); } + } var buildingTiles = FootprintUtils.Tiles(buildingName, this, topLeft).ToList(); return nearnessCandidates diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index 68628381b3..cfdbe97cb8 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -437,6 +437,25 @@ namespace OpenRA.Mods.RA.Server server.SyncLobbyInfo(); return true; }}, + { "allybuildradius", + s => + { + if (!client.IsAdmin) + { + server.SendOrderTo(conn, "Message", "Only the host can set that option"); + return true; + } + + if (server.Map.Options.AllyBuildRadius.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled ally build radius configuration"); + return true; + } + + bool.TryParse(s, out server.lobbyInfo.GlobalSettings.AllyBuildRadius); + server.SyncLobbyInfo(); + return true; + }}, { "difficulty", s => { diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index a8bbac988a..b239589c82 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -286,6 +286,15 @@ namespace OpenRA.Mods.RA.Widgets.Logic "crates {0}".F(!orderManager.LobbyInfo.GlobalSettings.Crates))); } + var allybuildradius = optionsBin.GetOrNull("ALLYBUILDRADIUS_CHECKBOX"); + if (allybuildradius != null) + { + allybuildradius.IsChecked = () => orderManager.LobbyInfo.GlobalSettings.AllyBuildRadius; + allybuildradius.IsDisabled = () => Map.Options.AllyBuildRadius.HasValue || configurationDisabled(); + allybuildradius.OnClick = () => orderManager.IssueOrder(Order.Command( + "allybuildradius {0}".F(!orderManager.LobbyInfo.GlobalSettings.AllyBuildRadius))); + } + var fragileAlliance = optionsBin.GetOrNull("FRAGILEALLIANCES_CHECKBOX"); if (fragileAlliance != null) { diff --git a/mods/cnc/chrome/dialogs.yaml b/mods/cnc/chrome/dialogs.yaml index 5d2c15a685..ac7c407a96 100644 --- a/mods/cnc/chrome/dialogs.yaml +++ b/mods/cnc/chrome/dialogs.yaml @@ -243,6 +243,12 @@ Background@LOBBY_OPTIONS_BIN: Width:230 Height:20 Text:Crates Appear + Checkbox@ALLYBUILDRADIUS_CHECKBOX: + X:280 + Y:35 + Width:230 + Height:20 + Text:Build off Ally ConYards Label@STARTINGUNITS_DESC: X:PARENT_RIGHT - WIDTH - 145 Y:72 diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index c5907cc2f6..9393004b4d 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -24,6 +24,7 @@ Options: Crates: false Fog: false Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/cnc/maps/nod01/map.yaml b/mods/cnc/maps/nod01/map.yaml index 40897c2a68..6a2cc30589 100644 --- a/mods/cnc/maps/nod01/map.yaml +++ b/mods/cnc/maps/nod01/map.yaml @@ -24,6 +24,7 @@ Options: Crates: false Fog: false Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/cnc/maps/the-hot-box/map.yaml b/mods/cnc/maps/the-hot-box/map.yaml index 7eafb51baf..1a1f5df620 100755 --- a/mods/cnc/maps/the-hot-box/map.yaml +++ b/mods/cnc/maps/the-hot-box/map.yaml @@ -22,6 +22,7 @@ Options: Fog: false Shroud: false Crates: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/chrome/lobby-dialogs.yaml b/mods/ra/chrome/lobby-dialogs.yaml index 249fce701d..63c5eda0de 100644 --- a/mods/ra/chrome/lobby-dialogs.yaml +++ b/mods/ra/chrome/lobby-dialogs.yaml @@ -96,6 +96,12 @@ Background@LOBBY_OPTIONS_BIN: Width:230 Height:20 Text:Crates Appear + Checkbox@ALLYBUILDRADIUS_CHECKBOX: + X:310 + Y:40 + Width:230 + Height:20 + Text:Build off Ally ConYards Label@STARTINGUNITS_DESC: X:PARENT_RIGHT - WIDTH - 145 Y:87 diff --git a/mods/ra/maps/Fort-Lonestar/map.yaml b/mods/ra/maps/Fort-Lonestar/map.yaml index 3072dfd7cf..dd91037eb0 100644 --- a/mods/ra/maps/Fort-Lonestar/map.yaml +++ b/mods/ra/maps/Fort-Lonestar/map.yaml @@ -21,6 +21,7 @@ Type: Minigame Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/Survival01/map.yaml b/mods/ra/maps/Survival01/map.yaml index faf43728bb..3a889eae56 100644 --- a/mods/ra/maps/Survival01/map.yaml +++ b/mods/ra/maps/Survival01/map.yaml @@ -21,6 +21,7 @@ Type: Minigame Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false Difficulties: Easy,Normal,Hard diff --git a/mods/ra/maps/Survival02/map.yaml b/mods/ra/maps/Survival02/map.yaml index 9ce437abd4..a5be8dd06f 100644 --- a/mods/ra/maps/Survival02/map.yaml +++ b/mods/ra/maps/Survival02/map.yaml @@ -21,6 +21,7 @@ Type: Minigame Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index fa3769a3d7..7d95ac6010 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -23,6 +23,7 @@ Type: Campaign Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false Difficulties: Easy, Normal diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index 93ff88674a..1ad0acc4ca 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -23,6 +23,7 @@ Type: Campaign Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index c48aeecae4..57d343749f 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -23,6 +23,7 @@ Type: Campaign Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false Difficulties: Easy, Normal, Hard diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index d96b91c28c..656436bbe4 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -15,6 +15,7 @@ Tileset: TEMPERAT Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false Difficulties: Easy,Normal,Hard diff --git a/mods/ra/maps/bomber-john/map.yaml b/mods/ra/maps/bomber-john/map.yaml index a1e75707d8..0727ba62b4 100644 --- a/mods/ra/maps/bomber-john/map.yaml +++ b/mods/ra/maps/bomber-john/map.yaml @@ -21,6 +21,7 @@ Type: Minigame Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml index 646afc9323..bcbd44f5b0 100644 --- a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml +++ b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml @@ -22,6 +22,7 @@ Options: Fog: false Shroud: false Crates: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/drop-zone-w/map.yaml b/mods/ra/maps/drop-zone-w/map.yaml index 60b8045f8c..a2fa753a33 100644 --- a/mods/ra/maps/drop-zone-w/map.yaml +++ b/mods/ra/maps/drop-zone-w/map.yaml @@ -22,6 +22,7 @@ Options: Fog: false Shroud: false Crates: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/drop-zone/map.yaml b/mods/ra/maps/drop-zone/map.yaml index 561a2bab06..1e2cb864ac 100644 --- a/mods/ra/maps/drop-zone/map.yaml +++ b/mods/ra/maps/drop-zone/map.yaml @@ -22,6 +22,7 @@ Options: Fog: false Shroud: false Crates: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 68a204951f..c4c609744b 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -23,6 +23,7 @@ Type: Campaign Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/soviet-01-classic/map.yaml b/mods/ra/maps/soviet-01-classic/map.yaml index 558f52ec1e..b945c15766 100644 --- a/mods/ra/maps/soviet-01-classic/map.yaml +++ b/mods/ra/maps/soviet-01-classic/map.yaml @@ -23,6 +23,7 @@ Type: Campaign Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false diff --git a/mods/ra/maps/training-camp/map.yaml b/mods/ra/maps/training-camp/map.yaml index f1a5a0fd65..961a08e641 100644 --- a/mods/ra/maps/training-camp/map.yaml +++ b/mods/ra/maps/training-camp/map.yaml @@ -21,6 +21,7 @@ Type: Minigame Options: Fog: true Shroud: true + AllyBuildRadius: false FragileAlliances: false ConfigurableStartingUnits: false From 3fd64dfe52bd52190c041c1641489c36b4945e76 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 12:39:46 +1200 Subject: [PATCH 5/8] Remove dead InitialCash setting from PlayerReference. --- OpenRA.Editor/LegacyMapImporter.cs | 3 --- OpenRA.FileFormats/Map/PlayerReference.cs | 1 - 2 files changed, 4 deletions(-) diff --git a/OpenRA.Editor/LegacyMapImporter.cs b/OpenRA.Editor/LegacyMapImporter.cs index 778366a6ef..b64290e9a9 100644 --- a/OpenRA.Editor/LegacyMapImporter.cs +++ b/OpenRA.Editor/LegacyMapImporter.cs @@ -475,9 +475,6 @@ namespace OpenRA.Editor Console.WriteLine(s.Key); switch (s.Key) { - case "Credits": - pr.InitialCash = int.Parse(s.Value); - break; case "Allies": pr.Allies = s.Value.Split(',').Intersect(players).Except(neutral).ToArray(); pr.Enemies = s.Value.Split(',').SymmetricDifference(players).Except(neutral).ToArray(); diff --git a/OpenRA.FileFormats/Map/PlayerReference.cs b/OpenRA.FileFormats/Map/PlayerReference.cs index d773161ba8..93a72589ab 100644 --- a/OpenRA.FileFormats/Map/PlayerReference.cs +++ b/OpenRA.FileFormats/Map/PlayerReference.cs @@ -39,7 +39,6 @@ namespace OpenRA.FileFormats public bool LockTeam = false; public int Team = 0; - public int InitialCash = 0; public string[] Allies = {}; public string[] Enemies = {}; From 271ce5275c4c65dc341275b70668042331eddb4e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 12:59:27 +1200 Subject: [PATCH 6/8] Add starting cash option. --- OpenRA.Game/Map.cs | 3 ++ OpenRA.Game/Network/Session.cs | 1 + OpenRA.Game/Traits/Player/PlayerResources.cs | 7 ++--- OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs | 19 ++++++++++++ OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs | 30 +++++++++++++++++++ mods/cnc/chrome/dialogs.yaml | 14 +++++++++ mods/cnc/maps/gdi01/map.yaml | 2 +- mods/cnc/maps/nod01/map.yaml | 1 + mods/cnc/maps/the-hot-box/map.yaml | 1 + mods/cnc/rules/system.yaml | 1 - mods/d2k/rules/system.yaml | 1 - mods/ra/chrome/lobby-dialogs.yaml | 13 ++++++++ mods/ra/maps/Fort-Lonestar/map.yaml | 3 +- mods/ra/maps/Survival01/map.yaml | 1 + mods/ra/maps/Survival02/map.yaml | 1 + mods/ra/maps/allies-01/map.yaml | 1 + mods/ra/maps/allies-02/map.yaml | 1 + mods/ra/maps/allies-03/map.yaml | 1 + mods/ra/maps/allies-04/map.yaml | 1 + mods/ra/maps/bomber-john/map.yaml | 3 +- .../maps/drop-zone-battle-of-tikiaki/map.yaml | 1 + mods/ra/maps/drop-zone-w/map.yaml | 1 + mods/ra/maps/drop-zone/map.yaml | 1 + mods/ra/maps/monster-tank-madness/map.yaml | 1 + mods/ra/maps/soviet-01-classic/map.yaml | 3 +- mods/ra/maps/training-camp/map.yaml | 3 +- mods/ra/rules/system.yaml | 1 - mods/ts/rules/system.yaml | 1 - 28 files changed, 100 insertions(+), 17 deletions(-) diff --git a/OpenRA.Game/Map.cs b/OpenRA.Game/Map.cs index 2e9179aeb6..cd7e369c89 100644 --- a/OpenRA.Game/Map.cs +++ b/OpenRA.Game/Map.cs @@ -29,6 +29,7 @@ namespace OpenRA public bool? Shroud; public bool? AllyBuildRadius; public bool? FragileAlliances; + public int? StartingCash; public bool ConfigurableStartingUnits = true; public string[] Difficulties = { }; @@ -44,6 +45,8 @@ namespace OpenRA settings.Shroud = Shroud.Value; if (AllyBuildRadius.HasValue) settings.AllyBuildRadius = AllyBuildRadius.Value; + if (StartingCash.HasValue) + settings.StartingCash = StartingCash.Value; if (FragileAlliances.HasValue) settings.FragileAlliances = FragileAlliances.Value; } diff --git a/OpenRA.Game/Network/Session.cs b/OpenRA.Game/Network/Session.cs index 6c6483239a..2dc549a270 100644 --- a/OpenRA.Game/Network/Session.cs +++ b/OpenRA.Game/Network/Session.cs @@ -95,6 +95,7 @@ namespace OpenRA.Network public bool Shroud = true; public bool Fog = true; public bool AllyBuildRadius = true; + public int StartingCash = 5000; public string StartingUnitsClass = "none"; public bool AllowVersionMismatch; } diff --git a/OpenRA.Game/Traits/Player/PlayerResources.cs b/OpenRA.Game/Traits/Player/PlayerResources.cs index 77fdbc4857..9a71313ab2 100644 --- a/OpenRA.Game/Traits/Player/PlayerResources.cs +++ b/OpenRA.Game/Traits/Player/PlayerResources.cs @@ -16,8 +16,8 @@ namespace OpenRA.Traits { public class PlayerResourcesInfo : ITraitInfo { - public readonly int InitialCash = 10000; - public readonly int InitialOre = 0; + public readonly int[] SelectableCash = { 2500, 5000, 10000, 20000 }; + public readonly int DefaultCash = 5000; public readonly int AdviceInterval = 250; public object Create(ActorInitializer init) { return new PlayerResources(init.self, this); } @@ -34,8 +34,7 @@ namespace OpenRA.Traits { Owner = self.Owner; - Cash = info.InitialCash; - Ore = info.InitialOre; + Cash = self.World.LobbyInfo.GlobalSettings.StartingCash; AdviceInterval = info.AdviceInterval; } diff --git a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs index cfdbe97cb8..a2d627d602 100644 --- a/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs +++ b/OpenRA.Mods.RA/ServerTraits/LobbyCommands.cs @@ -495,6 +495,25 @@ namespace OpenRA.Mods.RA.Server server.SyncLobbyInfo(); return true; }}, + { "startingcash", + s => + { + if (!client.IsAdmin) + { + server.SendOrderTo(conn, "Message", "Only the host can set that option"); + return true; + } + + if (server.Map.Options.StartingCash.HasValue) + { + server.SendOrderTo(conn, "Message", "Map has disabled cash configuration"); + return true; + } + + server.lobbyInfo.GlobalSettings.StartingCash = int.Parse(s); + server.SyncLobbyInfo(); + return true; + }}, { "kick", s => { diff --git a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs index b239589c82..5b182bafb7 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/LobbyLogic.cs @@ -368,6 +368,31 @@ namespace OpenRA.Mods.RA.Widgets.Logic optionsBin.Get("STARTINGUNITS_DESC").IsVisible = startingUnits.IsVisible; } + var startingCash = optionsBin.GetOrNull("STARTINGCASH_DROPDOWNBUTTON"); + if (startingCash != null) + { + startingCash.IsDisabled = () => Map.Options.StartingCash.HasValue || configurationDisabled(); + startingCash.GetText = () => Map.Options.StartingCash.HasValue ? "Not Available" : "${0}".F(orderManager.LobbyInfo.GlobalSettings.StartingCash); + startingCash.OnMouseDown = _ => + { + var options = Rules.Info["player"].Traits.Get().SelectableCash.Select(c => new DropDownOption + { + Title = "${0}".F(c), + IsSelected = () => orderManager.LobbyInfo.GlobalSettings.StartingCash == c, + OnClick = () => orderManager.IssueOrder(Order.Command("startingcash {0}".F(c))) + }); + + Func setupItem = (option, template) => + { + var item = ScrollItemWidget.Setup(template, option.IsSelected, option.OnClick); + item.Get("LABEL").GetText = () => option.Title; + return item; + }; + + startingCash.ShowDropDown("LABEL_DROPDOWN_TEMPLATE", options.Count() * 30, options, setupItem); + }; + } + var enableShroud = optionsBin.GetOrNull("SHROUD_CHECKBOX"); if (enableShroud != null) { @@ -481,6 +506,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic else throw new InvalidOperationException("Server's new map doesn't exist on your system and Downloading turned off"); Map = new Map(Game.modData.AvailableMaps[MapUid].Path); + + // Restore default starting cash if the last map set it to something invalid + var pri = Rules.Info["player"].Traits.Get(); + if (!Map.Options.StartingCash.HasValue && !pri.SelectableCash.Contains(orderManager.LobbyInfo.GlobalSettings.StartingCash)) + orderManager.IssueOrder(Order.Command("startingcash {0}".F(pri.DefaultCash))); } void UpdatePlayerList() diff --git a/mods/cnc/chrome/dialogs.yaml b/mods/cnc/chrome/dialogs.yaml index ac7c407a96..71453c9ae2 100644 --- a/mods/cnc/chrome/dialogs.yaml +++ b/mods/cnc/chrome/dialogs.yaml @@ -249,6 +249,20 @@ Background@LOBBY_OPTIONS_BIN: Width:230 Height:20 Text:Build off Ally ConYards + Label@STARTINGCASH_DESC: + X:10 + Y:72 + Width:80 + Height:25 + Text:Starting Cash: + Align:Right + DropDownButton@STARTINGCASH_DROPDOWNBUTTON: + X:95 + Y:72 + Width:120 + Height:25 + Font:Bold + Text:$5000 Label@STARTINGUNITS_DESC: X:PARENT_RIGHT - WIDTH - 145 Y:72 diff --git a/mods/cnc/maps/gdi01/map.yaml b/mods/cnc/maps/gdi01/map.yaml index 9393004b4d..adedb36355 100644 --- a/mods/cnc/maps/gdi01/map.yaml +++ b/mods/cnc/maps/gdi01/map.yaml @@ -26,6 +26,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 500 ConfigurableStartingUnits: false Players: @@ -47,7 +48,6 @@ Players: LockSpawn: True Spawn: 0 AllowBots: False - InitialCash: 20 Allies: GoodGuy Enemies: BadGuy,Creeps Required: True diff --git a/mods/cnc/maps/nod01/map.yaml b/mods/cnc/maps/nod01/map.yaml index 6a2cc30589..74ab1bc400 100644 --- a/mods/cnc/maps/nod01/map.yaml +++ b/mods/cnc/maps/nod01/map.yaml @@ -26,6 +26,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 0 ConfigurableStartingUnits: false Players: diff --git a/mods/cnc/maps/the-hot-box/map.yaml b/mods/cnc/maps/the-hot-box/map.yaml index 1a1f5df620..ba7f89d08e 100755 --- a/mods/cnc/maps/the-hot-box/map.yaml +++ b/mods/cnc/maps/the-hot-box/map.yaml @@ -24,6 +24,7 @@ Options: Crates: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/cnc/rules/system.yaml b/mods/cnc/rules/system.yaml index 01ba2734af..f3a5eabfbb 100644 --- a/mods/cnc/rules/system.yaml +++ b/mods/cnc/rules/system.yaml @@ -6,7 +6,6 @@ Player: PowerManager: AllyRepair: PlayerResources: - InitialCash: 5000 ActorGroupProxy: DeveloperMode: HackyAI@Default: diff --git a/mods/d2k/rules/system.yaml b/mods/d2k/rules/system.yaml index 2341f94806..2f9c28583f 100644 --- a/mods/d2k/rules/system.yaml +++ b/mods/d2k/rules/system.yaml @@ -39,7 +39,6 @@ Player: AdviceInterval: 650 AllyRepair: PlayerResources: - InitialCash: 5000 AdviceInterval: 650 ActorGroupProxy: DeveloperMode: diff --git a/mods/ra/chrome/lobby-dialogs.yaml b/mods/ra/chrome/lobby-dialogs.yaml index 63c5eda0de..712b1f15a0 100644 --- a/mods/ra/chrome/lobby-dialogs.yaml +++ b/mods/ra/chrome/lobby-dialogs.yaml @@ -102,6 +102,19 @@ Background@LOBBY_OPTIONS_BIN: Width:230 Height:20 Text:Build off Ally ConYards + Label@STARTINGCASH_DESC: + Y:87 + Width:80 + Height:25 + Text:Starting Cash: + Align:Right + DropDownButton@STARTINGCASH_DROPDOWNBUTTON: + X:85 + Y:87 + Width:130 + Height:25 + Font:Bold + Text:$5000 Label@STARTINGUNITS_DESC: X:PARENT_RIGHT - WIDTH - 145 Y:87 diff --git a/mods/ra/maps/Fort-Lonestar/map.yaml b/mods/ra/maps/Fort-Lonestar/map.yaml index dd91037eb0..b275fc36ad 100644 --- a/mods/ra/maps/Fort-Lonestar/map.yaml +++ b/mods/ra/maps/Fort-Lonestar/map.yaml @@ -23,6 +23,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 50 ConfigurableStartingUnits: false Players: @@ -512,8 +513,6 @@ Rules: Unit: e7 SelectionShares: 10 Player: - PlayerResources: - InitialCash: 50 ClassicProductionQueue@Infantry: Type: Infantry BuildSpeed: 1 diff --git a/mods/ra/maps/Survival01/map.yaml b/mods/ra/maps/Survival01/map.yaml index 3a889eae56..5a2e3fc2ef 100644 --- a/mods/ra/maps/Survival01/map.yaml +++ b/mods/ra/maps/Survival01/map.yaml @@ -23,6 +23,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Difficulties: Easy,Normal,Hard diff --git a/mods/ra/maps/Survival02/map.yaml b/mods/ra/maps/Survival02/map.yaml index a5be8dd06f..da2b871934 100644 --- a/mods/ra/maps/Survival02/map.yaml +++ b/mods/ra/maps/Survival02/map.yaml @@ -23,6 +23,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index 7d95ac6010..d9ebc642df 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -25,6 +25,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Difficulties: Easy, Normal diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index 1ad0acc4ca..eae5ed271f 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -25,6 +25,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index 57d343749f..f3467a1e15 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -25,6 +25,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Difficulties: Easy, Normal, Hard diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index 656436bbe4..8adf5608db 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -17,6 +17,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Difficulties: Easy,Normal,Hard diff --git a/mods/ra/maps/bomber-john/map.yaml b/mods/ra/maps/bomber-john/map.yaml index 0727ba62b4..171b5fca73 100644 --- a/mods/ra/maps/bomber-john/map.yaml +++ b/mods/ra/maps/bomber-john/map.yaml @@ -23,6 +23,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 60 ConfigurableStartingUnits: false Players: @@ -805,8 +806,6 @@ Rules: Player: ClassicProductionQueue@Building: BuildSpeed: 0.4 - PlayerResources: - InitialCash: 60 MNLYR: Inherits: ^Tank diff --git a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml index bcbd44f5b0..095bd8d62d 100644 --- a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml +++ b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml @@ -24,6 +24,7 @@ Options: Crates: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/drop-zone-w/map.yaml b/mods/ra/maps/drop-zone-w/map.yaml index a2fa753a33..4557a2d984 100644 --- a/mods/ra/maps/drop-zone-w/map.yaml +++ b/mods/ra/maps/drop-zone-w/map.yaml @@ -24,6 +24,7 @@ Options: Crates: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/drop-zone/map.yaml b/mods/ra/maps/drop-zone/map.yaml index 1e2cb864ac..2c64f94b57 100644 --- a/mods/ra/maps/drop-zone/map.yaml +++ b/mods/ra/maps/drop-zone/map.yaml @@ -24,6 +24,7 @@ Options: Crates: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index c4c609744b..5fcde1a85d 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -25,6 +25,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 5000 ConfigurableStartingUnits: false Players: diff --git a/mods/ra/maps/soviet-01-classic/map.yaml b/mods/ra/maps/soviet-01-classic/map.yaml index b945c15766..fc0fbbbec8 100644 --- a/mods/ra/maps/soviet-01-classic/map.yaml +++ b/mods/ra/maps/soviet-01-classic/map.yaml @@ -25,6 +25,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 0 ConfigurableStartingUnits: false Players: @@ -848,8 +849,6 @@ Smudges: Rules: Player: -ConquestVictoryConditions: - PlayerResources: - InitialCash: 0 World: -CrateDrop: -SpawnMPUnits: diff --git a/mods/ra/maps/training-camp/map.yaml b/mods/ra/maps/training-camp/map.yaml index 961a08e641..bb2606f8c2 100644 --- a/mods/ra/maps/training-camp/map.yaml +++ b/mods/ra/maps/training-camp/map.yaml @@ -23,6 +23,7 @@ Options: Shroud: true AllyBuildRadius: false FragileAlliances: false + StartingCash: 100 ConfigurableStartingUnits: false Players: @@ -807,8 +808,6 @@ Rules: -SpawnMPUnits: -MPStartLocations: Player: - PlayerResources: - InitialCash: 100 ClassicProductionQueue@Infantry: Type: Infantry BuildSpeed: 1 diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 6be1a8d901..ad40e94225 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -38,7 +38,6 @@ Player: PowerManager: AllyRepair: PlayerResources: - InitialCash: 5000 ActorGroupProxy: DeveloperMode: HackyAI@EasyAI: diff --git a/mods/ts/rules/system.yaml b/mods/ts/rules/system.yaml index 9900500350..cc8d895f22 100644 --- a/mods/ts/rules/system.yaml +++ b/mods/ts/rules/system.yaml @@ -30,7 +30,6 @@ Player: PowerManager: AllyRepair: PlayerResources: - InitialCash: 5000 ActorGroupProxy: DeveloperMode: PlayerColorPalette: From 7b42888064214c4ba39121b7a8cfb300ce77da13 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 20:16:01 +1200 Subject: [PATCH 7/8] Disable crates option for missions and mini games. --- mods/ra/maps/Survival01/map.yaml | 1 + mods/ra/maps/Survival02/map.yaml | 1 + mods/ra/maps/allies-01/map.yaml | 1 + mods/ra/maps/allies-02/map.yaml | 1 + mods/ra/maps/allies-03/map.yaml | 1 + mods/ra/maps/allies-04/map.yaml | 1 + mods/ra/maps/bomber-john/map.yaml | 1 + mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml | 2 +- mods/ra/maps/drop-zone-w/map.yaml | 2 +- mods/ra/maps/drop-zone/map.yaml | 2 +- mods/ra/maps/monster-tank-madness/map.yaml | 1 + mods/ra/maps/soviet-01-classic/map.yaml | 1 + mods/ra/maps/training-camp/map.yaml | 1 + 13 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mods/ra/maps/Survival01/map.yaml b/mods/ra/maps/Survival01/map.yaml index 5a2e3fc2ef..180ee6ab4d 100644 --- a/mods/ra/maps/Survival01/map.yaml +++ b/mods/ra/maps/Survival01/map.yaml @@ -19,6 +19,7 @@ UseAsShellmap: False Type: Minigame Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/Survival02/map.yaml b/mods/ra/maps/Survival02/map.yaml index da2b871934..d0fb73e7c5 100644 --- a/mods/ra/maps/Survival02/map.yaml +++ b/mods/ra/maps/Survival02/map.yaml @@ -19,6 +19,7 @@ UseAsShellmap: False Type: Minigame Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index d9ebc642df..79487adef2 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -21,6 +21,7 @@ UseAsShellmap: False Type: Campaign Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index eae5ed271f..81d07f6ad3 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -21,6 +21,7 @@ UseAsShellmap: False Type: Campaign Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index f3467a1e15..9e1d00f64e 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -21,6 +21,7 @@ UseAsShellmap: False Type: Campaign Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/allies-04/map.yaml b/mods/ra/maps/allies-04/map.yaml index 8adf5608db..a546d64ef4 100644 --- a/mods/ra/maps/allies-04/map.yaml +++ b/mods/ra/maps/allies-04/map.yaml @@ -13,6 +13,7 @@ Author: Scott_NZ Tileset: TEMPERAT Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/bomber-john/map.yaml b/mods/ra/maps/bomber-john/map.yaml index 171b5fca73..2addf941f1 100644 --- a/mods/ra/maps/bomber-john/map.yaml +++ b/mods/ra/maps/bomber-john/map.yaml @@ -19,6 +19,7 @@ UseAsShellmap: False Type: Minigame Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml index 095bd8d62d..535d060df6 100644 --- a/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml +++ b/mods/ra/maps/drop-zone-battle-of-tikiaki/map.yaml @@ -19,9 +19,9 @@ UseAsShellmap: False Type: Drop Zone Options: + Crates: true Fog: false Shroud: false - Crates: true AllyBuildRadius: false FragileAlliances: false StartingCash: 5000 diff --git a/mods/ra/maps/drop-zone-w/map.yaml b/mods/ra/maps/drop-zone-w/map.yaml index 4557a2d984..ee3ee14413 100644 --- a/mods/ra/maps/drop-zone-w/map.yaml +++ b/mods/ra/maps/drop-zone-w/map.yaml @@ -19,9 +19,9 @@ UseAsShellmap: False Type: Drop Zone Options: + Crates: true Fog: false Shroud: false - Crates: true AllyBuildRadius: false FragileAlliances: false StartingCash: 5000 diff --git a/mods/ra/maps/drop-zone/map.yaml b/mods/ra/maps/drop-zone/map.yaml index 2c64f94b57..3d8e08d55c 100644 --- a/mods/ra/maps/drop-zone/map.yaml +++ b/mods/ra/maps/drop-zone/map.yaml @@ -19,9 +19,9 @@ UseAsShellmap: False Type: Drop Zone Options: + Crates: true Fog: false Shroud: false - Crates: true AllyBuildRadius: false FragileAlliances: false StartingCash: 5000 diff --git a/mods/ra/maps/monster-tank-madness/map.yaml b/mods/ra/maps/monster-tank-madness/map.yaml index 5fcde1a85d..6d6d2c7b31 100644 --- a/mods/ra/maps/monster-tank-madness/map.yaml +++ b/mods/ra/maps/monster-tank-madness/map.yaml @@ -21,6 +21,7 @@ UseAsShellmap: False Type: Campaign Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/soviet-01-classic/map.yaml b/mods/ra/maps/soviet-01-classic/map.yaml index fc0fbbbec8..fe3075116d 100644 --- a/mods/ra/maps/soviet-01-classic/map.yaml +++ b/mods/ra/maps/soviet-01-classic/map.yaml @@ -21,6 +21,7 @@ UseAsShellmap: False Type: Campaign Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false diff --git a/mods/ra/maps/training-camp/map.yaml b/mods/ra/maps/training-camp/map.yaml index bb2606f8c2..8473183434 100644 --- a/mods/ra/maps/training-camp/map.yaml +++ b/mods/ra/maps/training-camp/map.yaml @@ -19,6 +19,7 @@ UseAsShellmap: False Type: Minigame Options: + Crates: false Fog: true Shroud: true AllyBuildRadius: false From bfd8739e2b3df2a4a69dfa0c3a7404e2ede2dca2 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 17 Aug 2013 21:37:48 +1200 Subject: [PATCH 8/8] Tweak layout again. C&C doesn't offer fragile alliances. --- mods/cnc/chrome/dialogs.yaml | 36 +++++++++++++------------------ mods/ra/chrome/lobby-dialogs.yaml | 26 +++++++++++----------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/mods/cnc/chrome/dialogs.yaml b/mods/cnc/chrome/dialogs.yaml index 71453c9ae2..5d6986f66a 100644 --- a/mods/cnc/chrome/dialogs.yaml +++ b/mods/cnc/chrome/dialogs.yaml @@ -213,78 +213,72 @@ Background@LOBBY_OPTIONS_BIN: Align:Center Text: Map Options Container: - X:20 + X:30 Y:65 - Width: PARENT_RIGHT-40 + Width: PARENT_RIGHT-60 Height: PARENT_BOTTOM-75 Children: - Checkbox@ALLOWCHEATS_CHECKBOX: - Width:230 - Height:20 - Text:Debug Menu - Checkbox@FRAGILEALLIANCES_CHECKBOX: - Y:35 - Width:220 - Height:20 - Text:Team Changes Checkbox@SHROUD_CHECKBOX: - X:155 Width:230 Height:20 Text:Shroud Checkbox@FOG_CHECKBOX: - X:155 Y:35 Width:230 Height:20 Text:Fog of War Checkbox@CRATES_CHECKBOX: - X:280 + X:160 Width:230 Height:20 Text:Crates Appear Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X:280 + X:160 Y:35 Width:230 Height:20 Text:Build off Ally ConYards + Checkbox@ALLOWCHEATS_CHECKBOX: + X:325 + Width:230 + Height:20 + Text:Debug Menu Label@STARTINGCASH_DESC: X:10 Y:72 - Width:80 + Width:70 Height:25 Text:Starting Cash: Align:Right DropDownButton@STARTINGCASH_DROPDOWNBUTTON: - X:95 + X:85 Y:72 Width:120 Height:25 Font:Bold Text:$5000 Label@STARTINGUNITS_DESC: - X:PARENT_RIGHT - WIDTH - 145 + X:PARENT_RIGHT - WIDTH - 135 Y:72 Width:120 Height:25 Text:Starting Units: Align:Right DropDownButton@STARTINGUNITS_DROPDOWNBUTTON: - X:PARENT_RIGHT - WIDTH + X:PARENT_RIGHT - WIDTH + 10 Y:72 Width:140 Height:25 Font:Bold Label@DIFFICULTY_DESC: - X:PARENT_RIGHT - WIDTH - 145 + X:PARENT_RIGHT - WIDTH - 135 Y:107 Width:120 Height:25 Text:Mission Difficulty: Align:Right DropDownButton@DIFFICULTY_DROPDOWNBUTTON: - X:PARENT_RIGHT - WIDTH + X:PARENT_RIGHT - WIDTH + 10 Y:107 Width:140 Height:25 diff --git a/mods/ra/chrome/lobby-dialogs.yaml b/mods/ra/chrome/lobby-dialogs.yaml index 712b1f15a0..633f4d6c5b 100644 --- a/mods/ra/chrome/lobby-dialogs.yaml +++ b/mods/ra/chrome/lobby-dialogs.yaml @@ -71,37 +71,37 @@ Background@LOBBY_OPTIONS_BIN: Width: PARENT_RIGHT-60 Height: PARENT_BOTTOM-75 Children: - Checkbox@ALLOWCHEATS_CHECKBOX: - Width:230 - Height:20 - Text:Debug Menu - Checkbox@FRAGILEALLIANCES_CHECKBOX: - Y:40 - Width:220 - Height:20 - Text:Team Changes Checkbox@SHROUD_CHECKBOX: - X:175 Width:230 Height:20 Text:Shroud Checkbox@FOG_CHECKBOX: - X:175 Y:40 Width:230 Height:20 Text:Fog of War Checkbox@CRATES_CHECKBOX: - X:310 + X:155 Width:230 Height:20 Text:Crates Appear Checkbox@ALLYBUILDRADIUS_CHECKBOX: - X:310 + X:155 Y:40 Width:230 Height:20 Text:Build off Ally ConYards + Checkbox@ALLOWCHEATS_CHECKBOX: + X:350 + Width:230 + Height:20 + Text:Debug Menu + Checkbox@FRAGILEALLIANCES_CHECKBOX: + X:350 + Y:40 + Width:220 + Height:20 + Text:Team Changes Label@STARTINGCASH_DESC: Y:87 Width:80