* Transform the Cloning Pod visualizer into a generic enum visualizer for simple cases like it ...I find it helpful at times like these to remind myself that our true enemy is code. Code is what makes our programs run and generally is required for all of these machinations to function in any way at all... * Give the kitchen/meat spike a visualizer * GenericEnumVisualizer: Byteify enums, switch to TryGetComponent for sprite
51 lines
1.4 KiB
C#
51 lines
1.4 KiB
C#
using System;
|
|
using Content.Shared.DragDrop;
|
|
using Content.Shared.Nutrition.Components;
|
|
using Content.Shared.Sound;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Content.Shared.Kitchen.Components
|
|
{
|
|
public abstract class SharedKitchenSpikeComponent : Component, IDragDropOn
|
|
{
|
|
public override string Name => "KitchenSpike";
|
|
|
|
[ViewVariables]
|
|
[DataField("delay")]
|
|
protected float SpikeDelay = 12.0f;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
[DataField("sound")]
|
|
protected SoundSpecifier SpikeSound = new SoundPathSpecifier("/Audio/Effects/Fluids/splat.ogg");
|
|
|
|
bool IDragDropOn.CanDragDropOn(DragDropEvent eventArgs)
|
|
{
|
|
if (!eventArgs.Dragged.HasComponent<SharedButcherableComponent>())
|
|
{
|
|
return false;
|
|
}
|
|
|
|
// TODO: Once we get silicons need to check organic
|
|
return true;
|
|
}
|
|
|
|
public abstract bool DragDropOn(DragDropEvent eventArgs);
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum KitchenSpikeVisuals : byte
|
|
{
|
|
Status
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum KitchenSpikeStatus : byte
|
|
{
|
|
Empty,
|
|
Bloody
|
|
}
|
|
}
|
|
}
|