fix compile failure

This commit is contained in:
Chris Forbes
2011-02-03 19:52:55 +13:00
committed by Paul Chote
parent 73a08624ef
commit 4aaafd18f1
4 changed files with 29 additions and 23 deletions

View File

@@ -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);

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -200,6 +200,7 @@
<Compile Include="ObjectCreator.cs" />
<Compile Include="Network\SyncReport.cs" />
<Compile Include="Traits\EditorAppearance.cs" />
<Compile Include="Traits\SubcellInit.cs" />
<Compile Include="Traits\Target.cs" />
<Compile Include="Traits\ValidateOrder.cs" />
<Compile Include="TraitDictionary.cs" />

View File

@@ -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<SubCell>
{
[FieldFromYamlKey]
public readonly int value = 0;
public SubCellInit() { }
public SubCellInit(int init)
{
value = init;
}
public SubCell Value(World world)
{
return (SubCell)value;
}
}
}

View File

@@ -434,24 +434,3 @@ namespace OpenRA.Mods.RA.Move
public IActivity MoveTo(Func<List<int2>> pathFunc) { return new Move(pathFunc); }
}
}
namespace OpenRA.Traits
{
public class SubCellInit : IActorInit<SubCell>
{
[FieldFromYamlKey]
public readonly int value = 0;
public SubCellInit() { }
public SubCellInit( int init )
{
value = init;
}
public SubCell Value( World world )
{
return (SubCell)value;
}
}
}