Added debug cheat button to grow map resources.

This commit is contained in:
Pizzaoverhead
2014-02-15 17:30:36 +00:00
parent c3b5495177
commit e0b40e2088
10 changed files with 74 additions and 38 deletions

View File

@@ -13,6 +13,7 @@ namespace OpenRA.Traits
public class DeveloperModeInfo : ITraitInfo
{
public int Cash = 20000;
public int ResourceGrowth = 100;
public bool FastBuild = false;
public bool FastCharge = false;
public bool DisableShroud = false;
@@ -79,6 +80,15 @@ namespace OpenRA.Traits
self.Trait<PlayerResources>().GiveCash(Info.Cash);
break;
}
case "DevGrowResources":
{
foreach (var a in self.World.ActorsWithTrait<ISeedableResource>())
{
for (var i = 0; i < Info.ResourceGrowth; i++)
a.Trait.Seed(a.Actor);
}
break;
}
case "DevShroudDisable":
{
DisableShroud ^= true;