From 248eba20fac4cd43d02e7b1595822f911b36bacf Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 20 May 2010 17:56:44 +1200 Subject: [PATCH] EmitInfantryOnSell moved to RA --- OpenRA.Game/GameRules/Footprint.cs | 2 +- OpenRA.Game/OpenRA.Game.csproj | 1 - OpenRA.Game/Traits/Buildable.cs | 2 +- OpenRA.Game/Traits/CustomSellValue.cs | 4 +-- .../EmitInfantryOnSell.cs | 33 +++++++++++++++---- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 + 6 files changed, 31 insertions(+), 12 deletions(-) rename {OpenRA.Game/Traits/AI => OpenRA.Mods.RA}/EmitInfantryOnSell.cs (59%) diff --git a/OpenRA.Game/GameRules/Footprint.cs b/OpenRA.Game/GameRules/Footprint.cs index c14bb82bf6..ad2010b8b3 100644 --- a/OpenRA.Game/GameRules/Footprint.cs +++ b/OpenRA.Game/GameRules/Footprint.cs @@ -25,7 +25,7 @@ using OpenRA.Traits; namespace OpenRA.GameRules { - static class Footprint + public static class Footprint { public static IEnumerable Tiles( string name, BuildingInfo buildingInfo, int2 topLeft ) { diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index bbde75d4b5..4e26eff10c 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -82,7 +82,6 @@ - diff --git a/OpenRA.Game/Traits/Buildable.cs b/OpenRA.Game/Traits/Buildable.cs index 4b19a97f10..71d9196da6 100755 --- a/OpenRA.Game/Traits/Buildable.cs +++ b/OpenRA.Game/Traits/Buildable.cs @@ -20,7 +20,7 @@ namespace OpenRA.Traits { - class ValuedInfo : ITraitInfo + public class ValuedInfo : ITraitInfo { public readonly int Cost = 0; public readonly string Description = ""; diff --git a/OpenRA.Game/Traits/CustomSellValue.cs b/OpenRA.Game/Traits/CustomSellValue.cs index 3d095412db..f52d7ec65e 100644 --- a/OpenRA.Game/Traits/CustomSellValue.cs +++ b/OpenRA.Game/Traits/CustomSellValue.cs @@ -23,10 +23,10 @@ namespace OpenRA.Traits // allow a nonstandard sell/repair value to avoid // buy-sell exploits like c&c's PROC. - class CustomSellValueInfo : TraitInfo + public class CustomSellValueInfo : TraitInfo { public readonly int Value = 0; } - class CustomSellValue {} + public class CustomSellValue { } } diff --git a/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs b/OpenRA.Mods.RA/EmitInfantryOnSell.cs similarity index 59% rename from OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs rename to OpenRA.Mods.RA/EmitInfantryOnSell.cs index ac292bd824..2be158eea9 100644 --- a/OpenRA.Game/Traits/AI/EmitInfantryOnSell.cs +++ b/OpenRA.Mods.RA/EmitInfantryOnSell.cs @@ -1,16 +1,35 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using OpenRA.GameRules; +#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 . + */ +#endregion -namespace OpenRA.Traits.AI +using System; +using System.Linq; +using OpenRA.GameRules; +using OpenRA.Traits; + +namespace OpenRA.Mods.RA { class EmitInfantryOnSellInfo : TraitInfo { public readonly float ValueFraction = .4f; public readonly float MinHpFraction = .3f; - public readonly string[] ActorTypes = { "e1" }; // todo: cN as well + public readonly string[] ActorTypes = { "e1" }; } class EmitInfantryOnSell : INotifySold, INotifyDamage diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index 8188bd407f..c53826564e 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -65,6 +65,7 @@ +