Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -5,7 +5,6 @@ using System.Numerics;
|
||||
using Content.Client.ContextMenu.UI;
|
||||
using Content.Client.Examine;
|
||||
using Content.Client.Guidebook.Richtext;
|
||||
using Content.Client.Verbs;
|
||||
using Content.Client.Verbs.UI;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Tag;
|
||||
@@ -37,7 +36,9 @@ public sealed partial class GuideEntityEmbed : BoxContainer, IDocumentTag
|
||||
|
||||
public bool Interactive;
|
||||
|
||||
public SpriteComponent? Sprite => View.Sprite;
|
||||
public Entity<SpriteComponent>? Sprite => View.Entity == null || View.Sprite == null
|
||||
? null
|
||||
: (View.Entity.Value, View.Sprite);
|
||||
|
||||
public Vector2 Scale
|
||||
{
|
||||
@@ -127,7 +128,7 @@ public sealed partial class GuideEntityEmbed : BoxContainer, IDocumentTag
|
||||
base.Dispose(disposing);
|
||||
|
||||
if (Sprite is not null)
|
||||
_entityManager.DeleteEntity(Sprite.Owner);
|
||||
_entityManager.DeleteEntity(Sprite);
|
||||
}
|
||||
|
||||
public bool TryParseTag(Dictionary<string, string> args, [NotNullWhen(true)] out Control? control)
|
||||
|
||||
Reference in New Issue
Block a user