2020-10-30 01:16:26 +01:00
|
|
|
|
#nullable enable
|
2020-10-10 15:25:13 +02:00
|
|
|
|
using Content.Client.GameObjects.Components.Disposal;
|
|
|
|
|
|
using Content.Client.GameObjects.Components.MedicalScanner;
|
|
|
|
|
|
using Content.Shared.GameObjects.Components.Body;
|
2020-10-14 15:24:07 +02:00
|
|
|
|
using Content.Shared.Interfaces.GameObjects.Components;
|
2020-10-10 15:25:13 +02:00
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.GameObjects.Components.Body
|
|
|
|
|
|
{
|
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
|
[ComponentReference(typeof(IBody))]
|
2020-10-14 15:24:07 +02:00
|
|
|
|
public class BodyComponent : SharedBodyComponent, IDraggable
|
2020-10-10 15:25:13 +02:00
|
|
|
|
{
|
2020-10-14 15:24:07 +02:00
|
|
|
|
public bool CanDrop(CanDropEventArgs eventArgs)
|
2020-10-10 15:25:13 +02:00
|
|
|
|
{
|
|
|
|
|
|
if (eventArgs.Target.HasComponent<DisposalUnitComponent>() ||
|
2020-10-30 01:16:26 +01:00
|
|
|
|
eventArgs.Target.HasComponent<MedicalScannerComponent>() ||
|
|
|
|
|
|
eventArgs.Target.HasComponent<DisposalMailingUnitComponent>())
|
2020-10-10 15:25:13 +02:00
|
|
|
|
{
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|