Smite Indexdebug, tidy up dev mode
This commit is contained in:
@@ -25,7 +25,6 @@ namespace OpenRA.GameRules
|
||||
public bool ShowGameTimer = true;
|
||||
public bool DeveloperMode = false;
|
||||
public bool UnitDebug = false;
|
||||
public bool IndexDebug = false;
|
||||
|
||||
// Window settings
|
||||
public WindowMode WindowMode = WindowMode.PseudoFullscreen;
|
||||
|
||||
@@ -120,12 +120,6 @@ namespace OpenRA.Graphics
|
||||
|
||||
Game.Renderer.Device.DisableScissor();
|
||||
|
||||
if (Game.Settings.IndexDebug)
|
||||
{
|
||||
bounds.Offset((int)Game.viewport.Location.X, (int)Game.viewport.Location.Y);
|
||||
DrawBins(bounds);
|
||||
}
|
||||
|
||||
Game.Renderer.LineRenderer.Flush();
|
||||
}
|
||||
|
||||
|
||||
@@ -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":
|
||||
{
|
||||
if (self.World.LocalPlayer == self.Owner)
|
||||
{
|
||||
DisableShroud ^= true;
|
||||
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
|
||||
IssueNotification(DisableShroud);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "DevPathDebug":
|
||||
{
|
||||
if (self.World.LocalPlayer == self.Owner)
|
||||
PathDebug ^= true;
|
||||
IssueNotification(PathDebug);
|
||||
break;
|
||||
}
|
||||
case "DevIndexDebug":
|
||||
{
|
||||
Game.Settings.IndexDebug ^= true;
|
||||
IssueNotification(Game.Settings.IndexDebug);
|
||||
break;
|
||||
}
|
||||
case "DevUnitDebug":
|
||||
{
|
||||
if (self.World.LocalPlayer == self.Owner)
|
||||
Game.Settings.UnitDebug ^= true;
|
||||
IssueNotification(Game.Settings.UnitDebug);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IssueNotification(bool enabled)
|
||||
{
|
||||
if (enabled)
|
||||
Game.IssueOrder(Order.Chat("I used a devmode option"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -64,14 +64,6 @@ namespace OpenRA.Widgets.Delegates
|
||||
return true;
|
||||
};
|
||||
|
||||
devmodeBG.GetWidget<CheckboxWidget>("SETTINGS_CHECKBOX_INDEXDEBUG").Checked =
|
||||
() => Game.Settings.IndexDebug;
|
||||
devmodeBG.GetWidget("SETTINGS_CHECKBOX_INDEXDEBUG").OnMouseDown = mi =>
|
||||
{
|
||||
Game.IssueOrder(new Order("DevIndexDebug", Game.world.LocalPlayer.PlayerActor));
|
||||
return true;
|
||||
};
|
||||
|
||||
devmodeBG.GetWidget<ButtonWidget>("SETTINGS_GIVE_CASH").OnMouseUp = mi =>
|
||||
{
|
||||
Game.IssueOrder(new Order("DevGiveCash", Game.world.LocalPlayer.PlayerActor));
|
||||
|
||||
@@ -236,31 +236,24 @@ Container@ROOT:
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Unit Paths
|
||||
Checkbox@SETTINGS_CHECKBOX_INDEXDEBUG:
|
||||
Id:SETTINGS_CHECKBOX_INDEXDEBUG
|
||||
X:30
|
||||
Y:140
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Spatial Index Debug
|
||||
Button@SETTINGS_GIVE_CASH
|
||||
Id:SETTINGS_GIVE_CASH
|
||||
X:30
|
||||
Y:170
|
||||
Y:140
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Cash
|
||||
Checkbox@SETTINGS_BUILD_SPEED
|
||||
Id:SETTINGS_BUILD_SPEED
|
||||
X:30
|
||||
Y:200
|
||||
Y:170
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Build Speed
|
||||
Checkbox@SETTINGS_CHARGE_TIME
|
||||
Id:SETTINGS_CHARGE_TIME
|
||||
X:30
|
||||
Y:230
|
||||
Y:200
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Charge Time (Special Powers)
|
||||
@@ -245,31 +245,24 @@ Container@ROOT:
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Unit Paths
|
||||
Checkbox@SETTINGS_CHECKBOX_INDEXDEBUG:
|
||||
Id:SETTINGS_CHECKBOX_INDEXDEBUG
|
||||
X:30
|
||||
Y:140
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Show Spatial Index Debug
|
||||
Button@SETTINGS_GIVE_CASH
|
||||
Id:SETTINGS_GIVE_CASH
|
||||
X:30
|
||||
Y:170
|
||||
Y:140
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Cash
|
||||
Checkbox@SETTINGS_BUILD_SPEED
|
||||
Id:SETTINGS_BUILD_SPEED
|
||||
X:30
|
||||
Y:200
|
||||
Y:170
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Build Speed
|
||||
Checkbox@SETTINGS_CHARGE_TIME
|
||||
Id:SETTINGS_CHARGE_TIME
|
||||
X:30
|
||||
Y:230
|
||||
Y:200
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Instant Charge Time (Special Powers)
|
||||
Reference in New Issue
Block a user