Lint more const string prototypes (#18922)
This commit is contained in:
@@ -20,7 +20,10 @@ public abstract class SharedChatSystem : EntitySystem
|
||||
public const char AdminPrefix = ']';
|
||||
public const char WhisperPrefix = ',';
|
||||
public const char DefaultChannelKey = 'h';
|
||||
|
||||
[ValidatePrototypeId<RadioChannelPrototype>]
|
||||
public const string CommonChannel = "Common";
|
||||
|
||||
public static string DefaultChannelPrefix = $"{RadioChannelPrefix}{DefaultChannelKey}";
|
||||
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Clothing.Components;
|
||||
using Content.Shared.Inventory.Events;
|
||||
|
||||
namespace Content.Shared.Chat.TypingIndicator;
|
||||
@@ -11,8 +11,9 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
|
||||
/// <summary>
|
||||
/// Default ID of <see cref="TypingIndicatorPrototype"/>
|
||||
/// </summary>
|
||||
[ValidatePrototypeId<TypingIndicatorPrototype>]
|
||||
public const string InitialIndicatorId = "default";
|
||||
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -25,7 +26,7 @@ public abstract class SharedTypingIndicatorSystem : EntitySystem
|
||||
if (!TryComp<ClothingComponent>(uid, out var clothing) ||
|
||||
!TryComp<TypingIndicatorComponent>(args.Equipee, out var indicator))
|
||||
return;
|
||||
|
||||
|
||||
var isCorrectSlot = clothing.Slots.HasFlag(args.SlotFlags);
|
||||
if (!isCorrectSlot) return;
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Content.Shared.Drunk;
|
||||
|
||||
public abstract class SharedDrunkSystem : EntitySystem
|
||||
{
|
||||
[ValidatePrototypeId<StatusEffectPrototype>]
|
||||
public const string DrunkKey = "Drunk";
|
||||
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffectsSystem = default!;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using Content.Shared.Eye.Blinding.Components;
|
||||
using Content.Shared.StatusEffect;
|
||||
|
||||
namespace Content.Shared.Eye.Blinding.Systems;
|
||||
|
||||
public sealed class TemporaryBlindnessSystem : EntitySystem
|
||||
{
|
||||
[ValidatePrototypeId<StatusEffectPrototype>]
|
||||
public const string BlindingStatusEffect = "TemporaryBlindness";
|
||||
|
||||
[Dependency] private readonly BlindableSystem _blindableSystem = default!;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Audio;
|
||||
|
||||
namespace Content.Shared.Fluids.Components;
|
||||
@@ -14,6 +15,8 @@ namespace Content.Shared.Fluids.Components;
|
||||
public sealed class DrainComponent : Component
|
||||
{
|
||||
public const string SolutionName = "drainBuffer";
|
||||
|
||||
[ValidatePrototypeId<TagPrototype>]
|
||||
public const string PlungerTag = "Plunger";
|
||||
|
||||
[DataField("accumulator")]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Robust.Shared.Network;
|
||||
using Content.Shared.Roles;
|
||||
using Robust.Shared.Replays;
|
||||
using Robust.Shared.Serialization;
|
||||
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.
|
||||
// But this is easier, and at least it isn't hardcoded.
|
||||
//TODO: Move these, they really belong in StationJobsSystem or a cvar.
|
||||
[ValidatePrototypeId<JobPrototype>]
|
||||
public const string FallbackOverflowJob = "Passenger";
|
||||
|
||||
public const string FallbackOverflowJobName = "job-name-passenger";
|
||||
|
||||
// TODO network.
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
using Content.Shared.Humanoid.Markings;
|
||||
|
||||
namespace Content.Shared.Humanoid
|
||||
{
|
||||
public static class HairStyles
|
||||
{
|
||||
[ValidatePrototypeId<MarkingPrototype>]
|
||||
public const string DefaultHairStyle = "HairBald";
|
||||
|
||||
[ValidatePrototypeId<MarkingPrototype>]
|
||||
public const string DefaultFacialHairStyle = "FacialHairShaved";
|
||||
|
||||
public static readonly IReadOnlyList<Color> RealisticHairColors = new List<Color>
|
||||
|
||||
@@ -2,7 +2,6 @@ using Content.Shared.Humanoid.Markings;
|
||||
using Content.Shared.Humanoid.Prototypes;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
using System.Linq;
|
||||
using Content.Shared.Preferences;
|
||||
using Robust.Shared.GameObjects.Components.Localization;
|
||||
@@ -25,6 +24,7 @@ public abstract class SharedHumanoidAppearanceSystem : EntitySystem
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
[Dependency] private readonly MarkingManager _markingManager = default!;
|
||||
|
||||
[ValidatePrototypeId<SpeciesPrototype>]
|
||||
public const string DefaultSpecies = "Human";
|
||||
|
||||
public override void Initialize()
|
||||
|
||||
@@ -4,20 +4,21 @@ namespace Content.Shared.Speech.EntitySystems;
|
||||
|
||||
public abstract class SharedStutteringSystem : EntitySystem
|
||||
{
|
||||
[ValidatePrototypeId<StatusEffectPrototype>]
|
||||
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.
|
||||
public virtual void DoStutter(EntityUid uid, TimeSpan time, bool refresh, StatusEffectsComponent? status = null)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public virtual void DoRemoveStutterTime(EntityUid uid, double timeRemoved)
|
||||
{
|
||||
_statusEffectsSystem.TryRemoveTime(uid, StutterKey, TimeSpan.FromSeconds(timeRemoved));
|
||||
}
|
||||
|
||||
|
||||
public void DoRemoveStutter(EntityUid uid, double timeRemoved)
|
||||
{
|
||||
_statusEffectsSystem.TryRemoveStatusEffect(uid, StutterKey);
|
||||
|
||||
Reference in New Issue
Block a user