Replace string data fields with LocId where relevant (#20883)

This commit is contained in:
DrSmugleaf
2023-10-10 20:06:24 -07:00
committed by GitHub
parent ef233cf0fe
commit 9bcf67753a
69 changed files with 265 additions and 286 deletions

View File

@@ -1,4 +1,3 @@
using Robust.Server.GameObjects;
using Robust.Server.Player;
using Robust.Shared.Reflection;
using Robust.Shared.Serialization;
@@ -15,21 +14,21 @@ namespace Content.Server.UserInterface
[ViewVariables] public PlayerBoundUserInterface? UserInterface => (Key != null) ? Owner.GetUIOrNull(Key) : null;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("inHandsOnly")]
[DataField]
public bool InHandsOnly { get; set; } = false;
[DataField("singleUser")]
[DataField]
public bool SingleUser { get; set; } = false;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("adminOnly")]
[DataField]
public bool AdminOnly { get; set; } = false;
[DataField("key", required: true)]
private string _keyRaw = default!;
[DataField("verbText")]
public string VerbText = "ui-verb-toggle-open";
[DataField]
public LocId VerbText = "ui-verb-toggle-open";
/// <summary>
/// Whether you need a hand to operate this UI. The hand does not need to be free, you just need to have one.
@@ -39,28 +38,28 @@ namespace Content.Server.UserInterface
/// more generic interaction / configuration that might not require hands.
/// </remarks>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("requireHands")]
[DataField]
public bool RequireHands = true;
/// <summary>
/// Whether you can activate this ui with activateinhand or not
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("rightClickOnly")]
[DataField]
public bool rightClickOnly = false;
/// <summary>
/// Whether spectators (non-admin ghosts) should be allowed to view this UI.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("allowSpectator")]
[DataField]
public bool AllowSpectator = true;
/// <summary>
/// Whether the UI should close when the item is deselected due to a hand swap or drop
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("closeOnHandDeselect")]
[DataField]
public bool CloseOnHandDeselect = true;
/// <summary>