Move shroud options to rules.

This commit is contained in:
Paul Chote
2016-02-29 18:43:01 +00:00
parent f44993e4f7
commit 62f28d2909
8 changed files with 29 additions and 18 deletions

View File

@@ -59,8 +59,6 @@ namespace OpenRA
public class MapOptions
{
public bool? Creeps;
public bool? Fog;
public bool? Shroud;
public bool? AllyBuildRadius;
public int? StartingCash;
public string TechLevel;
@@ -72,10 +70,6 @@ namespace OpenRA
{
if (Creeps.HasValue)
settings.Creeps = Creeps.Value;
if (Fog.HasValue)
settings.Fog = Fog.Value;
if (Shroud.HasValue)
settings.Shroud = Shroud.Value;
if (AllyBuildRadius.HasValue)
settings.AllyBuildRadius = AllyBuildRadius.Value;
if (StartingCash.HasValue)

View File

@@ -18,6 +18,18 @@ namespace OpenRA.Traits
[Desc("Required for shroud and fog visibility checks. Add this to the player actor.")]
public class ShroudInfo : ITraitInfo
{
[Desc("Default value of the fog checkbox in the lobby.")]
public bool FogEnabled = true;
[Desc("Prevent the fog enabled state from being changed in the lobby.")]
public bool FogLocked = false;
[Desc("Default value of the explore map checkbox in the lobby.")]
public bool ExploredMapEnabled = false;
[Desc("Prevent the explore map enabled state from being changed in the lobby.")]
public bool ExploredMapLocked = false;
public object Create(ActorInitializer init) { return new Shroud(init.Self); }
}