Files
OldThink/Content.Client/Materials/MaterialStorageSystem.cs

21 lines
653 B
C#
Raw Normal View History

using Content.Shared.Materials;
using Robust.Client.GameObjects;
namespace Content.Client.Materials;
/// <summary>
/// This handles...
/// </summary>
public sealed class MaterialStorageSystem : SharedMaterialStorageSystem
{
[Dependency] private readonly TransformSystem _transform = default!;
2022-10-09 14:16:10 -04:00
public override bool TryInsertMaterialEntity(EntityUid user, EntityUid toInsert, EntityUid receiver, MaterialStorageComponent? component = null)
{
2022-10-09 14:16:10 -04:00
if (!base.TryInsertMaterialEntity(user, toInsert, receiver, component))
return false;
_transform.DetachParentToNull(Transform(toInsert));
2022-10-09 14:16:10 -04:00
return true;
}
}