add chrome + plumbing for BuildAnywhere devhack
This commit is contained in:
@@ -20,7 +20,8 @@ namespace OpenRA.Traits
|
||||
public bool DisableShroud = false;
|
||||
public bool PathDebug = false;
|
||||
public bool UnitInfluenceDebug = false;
|
||||
public bool UnlimitedPower;
|
||||
public bool UnlimitedPower;
|
||||
public bool BuildAnywhere;
|
||||
|
||||
public object Create (ActorInitializer init) { return new DeveloperMode(this); }
|
||||
}
|
||||
@@ -34,17 +35,19 @@ namespace OpenRA.Traits
|
||||
[Sync] public bool DisableShroud;
|
||||
[Sync] public bool PathDebug;
|
||||
[Sync] public bool UnitInfluenceDebug;
|
||||
[Sync] public bool UnlimitedPower;
|
||||
[Sync] public bool UnlimitedPower;
|
||||
[Sync] public bool BuildAnywhere;
|
||||
|
||||
public DeveloperMode(DeveloperModeInfo info)
|
||||
{
|
||||
Info = info;
|
||||
FastBuild = Info.FastBuild;
|
||||
FastCharge = Info.FastCharge;
|
||||
DisableShroud = Info.DisableShroud;
|
||||
PathDebug = Info.PathDebug;
|
||||
FastBuild = info.FastBuild;
|
||||
FastCharge = info.FastCharge;
|
||||
DisableShroud = info.DisableShroud;
|
||||
PathDebug = info.PathDebug;
|
||||
UnitInfluenceDebug = info.UnitInfluenceDebug;
|
||||
UnlimitedPower = info.UnlimitedPower;
|
||||
UnlimitedPower = info.UnlimitedPower;
|
||||
BuildAnywhere = info.BuildAnywhere;
|
||||
}
|
||||
|
||||
public void ResolveOrder (Actor self, Order order)
|
||||
@@ -100,7 +103,12 @@ namespace OpenRA.Traits
|
||||
{
|
||||
UnlimitedPower ^= true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
case "DevBuildAnywhere":
|
||||
{
|
||||
BuildAnywhere ^= true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,10 @@ namespace OpenRA.Mods.RA.Widgets.Delegates
|
||||
devmodeBG.GetWidget<CheckboxWidget>("ENABLE_TECH").OnChange += _ => Order(world, "DevEnableTech");
|
||||
|
||||
devmodeBG.GetWidget<CheckboxWidget>("UNLIMITED_POWER").BindReadOnly(devTrait, "UnlimitedPower");
|
||||
devmodeBG.GetWidget<CheckboxWidget>("UNLIMITED_POWER").OnChange += _ => Order(world, "DevUnlimitedPower");
|
||||
devmodeBG.GetWidget<CheckboxWidget>("UNLIMITED_POWER").OnChange += _ => Order(world, "DevUnlimitedPower");
|
||||
|
||||
devmodeBG.GetWidget<CheckboxWidget>("BUILD_ANYWHERE").BindReadOnly(devTrait, "BuildAnywhere");
|
||||
devmodeBG.GetWidget<CheckboxWidget>("BUILD_ANYWHERE").OnChange += _ => Order(world, "DevBuildAnywhere");
|
||||
|
||||
devmodeBG.GetWidget<ButtonWidget>("GIVE_EXPLORATION").OnMouseUp = mi =>
|
||||
{
|
||||
|
||||
@@ -220,7 +220,7 @@ Container@INGAME_ROOT:
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:350
|
||||
Height:360
|
||||
Height:370
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
@@ -287,10 +287,17 @@ Container@INGAME_ROOT:
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Unlimited Power
|
||||
Checkbox@BUILD_ANYWHERE
|
||||
Id:BUILD_ANYWHERE
|
||||
X:30
|
||||
Y:290
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Build Anywhere
|
||||
Button@GIVE_EXPLORATION
|
||||
Id:GIVE_EXPLORATION
|
||||
X:30
|
||||
Y:290
|
||||
Y:320
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Exploration
|
||||
|
||||
@@ -227,7 +227,7 @@ Container@INGAME_ROOT:
|
||||
X:(WINDOW_RIGHT - WIDTH)/2
|
||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||
Width:350
|
||||
Height:360
|
||||
Height:370
|
||||
Visible:false
|
||||
Children:
|
||||
Label@LABEL_TITLE:
|
||||
@@ -294,10 +294,17 @@ Container@INGAME_ROOT:
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Unlimited Power
|
||||
Checkbox@BUILD_ANYWHERE
|
||||
Id:BUILD_ANYWHERE
|
||||
X:30
|
||||
Y:290
|
||||
Width:PARENT_RIGHT - 30
|
||||
Height:20
|
||||
Text:Build Anywhere
|
||||
Button@GIVE_EXPLORATION
|
||||
Id:GIVE_EXPLORATION
|
||||
X:30
|
||||
Y:290
|
||||
Y:320
|
||||
Width:200
|
||||
Height:20
|
||||
Text: Give Exploration
|
||||
|
||||
Reference in New Issue
Block a user