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