Rename boolean LobbyOption fields.

This commit is contained in:
Paul Chote
2017-12-12 20:22:58 +00:00
committed by reaperrr
parent 36fccbc453
commit 3f67feab0e
4 changed files with 15 additions and 17 deletions

View File

@@ -180,13 +180,11 @@ namespace OpenRA.Network
public class LobbyOptionState
{
public bool Locked;
public string Value;
public string PreferredValue;
public LobbyOptionState() { }
public bool Enabled { get { return Value == "True"; } }
public bool IsLocked;
public bool IsEnabled { get { return Value == "True"; } }
}
public class Global
@@ -228,7 +226,7 @@ namespace OpenRA.Network
{
LobbyOptionState option;
if (LobbyOptions.TryGetValue(id, out option))
return option.Enabled;
return option.IsEnabled;
return def;
}

View File

@@ -392,8 +392,8 @@ namespace OpenRA.Traits
public readonly string Description;
public readonly IReadOnlyDictionary<string, string> Values;
public readonly string DefaultValue;
public readonly bool Locked;
public readonly bool Visible;
public readonly bool IsLocked;
public readonly bool IsVisible;
public readonly int DisplayOrder;
public LobbyOption(string id, string name, string description, bool visible, int displayorder,
@@ -402,11 +402,11 @@ namespace OpenRA.Traits
Id = id;
Name = name;
Description = description;
Visible = visible;
IsVisible = visible;
DisplayOrder = displayorder;
Values = values;
DefaultValue = defaultValue;
Locked = locked;
IsLocked = locked;
}
public virtual string ValueChangedMessage(string playerName, string newValue)