add reset exploration developer cheat
This commit is contained in:
@@ -73,7 +73,7 @@ namespace OpenRA.Traits
|
|||||||
self.Trait<PlayerResources>().GiveCash(Info.Cash);
|
self.Trait<PlayerResources>().GiveCash(Info.Cash);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevShroud":
|
case "DevShroudDisable":
|
||||||
{
|
{
|
||||||
DisableShroud ^= true;
|
DisableShroud ^= true;
|
||||||
self.Owner.Shroud.Disabled = DisableShroud;
|
self.Owner.Shroud.Disabled = DisableShroud;
|
||||||
@@ -89,6 +89,11 @@ namespace OpenRA.Traits
|
|||||||
self.Owner.Shroud.ExploreAll(self.World);
|
self.Owner.Shroud.ExploreAll(self.World);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "DevResetExploration":
|
||||||
|
{
|
||||||
|
self.Owner.Shroud.ResetExploration();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "DevUnlimitedPower":
|
case "DevUnlimitedPower":
|
||||||
{
|
{
|
||||||
UnlimitedPower ^= true;
|
UnlimitedPower ^= true;
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ namespace OpenRA.Traits
|
|||||||
Dirty();
|
Dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResetExploration() // for `hide map` crate
|
public void ResetExploration()
|
||||||
{
|
{
|
||||||
for (var j = 0; j <= exploredCells.GetUpperBound(1); j++)
|
for (var j = 0; j <= exploredCells.GetUpperBound(1); j++)
|
||||||
for (var i = 0; i <= exploredCells.GetUpperBound(0); i++)
|
for (var i = 0; i <= exploredCells.GetUpperBound(0); i++)
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
|
|
||||||
var shroudCheckbox = widget.Get<CheckboxWidget>("DISABLE_SHROUD");
|
var shroudCheckbox = widget.Get<CheckboxWidget>("DISABLE_SHROUD");
|
||||||
shroudCheckbox.IsChecked = () => devTrait.DisableShroud;
|
shroudCheckbox.IsChecked = () => devTrait.DisableShroud;
|
||||||
shroudCheckbox.OnClick = () => Order(world, "DevShroud");
|
shroudCheckbox.OnClick = () => Order(world, "DevShroudDisable");
|
||||||
|
|
||||||
var pathCheckbox = widget.Get<CheckboxWidget>("SHOW_UNIT_PATHS");
|
var pathCheckbox = widget.Get<CheckboxWidget>("SHOW_UNIT_PATHS");
|
||||||
pathCheckbox.IsChecked = () => devTrait.PathDebug;
|
pathCheckbox.IsChecked = () => devTrait.PathDebug;
|
||||||
@@ -56,6 +56,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
widget.Get<ButtonWidget>("GIVE_EXPLORATION").OnClick = () =>
|
widget.Get<ButtonWidget>("GIVE_EXPLORATION").OnClick = () =>
|
||||||
world.IssueOrder(new Order("DevGiveExploration", world.LocalPlayer.PlayerActor, false));
|
world.IssueOrder(new Order("DevGiveExploration", world.LocalPlayer.PlayerActor, false));
|
||||||
|
|
||||||
|
widget.Get<ButtonWidget>("RESET_EXPLORATION").OnClick = () =>
|
||||||
|
world.IssueOrder(new Order("DevResetExploration", world.LocalPlayer.PlayerActor, false));
|
||||||
|
|
||||||
widget.Get<ButtonWidget>("CLOSE").OnClick = () => { Ui.CloseWindow(); onExit(); };
|
widget.Get<ButtonWidget>("CLOSE").OnClick = () => { Ui.CloseWindow(); onExit(); };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,18 +13,25 @@ Background@CHEATS_PANEL:
|
|||||||
Height:25
|
Height:25
|
||||||
Text:Developer Mode
|
Text:Developer Mode
|
||||||
Align:Center
|
Align:Center
|
||||||
|
Font:Bold
|
||||||
Checkbox@DISABLE_SHROUD:
|
Checkbox@DISABLE_SHROUD:
|
||||||
X:30
|
X:30
|
||||||
Y:50
|
Y:50
|
||||||
Height:20
|
Height:20
|
||||||
Width:PARENT_RIGHT - 30
|
Width:PARENT_RIGHT - 30
|
||||||
Text:Disable Shroud
|
Text:Disable Shroud
|
||||||
Button@GIVE_EXPLORATION
|
Button@GIVE_EXPLORATION:
|
||||||
X:30
|
X:30
|
||||||
Y:80
|
Y:80
|
||||||
Width:200
|
Width:120
|
||||||
Height:20
|
Height:25
|
||||||
Text: Give Exploration
|
Text:Give Exploration
|
||||||
|
Button@RESET_EXPLORATION:
|
||||||
|
X:200
|
||||||
|
Y:80
|
||||||
|
Width:120
|
||||||
|
Height:25
|
||||||
|
Text:Reset Exploration
|
||||||
Checkbox@SHOW_UNIT_PATHS:
|
Checkbox@SHOW_UNIT_PATHS:
|
||||||
X:30
|
X:30
|
||||||
Y:110
|
Y:110
|
||||||
@@ -34,9 +41,10 @@ Background@CHEATS_PANEL:
|
|||||||
Button@GIVE_CASH:
|
Button@GIVE_CASH:
|
||||||
X:30
|
X:30
|
||||||
Y:140
|
Y:140
|
||||||
Width:200
|
Width:150
|
||||||
Height:20
|
Height:20
|
||||||
Text: Give Cash
|
Text: Give $ 20.000 Cash
|
||||||
|
Height:25
|
||||||
Checkbox@INSTANT_BUILD:
|
Checkbox@INSTANT_BUILD:
|
||||||
X:30
|
X:30
|
||||||
Y:170
|
Y:170
|
||||||
@@ -71,6 +79,6 @@ Background@CHEATS_PANEL:
|
|||||||
X:30
|
X:30
|
||||||
Y:360
|
Y:360
|
||||||
Width:PARENT_RIGHT - 60
|
Width:PARENT_RIGHT - 60
|
||||||
Height:20
|
Height:25
|
||||||
Text:Close
|
Text:Close
|
||||||
Key:escape
|
Key:escape
|
||||||
|
|||||||
Reference in New Issue
Block a user