Re-organize all projects (#4166)
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#nullable enable
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Robust.Shared.GameObjects;
|
||||
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 string? SpikeSound = "/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);
|
||||
}
|
||||
}
|
||||
101
Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs
Normal file
101
Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs
Normal file
@@ -0,0 +1,101 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Chemistry.Solution;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Kitchen.Components
|
||||
{
|
||||
|
||||
public class SharedMicrowaveComponent : Component
|
||||
{
|
||||
|
||||
public override string Name => "Microwave";
|
||||
public override uint? NetID => ContentNetIDs.MICROWAVE;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class MicrowaveStartCookMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public MicrowaveStartCookMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class MicrowaveEjectMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public MicrowaveEjectMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class MicrowaveEjectSolidIndexedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
|
||||
public EntityUid EntityID;
|
||||
public MicrowaveEjectSolidIndexedMessage(EntityUid entityID)
|
||||
{
|
||||
EntityID = entityID;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class MicrowaveVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
|
||||
public Solution.ReagentQuantity ReagentQuantity;
|
||||
public MicrowaveVaporizeReagentIndexedMessage(Solution.ReagentQuantity reagentQuantity)
|
||||
{
|
||||
ReagentQuantity = reagentQuantity;
|
||||
}
|
||||
}
|
||||
[Serializable, NetSerializable]
|
||||
public class MicrowaveSelectCookTimeMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public int ButtonIndex;
|
||||
public uint NewCookTime;
|
||||
public MicrowaveSelectCookTimeMessage(int buttonIndex, uint inputTime)
|
||||
{
|
||||
ButtonIndex = buttonIndex;
|
||||
NewCookTime = inputTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState
|
||||
{
|
||||
public Solution.ReagentQuantity[] ReagentQuantities;
|
||||
public EntityUid[] ContainedSolids;
|
||||
public bool IsMicrowaveBusy;
|
||||
public int ActiveButtonIndex;
|
||||
public uint CurrentCookTime;
|
||||
|
||||
public MicrowaveUpdateUserInterfaceState(Solution.ReagentQuantity[] reagents, EntityUid[] containedSolids,
|
||||
bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime)
|
||||
{
|
||||
ReagentQuantities = reagents;
|
||||
ContainedSolids = containedSolids;
|
||||
IsMicrowaveBusy = isMicrowaveBusy;
|
||||
ActiveButtonIndex = activeButtonIndex;
|
||||
CurrentCookTime = currentCookTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum MicrowaveVisualState
|
||||
{
|
||||
Idle,
|
||||
Cooking
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public enum MicrowaveUiKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.Chemistry.Solution;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Kitchen.Components
|
||||
{
|
||||
public abstract class SharedReagentGrinderComponent : Component
|
||||
{
|
||||
public override string Name => "ReagentGrinder";
|
||||
public override uint? NetID => ContentNetIDs.REAGENT_GRINDER;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderGrindStartMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public ReagentGrinderGrindStartMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderJuiceStartMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public ReagentGrinderJuiceStartMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderEjectChamberAllMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public ReagentGrinderEjectChamberAllMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderEjectBeakerMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public ReagentGrinderEjectBeakerMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderEjectChamberContentMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public EntityUid EntityID;
|
||||
public ReagentGrinderEjectChamberContentMessage(EntityUid entityID)
|
||||
{
|
||||
EntityID = entityID;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public Solution.ReagentQuantity ReagentQuantity;
|
||||
public ReagentGrinderVaporizeReagentIndexedMessage(Solution.ReagentQuantity reagentQuantity)
|
||||
{
|
||||
ReagentQuantity = reagentQuantity;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderWorkStartedMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public GrinderProgram GrinderProgram;
|
||||
public ReagentGrinderWorkStartedMessage(GrinderProgram grinderProgram)
|
||||
{
|
||||
GrinderProgram = grinderProgram;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class ReagentGrinderWorkCompleteMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public ReagentGrinderWorkCompleteMessage()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum ReagentGrinderVisualState : byte
|
||||
{
|
||||
BeakerAttached
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public enum ReagentGrinderUiKey : byte
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum GrinderProgram : byte
|
||||
{
|
||||
Grind,
|
||||
Juice
|
||||
}
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public sealed class ReagentGrinderInterfaceState : BoundUserInterfaceState
|
||||
{
|
||||
public bool IsBusy;
|
||||
public bool HasBeakerIn;
|
||||
public bool Powered;
|
||||
public bool CanJuice;
|
||||
public bool CanGrind;
|
||||
public EntityUid[] ChamberContents;
|
||||
public Solution.ReagentQuantity[]? ReagentQuantities;
|
||||
public ReagentGrinderInterfaceState(bool isBusy, bool hasBeaker, bool powered, bool canJuice, bool canGrind, EntityUid[] chamberContents, Solution.ReagentQuantity[]? heldBeakerContents)
|
||||
{
|
||||
IsBusy = isBusy;
|
||||
HasBeakerIn = hasBeaker;
|
||||
Powered = powered;
|
||||
CanJuice = canJuice;
|
||||
CanGrind = canGrind;
|
||||
ChamberContents = chamberContents;
|
||||
ReagentQuantities = heldBeakerContents;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user