Small UI refactor pieces (#11026)
* ActionType rename Name to DisplayName * Gameplay State rename+move
This commit is contained in:
@@ -35,7 +35,7 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
|
||||
/// Name to show in UI.
|
||||
/// </summary>
|
||||
[DataField("name", required: true)]
|
||||
public string Name = string.Empty;
|
||||
public string DisplayName = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Description to show in UI. Accepts formatting.
|
||||
@@ -89,7 +89,7 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
|
||||
public EntityUid? Provider;
|
||||
|
||||
/// <summary>
|
||||
/// Entity to use for the action icon. Defaults to using <see cref="Provider"/>.
|
||||
/// Entity to use for the action icon. Defaults to using <see cref="Provider"/>.
|
||||
/// </summary>
|
||||
public EntityUid? EntityIcon
|
||||
{
|
||||
@@ -207,8 +207,8 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
|
||||
if (Priority != otherAction.Priority)
|
||||
return otherAction.Priority - Priority;
|
||||
|
||||
var name = FormattedMessage.RemoveMarkup(Loc.GetString(Name));
|
||||
var otherName = FormattedMessage.RemoveMarkup(Loc.GetString(otherAction.Name));
|
||||
var name = FormattedMessage.RemoveMarkup(Loc.GetString(DisplayName));
|
||||
var otherName = FormattedMessage.RemoveMarkup(Loc.GetString(otherAction.DisplayName));
|
||||
if (name != otherName)
|
||||
return string.Compare(name, otherName, StringComparison.CurrentCulture);
|
||||
|
||||
@@ -244,7 +244,7 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
|
||||
Priority = toClone.Priority;
|
||||
Icon = toClone.Icon;
|
||||
IconOn = toClone.IconOn;
|
||||
Name = toClone.Name;
|
||||
DisplayName = toClone.DisplayName;
|
||||
Description = toClone.Description;
|
||||
Provider = toClone.Provider;
|
||||
AttachedEntity = toClone.AttachedEntity;
|
||||
@@ -278,7 +278,7 @@ public abstract class ActionType : IEquatable<ActionType>, IComparable, ICloneab
|
||||
unchecked
|
||||
{
|
||||
var hashCode = Priority.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ Name.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ DisplayName.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ Provider.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user