Inline GetComponentOrNull
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.Smoking;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Client.Smoking
|
||||
@@ -38,7 +39,7 @@ namespace Content.Client.Smoking
|
||||
|
||||
private void SetState(AppearanceComponent component, SmokableState burnState)
|
||||
{
|
||||
var clothing = component.Owner.GetComponentOrNull<ClothingComponent>();
|
||||
var clothing = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<ClothingComponent>(component.Owner.Uid);
|
||||
|
||||
if (component.Owner.TryGetComponent<ISpriteComponent>(out var sprite))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user