add chrome + plumbing for BuildAnywhere devhack

This commit is contained in:
Chris Forbes
2011-03-07 20:20:44 +13:00
parent 7cf07f5765
commit 14a2b68b7d
4 changed files with 38 additions and 13 deletions

View File

@@ -20,7 +20,8 @@ namespace OpenRA.Traits
public bool DisableShroud = false;
public bool PathDebug = false;
public bool UnitInfluenceDebug = false;
public bool UnlimitedPower;
public bool UnlimitedPower;
public bool BuildAnywhere;
public object Create (ActorInitializer init) { return new DeveloperMode(this); }
}
@@ -34,17 +35,19 @@ namespace OpenRA.Traits
[Sync] public bool DisableShroud;
[Sync] public bool PathDebug;
[Sync] public bool UnitInfluenceDebug;
[Sync] public bool UnlimitedPower;
[Sync] public bool UnlimitedPower;
[Sync] public bool BuildAnywhere;
public DeveloperMode(DeveloperModeInfo info)
{
Info = info;
FastBuild = Info.FastBuild;
FastCharge = Info.FastCharge;
DisableShroud = Info.DisableShroud;
PathDebug = Info.PathDebug;
FastBuild = info.FastBuild;
FastCharge = info.FastCharge;
DisableShroud = info.DisableShroud;
PathDebug = info.PathDebug;
UnitInfluenceDebug = info.UnitInfluenceDebug;
UnlimitedPower = info.UnlimitedPower;
UnlimitedPower = info.UnlimitedPower;
BuildAnywhere = info.BuildAnywhere;
}
public void ResolveOrder (Actor self, Order order)
@@ -100,7 +103,12 @@ namespace OpenRA.Traits
{
UnlimitedPower ^= true;
break;
}
}
case "DevBuildAnywhere":
{
BuildAnywhere ^= true;
break;
}
default:
return;
}