Lint more const string prototypes (#18922)

This commit is contained in:
Vordenburg
2023-08-13 20:26:59 -04:00
committed by GitHub
parent 17808a54ef
commit 7582474f1a
32 changed files with 73 additions and 19 deletions

View File

@@ -20,7 +20,6 @@ using Robust.Shared.Map;
using Robust.Shared.Player; using Robust.Shared.Player;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using System.Linq;
using System.Numerics; using System.Numerics;
using DrawDepth = Content.Shared.DrawDepth.DrawDepth; using DrawDepth = Content.Shared.DrawDepth.DrawDepth;
@@ -57,7 +56,10 @@ public sealed class DragDropSystem : SharedDragDropSystem
// mousedown event so it can be treated like a regular click // mousedown event so it can be treated like a regular click
private const float MaxMouseDownTimeForReplayingClick = 0.85f; private const float MaxMouseDownTimeForReplayingClick = 0.85f;
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderDropTargetInRange = "SelectionOutlineInrange"; private const string ShaderDropTargetInRange = "SelectionOutlineInrange";
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderDropTargetOutOfRange = "SelectionOutline"; private const string ShaderDropTargetOutOfRange = "SelectionOutline";
/// <summary> /// <summary>

View File

@@ -1,7 +1,5 @@
using Robust.Client.GameObjects; using Robust.Client.GameObjects;
using Robust.Client.Graphics; using Robust.Client.Graphics;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
namespace Content.Client.Interactable.Components namespace Content.Client.Interactable.Components
@@ -13,8 +11,13 @@ namespace Content.Client.Interactable.Components
[Dependency] private readonly IEntityManager _entMan = default!; [Dependency] private readonly IEntityManager _entMan = default!;
private const float DefaultWidth = 1; private const float DefaultWidth = 1;
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderInRange = "SelectionOutlineInrange"; private const string ShaderInRange = "SelectionOutlineInrange";
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderOutOfRange = "SelectionOutline"; private const string ShaderOutOfRange = "SelectionOutline";
private bool _inRange; private bool _inRange;
private ShaderInstance? _shader; private ShaderInstance? _shader;
private int _lastRenderScale; private int _lastRenderScale;

View File

@@ -63,8 +63,12 @@ public sealed class TargetOutlineSystem : EntitySystem
private Vector2 LookupVector => new(LookupSize, LookupSize); private Vector2 LookupVector => new(LookupSize, LookupSize);
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderTargetValid = "SelectionOutlineInrange"; private const string ShaderTargetValid = "SelectionOutlineInrange";
[ValidatePrototypeId<ShaderPrototype>]
private const string ShaderTargetInvalid = "SelectionOutline"; private const string ShaderTargetInvalid = "SelectionOutline";
private ShaderInstance? _shaderTargetValid; private ShaderInstance? _shaderTargetValid;
private ShaderInstance? _shaderTargetInvalid; private ShaderInstance? _shaderTargetInvalid;

View File

@@ -14,7 +14,9 @@ public sealed class ParallaxSystem : SharedParallaxSystem
[Dependency] private readonly IParallaxManager _parallax = default!; [Dependency] private readonly IParallaxManager _parallax = default!;
[Dependency] private readonly IPrototypeManager _protoManager = default!; [Dependency] private readonly IPrototypeManager _protoManager = default!;
[ValidatePrototypeId<ParallaxPrototype>]
private const string Fallback = "Default"; private const string Fallback = "Default";
public const int ParallaxZIndex = 0; public const int ParallaxZIndex = 0;
public override void Initialize() public override void Initialize()

View File

@@ -14,6 +14,7 @@ namespace Content.Server.Body.Commands
[AdminCommand(AdminFlags.Fun)] [AdminCommand(AdminFlags.Fun)]
sealed class AddHandCommand : IConsoleCommand sealed class AddHandCommand : IConsoleCommand
{ {
[ValidatePrototypeId<EntityPrototype>]
public const string DefaultHandPrototype = "LeftHandHuman"; public const string DefaultHandPrototype = "LeftHandHuman";
public string Command => "addhand"; public string Command => "addhand";

View File

@@ -1,9 +1,10 @@
using Content.Server.CrewManifest; using Content.Server.CrewManifest;
using Content.Server.Station.Systems; using Content.Server.Station.Systems;
using Content.Shared.CartridgeLoader; using Content.Shared.CartridgeLoader;
using Content.Shared.CartridgeLoader.Cartridges; using Content.Shared.CartridgeLoader.Cartridges;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Robust.Shared.Configuration; using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
namespace Content.Server.CartridgeLoader.Cartridges; namespace Content.Server.CartridgeLoader.Cartridges;
@@ -14,6 +15,7 @@ public sealed class CrewManifestCartridgeSystem : EntitySystem
[Dependency] private readonly CrewManifestSystem _crewManifest = default!; [Dependency] private readonly CrewManifestSystem _crewManifest = default!;
[Dependency] private readonly StationSystem _stationSystem = default!; [Dependency] private readonly StationSystem _stationSystem = default!;
[ValidatePrototypeId<EntityPrototype>]
private const string CartridgePrototypeName = "CrewManifestCartridge"; private const string CartridgePrototypeName = "CrewManifestCartridge";
/// <summary> /// <summary>

View File

@@ -15,6 +15,7 @@ using JetBrains.Annotations;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.Containers; using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
namespace Content.Server.Chemistry.EntitySystems namespace Content.Server.Chemistry.EntitySystems
{ {
@@ -36,6 +37,7 @@ namespace Content.Server.Chemistry.EntitySystems
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!; [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly AppearanceSystem _appearance = default!; [Dependency] private readonly AppearanceSystem _appearance = default!;
[ValidatePrototypeId<EntityPrototype>]
private const string PillPrototypeId = "Pill"; private const string PillPrototypeId = "Pill";
public override void Initialize() public override void Initialize()

View File

@@ -16,7 +16,10 @@ namespace Content.Server.Construction.Commands
public string Description => "Puts an underplating tile below every wall on a grid."; public string Description => "Puts an underplating tile below every wall on a grid.";
public string Help => $"Usage: {Command} <gridId> | {Command}"; public string Help => $"Usage: {Command} <gridId> | {Command}";
[ValidatePrototypeId<ContentTileDefinition>]
public const string TilePrototypeId = "Plating"; public const string TilePrototypeId = "Plating";
[ValidatePrototypeId<TagPrototype>]
public const string WallTag = "Wall"; public const string WallTag = "Wall";
public void Execute(IConsoleShell shell, string argStr, string[] args) public void Execute(IConsoleShell shell, string argStr, string[] args)

View File

@@ -12,6 +12,7 @@ namespace Content.Server.Electrocution
public string Description => Loc.GetString("electrocute-command-description"); public string Description => Loc.GetString("electrocute-command-description");
public string Help => $"{Command} <uid> <seconds> <damage>"; public string Help => $"{Command} <uid> <seconds> <damage>";
[ValidatePrototypeId<StatusEffectPrototype>]
public const string ElectrocutionStatusEffect = "Electrocution"; public const string ElectrocutionStatusEffect = "Electrocution";
public void Execute(IConsoleShell shell, string argStr, string[] args) public void Execute(IConsoleShell shell, string argStr, string[] args)

View File

@@ -52,7 +52,10 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
[Dependency] private readonly SharedStutteringSystem _stuttering = default!; [Dependency] private readonly SharedStutteringSystem _stuttering = default!;
[Dependency] private readonly TagSystem _tag = default!; [Dependency] private readonly TagSystem _tag = default!;
[ValidatePrototypeId<StatusEffectPrototype>]
private const string StatusEffectKey = "Electrocution"; private const string StatusEffectKey = "Electrocution";
[ValidatePrototypeId<DamageTypePrototype>]
private const string DamageType = "Shock"; private const string DamageType = "Shock";
// Yes, this is absurdly small for a reason. // Yes, this is absurdly small for a reason.

View File

@@ -61,6 +61,7 @@ public sealed partial class ExplosionSystem : EntitySystem
/// find errors. However some components, like rogue arrows, or some commands like the admin-smite need to have /// find errors. However some components, like rogue arrows, or some commands like the admin-smite need to have
/// a "default" option specified outside of yaml data-fields. Hence this const string. /// a "default" option specified outside of yaml data-fields. Hence this const string.
/// </remarks> /// </remarks>
[ValidatePrototypeId<ExplosionPrototype>]
public const string DefaultExplosionPrototypeId = "Default"; public const string DefaultExplosionPrototypeId = "Default";
public override void Initialize() public override void Initialize()

View File

@@ -1,5 +1,6 @@
using Content.Server.Fluids.Components; using Content.Server.Fluids.Components;
using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.Fluids.Components; using Content.Shared.Fluids.Components;
@@ -9,6 +10,7 @@ public sealed partial class PuddleSystem
{ {
private static readonly TimeSpan EvaporationCooldown = TimeSpan.FromSeconds(1); private static readonly TimeSpan EvaporationCooldown = TimeSpan.FromSeconds(1);
[ValidatePrototypeId<ReagentPrototype>]
public const string EvaporationReagent = "Water"; public const string EvaporationReagent = "Water";
private void OnEvaporationMapInit(EntityUid uid, EvaporationComponent component, MapInitEvent args) private void OnEvaporationMapInit(EntityUid uid, EvaporationComponent component, MapInitEvent args)

View File

@@ -6,6 +6,7 @@ namespace Content.Server.GameTicking
{ {
public sealed partial class GameTicker public sealed partial class GameTicker
{ {
[ValidatePrototypeId<SoundCollectionPrototype>]
private const string LobbyMusicCollection = "LobbyMusic"; private const string LobbyMusicCollection = "LobbyMusic";
[ViewVariables] [ViewVariables]

View File

@@ -9,13 +9,13 @@ using Content.Server.Speech.Components;
using Content.Server.Station.Components; using Content.Server.Station.Components;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.Preferences; using Content.Shared.Preferences;
using Content.Shared.Roles; using Content.Shared.Roles;
using JetBrains.Annotations; using JetBrains.Annotations;
using Robust.Server.Player; using Robust.Server.Player;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Network; using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.Shared.Random; using Robust.Shared.Random;
using Robust.Shared.Utility; using Robust.Shared.Utility;
using Job = Content.Server.Roles.Job; using Job = Content.Server.Roles.Job;
@@ -26,6 +26,7 @@ namespace Content.Server.GameTicking
{ {
[Dependency] private readonly IAdminManager _adminManager = default!; [Dependency] private readonly IAdminManager _adminManager = default!;
[ValidatePrototypeId<EntityPrototype>]
private const string ObserverPrototypeName = "MobObserver"; private const string ObserverPrototypeName = "MobObserver";
/// <summary> /// <summary>

View File

@@ -1,17 +1,15 @@
using System.Threading; using System.Threading;
using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Events; using Content.Server.Shuttles.Events;
using Content.Server.Station.Components;
using Content.Server.UserInterface; using Content.Server.UserInterface;
using Content.Shared.Access;
using Content.Shared.CCVar; using Content.Shared.CCVar;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.GameTicking;
using Content.Shared.Popups; using Content.Shared.Popups;
using Content.Shared.Shuttles.BUIStates; using Content.Shared.Shuttles.BUIStates;
using Content.Shared.Shuttles.Events; using Content.Shared.Shuttles.Events;
using Content.Shared.Shuttles.Systems; using Content.Shared.Shuttles.Systems;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.Map; using Robust.Shared.Map;
using Robust.Shared.Player; using Robust.Shared.Player;
using Timer = Robust.Shared.Timing.Timer; using Timer = Robust.Shared.Timing.Timer;
@@ -63,6 +61,7 @@ public sealed partial class EmergencyShuttleSystem
private CancellationTokenSource? _roundEndCancelToken; private CancellationTokenSource? _roundEndCancelToken;
[ValidatePrototypeId<AccessLevelPrototype>]
private const string EmergencyRepealAllAccess = "EmergencyShuttleRepealAll"; private const string EmergencyRepealAllAccess = "EmergencyShuttleRepealAll";
private static readonly Color DangerColor = Color.Red; private static readonly Color DangerColor = Color.Red;

View File

@@ -16,6 +16,7 @@ using Content.Shared.CCVar;
using Content.Shared.Database; using Content.Shared.Database;
using Content.Shared.Shuttles.Components; using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Events; using Content.Shared.Shuttles.Events;
using Content.Shared.Tag;
using Content.Shared.Tiles; using Content.Shared.Tiles;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Server.Maps; using Robust.Server.Maps;
@@ -60,6 +61,7 @@ public sealed partial class EmergencyShuttleSystem : EntitySystem
private bool _emergencyShuttleEnabled; private bool _emergencyShuttleEnabled;
[ValidatePrototypeId<TagPrototype>]
private const string DockTag = "DockEmergency"; private const string DockTag = "DockEmergency";
public override void Initialize() public override void Initialize()

View File

@@ -1,4 +1,4 @@
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Content.Shared.Speech.Components; using Content.Shared.Speech.Components;
using Content.Shared.Speech.EntitySystems; using Content.Shared.Speech.EntitySystems;
@@ -9,6 +9,9 @@ namespace Content.Server.Speech.EntitySystems;
public sealed class RatvarianLanguageSystem : SharedRatvarianLanguageSystem public sealed class RatvarianLanguageSystem : SharedRatvarianLanguageSystem
{ {
[Dependency] private readonly StatusEffectsSystem _statusEffects = default!; [Dependency] private readonly StatusEffectsSystem _statusEffects = default!;
[ValidatePrototypeId<StatusEffectPrototype>]
private const string RatvarianKey = "RatvarianLanguage"; private const string RatvarianKey = "RatvarianLanguage";
// This is the word of Ratvar and those who speak it shall abide by His rules: // This is the word of Ratvar and those who speak it shall abide by His rules:

View File

@@ -12,6 +12,7 @@ public sealed class SlurredSystem : SharedSlurredSystem
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
[ValidatePrototypeId<StatusEffectPrototype>]
private const string SlurKey = "SlurredSpeech"; private const string SlurKey = "SlurredSpeech";
public override void Initialize() public override void Initialize()

View File

@@ -12,8 +12,6 @@ namespace Content.Server.Speech.EntitySystems
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
[Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IRobustRandom _random = default!;
private const string StutterKey = "Stutter";
// Regex of characters to stutter. // Regex of characters to stutter.
private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz]", private static readonly Regex Stutter = new(@"[b-df-hj-np-tv-wxyz]",
RegexOptions.Compiled | RegexOptions.IgnoreCase); RegexOptions.Compiled | RegexOptions.IgnoreCase);

View File

@@ -12,6 +12,7 @@ public sealed class KudzuSystem : EntitySystem
[Dependency] private readonly SharedAppearanceSystem _appearance = default!; [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly DamageableSystem _damageable = default!; [Dependency] private readonly DamageableSystem _damageable = default!;
[ValidatePrototypeId<EdgeSpreaderPrototype>]
private const string KudzuGroup = "kudzu"; private const string KudzuGroup = "kudzu";
/// <inheritdoc/> /// <inheritdoc/>

View File

@@ -31,6 +31,7 @@ public sealed class SpreaderSystem : EntitySystem
private readonly List<string> _spreaderGroups = new(); private readonly List<string> _spreaderGroups = new();
[ValidatePrototypeId<TagPrototype>]
private const string IgnoredTag = "SpreaderIgnore"; private const string IgnoredTag = "SpreaderIgnore";
/// <inheritdoc/> /// <inheritdoc/>

View File

@@ -4,6 +4,7 @@ using Content.Shared.Inventory;
using Content.Shared.PDA; using Content.Shared.PDA;
using Content.Server.Store.Components; using Content.Server.Store.Components;
using Content.Shared.FixedPoint; using Content.Shared.FixedPoint;
using Content.Shared.Store;
namespace Content.Server.Traitor.Uplink namespace Content.Server.Traitor.Uplink
{ {
@@ -13,6 +14,7 @@ namespace Content.Server.Traitor.Uplink
[Dependency] private readonly SharedHandsSystem _handsSystem = default!; [Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly StoreSystem _store = default!; [Dependency] private readonly StoreSystem _store = default!;
[ValidatePrototypeId<CurrencyPrototype>]
public const string TelecrystalCurrencyPrototype = "Telecrystal"; public const string TelecrystalCurrencyPrototype = "Telecrystal";
/// <summary> /// <summary>

View File

@@ -9,6 +9,7 @@ namespace Content.Server.Traits.Assorted;
/// </summary> /// </summary>
public sealed class NarcolepsySystem : EntitySystem public sealed class NarcolepsySystem : EntitySystem
{ {
[ValidatePrototypeId<StatusEffectPrototype>]
private const string StatusEffectKey = "ForcedSleep"; // Same one used by N2O and other sleep chems. private const string StatusEffectKey = "ForcedSleep"; // Same one used by N2O and other sleep chems.
[Dependency] private readonly StatusEffectsSystem _statusEffects = default!; [Dependency] private readonly StatusEffectsSystem _statusEffects = default!;

View File

@@ -20,7 +20,10 @@ public abstract class SharedChatSystem : EntitySystem
public const char AdminPrefix = ']'; public const char AdminPrefix = ']';
public const char WhisperPrefix = ','; public const char WhisperPrefix = ',';
public const char DefaultChannelKey = 'h'; public const char DefaultChannelKey = 'h';
[ValidatePrototypeId<RadioChannelPrototype>]
public const string CommonChannel = "Common"; public const string CommonChannel = "Common";
public static string DefaultChannelPrefix = $"{RadioChannelPrefix}{DefaultChannelKey}"; public static string DefaultChannelPrefix = $"{RadioChannelPrefix}{DefaultChannelKey}";
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;

View File

@@ -1,4 +1,4 @@
using Content.Shared.Clothing.Components; using Content.Shared.Clothing.Components;
using Content.Shared.Inventory.Events; using Content.Shared.Inventory.Events;
namespace Content.Shared.Chat.TypingIndicator; namespace Content.Shared.Chat.TypingIndicator;
@@ -11,8 +11,9 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
/// <summary> /// <summary>
/// Default ID of <see cref="TypingIndicatorPrototype"/> /// Default ID of <see cref="TypingIndicatorPrototype"/>
/// </summary> /// </summary>
[ValidatePrototypeId<TypingIndicatorPrototype>]
public const string InitialIndicatorId = "default"; public const string InitialIndicatorId = "default";
public override void Initialize() public override void Initialize()
{ {
base.Initialize(); base.Initialize();
@@ -25,7 +26,7 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
if (!TryComp<ClothingComponent>(uid, out var clothing) || if (!TryComp<ClothingComponent>(uid, out var clothing) ||
!TryComp<TypingIndicatorComponent>(args.Equipee, out var indicator)) !TryComp<TypingIndicatorComponent>(args.Equipee, out var indicator))
return; return;
var isCorrectSlot = clothing.Slots.HasFlag(args.SlotFlags); var isCorrectSlot = clothing.Slots.HasFlag(args.SlotFlags);
if (!isCorrectSlot) return; if (!isCorrectSlot) return;

View File

@@ -6,6 +6,7 @@ namespace Content.Shared.Drunk;
public abstract class SharedDrunkSystem : EntitySystem public abstract class SharedDrunkSystem : EntitySystem
{ {
[ValidatePrototypeId<StatusEffectPrototype>]
public const string DrunkKey = "Drunk"; public const string DrunkKey = "Drunk";
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;

View File

@@ -1,9 +1,11 @@
using Content.Shared.Eye.Blinding.Components; using Content.Shared.Eye.Blinding.Components;
using Content.Shared.StatusEffect;
namespace Content.Shared.Eye.Blinding.Systems; namespace Content.Shared.Eye.Blinding.Systems;
public sealed class TemporaryBlindnessSystem : EntitySystem public sealed class TemporaryBlindnessSystem : EntitySystem
{ {
[ValidatePrototypeId<StatusEffectPrototype>]
public const string BlindingStatusEffect = "TemporaryBlindness"; public const string BlindingStatusEffect = "TemporaryBlindness";
[Dependency] private readonly BlindableSystem _blindableSystem = default!; [Dependency] private readonly BlindableSystem _blindableSystem = default!;

View File

@@ -1,3 +1,4 @@
using Content.Shared.Tag;
using Robust.Shared.Audio; using Robust.Shared.Audio;
namespace Content.Shared.Fluids.Components; namespace Content.Shared.Fluids.Components;
@@ -14,6 +15,8 @@ namespace Content.Shared.Fluids.Components;
public sealed class DrainComponent : Component public sealed class DrainComponent : Component
{ {
public const string SolutionName = "drainBuffer"; public const string SolutionName = "drainBuffer";
[ValidatePrototypeId<TagPrototype>]
public const string PlungerTag = "Plunger"; public const string PlungerTag = "Plunger";
[DataField("accumulator")] [DataField("accumulator")]

View File

@@ -1,4 +1,4 @@
using Robust.Shared.Network; using Content.Shared.Roles;
using Robust.Shared.Replays; using Robust.Shared.Replays;
using Robust.Shared.Serialization; using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Mapping;
@@ -13,7 +13,9 @@ namespace Content.Shared.GameTicking
// See ideally these would be pulled from the job definition or something. // See ideally these would be pulled from the job definition or something.
// But this is easier, and at least it isn't hardcoded. // But this is easier, and at least it isn't hardcoded.
//TODO: Move these, they really belong in StationJobsSystem or a cvar. //TODO: Move these, they really belong in StationJobsSystem or a cvar.
[ValidatePrototypeId<JobPrototype>]
public const string FallbackOverflowJob = "Passenger"; public const string FallbackOverflowJob = "Passenger";
public const string FallbackOverflowJobName = "job-name-passenger"; public const string FallbackOverflowJobName = "job-name-passenger";
// TODO network. // TODO network.

View File

@@ -1,8 +1,13 @@
using Content.Shared.Humanoid.Markings;
namespace Content.Shared.Humanoid namespace Content.Shared.Humanoid
{ {
public static class HairStyles public static class HairStyles
{ {
[ValidatePrototypeId<MarkingPrototype>]
public const string DefaultHairStyle = "HairBald"; public const string DefaultHairStyle = "HairBald";
[ValidatePrototypeId<MarkingPrototype>]
public const string DefaultFacialHairStyle = "FacialHairShaved"; public const string DefaultFacialHairStyle = "FacialHairShaved";
public static readonly IReadOnlyList<Color> RealisticHairColors = new List<Color> public static readonly IReadOnlyList<Color> RealisticHairColors = new List<Color>

View File

@@ -2,7 +2,6 @@ using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes; using Content.Shared.Humanoid.Prototypes;
using Robust.Shared.GameStates; using Robust.Shared.GameStates;
using Robust.Shared.Prototypes; using Robust.Shared.Prototypes;
using Robust.Shared.Utility;
using System.Linq; using System.Linq;
using Content.Shared.Preferences; using Content.Shared.Preferences;
using Robust.Shared.GameObjects.Components.Localization; using Robust.Shared.GameObjects.Components.Localization;
@@ -25,6 +24,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly MarkingManager _markingManager = default!; [Dependency] private readonly MarkingManager _markingManager = default!;
[ValidatePrototypeId<SpeciesPrototype>]
public const string DefaultSpecies = "Human"; public const string DefaultSpecies = "Human";
public override void Initialize() public override void Initialize()

View File

@@ -4,20 +4,21 @@ namespace Content.Shared.Speech.EntitySystems;
public abstract class SharedStutteringSystem : EntitySystem public abstract class SharedStutteringSystem : EntitySystem
{ {
[ValidatePrototypeId<StatusEffectPrototype>]
public const string StutterKey = "Stutter"; public const string StutterKey = "Stutter";
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!; [Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
// For code in shared... I imagine we ain't getting accent prediction anytime soon so let's not bother. // For code in shared... I imagine we ain't getting accent prediction anytime soon so let's not bother.
public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null) public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null)
{ {
} }
public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved) public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved)
{ {
_statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved)); _statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved));
} }
public void DoRemoveStutter(EntityUid uid, double timeRemoved) public void DoRemoveStutter(EntityUid uid, double timeRemoved)
{ {
_statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey); _statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey);