diff --git a/Content.Client/Actions/UI/ActionMenu.cs b/Content.Client/Actions/UI/ActionMenu.cs index edb341a644..88d08be32c 100644 --- a/Content.Client/Actions/UI/ActionMenu.cs +++ b/Content.Client/Actions/UI/ActionMenu.cs @@ -306,7 +306,7 @@ namespace Content.Client.Actions.UI return true; } - if (Standardize(action.Name.ToString()).Contains(standardizedSearch)) + if (Standardize(action.DisplayName.ToString()).Contains(standardizedSearch)) { return true; } diff --git a/Content.Client/Actions/UI/ActionMenuItem.cs b/Content.Client/Actions/UI/ActionMenuItem.cs index 61bfe4ebe3..a2ce3023f9 100644 --- a/Content.Client/Actions/UI/ActionMenuItem.cs +++ b/Content.Client/Actions/UI/ActionMenuItem.cs @@ -193,7 +193,7 @@ namespace Content.Client.Actions.UI private Control SupplyTooltip(Control? sender) { - var name = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.Name)); + var name = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.DisplayName)); var decr = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.Description)); var tooltip = new ActionAlertTooltip(name, decr); diff --git a/Content.Client/Actions/UI/ActionSlot.cs b/Content.Client/Actions/UI/ActionSlot.cs index e620e8e350..dd4ff87b62 100644 --- a/Content.Client/Actions/UI/ActionSlot.cs +++ b/Content.Client/Actions/UI/ActionSlot.cs @@ -164,7 +164,7 @@ namespace Content.Client.Actions.UI extra = Loc.GetString("ui-actionslot-charges", ("charges", Action.Charges)); } - var name = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.Name)); + var name = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.DisplayName)); var decr = FormattedMessage.FromMarkupPermissive(Loc.GetString(Action.Description)); var tooltip = new ActionAlertTooltip(name, decr, extra); diff --git a/Content.Client/Audio/BackgroundAudioSystem.cs b/Content.Client/Audio/BackgroundAudioSystem.cs index 3897e8e5d5..761cd66140 100644 --- a/Content.Client/Audio/BackgroundAudioSystem.cs +++ b/Content.Client/Audio/BackgroundAudioSystem.cs @@ -14,6 +14,7 @@ using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Timing; using System.Threading; +using Content.Client.Gameplay; using Robust.Client.GameObjects; using Robust.Client.ResourceManagement; using Timer = Robust.Shared.Timing.Timer; @@ -165,7 +166,7 @@ namespace Content.Client.Audio StartLobbyMusic(); return; } - else if (args.NewState is GameScreen) + else if (args.NewState is GameplayState) { StartAmbience(); } @@ -195,7 +196,7 @@ namespace Content.Client.Audio private void AmbienceCVarChanged(float volume) { - if (_stateManager.CurrentState is GameScreen) + if (_stateManager.CurrentState is GameplayState) { StartAmbience(); } @@ -237,7 +238,7 @@ namespace Content.Client.Audio if (_currentCollection == null) return; - if (enabled && _stateManager.CurrentState is GameScreen && _currentCollection.ID == _stationAmbience.ID) + if (enabled && _stateManager.CurrentState is GameplayState && _currentCollection.ID == _stationAmbience.ID) { StartAmbience(); } @@ -252,7 +253,7 @@ namespace Content.Client.Audio if (_currentCollection == null) return; - if (enabled && _stateManager.CurrentState is GameScreen && _currentCollection.ID == _spaceAmbience.ID) + if (enabled && _stateManager.CurrentState is GameplayState && _currentCollection.ID == _spaceAmbience.ID) { StartAmbience(); } diff --git a/Content.Client/Chat/ChatInput.cs b/Content.Client/Chat/ChatInput.cs index 8ddf44a68d..3633e66e69 100644 --- a/Content.Client/Chat/ChatInput.cs +++ b/Content.Client/Chat/ChatInput.cs @@ -1,4 +1,5 @@ using Content.Client.Chat.UI; +using Content.Client.Gameplay; using Content.Client.Viewport; using Content.Shared.Chat; using Content.Shared.Input; @@ -12,28 +13,28 @@ namespace Content.Client.Chat public static void SetupChatInputHandlers(IInputManager inputManager, ChatBox chatBox) { inputManager.SetInputCommand(ContentKeyFunctions.FocusChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChat(chatBox))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChat(chatBox))); inputManager.SetInputCommand(ContentKeyFunctions.FocusLocalChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Local))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Local))); inputManager.SetInputCommand(ContentKeyFunctions.FocusWhisperChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Whisper))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Whisper))); inputManager.SetInputCommand(ContentKeyFunctions.FocusOOC, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.OOC))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.OOC))); inputManager.SetInputCommand(ContentKeyFunctions.FocusAdminChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Admin))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Admin))); inputManager.SetInputCommand(ContentKeyFunctions.FocusRadio, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Radio))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Radio))); inputManager.SetInputCommand(ContentKeyFunctions.FocusDeadChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Dead))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Dead))); inputManager.SetInputCommand(ContentKeyFunctions.FocusConsoleChat, - InputCmdHandler.FromDelegate(_ => GameScreen.FocusChannel(chatBox, ChatSelectChannel.Console))); + InputCmdHandler.FromDelegate(_ => GameplayState.FocusChannel(chatBox, ChatSelectChannel.Console))); inputManager.SetInputCommand(ContentKeyFunctions.CycleChatChannelForward, InputCmdHandler.FromDelegate(_ => chatBox.CycleChatChannel(true))); diff --git a/Content.Client/Chat/Managers/ChatManager.cs b/Content.Client/Chat/Managers/ChatManager.cs index 9c7344752d..4f2c9988d5 100644 --- a/Content.Client/Chat/Managers/ChatManager.cs +++ b/Content.Client/Chat/Managers/ChatManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using Content.Client.Administration.Managers; using Content.Client.Chat.UI; +using Content.Client.Gameplay; using Content.Client.Ghost; using Content.Client.Viewport; using Content.Shared.Administration; @@ -200,7 +201,7 @@ namespace Content.Client.Chat.Managers // can always hear server (nobody can actually send server messages). FilterableChannels |= ChatChannel.Server; - if (_stateManager.CurrentState is GameScreenBase) + if (_stateManager.CurrentState is GameplayStateBase) { // can always hear local / radio / emote when in the game FilterableChannels |= ChatChannel.Local; diff --git a/Content.Client/ContextMenu/UI/EntityMenuPresenter.cs b/Content.Client/ContextMenu/UI/EntityMenuPresenter.cs index cc2f22831a..1719ac6429 100644 --- a/Content.Client/ContextMenu/UI/EntityMenuPresenter.cs +++ b/Content.Client/ContextMenu/UI/EntityMenuPresenter.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using System.Linq; using Content.Client.Examine; +using Content.Client.Gameplay; using Content.Client.Verbs; using Content.Client.Viewport; using Content.Shared.CCVar; @@ -156,7 +157,7 @@ namespace Content.Client.ContextMenu.UI if (args.State != BoundKeyState.Down) return false; - if (_stateManager.CurrentState is not GameScreenBase) + if (_stateManager.CurrentState is not GameplayStateBase) return false; var coords = args.Coordinates.ToMap(_entityManager); diff --git a/Content.Client/Decals/DecalPlacementSystem.cs b/Content.Client/Decals/DecalPlacementSystem.cs index 45da1c5547..6b592fd98a 100644 --- a/Content.Client/Decals/DecalPlacementSystem.cs +++ b/Content.Client/Decals/DecalPlacementSystem.cs @@ -145,7 +145,7 @@ public sealed class DecalPlacementSystem : EntitySystem ev.Action = new WorldTargetAction() { - Name = $"{_decalId} ({_decalColor.ToHex()}, {(int) _decalAngle.Degrees})", // non-unique actions may be considered duplicates when saving/loading. + DisplayName = $"{_decalId} ({_decalColor.ToHex()}, {(int) _decalAngle.Degrees})", // non-unique actions may be considered duplicates when saving/loading. Icon = decalProto.Sprite, Repeat = true, CheckCanAccess = false, diff --git a/Content.Client/DragDrop/DragDropSystem.cs b/Content.Client/DragDrop/DragDropSystem.cs index d5841080fd..37bae796d7 100644 --- a/Content.Client/DragDrop/DragDropSystem.cs +++ b/Content.Client/DragDrop/DragDropSystem.cs @@ -1,4 +1,5 @@ using Content.Client.CombatMode; +using Content.Client.Gameplay; using Content.Client.Outline; using Content.Client.Viewport; using Content.Shared.ActionBlocker; @@ -303,7 +304,7 @@ namespace Content.Client.DragDrop IList entities; - if (_stateManager.CurrentState is GameScreen screen) + if (_stateManager.CurrentState is GameplayState screen) { entities = screen.GetEntitiesUnderPosition(args.Coordinates); } diff --git a/Content.Client/EscapeMenu/EscapeMenuOwner.cs b/Content.Client/EscapeMenu/EscapeMenuOwner.cs index 106150e407..22ee84128d 100644 --- a/Content.Client/EscapeMenu/EscapeMenuOwner.cs +++ b/Content.Client/EscapeMenu/EscapeMenuOwner.cs @@ -1,3 +1,4 @@ +using Content.Client.Gameplay; using Content.Client.HUD; using Content.Client.Viewport; using Robust.Client.Console; @@ -27,7 +28,7 @@ namespace Content.Client.EscapeMenu private void StateManagerOnOnStateChanged(StateChangedEventArgs obj) { - if (obj.NewState is GameScreenBase) + if (obj.NewState is GameplayStateBase) { // Switched TO GameScreen. _escapeMenu = new UI.EscapeMenu(_consoleHost); @@ -37,7 +38,7 @@ namespace Content.Client.EscapeMenu _inputManager.SetInputCommand(EngineKeyFunctions.EscapeMenu, InputCmdHandler.FromDelegate(_ => Enabled())); } - else if (obj.OldState is GameScreenBase) + else if (obj.OldState is GameplayStateBase) { // Switched FROM GameScreen. _escapeMenu?.Dispose(); diff --git a/Content.Client/GameTicking/Managers/ClientGameTicker.cs b/Content.Client/GameTicking/Managers/ClientGameTicker.cs index 78d5abf0e7..27fc7261d7 100644 --- a/Content.Client/GameTicking/Managers/ClientGameTicker.cs +++ b/Content.Client/GameTicking/Managers/ClientGameTicker.cs @@ -1,4 +1,5 @@ using Content.Client.Audio; +using Content.Client.Gameplay; using Content.Client.Lobby; using Content.Client.RoundEnd; using Content.Client.Viewport; @@ -109,7 +110,7 @@ namespace Content.Client.GameTicking.Managers private void JoinGame(TickerJoinGameEvent message) { - _stateManager.RequestStateChange(); + _stateManager.RequestStateChange(); } private void LobbyCountdown(TickerLobbyCountdownEvent message) diff --git a/Content.Client/Viewport/GameScreen.cs b/Content.Client/Gameplay/GameplayState.cs similarity index 96% rename from Content.Client/Viewport/GameScreen.cs rename to Content.Client/Gameplay/GameplayState.cs index a796c788aa..c4fb1cefe4 100644 --- a/Content.Client/Viewport/GameScreen.cs +++ b/Content.Client/Gameplay/GameplayState.cs @@ -6,6 +6,7 @@ using Content.Client.Construction.UI; using Content.Client.Hands; using Content.Client.HUD; using Content.Client.HUD.UI; +using Content.Client.Viewport; using Content.Client.Voting; using Content.Shared.Chat; using Content.Shared.CCVar; @@ -15,14 +16,11 @@ using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Configuration; -using Robust.Shared.IoC; -using Robust.Shared.Maths; using Robust.Shared.Timing; -using Robust.Shared.ViewVariables; -namespace Content.Client.Viewport +namespace Content.Client.Gameplay { - public sealed class GameScreen : GameScreenBase, IMainViewportState + public sealed class GameplayState : GameplayStateBase, IMainViewportState { public static readonly Vector2i ViewportSize = (EyeManager.PixelsPerMeter * 21, EyeManager.PixelsPerMeter * 15); diff --git a/Content.Client/Viewport/GameScreenBase.cs b/Content.Client/Gameplay/GameplayStateBase.cs similarity index 97% rename from Content.Client/Viewport/GameScreenBase.cs rename to Content.Client/Gameplay/GameplayStateBase.cs index a6a39baafa..43397fbd10 100644 --- a/Content.Client/Viewport/GameScreenBase.cs +++ b/Content.Client/Gameplay/GameplayStateBase.cs @@ -9,20 +9,17 @@ using Robust.Client.State; using Robust.Client.UserInterface; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.Containers; -using Robust.Shared.GameObjects; using Robust.Shared.Input; -using Robust.Shared.IoC; using Robust.Shared.Map; -using Robust.Shared.Maths; using Robust.Shared.Timing; -namespace Content.Client.Viewport +namespace Content.Client.Gameplay { // OH GOD. // Ok actually it's fine. // Instantiated dynamically through the StateManager, Dependencies will be resolved. [Virtual] - public class GameScreenBase : State, IEntityEventSubscriber + public class GameplayStateBase : State, IEntityEventSubscriber { [Dependency] private readonly IInputManager _inputManager = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; diff --git a/Content.Client/Info/RulesManager.cs b/Content.Client/Info/RulesManager.cs index 1ee5de77b4..aa976b3b89 100644 --- a/Content.Client/Info/RulesManager.cs +++ b/Content.Client/Info/RulesManager.cs @@ -1,3 +1,4 @@ +using Content.Client.Gameplay; using Content.Client.Lobby; using Content.Client.Viewport; using Content.Shared.CCVar; @@ -42,7 +43,7 @@ public sealed class RulesManager : SharedRulesManager private void OnStateChanged(StateChangedEventArgs args) { - if (args.NewState is not (GameScreen or LobbyState)) + if (args.NewState is not (GameplayState or LobbyState)) return; if (!_shouldShowRules) diff --git a/Content.Client/Mapping/MappingSystem.cs b/Content.Client/Mapping/MappingSystem.cs index 8e9594a4db..e82474a7c2 100644 --- a/Content.Client/Mapping/MappingSystem.cs +++ b/Content.Client/Mapping/MappingSystem.cs @@ -86,7 +86,7 @@ public sealed partial class MappingSystem : EntitySystem { CheckCanInteract = false, Event = actionEvent, - Name = tileDef.Name, + DisplayName = tileDef.Name, Icon = tileIcon }; @@ -99,7 +99,7 @@ public sealed partial class MappingSystem : EntitySystem { CheckCanInteract = false, Event = actionEvent, - Name = "action-name-mapping-erase", + DisplayName = "action-name-mapping-erase", Icon = _deleteIcon, }; @@ -113,7 +113,7 @@ public sealed partial class MappingSystem : EntitySystem { CheckCanInteract = false, Event = actionEvent, - Name = actionEvent.EntityType, + DisplayName = actionEvent.EntityType, Icon = new SpriteSpecifier.EntityPrototype(actionEvent.EntityType), }; } diff --git a/Content.Client/Outline/InteractionOutlineSystem.cs b/Content.Client/Outline/InteractionOutlineSystem.cs index 779804cb3b..cfeeb21b76 100644 --- a/Content.Client/Outline/InteractionOutlineSystem.cs +++ b/Content.Client/Outline/InteractionOutlineSystem.cs @@ -1,4 +1,5 @@ using Content.Client.ContextMenu.UI; +using Content.Client.Gameplay; using Content.Client.Interactable.Components; using Content.Client.Viewport; using Content.Shared.CCVar; @@ -109,7 +110,7 @@ public sealed class InteractionOutlineSystem : EntitySystem // Potentially change someday? who knows. var currentState = _stateManager.CurrentState; - if (currentState is not GameScreen screen) return; + if (currentState is not GameplayState screen) return; EntityUid? entityToClick = null; var renderScale = 1; diff --git a/Content.Client/Verbs/VerbSystem.cs b/Content.Client/Verbs/VerbSystem.cs index 41690a12a7..5062ce57ea 100644 --- a/Content.Client/Verbs/VerbSystem.cs +++ b/Content.Client/Verbs/VerbSystem.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Client.ContextMenu.UI; using Content.Client.Examine; +using Content.Client.Gameplay; using Content.Client.Popups; using Content.Client.Verbs.UI; using Content.Client.Viewport; @@ -92,7 +93,7 @@ namespace Content.Client.Verbs { result = null; - if (_stateManager.CurrentState is not GameScreenBase gameScreenBase) + if (_stateManager.CurrentState is not GameplayStateBase gameScreenBase) return false; var player = _playerManager.LocalPlayer?.ControlledEntity; diff --git a/Content.Server/Abilities/Mime/MimePowersComponent.cs b/Content.Server/Abilities/Mime/MimePowersComponent.cs index 3b56a07a6d..9f1c9a22dc 100644 --- a/Content.Server/Abilities/Mime/MimePowersComponent.cs +++ b/Content.Server/Abilities/Mime/MimePowersComponent.cs @@ -29,7 +29,7 @@ namespace Content.Server.Abilities.Mime { UseDelay = TimeSpan.FromSeconds(30), Icon = new SpriteSpecifier.Texture(new ResourcePath("Structures/Walls/solid.rsi/full.png")), - Name = "mime-invisible-wall", + DisplayName = "mime-invisible-wall", Description = "mime-invisible-wall-desc", Priority = -1, Event = new InvisibleWallActionEvent(), diff --git a/Content.Server/Bible/Components/SummonableComponent.cs b/Content.Server/Bible/Components/SummonableComponent.cs index 2012d8cedb..bfa13916c5 100644 --- a/Content.Server/Bible/Components/SummonableComponent.cs +++ b/Content.Server/Bible/Components/SummonableComponent.cs @@ -31,7 +31,7 @@ namespace Content.Server.Bible.Components public InstantAction SummonAction = new() { Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Head/Hats/witch.rsi/icon.png")), - Name = "bible-summon-verb", + DisplayName = "bible-summon-verb", Description = "bible-summon-verb-desc", Event = new SummonActionEvent(), }; diff --git a/Content.Server/Ghost/Components/GhostComponent.cs b/Content.Server/Ghost/Components/GhostComponent.cs index e6ea4a4b60..b0d51556f0 100644 --- a/Content.Server/Ghost/Components/GhostComponent.cs +++ b/Content.Server/Ghost/Components/GhostComponent.cs @@ -22,7 +22,7 @@ namespace Content.Server.Ghost.Components { UseDelay = TimeSpan.FromSeconds(120), Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/scream.png")), - Name = "action-name-boo", + DisplayName = "action-name-boo", Description = "action-description-boo", CheckCanInteract = false, Event = new BooActionEvent(), diff --git a/Content.Server/Guardian/GuardianHostComponent.cs b/Content.Server/Guardian/GuardianHostComponent.cs index e76f0b4c60..bb56d5ec4b 100644 --- a/Content.Server/Guardian/GuardianHostComponent.cs +++ b/Content.Server/Guardian/GuardianHostComponent.cs @@ -27,7 +27,7 @@ namespace Content.Server.Guardian [DataField("action")] public InstantAction Action = new() { - Name = "action-name-guardian", + DisplayName = "action-name-guardian", Description = "action-description-guardian", Icon = new SpriteSpecifier.Texture(new ResourcePath("Interface/Actions/manifest.png")), UseDelay = TimeSpan.FromSeconds(2), diff --git a/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs b/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs index 49b926e72d..e0af81530b 100644 --- a/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs +++ b/Content.Server/Medical/Stethoscope/Components/StethoscopeComponent.cs @@ -20,7 +20,7 @@ namespace Content.Server.Medical.Components public EntityTargetAction Action = new() { Icon = new SpriteSpecifier.Texture(new ResourcePath("Clothing/Neck/Misc/stethoscope.rsi/icon.png")), - Name = "stethoscope-verb", + DisplayName = "stethoscope-verb", Priority = -1, Event = new StethoscopeActionEvent(), }; diff --git a/Content.Server/Polymorph/Systems/PolymorphableSystem.cs b/Content.Server/Polymorph/Systems/PolymorphableSystem.cs index 34b953cb84..8cc4f863ec 100644 --- a/Content.Server/Polymorph/Systems/PolymorphableSystem.cs +++ b/Content.Server/Polymorph/Systems/PolymorphableSystem.cs @@ -188,7 +188,7 @@ namespace Content.Server.Polymorph.Systems { Prototype = polyproto, }, - Name = Loc.GetString("polymorph-self-action-name", ("target", entproto.Name)), + DisplayName = Loc.GetString("polymorph-self-action-name", ("target", entproto.Name)), Description = Loc.GetString("polymorph-self-action-description", ("target", entproto.Name)), Icon = new SpriteSpecifier.EntityPrototype(polyproto.Entity), ItemIconStyle = ItemActionIconStyle.NoItem, diff --git a/Content.Server/Polymorph/Systems/PolymorphedEntitySystem.cs b/Content.Server/Polymorph/Systems/PolymorphedEntitySystem.cs index 9c1295f178..b6ad72f5c9 100644 --- a/Content.Server/Polymorph/Systems/PolymorphedEntitySystem.cs +++ b/Content.Server/Polymorph/Systems/PolymorphedEntitySystem.cs @@ -114,7 +114,7 @@ namespace Content.Server.Polymorph.Systems { Event = new RevertPolymorphActionEvent(), EntityIcon = component.Parent, - Name = Loc.GetString("polymorph-revert-action-name"), + DisplayName = Loc.GetString("polymorph-revert-action-name"), Description = Loc.GetString("polymorph-revert-action-description"), UseDelay = TimeSpan.FromSeconds(component.Prototype.Delay), }; diff --git a/Content.Shared/Actions/ActionTypes/ActionType.cs b/Content.Shared/Actions/ActionTypes/ActionType.cs index de20beb65e..f8f334d400 100644 --- a/Content.Shared/Actions/ActionTypes/ActionType.cs +++ b/Content.Shared/Actions/ActionTypes/ActionType.cs @@ -35,7 +35,7 @@ public abstract class ActionType : IEquatable, IComparable, ICloneab /// Name to show in UI. /// [DataField("name", required: true)] - public string Name = string.Empty; + public string DisplayName = string.Empty; /// /// Description to show in UI. Accepts formatting. @@ -89,7 +89,7 @@ public abstract class ActionType : IEquatable, IComparable, ICloneab public EntityUid? Provider; /// - /// Entity to use for the action icon. Defaults to using . + /// Entity to use for the action icon. Defaults to using . /// public EntityUid? EntityIcon { @@ -207,8 +207,8 @@ public abstract class ActionType : IEquatable, 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, 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, IComparable, ICloneab unchecked { var hashCode = Priority.GetHashCode(); - hashCode = (hashCode * 397) ^ Name.GetHashCode(); + hashCode = (hashCode * 397) ^ DisplayName.GetHashCode(); hashCode = (hashCode * 397) ^ Provider.GetHashCode(); return hashCode; } diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index 7e0d0265b3..b45e3890e2 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -114,7 +114,7 @@ public abstract class SharedActionsSystem : EntitySystem if (!component.Actions.TryGetValue(ev.Action, out var act)) { _adminLogger.Add(LogType.Action, - $"{ToPrettyString(user):user} attempted to perform an action that they do not have: {ev.Action.Name}."); + $"{ToPrettyString(user):user} attempted to perform an action that they do not have: {ev.Action.DisplayName}."); return; } @@ -128,7 +128,7 @@ public abstract class SharedActionsSystem : EntitySystem BaseActionEvent? performEvent = null; // Validate request by checking action blockers and the like: - var name = Loc.GetString(act.Name); + var name = Loc.GetString(act.DisplayName); switch (act) { @@ -136,7 +136,7 @@ public abstract class SharedActionsSystem : EntitySystem if (ev.EntityTarget is not EntityUid { Valid: true } entityTarget) { - Logger.Error($"Attempted to perform an entity-targeted action without a target! Action: {entityAction.Name}"); + Logger.Error($"Attempted to perform an entity-targeted action without a target! Action: {entityAction.DisplayName}"); return; } @@ -164,7 +164,7 @@ public abstract class SharedActionsSystem : EntitySystem if (ev.MapTarget is not MapCoordinates mapTarget) { - Logger.Error($"Attempted to perform a map-targeted action without a target! Action: {worldAction.Name}"); + Logger.Error($"Attempted to perform a map-targeted action without a target! Action: {worldAction.DisplayName}"); return; } diff --git a/Content.Shared/Vehicle/Components/VehicleComponent.cs b/Content.Shared/Vehicle/Components/VehicleComponent.cs index f76dd3b8df..8cf2275065 100644 --- a/Content.Shared/Vehicle/Components/VehicleComponent.cs +++ b/Content.Shared/Vehicle/Components/VehicleComponent.cs @@ -50,7 +50,7 @@ namespace Content.Shared.Vehicle.Components { UseDelay = TimeSpan.FromSeconds(3.4), Icon = new SpriteSpecifier.Texture(new ResourcePath("Objects/Fun/bikehorn.rsi/icon.png")), - Name = "action-name-honk", + DisplayName = "action-name-honk", Description = "action-desc-honk", Event = new HonkActionEvent(), };