Skip to content

Commit

Permalink
fix compile failure
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes authored and pchote committed Feb 4, 2011
1 parent 73a0862 commit 4aaafd1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion OpenRA.Editor/LegacyMapImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void LoadActors(IniFile file, string section)
};

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

Expand Down
3 changes: 2 additions & 1 deletion OpenRA.Game/OpenRA.Game.csproj
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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" />
Expand Down
26 changes: 26 additions & 0 deletions OpenRA.Game/Traits/SubcellInit.cs
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
21 changes: 0 additions & 21 deletions OpenRA.Mods.RA/Move/Mobile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,24 +434,3 @@ public bool CanTargetLocation(Actor self, int2 location, List<Actor> actorsAtLoc
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;
}
}
}

0 comments on commit 4aaafd1

Please sign in to comment.