2021-10-03 00:43:47 +01:00
|
|
|
using System;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.DragDrop;
|
|
|
|
|
using Content.Shared.Nutrition.Components;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-02-18 14:49:50 +07:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-03 12:23:18 +01:00
|
|
|
using Robust.Shared.IoC;
|
2021-10-03 00:43:47 +01:00
|
|
|
using Robust.Shared.Serialization;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-02-18 14:49:50 +07:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Kitchen.Components
|
2021-02-18 14:49:50 +07:00
|
|
|
{
|
|
|
|
|
public abstract class SharedKitchenSpikeComponent : Component, IDragDropOn
|
|
|
|
|
{
|
2021-03-08 21:24:34 +11:00
|
|
|
[ViewVariables]
|
|
|
|
|
[DataField("delay")]
|
2022-02-18 15:57:42 -07:00
|
|
|
public float SpikeDelay = 7.0f;
|
2021-03-08 21:24:34 +11:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
[DataField("sound")]
|
2021-12-26 05:32:01 +03:00
|
|
|
public SoundSpecifier SpikeSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
|
2021-02-18 14:49:50 +07:00
|
|
|
|
2021-05-22 21:06:40 -07:00
|
|
|
bool IDragDropOn.CanDragDropOn(DragDropEvent eventArgs)
|
2021-02-18 14:49:50 +07:00
|
|
|
{
|
2021-12-03 15:53:09 +01:00
|
|
|
if (!IoCManager.Resolve<IEntityManager>().HasComponent<SharedButcherableComponent>(eventArgs.Dragged))
|
2021-02-18 14:49:50 +07:00
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-08 21:24:34 +11:00
|
|
|
// TODO: Once we get silicons need to check organic
|
2021-05-17 02:12:17 -07:00
|
|
|
return true;
|
2021-02-18 14:49:50 +07:00
|
|
|
}
|
|
|
|
|
|
2021-05-22 21:06:40 -07:00
|
|
|
public abstract bool DragDropOn(DragDropEvent eventArgs);
|
2021-10-03 00:43:47 +01:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum KitchenSpikeVisuals : byte
|
|
|
|
|
{
|
|
|
|
|
Status
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum KitchenSpikeStatus : byte
|
|
|
|
|
{
|
|
|
|
|
Empty,
|
|
|
|
|
Bloody
|
|
|
|
|
}
|
2021-02-18 14:49:50 +07:00
|
|
|
}
|
|
|
|
|
}
|