Smite Indexdebug, tidy up dev mode

This commit is contained in:
alzeih
2010-07-26 21:43:26 +12:00
parent 30241ddccc
commit d9a423b596
6 changed files with 15 additions and 58 deletions

View File

@@ -49,55 +49,41 @@ namespace OpenRA.Traits
case "DevFastCharge":
{
FastCharge ^= true;
IssueNotification(FastCharge);
break;
}
case "DevFastBuild":
{
FastBuild ^= true;
IssueNotification(FastBuild);
break;
}
case "DevGiveCash":
{
self.traits.Get<PlayerResources>().GiveCash(Info.Cash);
IssueNotification(true);
break;
}
case "DevShroud":
{
DisableShroud ^= true;
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
IssueNotification(DisableShroud);
if (self.World.LocalPlayer == self.Owner)
{
DisableShroud ^= true;
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
}
break;
}
case "DevPathDebug":
{
PathDebug ^= true;
IssueNotification(PathDebug);
break;
}
case "DevIndexDebug":
{
Game.Settings.IndexDebug ^= true;
IssueNotification(Game.Settings.IndexDebug);
if (self.World.LocalPlayer == self.Owner)
PathDebug ^= true;
break;
}
case "DevUnitDebug":
{
Game.Settings.UnitDebug ^= true;
IssueNotification(Game.Settings.UnitDebug);
if (self.World.LocalPlayer == self.Owner)
Game.Settings.UnitDebug ^= true;
break;
}
}
}
void IssueNotification(bool enabled)
{
if (enabled)
Game.IssueOrder(Order.Chat("I used a devmode option"));
}
}
}