Smite Indexdebug, tidy up dev mode
This commit is contained in:
@@ -25,7 +25,6 @@ namespace OpenRA.GameRules
|
|||||||
public bool ShowGameTimer = true;
|
public bool ShowGameTimer = true;
|
||||||
public bool DeveloperMode = false;
|
public bool DeveloperMode = false;
|
||||||
public bool UnitDebug = false;
|
public bool UnitDebug = false;
|
||||||
public bool IndexDebug = false;
|
|
||||||
|
|
||||||
// Window settings
|
// Window settings
|
||||||
public WindowMode WindowMode = WindowMode.PseudoFullscreen;
|
public WindowMode WindowMode = WindowMode.PseudoFullscreen;
|
||||||
|
|||||||
@@ -120,12 +120,6 @@ namespace OpenRA.Graphics
|
|||||||
|
|
||||||
Game.Renderer.Device.DisableScissor();
|
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();
|
Game.Renderer.LineRenderer.Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,55 +49,41 @@ namespace OpenRA.Traits
|
|||||||
case "DevFastCharge":
|
case "DevFastCharge":
|
||||||
{
|
{
|
||||||
FastCharge ^= true;
|
FastCharge ^= true;
|
||||||
IssueNotification(FastCharge);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevFastBuild":
|
case "DevFastBuild":
|
||||||
{
|
{
|
||||||
FastBuild ^= true;
|
FastBuild ^= true;
|
||||||
IssueNotification(FastBuild);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevGiveCash":
|
case "DevGiveCash":
|
||||||
{
|
{
|
||||||
self.traits.Get<PlayerResources>().GiveCash(Info.Cash);
|
self.traits.Get<PlayerResources>().GiveCash(Info.Cash);
|
||||||
IssueNotification(true);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevShroud":
|
case "DevShroud":
|
||||||
{
|
{
|
||||||
DisableShroud ^= true;
|
if (self.World.LocalPlayer == self.Owner)
|
||||||
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
|
{
|
||||||
IssueNotification(DisableShroud);
|
DisableShroud ^= true;
|
||||||
|
Game.world.LocalPlayer.Shroud.Disabled = DisableShroud;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevPathDebug":
|
case "DevPathDebug":
|
||||||
{
|
{
|
||||||
PathDebug ^= true;
|
if (self.World.LocalPlayer == self.Owner)
|
||||||
IssueNotification(PathDebug);
|
PathDebug ^= true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "DevIndexDebug":
|
|
||||||
{
|
|
||||||
Game.Settings.IndexDebug ^= true;
|
|
||||||
IssueNotification(Game.Settings.IndexDebug);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevUnitDebug":
|
case "DevUnitDebug":
|
||||||
{
|
{
|
||||||
Game.Settings.UnitDebug ^= true;
|
if (self.World.LocalPlayer == self.Owner)
|
||||||
IssueNotification(Game.Settings.UnitDebug);
|
Game.Settings.UnitDebug ^= true;
|
||||||
break;
|
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;
|
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 =>
|
devmodeBG.GetWidget<ButtonWidget>("SETTINGS_GIVE_CASH").OnMouseUp = mi =>
|
||||||
{
|
{
|
||||||
Game.IssueOrder(new Order("DevGiveCash", Game.world.LocalPlayer.PlayerActor));
|
Game.IssueOrder(new Order("DevGiveCash", Game.world.LocalPlayer.PlayerActor));
|
||||||
|
|||||||
@@ -236,31 +236,24 @@ Container@ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Show Unit Paths
|
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
|
Button@SETTINGS_GIVE_CASH
|
||||||
Id:SETTINGS_GIVE_CASH
|
Id:SETTINGS_GIVE_CASH
|
||||||
X:30
|
X:30
|
||||||
Y:170
|
Y:140
|
||||||
Width:200
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Give Cash
|
Text: Give Cash
|
||||||
Checkbox@SETTINGS_BUILD_SPEED
|
Checkbox@SETTINGS_BUILD_SPEED
|
||||||
Id:SETTINGS_BUILD_SPEED
|
Id:SETTINGS_BUILD_SPEED
|
||||||
X:30
|
X:30
|
||||||
Y:200
|
Y:170
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Build Speed
|
Text:Instant Build Speed
|
||||||
Checkbox@SETTINGS_CHARGE_TIME
|
Checkbox@SETTINGS_CHARGE_TIME
|
||||||
Id:SETTINGS_CHARGE_TIME
|
Id:SETTINGS_CHARGE_TIME
|
||||||
X:30
|
X:30
|
||||||
Y:230
|
Y:200
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Charge Time (Special Powers)
|
Text:Instant Charge Time (Special Powers)
|
||||||
@@ -245,31 +245,24 @@ Container@ROOT:
|
|||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Show Unit Paths
|
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
|
Button@SETTINGS_GIVE_CASH
|
||||||
Id:SETTINGS_GIVE_CASH
|
Id:SETTINGS_GIVE_CASH
|
||||||
X:30
|
X:30
|
||||||
Y:170
|
Y:140
|
||||||
Width:200
|
Width:200
|
||||||
Height:20
|
Height:20
|
||||||
Text: Give Cash
|
Text: Give Cash
|
||||||
Checkbox@SETTINGS_BUILD_SPEED
|
Checkbox@SETTINGS_BUILD_SPEED
|
||||||
Id:SETTINGS_BUILD_SPEED
|
Id:SETTINGS_BUILD_SPEED
|
||||||
X:30
|
X:30
|
||||||
Y:200
|
Y:170
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Build Speed
|
Text:Instant Build Speed
|
||||||
Checkbox@SETTINGS_CHARGE_TIME
|
Checkbox@SETTINGS_CHARGE_TIME
|
||||||
Id:SETTINGS_CHARGE_TIME
|
Id:SETTINGS_CHARGE_TIME
|
||||||
X:30
|
X:30
|
||||||
Y:230
|
Y:200
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Height:20
|
Height:20
|
||||||
Text:Instant Charge Time (Special Powers)
|
Text:Instant Charge Time (Special Powers)
|
||||||
Reference in New Issue
Block a user