moved various other traits
This commit is contained in:
@@ -59,7 +59,7 @@ namespace OpenRA
|
|||||||
internal static Renderer renderer;
|
internal static Renderer renderer;
|
||||||
static int2 clientSize;
|
static int2 clientSize;
|
||||||
static string mapName;
|
static string mapName;
|
||||||
internal static Session LobbyInfo = new Session();
|
public static Session LobbyInfo = new Session();
|
||||||
static bool packageChangePending;
|
static bool packageChangePending;
|
||||||
static bool mapChangePending;
|
static bool mapChangePending;
|
||||||
static Pair<Assembly, string>[] ModAssemblies;
|
static Pair<Assembly, string>[] ModAssemblies;
|
||||||
|
|||||||
@@ -85,7 +85,6 @@
|
|||||||
<Compile Include="Traits\Player\ActorGroupProxy.cs" />
|
<Compile Include="Traits\Player\ActorGroupProxy.cs" />
|
||||||
<Compile Include="Traits\Player\PlayerResources.cs" />
|
<Compile Include="Traits\Player\PlayerResources.cs" />
|
||||||
<Compile Include="Traits\Player\TechTreeCache.cs" />
|
<Compile Include="Traits\Player\TechTreeCache.cs" />
|
||||||
<Compile Include="Traits\RevealsShroud.cs" />
|
|
||||||
<Compile Include="Traits\Player\ConquestVictoryConditions.cs" />
|
<Compile Include="Traits\Player\ConquestVictoryConditions.cs" />
|
||||||
<Compile Include="Traits\Modifiers\HiddenUnderFog.cs" />
|
<Compile Include="Traits\Modifiers\HiddenUnderFog.cs" />
|
||||||
<Compile Include="Traits\World\Shroud.cs" />
|
<Compile Include="Traits\World\Shroud.cs" />
|
||||||
@@ -139,7 +138,6 @@
|
|||||||
<Compile Include="Traits\Chrome\PowerDownButton.cs" />
|
<Compile Include="Traits\Chrome\PowerDownButton.cs" />
|
||||||
<Compile Include="Traits\CustomSellValue.cs" />
|
<Compile Include="Traits\CustomSellValue.cs" />
|
||||||
<Compile Include="Traits\World\SpatialBins.cs" />
|
<Compile Include="Traits\World\SpatialBins.cs" />
|
||||||
<Compile Include="Traits\World\SpawnDefaultUnits.cs" />
|
|
||||||
<Compile Include="Traits\World\ChoosePaletteOnSelect.cs" />
|
<Compile Include="Traits\World\ChoosePaletteOnSelect.cs" />
|
||||||
<Compile Include="Traits\World\Country.cs" />
|
<Compile Include="Traits\World\Country.cs" />
|
||||||
<Compile Include="Traits\Activities\Attack.cs" />
|
<Compile Include="Traits\Activities\Attack.cs" />
|
||||||
@@ -204,18 +202,14 @@
|
|||||||
<Compile Include="Traits\Building.cs" />
|
<Compile Include="Traits\Building.cs" />
|
||||||
<Compile Include="Traits\World\BuildingInfluence.cs" />
|
<Compile Include="Traits\World\BuildingInfluence.cs" />
|
||||||
<Compile Include="Traits\CanPowerDown.cs" />
|
<Compile Include="Traits\CanPowerDown.cs" />
|
||||||
<Compile Include="Traits\Fake.cs" />
|
|
||||||
<Compile Include="Traits\Helicopter.cs" />
|
<Compile Include="Traits\Helicopter.cs" />
|
||||||
<Compile Include="Traits\Modifiers\InvisibleToOthers.cs" />
|
<Compile Include="Traits\Modifiers\InvisibleToOthers.cs" />
|
||||||
<Compile Include="Traits\ConstructionYard.cs" />
|
<Compile Include="Traits\ConstructionYard.cs" />
|
||||||
<Compile Include="Traits\LimitedAmmo.cs" />
|
<Compile Include="Traits\LimitedAmmo.cs" />
|
||||||
<Compile Include="Traits\World\PaletteFromFile.cs" />
|
|
||||||
<Compile Include="Traits\World\PaletteFromRGBA.cs" />
|
|
||||||
<Compile Include="Traits\Player\PlaceBuilding.cs" />
|
<Compile Include="Traits\Player\PlaceBuilding.cs" />
|
||||||
<Compile Include="Traits\World\PlayerColorPalette.cs" />
|
<Compile Include="Traits\World\PlayerColorPalette.cs" />
|
||||||
<Compile Include="Traits\World\ResourceLayer.cs" />
|
<Compile Include="Traits\World\ResourceLayer.cs" />
|
||||||
<Compile Include="Traits\World\ResourceType.cs" />
|
<Compile Include="Traits\World\ResourceType.cs" />
|
||||||
<Compile Include="Traits\World\ShroudPalette.cs" />
|
|
||||||
<Compile Include="Traits\SupportPower.cs" />
|
<Compile Include="Traits\SupportPower.cs" />
|
||||||
<Compile Include="Traits\ProvidesRadar.cs" />
|
<Compile Include="Traits\ProvidesRadar.cs" />
|
||||||
<Compile Include="Traits\Repairable.cs" />
|
<Compile Include="Traits\Repairable.cs" />
|
||||||
@@ -223,7 +217,6 @@
|
|||||||
<Compile Include="Traits\Selectable.cs" />
|
<Compile Include="Traits\Selectable.cs" />
|
||||||
<Compile Include="Traits\Plane.cs" />
|
<Compile Include="Traits\Plane.cs" />
|
||||||
<Compile Include="Traits\Player\ProductionQueue.cs" />
|
<Compile Include="Traits\Player\ProductionQueue.cs" />
|
||||||
<Compile Include="Traits\ProductionSurround.cs" />
|
|
||||||
<Compile Include="Traits\Render\RenderBuildingCharge.cs" />
|
<Compile Include="Traits\Render\RenderBuildingCharge.cs" />
|
||||||
<Compile Include="Traits\TransformsOnDeploy.cs" />
|
<Compile Include="Traits\TransformsOnDeploy.cs" />
|
||||||
<Compile Include="Traits\Mobile.cs" />
|
<Compile Include="Traits\Mobile.cs" />
|
||||||
@@ -240,13 +233,11 @@
|
|||||||
<Compile Include="Traits\Render\RenderUnitRotor.cs" />
|
<Compile Include="Traits\Render\RenderUnitRotor.cs" />
|
||||||
<Compile Include="Traits\Render\RenderUnitSpinner.cs" />
|
<Compile Include="Traits\Render\RenderUnitSpinner.cs" />
|
||||||
<Compile Include="Traits\Render\RenderUnitTurreted.cs" />
|
<Compile Include="Traits\Render\RenderUnitTurreted.cs" />
|
||||||
<Compile Include="Traits\SeedsResource.cs" />
|
|
||||||
<Compile Include="Traits\StoresOre.cs" />
|
<Compile Include="Traits\StoresOre.cs" />
|
||||||
<Compile Include="Traits\Cloak.cs" />
|
<Compile Include="Traits\Cloak.cs" />
|
||||||
<Compile Include="Traits\TraitsInterfaces.cs" />
|
<Compile Include="Traits\TraitsInterfaces.cs" />
|
||||||
<Compile Include="Traits\Turreted.cs" />
|
<Compile Include="Traits\Turreted.cs" />
|
||||||
<Compile Include="Traits\Unit.cs" />
|
<Compile Include="Traits\Unit.cs" />
|
||||||
<Compile Include="Traits\World\SpawnMapActors.cs" />
|
|
||||||
<Compile Include="Traits\World\UnitInfluence.cs" />
|
<Compile Include="Traits\World\UnitInfluence.cs" />
|
||||||
<Compile Include="Traits\Modifiers\WithShadow.cs" />
|
<Compile Include="Traits\Modifiers\WithShadow.cs" />
|
||||||
<Compile Include="Network\UnitOrders.cs" />
|
<Compile Include="Network\UnitOrders.cs" />
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
|
||||||
{
|
|
||||||
public class SpawnMapActorsInfo : TraitInfo<SpawnMapActors> { }
|
|
||||||
|
|
||||||
public class SpawnMapActors : IGameStarted
|
|
||||||
{
|
|
||||||
public Dictionary<string, Actor> MapActors = new Dictionary<string, Actor>();
|
|
||||||
|
|
||||||
public void GameStarted(World world)
|
|
||||||
{
|
|
||||||
Game.skipMakeAnims = true; // rude hack
|
|
||||||
|
|
||||||
foreach (var actorReference in world.Map.Actors)
|
|
||||||
MapActors[actorReference.Key] = world.CreateActor(actorReference.Value.Name, actorReference.Value.Location,
|
|
||||||
world.players.Values.FirstOrDefault(p => p.InternalName == actorReference.Value.Owner)
|
|
||||||
?? world.NeutralPlayer);
|
|
||||||
|
|
||||||
Game.skipMakeAnims = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,9 +19,10 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using OpenRA.Traits;
|
||||||
using OpenRA.Traits.Activities;
|
using OpenRA.Traits.Activities;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class AttackTurretedInfo : AttackBaseInfo
|
class AttackTurretedInfo : AttackBaseInfo
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,8 +19,9 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class FakeInfo : TraitInfo<Fake> { }
|
class FakeInfo : TraitInfo<Fake> { }
|
||||||
|
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
<Compile Include="Activities\Harvest.cs" />
|
<Compile Include="Activities\Harvest.cs" />
|
||||||
<Compile Include="EmitInfantryOnSell.cs" />
|
<Compile Include="EmitInfantryOnSell.cs" />
|
||||||
<Compile Include="Explodes.cs" />
|
<Compile Include="Explodes.cs" />
|
||||||
|
<Compile Include="Fake.cs" />
|
||||||
<Compile Include="Harvester.cs" />
|
<Compile Include="Harvester.cs" />
|
||||||
<Compile Include="HasUnitOnBuild.cs" />
|
<Compile Include="HasUnitOnBuild.cs" />
|
||||||
<Compile Include="Husk.cs" />
|
<Compile Include="Husk.cs" />
|
||||||
@@ -105,9 +106,12 @@
|
|||||||
<Compile Include="InfiltrateForSonarPulse.cs" />
|
<Compile Include="InfiltrateForSonarPulse.cs" />
|
||||||
<Compile Include="IronCurtainable.cs" />
|
<Compile Include="IronCurtainable.cs" />
|
||||||
<Compile Include="IronCurtainPower.cs" />
|
<Compile Include="IronCurtainPower.cs" />
|
||||||
|
<Compile Include="PaletteFromFile.cs" />
|
||||||
|
<Compile Include="PaletteFromRGBA.cs" />
|
||||||
<Compile Include="ParaDrop.cs" />
|
<Compile Include="ParaDrop.cs" />
|
||||||
<Compile Include="ParatroopersPower.cs" />
|
<Compile Include="ParatroopersPower.cs" />
|
||||||
<Compile Include="Passenger.cs" />
|
<Compile Include="Passenger.cs" />
|
||||||
|
<Compile Include="ProductionSurround.cs" />
|
||||||
<Compile Include="RenderFlare.cs" />
|
<Compile Include="RenderFlare.cs" />
|
||||||
<Compile Include="RenderInfantry.cs" />
|
<Compile Include="RenderInfantry.cs" />
|
||||||
<Compile Include="RequiresPower.cs" />
|
<Compile Include="RequiresPower.cs" />
|
||||||
@@ -118,8 +122,13 @@
|
|||||||
<Compile Include="RepairableNear.cs" />
|
<Compile Include="RepairableNear.cs" />
|
||||||
<Compile Include="Crates\SpeedUpgradeCrateAction.cs" />
|
<Compile Include="Crates\SpeedUpgradeCrateAction.cs" />
|
||||||
<Compile Include="ReturnOnIdle.cs" />
|
<Compile Include="ReturnOnIdle.cs" />
|
||||||
|
<Compile Include="RevealsShroud.cs" />
|
||||||
|
<Compile Include="SeedsResource.cs" />
|
||||||
<Compile Include="SelfHealing.cs" />
|
<Compile Include="SelfHealing.cs" />
|
||||||
|
<Compile Include="ShroudPalette.cs" />
|
||||||
<Compile Include="SonarPulsePower.cs" />
|
<Compile Include="SonarPulsePower.cs" />
|
||||||
|
<Compile Include="SpawnDefaultUnits.cs" />
|
||||||
|
<Compile Include="SpawnMapActors.cs" />
|
||||||
<Compile Include="Spy.cs" />
|
<Compile Include="Spy.cs" />
|
||||||
<Compile Include="SpyPlanePower.cs" />
|
<Compile Include="SpyPlanePower.cs" />
|
||||||
<Compile Include="NukePower.cs" />
|
<Compile Include="NukePower.cs" />
|
||||||
|
|||||||
@@ -19,8 +19,9 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class PaletteFromFileInfo : ITraitInfo
|
class PaletteFromFileInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
|
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class PaletteFromRGBAInfo : ITraitInfo
|
class PaletteFromRGBAInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
@@ -20,8 +20,9 @@
|
|||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.GameRules;
|
using OpenRA.GameRules;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class ProductionSurroundInfo : ProductionInfo
|
class ProductionSurroundInfo : ProductionInfo
|
||||||
{
|
{
|
||||||
@@ -18,7 +18,9 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class RevealsShroudInfo : TraitInfo<RevealsShroud> { }
|
class RevealsShroudInfo : TraitInfo<RevealsShroud> { }
|
||||||
|
|
||||||
@@ -21,8 +21,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class SeedsResourceInfo : ITraitInfo
|
class SeedsResourceInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
@@ -19,8 +19,9 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class ShroudPaletteInfo : ITraitInfo
|
class ShroudPaletteInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
@@ -18,12 +18,13 @@
|
|||||||
*/
|
*/
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using OpenRA.FileFormats;
|
using OpenRA.FileFormats;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
class SpawnDefaultUnitsInfo : TraitInfo<SpawnDefaultUnits>
|
class SpawnDefaultUnitsInfo : TraitInfo<SpawnDefaultUnits>
|
||||||
{
|
{
|
||||||
45
OpenRA.Mods.RA/SpawnMapActors.cs
Normal file
45
OpenRA.Mods.RA/SpawnMapActors.cs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#region Copyright & License Information
|
||||||
|
/*
|
||||||
|
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
|
||||||
|
* This file is part of OpenRA.
|
||||||
|
*
|
||||||
|
* OpenRA is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* OpenRA is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with OpenRA. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using OpenRA.Traits;
|
||||||
|
|
||||||
|
namespace OpenRA.Mods.RA
|
||||||
|
{
|
||||||
|
public class SpawnMapActorsInfo : TraitInfo<SpawnMapActors> { }
|
||||||
|
|
||||||
|
public class SpawnMapActors : IGameStarted
|
||||||
|
{
|
||||||
|
public Dictionary<string, Actor> MapActors = new Dictionary<string, Actor>();
|
||||||
|
|
||||||
|
public void GameStarted(World world)
|
||||||
|
{
|
||||||
|
Game.skipMakeAnims = true; // rude hack
|
||||||
|
|
||||||
|
foreach (var actorReference in world.Map.Actors)
|
||||||
|
MapActors[actorReference.Key] = world.CreateActor(actorReference.Value.Name, actorReference.Value.Location,
|
||||||
|
world.players.Values.FirstOrDefault(p => p.InternalName == actorReference.Value.Owner)
|
||||||
|
?? world.NeutralPlayer);
|
||||||
|
|
||||||
|
Game.skipMakeAnims = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user