From 8f8800803bfde000dd46b9f498f87d70d1e6a6bf Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Thu, 11 Oct 2012 22:35:13 +1300 Subject: [PATCH] Make the Soviet V2s buildable immediately. Fix the Soviet reinforcements not arriving properly. Remove the Soviet reinforcements timer. Rework the bottom left of the map. --- OpenRA.Mods.RA/Missions/Allies02Script.cs | 45 +---- mods/ra/maps/allies-02/map.bin | Bin 81925 -> 81925 bytes mods/ra/maps/allies-02/map.yaml | 234 ++++++++++++++++++---- 3 files changed, 205 insertions(+), 74 deletions(-) diff --git a/OpenRA.Mods.RA/Missions/Allies02Script.cs b/OpenRA.Mods.RA/Missions/Allies02Script.cs index fdf8821c9b..72a3400ccd 100644 --- a/OpenRA.Mods.RA/Missions/Allies02Script.cs +++ b/OpenRA.Mods.RA/Missions/Allies02Script.cs @@ -94,18 +94,14 @@ namespace OpenRA.Mods.RA.Missions CountdownTimer reinforcementsTimer; CountdownTimerWidget reinforcementsTimerWidget; - CountdownTimer sovietReinforcementsTimer; - CountdownTimerWidget sovietReinforcementsTimerWidget; List sovietReinforcementsUnits = new List(); const string InfantryQueueName = "Infantry"; const string VehicleQueueName = "Vehicle"; - readonly List sovietInfantry = new List { "e1", "e2", "e3" }; - readonly List sovietVehicles = new List { "3tnk" }; - static readonly string[] SovietVehicleAdditions = { "v2rl" }; + static readonly string[] sovietInfantry = { "e1", "e2", "e3" }; + static readonly string[] sovietVehicles = { "3tnk", "v2rl" }; const int SovietGroupSize = 8; - const int SovietVehicleAdditionsTicks = 1500 * 4; const int SovietHelperCash = 2000; const int ReinforcementsTicks = 1500 * 12; @@ -138,7 +134,7 @@ namespace OpenRA.Mods.RA.Missions static readonly string[] Badger2Passengers = { "e1", "e1", "e1", "e2", "e2" }; static readonly string[] Badger3Passengers = { "e1", "e1", "e1", "e2", "e2" }; - const int TanksTicks = 1500 * 8; + const int TanksTicks = 1500 * 11; static readonly string[] Tanks = { "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "3tnk", "3tnk" }; const string SignalFlareName = "flare"; @@ -196,10 +192,8 @@ namespace OpenRA.Mods.RA.Missions { InitializeSovietFactories(); StartReinforcementsTimer(); - StartSovietReinforcementsTimer(); } reinforcementsTimer.Tick(); - sovietReinforcementsTimer.Tick(); if (world.FrameNumber == ParatroopersTicks) { MissionUtils.Paradrop(world, soviets, Badger1Passengers, badgerEntryPoint1.Location, badgerDropPoint1.Location); @@ -219,9 +213,9 @@ namespace OpenRA.Mods.RA.Missions MissionUtils.Parabomb(world, soviets, badgerEntryPoint2.Location, parabombPoint1.Location); MissionUtils.Parabomb(world, soviets, badgerEntryPoint2.Location + new CVec(0, 3), parabombPoint2.Location); } - if (world.FrameNumber == SovietVehicleAdditionsTicks) + if (world.FrameNumber == SovietReinforcementsTicks) { - sovietVehicles.AddRange(SovietVehicleAdditions); + SendSovietReinforcements(); } if (yak == null || (yak != null && !yak.IsDead() && (yak.GetCurrentActivity() is FlyCircle || yak.IsIdle))) { @@ -365,7 +359,6 @@ namespace OpenRA.Mods.RA.Missions } } var idleSovietUnits = world.FindAliveCombatantActorsInCircle(allies2BasePoint.CenterLocation, 20).Where(a => a.Owner == soviets && a.IsIdle && a.HasTrait()); - idleSovietUnits = idleSovietUnits.Union(sovietReinforcementsUnits.Where(a => !a.IsDead() && a.IsIdle && a.HasTrait())); foreach (var unit in idleSovietUnits) { var closestAlliedBuilding = ClosestAlliedBuilding(unit, 40); @@ -416,30 +409,13 @@ namespace OpenRA.Mods.RA.Missions void StartReinforcementsTimer() { - reinforcementsTimer = new CountdownTimer(ReinforcementsTicks, ReinforcementsTimerExpired, false); + Sound.Play("timergo1.aud"); + reinforcementsTimer = new CountdownTimer(ReinforcementsTicks, ReinforcementsTimerExpired, true); reinforcementsTimerWidget = new CountdownTimerWidget( reinforcementsTimer, "Allied reinforcements arrive in: {0}", - new float2(Game.viewport.Width * 0.35f, Game.viewport.Height * 0.85f)); - Ui.Root.AddChild(reinforcementsTimerWidget); - } - - void StartSovietReinforcementsTimer() - { - Sound.Play("timergo1.aud"); - sovietReinforcementsTimer = new CountdownTimer(SovietReinforcementsTicks, SovietReinforcementsTimerExpired, true); - sovietReinforcementsTimerWidget = new CountdownTimerWidget( - sovietReinforcementsTimer, - "Soviet reinforcements arrive in: {0}", new float2(Game.viewport.Width * 0.35f, Game.viewport.Height * 0.9f)); - Ui.Root.AddChild(sovietReinforcementsTimerWidget); - } - - void SovietReinforcementsTimerExpired(CountdownTimer countdownTimer) - { - sovietReinforcementsTimerWidget.Visible = false; - SendSovietReinforcements(); - Sound.Play("sovrein1.aud"); + Ui.Root.AddChild(reinforcementsTimerWidget); } void SendSovietReinforcements() @@ -454,7 +430,7 @@ namespace OpenRA.Mods.RA.Missions new FacingInit(Util.GetFacing(allies2BasePoint.Location - entryPoint.Location, 0)), new OwnerInit(soviets) }); - sovietReinforcementsUnits.Add(u); + u.QueueActivity(new Move.Move(sovietRallyPoint.Location, 3)); } } } @@ -531,7 +507,8 @@ namespace OpenRA.Mods.RA.Missions bool AlliesNearTown() { - return world.FindAliveCombatantActorsInCircle(townPoint.CenterLocation, AlliedTownTransferRange).Where(a => a.HasTrait()).Any(a => a.Owner == allies1); + return world.FindAliveCombatantActorsInCircle(townPoint.CenterLocation, AlliedTownTransferRange) + .Any(a => a.Owner == allies1 && a.HasTrait()); } void TransferTownUnitsToAllies() diff --git a/mods/ra/maps/allies-02/map.bin b/mods/ra/maps/allies-02/map.bin index 89d78aa89f3c67eb69874f061e932b197a61ea5f..2fcc7d8c2f8468f4d7f9a5392b280ae83c7f0afd 100644 GIT binary patch delta 440 zcmXX?OGq106rD%Sl+lrap$|q!&6_6m6F-THF-T%)(poJ>5G8^rBBEPCT8c2R;4YMsl7g#tRb03zg)ZE5*L_#s(87iLJMW!y?p`UhR|;J{cv#2i?kNDmFtb#s@%MajY1iG%V|1KO7BQQoq&3MkXk&cHE=Kc}WvCXSK`PV}iY zE>NBF;iR~?C==!{!tVoQ-vnAo`m9m{-zPn4e7-7pfW=LV%8?na|7(!A(GF!^C?0jN zj2K+1o!mlx+9NEB`&u_aAYl!`67YnZ?)=$`rjq12hUwe84%o&MaW9~nX7IpW%71*Ek zn8T-!@d5*ilIr_^hwyDe($nE30cXH6&kb>IJb_b?bdV~F#!JJvG(@EqbrpOWe@0?t xm7znuTHWDh$HhpWjlV56j?(jdy{J|Rg!3llGm+Z$=J4*7xqCZ$eLE_0;t{;mmO20c delta 629 zcmYk4Pe>GT6vw}B{;V!cjBG8gj_Kr|(st2R(Y7W3q?KDBB!xj}hyH*OR7g959?}U3 zf_8Rz6^264DLRPk@1V>@8R^ieTZazqf*^bA-lb;p5_}I|9`EzM@ZMWpR#%tRt%C%Q zWa2zGr70d{k4Gm=*NlqZhCb@>A^V8@0sfZ_*pO{RJdg*)>i<*6?K5CBwN{~xX18+mJq1vbwD<|hDn9f7@ zHKDZJ4SbAqYr1%8J|_P1J|=2f9}$nO$N6e<$u;|VpnX%z19`|6U_s{HjW{>l(Yelw zhVYK7i=hsaj0Io;QXZ6tVu36uhrnVeiPHmvV)JxQ*hCAE^I@NAL9(D8f)+!`yfxU* z&Y;0R<~2@V)Lru)zx^2F@10An1)u<_2oxbzfhr^ia3Gg~GN=MncQ^L z<@4657QX^1>_sLq5uE@ diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index 8de3d9f5e1..0f079b48e1 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -378,8 +378,8 @@ Actors: Actor330: oilb Location: 65,31 Owner: Neutral - Actor570: t02 - Location: 23,73 + Actor360: t16 + Location: 21,81 Owner: Neutral Actor114: fenc Location: 100,98 @@ -456,8 +456,8 @@ Actors: Actor73: e1 Location: 72,109 Owner: Soviets - Actor179: tc01 - Location: 22,76 + Actor361: tc03 + Location: 27,80 Owner: Neutral Actor387: brik Location: 16,43 @@ -537,9 +537,9 @@ Actors: Actor53: e1 Location: 109,89 Owner: Allies1 - Actor148: oilb - Location: 45,88 - Owner: Neutral + Actor896: e1 + Location: 25,80 + Owner: Soviets Actor182: tc02 Location: 53,35 Owner: Neutral @@ -1298,9 +1298,6 @@ Actors: Actor206: dome Location: 38,100 Owner: Allies2 - Actor435: oilb - Location: 45,85 - Owner: Neutral Actor204: apwr Location: 37,107 Owner: Allies2 @@ -1493,9 +1490,6 @@ Actors: Actor448: e2 Location: 54,22 Owner: Soviets - Actor450: t05 - Location: 47,84 - Owner: Neutral Actor468: fenc Location: 29,93 Owner: Allies2 @@ -1615,24 +1609,21 @@ Actors: Actor569: e1 Location: 31,56 Owner: Soviets - Actor139: t01 - Location: 23,72 + Actor873: brl3 + Location: 45,79 Owner: Neutral - Actor357: barb - Location: 30,78 - Owner: Soviets - Actor571: t14 - Location: 26,79 + Actor179: t16 + Location: 24,75 + Owner: Neutral + Actor139: tc02 + Location: 20,72 + Owner: Neutral + Actor570: oilb + Location: 43,80 + Owner: Neutral + Actor885: t12 + Location: 40,77 Owner: Neutral - Actor358: barb - Location: 31,78 - Owner: Soviets - Actor261: barb - Location: 29,78 - Owner: Soviets - Actor359: barb - Location: 32,78 - Owner: Soviets Actor584: tc04 Location: 52,70 Owner: Neutral @@ -2125,14 +2116,14 @@ Actors: Actor40: tran.husk1 Location: 69,87 Owner: Allies1 - Actor360: barb - Location: 32,77 - Owner: Soviets - Actor361: barb - Location: 32,76 - Owner: Soviets + Actor884: barl + Location: 45,80 + Owner: Neutral + Actor357: t05 + Location: 26,79 + Owner: Neutral Actor575: tc05 - Location: 17,88 + Location: 16,89 Owner: Neutral Actor573: 2tnk Location: 34,92 @@ -2141,8 +2132,8 @@ Actors: Actor577: tc02 Location: 81,87 Owner: Neutral - Actor576: tc04 - Location: 15,89 + Actor576: tc01 + Location: 15,90 Owner: Neutral Actor574: 2tnk Location: 35,92 @@ -2429,8 +2420,8 @@ Actors: Actor777: fenc Location: 99,56 Owner: Soviets - Actor778: t02 - Location: 27,75 + Actor359: t02 + Location: 41,81 Owner: Neutral Actor779: brik Location: 24,38 @@ -2711,6 +2702,169 @@ Actors: Actor857: brik Location: 45,38 Owner: Soviets + Actor253: e1 + Location: 21,90 + Owner: Allies2 + Actor255: e1 + Location: 23,89 + Owner: Allies2 + Actor270: e1 + Location: 27,90 + Owner: Allies2 + Actor268: e1 + Location: 33,90 + Owner: Allies2 + Actor269: e1 + Location: 34,90 + Owner: Allies2 + Actor267: jeep + Location: 25,89 + Owner: Allies2 + Facing: 0 + Actor882: barl + Location: 46,81 + Owner: Neutral + Actor871: brl3 + Location: 44,82 + Owner: Neutral + Actor874: brl3 + Location: 34,78 + Owner: Neutral + Actor872: brl3 + Location: 39,81 + Owner: Neutral + Actor870: brl3 + Location: 29,79 + Owner: Neutral + Actor450: oilb + Location: 40,80 + Owner: Neutral + Actor148: oilb + Location: 30,77 + Owner: Neutral + Actor435: oilb + Location: 27,77 + Owner: Neutral + Actor868: t10 + Location: 21,77 + Owner: Neutral + Actor358: t16 + Location: 40,78 + Owner: Neutral + Actor261: tc01 + Location: 42,77 + Owner: Neutral + Actor778: t05 + Location: 48,78 + Owner: Neutral + Actor831: t15 + Location: 47,82 + Owner: Neutral + Actor899: e1 + Location: 37,79 + Owner: Soviets + Actor865: t08 + Location: 24,110 + Owner: Neutral + Actor864: t01 + Location: 33,109 + Owner: Neutral + Actor863: t05 + Location: 38,97 + Owner: Neutral + Actor860: tc04 + Location: 18,78 + Owner: Neutral + Actor862: t07 + Location: 41,71 + Owner: Neutral + Actor861: tc04 + Location: 29,73 + Owner: Neutral + Actor867: t01 + Location: 16,68 + Owner: Neutral + Actor909: oilb + Location: 45,86 + Owner: Neutral + Actor883: barl + Location: 44,79 + Owner: Neutral + Actor905: v01 + Location: 20,74 + Owner: Neutral + Actor901: barl + Location: 39,80 + Owner: Neutral + Actor888: barl + Location: 28,79 + Owner: Neutral + Actor881: barl + Location: 43,82 + Owner: Neutral + Actor894: barl + Location: 30,75 + Owner: Soviets + Actor891: barl + Location: 31,77 + Owner: Neutral + Actor897: barl + Location: 25,79 + Owner: Neutral + Actor893: e2 + Location: 30,81 + Owner: Soviets + Actor878: t15 + Location: 34,80 + Owner: Neutral + Actor879: barl + Location: 40,82 + Owner: Neutral + Actor869: brl3 + Location: 31,76 + Owner: Neutral + Actor886: barl + Location: 33,78 + Owner: Neutral + Actor866: e2 + Location: 38,77 + Owner: Soviets + Actor859: brl3 + Location: 25,78 + Owner: Neutral + Actor898: barl + Location: 26,77 + Owner: Neutral + Actor907: e2 + Location: 33,77 + Owner: Soviets + Actor906: v03 + Location: 16,72 + Owner: Neutral + Actor914: brl3 + Location: 44,86 + Owner: Neutral + Actor911: tc03 + Location: 15,92 + Owner: Neutral + Actor912: oilb + Location: 45,89 + Owner: Neutral + Actor908: t16 + Location: 16,91 + Owner: Neutral + Actor919: barl + Location: 44,89 + Owner: Neutral + Actor913: brl3 + Location: 44,91 + Owner: Neutral + Actor922: barl + Location: 47,86 + Owner: Neutral + Actor923: barl + Location: 47,87 + Owner: Neutral Smudges: