Add Visualization chat commands
This commit is contained in:
@@ -47,18 +47,6 @@ namespace OpenRA.Traits
|
||||
[Desc("Enable the path debug overlay by default.")]
|
||||
public bool PathDebug;
|
||||
|
||||
[Desc("Enable the combat geometry overlay by default.")]
|
||||
public bool ShowCombatGeometry;
|
||||
|
||||
[Desc("Enable the debug geometry overlay by default.")]
|
||||
public bool ShowDebugGeometry;
|
||||
|
||||
[Desc("Enable the depth buffer overlay by default.")]
|
||||
public bool ShowDepthPreview;
|
||||
|
||||
[Desc("Enable the actor tags overlay by default.")]
|
||||
public bool ShowActorTags;
|
||||
|
||||
IEnumerable<LobbyOption> ILobbyOptions.LobbyOptions(Ruleset rules)
|
||||
{
|
||||
yield return new LobbyBooleanOption("cheats", "Debug Menu", Enabled, Locked);
|
||||
@@ -88,12 +76,6 @@ namespace OpenRA.Traits
|
||||
public bool UnlimitedPower { get { return Enabled && unlimitedPower; } }
|
||||
public bool BuildAnywhere { get { return Enabled && buildAnywhere; } }
|
||||
|
||||
// Client side only
|
||||
public bool ShowCombatGeometry;
|
||||
public bool ShowDebugGeometry;
|
||||
public bool ShowDepthPreview;
|
||||
public bool ShowActorTags;
|
||||
|
||||
bool enableAll;
|
||||
|
||||
public DeveloperMode(DeveloperModeInfo info)
|
||||
@@ -105,11 +87,6 @@ namespace OpenRA.Traits
|
||||
pathDebug = info.PathDebug;
|
||||
unlimitedPower = info.UnlimitedPower;
|
||||
buildAnywhere = info.BuildAnywhere;
|
||||
|
||||
ShowCombatGeometry = info.ShowCombatGeometry;
|
||||
ShowDebugGeometry = info.ShowDebugGeometry;
|
||||
ShowDepthPreview = info.ShowDepthPreview;
|
||||
ShowActorTags = info.ShowActorTags;
|
||||
}
|
||||
|
||||
void INotifyCreated.Created(Actor self)
|
||||
|
||||
24
OpenRA.Game/Traits/World/DebugVisualizations.cs
Normal file
24
OpenRA.Game/Traits/World/DebugVisualizations.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2017 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version. For more
|
||||
* information, see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
[Desc("Enables visualization commands. Attach this to the world actor.")]
|
||||
public class DebugVisualizationsInfo : TraitInfo<DebugVisualizations> { }
|
||||
|
||||
public class DebugVisualizations
|
||||
{
|
||||
public bool CombatGeometry;
|
||||
public bool RenderGeometry;
|
||||
public bool DepthBuffer;
|
||||
public bool ActorTags;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user