]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Forbid string literals for `SharedActionsSystem` methods (#38472)
authorTayrtahn <tayrtahn@gmail.com>
Fri, 20 Jun 2025 22:11:12 +0000 (18:11 -0400)
committerGitHub <noreply@github.com>
Fri, 20 Jun 2025 22:11:12 +0000 (00:11 +0200)
Forbid string literals for SharedActionsSystem methods

Content.Shared/Actions/SharedActionsSystem.cs

index 6490dc3c0a5723b5eb6470e7be3034fd43d42f17..333d87157d04c14bde1be9b057eba8b652318c88 100644 (file)
@@ -579,7 +579,7 @@ public abstract class SharedActionsSystem : EntitySystem
     #region AddRemoveActions
 
     public EntityUid? AddAction(EntityUid performer,
-        string? actionPrototypeId,
+        [ForbidLiteral] string? actionPrototypeId,
         EntityUid container = default,
         ActionsComponent? component = null)
     {
@@ -599,7 +599,7 @@ public abstract class SharedActionsSystem : EntitySystem
     /// <param name="container">The entity that contains/enables this action (e.g., flashlight).</param>
     public bool AddAction(EntityUid performer,
         [NotNullWhen(true)] ref EntityUid? actionId,
-        string? actionPrototypeId,
+        [ForbidLiteral] string? actionPrototypeId,
         EntityUid container = default,
         ActionsComponent? component = null)
     {
@@ -610,7 +610,7 @@ public abstract class SharedActionsSystem : EntitySystem
     public bool AddAction(EntityUid performer,
         [NotNullWhen(true)] ref EntityUid? actionId,
         [NotNullWhen(true)] out ActionComponent? action,
-        string? actionPrototypeId,
+        [ForbidLiteral] string? actionPrototypeId,
         EntityUid container = default,
         ActionsComponent? component = null)
     {