Extracts magic strings from Tag calls (#36305)
* Extracts magic strings from Tag calls When #36281 gets merged, the `TagSystem` methods will all give warnings. Let's fix those warnings before they even happen! * Adds missing libraries * Remove not yet implemented TagSystem changes * Fix tag spelling error Genuinely surprised there was only 1! * Styling and proper type changes * Styling Co-authored-by: Tayrtahn <tayrtahn@gmail.com> --------- Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@ using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Revenant.EntitySystems;
|
||||
|
||||
@@ -44,6 +45,8 @@ public sealed partial class RevenantSystem
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> WindowTag = "Window";
|
||||
|
||||
private void InitializeAbilities()
|
||||
{
|
||||
SubscribeLocalEvent<RevenantComponent, UserActivateInWorldEvent>(OnInteract);
|
||||
@@ -253,7 +256,7 @@ public sealed partial class RevenantSystem
|
||||
foreach (var ent in lookup)
|
||||
{
|
||||
//break windows
|
||||
if (tags.HasComponent(ent) && _tag.HasTag(ent, "Window"))
|
||||
if (tags.HasComponent(ent) && _tag.HasTag(ent, WindowTag))
|
||||
{
|
||||
//hardcoded damage specifiers til i die.
|
||||
var dspec = new DamageSpecifier();
|
||||
|
||||
Reference in New Issue
Block a user