Start work on Allies 02 script, reveal sam site locations

This commit is contained in:
Scott_NZ
2012-08-07 21:45:38 +12:00
parent 9be501fc3d
commit d5279d123f
2 changed files with 477 additions and 429 deletions

View File

@@ -0,0 +1,47 @@
#region Copyright & License Information
/*
* Copyright 2007-2012 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.Linq;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Missions
{
class Allies02ScriptInfo : TraitInfo<Allies02Script>, Requires<SpawnMapActorsInfo> { }
class Allies02Script : IWorldLoaded, ITick
{
Actor chinookHusk;
Actor sam1;
Actor sam2;
Actor sam3;
Player allies;
Player soviets;
public void Tick(Actor self)
{
}
public void WorldLoaded(World w)
{
allies = w.Players.Single(p => p.InternalName == "Allies");
soviets = w.Players.Single(p => p.InternalName == "Soviets");
var actors = w.WorldActor.Trait<SpawnMapActors>().Actors;
chinookHusk = actors["ChinookHusk"];
sam1 = actors["SAM1"];
sam2 = actors["SAM2"];
sam3 = actors["SAM3"];
w.WorldActor.Trait<Shroud>().Explore(w, sam1.Location, 3);
w.WorldActor.Trait<Shroud>().Explore(w, sam2.Location, 3);
w.WorldActor.Trait<Shroud>().Explore(w, sam3.Location, 3);
}
}
}

View File

@@ -233,6 +233,7 @@
<Compile Include="Lint\CheckSyncAnnotations.cs" />
<Compile Include="Lint\CheckTraitPrerequisites.cs" />
<Compile Include="Lint\LintBuildablePrerequisites.cs" />
<Compile Include="Missions\Allies02Script.cs" />
<Compile Include="MPStartLocations.cs" />
<Compile Include="Mine.cs" />
<Compile Include="Minelayer.cs" />