remove UIM-debug from settings (now in DeveloperMode trait)
This commit is contained in:
@@ -32,7 +32,6 @@ namespace OpenRA.GameRules
|
|||||||
{
|
{
|
||||||
public bool PerfGraph = false;
|
public bool PerfGraph = false;
|
||||||
public bool RecordSyncReports = true;
|
public bool RecordSyncReports = true;
|
||||||
public bool ShowCollisions = false;
|
|
||||||
public float LongTickThreshold = 0.001f;
|
public float LongTickThreshold = 0.001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ namespace OpenRA.Traits
|
|||||||
public bool FastBuild = false;
|
public bool FastBuild = false;
|
||||||
public bool FastCharge = false;
|
public bool FastCharge = false;
|
||||||
public bool DisableShroud = false;
|
public bool DisableShroud = false;
|
||||||
public bool PathDebug = false;
|
public bool PathDebug = false;
|
||||||
|
public bool UnitInfluenceDebug = false;
|
||||||
|
|
||||||
public object Create (ActorInitializer init) { return new DeveloperMode(this); }
|
public object Create (ActorInitializer init) { return new DeveloperMode(this); }
|
||||||
}
|
}
|
||||||
@@ -30,14 +31,16 @@ namespace OpenRA.Traits
|
|||||||
[Sync] public bool FastBuild;
|
[Sync] public bool FastBuild;
|
||||||
[Sync] public bool DisableShroud;
|
[Sync] public bool DisableShroud;
|
||||||
[Sync] public bool PathDebug;
|
[Sync] public bool PathDebug;
|
||||||
|
[Sync] public bool UnitInfluenceDebug;
|
||||||
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ResolveOrder (Actor self, Order order)
|
public void ResolveOrder (Actor self, Order order)
|
||||||
@@ -79,9 +82,8 @@ namespace OpenRA.Traits
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevUnitDebug":
|
case "DevUnitDebug":
|
||||||
{
|
{
|
||||||
if (self.World.LocalPlayer == self.Owner)
|
UnitInfluenceDebug ^= true;
|
||||||
Game.Settings.Debug.ShowCollisions ^= true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "DevGiveExploration":
|
case "DevGiveExploration":
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace OpenRA
|
|||||||
|
|
||||||
public void Draw( WorldRenderer wr, World world )
|
public void Draw( WorldRenderer wr, World world )
|
||||||
{
|
{
|
||||||
if (Game.Settings.Debug.ShowCollisions)
|
if (world.LocalPlayer.PlayerActor.Trait<DeveloperMode>().UnitInfluenceDebug)
|
||||||
{
|
{
|
||||||
var uim = world.WorldActor.Trait<UnitInfluence>();
|
var uim = world.WorldActor.Trait<UnitInfluence>();
|
||||||
|
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
devmodeBG.GetWidget<CheckboxWidget>("CHECKBOX_UNITDEBUG").Checked =
|
devmodeBG.GetWidget<CheckboxWidget>("CHECKBOX_UNITDEBUG").Checked =
|
||||||
() => Game.Settings.Debug.ShowCollisions;
|
() => world.LocalPlayer.PlayerActor.Trait<DeveloperMode>().UnitInfluenceDebug;
|
||||||
devmodeBG.GetWidget("CHECKBOX_UNITDEBUG").OnMouseDown = mi =>
|
devmodeBG.GetWidget("CHECKBOX_UNITDEBUG").OnMouseDown = mi =>
|
||||||
{
|
{
|
||||||
world.IssueOrder(new Order("DevUnitDebug", world.LocalPlayer.PlayerActor));
|
world.IssueOrder(new Order("DevUnitDebug", world.LocalPlayer.PlayerActor));
|
||||||
|
|||||||
Reference in New Issue
Block a user