fix compile failure
This commit is contained in:
@@ -408,7 +408,7 @@ namespace OpenRA.Editor
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (section == "INFANTRY")
|
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);
|
Map.Actors.Add("Actor" + ActorCount++,actor);
|
||||||
|
|
||||||
|
|||||||
@@ -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">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
@@ -200,6 +200,7 @@
|
|||||||
<Compile Include="ObjectCreator.cs" />
|
<Compile Include="ObjectCreator.cs" />
|
||||||
<Compile Include="Network\SyncReport.cs" />
|
<Compile Include="Network\SyncReport.cs" />
|
||||||
<Compile Include="Traits\EditorAppearance.cs" />
|
<Compile Include="Traits\EditorAppearance.cs" />
|
||||||
|
<Compile Include="Traits\SubcellInit.cs" />
|
||||||
<Compile Include="Traits\Target.cs" />
|
<Compile Include="Traits\Target.cs" />
|
||||||
<Compile Include="Traits\ValidateOrder.cs" />
|
<Compile Include="Traits\ValidateOrder.cs" />
|
||||||
<Compile Include="TraitDictionary.cs" />
|
<Compile Include="TraitDictionary.cs" />
|
||||||
|
|||||||
26
OpenRA.Game/Traits/SubcellInit.cs
Normal file
26
OpenRA.Game/Traits/SubcellInit.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -434,24 +434,3 @@ namespace OpenRA.Mods.RA.Move
|
|||||||
public IActivity MoveTo(Func<List<int2>> pathFunc) { return new Move(pathFunc); }
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user