From 4aaafd18f1d63ba648961814d0b8b6d596a3f758 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 3 Feb 2011 19:52:55 +1300 Subject: [PATCH] fix compile failure --- OpenRA.Editor/LegacyMapImporter.cs | 2 +- OpenRA.Game/OpenRA.Game.csproj | 3 ++- OpenRA.Game/Traits/SubcellInit.cs | 26 ++++++++++++++++++++++++++ OpenRA.Mods.RA/Move/Mobile.cs | 21 --------------------- 4 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 OpenRA.Game/Traits/SubcellInit.cs diff --git a/OpenRA.Editor/LegacyMapImporter.cs b/OpenRA.Editor/LegacyMapImporter.cs index 4a72d04a70..40bb9a5bba 100644 --- a/OpenRA.Editor/LegacyMapImporter.cs +++ b/OpenRA.Editor/LegacyMapImporter.cs @@ -408,7 +408,7 @@ namespace OpenRA.Editor }; if (section == "INFANTRY") - actor.Add(new SubcellInit(int.Parse(parts[4]))); + actor.Add(new SubCellInit(int.Parse(parts[4]))); Map.Actors.Add("Actor" + ActorCount++,actor); diff --git a/OpenRA.Game/OpenRA.Game.csproj b/OpenRA.Game/OpenRA.Game.csproj index 3003c7fc8b..9584b7c035 100755 --- a/OpenRA.Game/OpenRA.Game.csproj +++ b/OpenRA.Game/OpenRA.Game.csproj @@ -1,4 +1,4 @@ - + Debug @@ -200,6 +200,7 @@ + diff --git a/OpenRA.Game/Traits/SubcellInit.cs b/OpenRA.Game/Traits/SubcellInit.cs new file mode 100644 index 0000000000..01a64d4781 --- /dev/null +++ b/OpenRA.Game/Traits/SubcellInit.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using OpenRA.FileFormats; + +namespace OpenRA.Traits +{ + public class SubCellInit : IActorInit + { + [FieldFromYamlKey] + public readonly int value = 0; + + public SubCellInit() { } + + public SubCellInit(int init) + { + value = init; + } + + public SubCell Value(World world) + { + return (SubCell)value; + } + } +} diff --git a/OpenRA.Mods.RA/Move/Mobile.cs b/OpenRA.Mods.RA/Move/Mobile.cs index b33da09276..301a365837 100755 --- a/OpenRA.Mods.RA/Move/Mobile.cs +++ b/OpenRA.Mods.RA/Move/Mobile.cs @@ -434,24 +434,3 @@ namespace OpenRA.Mods.RA.Move public IActivity MoveTo(Func> pathFunc) { return new Move(pathFunc); } } } - -namespace OpenRA.Traits -{ - public class SubCellInit : IActorInit - { - [FieldFromYamlKey] - public readonly int value = 0; - - public SubCellInit() { } - - public SubCellInit( int init ) - { - value = init; - } - - public SubCell Value( World world ) - { - return (SubCell)value; - } - } -} \ No newline at end of file