2021-02-27 04:12:09 +01:00
|
|
|
using System;
|
2021-09-06 15:49:44 +02:00
|
|
|
using Content.Shared.Chemistry.Components;
|
2020-05-01 23:34:04 -05:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-07-12 01:32:10 -07:00
|
|
|
using Robust.Shared.GameStates;
|
2020-08-13 14:40:27 +02:00
|
|
|
using Robust.Shared.Serialization;
|
2020-05-01 23:34:04 -05:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Shared.Kitchen.Components
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
|
|
|
|
|
2021-07-12 01:32:10 -07:00
|
|
|
[NetworkedComponent()]
|
2022-02-16 00:23:23 -07:00
|
|
|
public abstract class SharedMicrowaveComponent : Component
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveStartCookMessage : BoundUserInterfaceMessage
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
|
|
|
|
public MicrowaveStartCookMessage()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveEjectMessage : BoundUserInterfaceMessage
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
|
|
|
|
public MicrowaveEjectMessage()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-05-03 01:34:00 -05:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveEjectSolidIndexedMessage : BoundUserInterfaceMessage
|
2020-05-03 01:34:00 -05:00
|
|
|
{
|
|
|
|
|
|
2020-05-03 03:09:54 -05:00
|
|
|
public EntityUid EntityID;
|
|
|
|
|
public MicrowaveEjectSolidIndexedMessage(EntityUid entityID)
|
2020-05-03 01:34:00 -05:00
|
|
|
{
|
2020-05-03 03:09:54 -05:00
|
|
|
EntityID = entityID;
|
2020-05-03 01:34:00 -05:00
|
|
|
}
|
|
|
|
|
}
|
2020-05-06 17:45:45 -05:00
|
|
|
|
2020-05-04 15:16:16 -05:00
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
|
2020-05-04 15:16:16 -05:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public Solution.ReagentQuantity ReagentQuantity;
|
|
|
|
|
public MicrowaveVaporizeReagentIndexedMessage(Solution.ReagentQuantity reagentQuantity)
|
|
|
|
|
{
|
|
|
|
|
ReagentQuantity = reagentQuantity;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-05-03 23:58:29 -05:00
|
|
|
[Serializable, NetSerializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveSelectCookTimeMessage : BoundUserInterfaceMessage
|
2020-05-03 23:58:29 -05:00
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
public int ButtonIndex;
|
|
|
|
|
public uint NewCookTime;
|
|
|
|
|
public MicrowaveSelectCookTimeMessage(int buttonIndex, uint inputTime)
|
2020-05-03 23:58:29 -05:00
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
ButtonIndex = buttonIndex;
|
|
|
|
|
NewCookTime = inputTime;
|
2020-05-03 23:58:29 -05:00
|
|
|
}
|
|
|
|
|
}
|
2020-05-01 23:34:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[NetSerializable, Serializable]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
public EntityUid[] ContainedSolids;
|
2020-05-06 17:45:45 -05:00
|
|
|
public bool IsMicrowaveBusy;
|
2020-05-28 15:28:35 -05:00
|
|
|
public int ActiveButtonIndex;
|
|
|
|
|
public uint CurrentCookTime;
|
|
|
|
|
|
2022-02-12 17:53:54 -07:00
|
|
|
public MicrowaveUpdateUserInterfaceState(EntityUid[] containedSolids,
|
2020-05-28 15:28:35 -05:00
|
|
|
bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime)
|
2020-05-01 23:34:04 -05:00
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
ContainedSolids = containedSolids;
|
|
|
|
|
IsMicrowaveBusy = isMicrowaveBusy;
|
|
|
|
|
ActiveButtonIndex = activeButtonIndex;
|
|
|
|
|
CurrentCookTime = currentCookTime;
|
2020-05-01 23:34:04 -05:00
|
|
|
}
|
2020-05-28 15:28:35 -05:00
|
|
|
|
2020-05-01 23:34:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public enum MicrowaveVisualState
|
|
|
|
|
{
|
|
|
|
|
Idle,
|
2021-06-19 19:34:01 +00:00
|
|
|
Cooking,
|
|
|
|
|
Broken
|
2020-05-01 23:34:04 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[NetSerializable, Serializable]
|
|
|
|
|
public enum MicrowaveUiKey
|
|
|
|
|
{
|
|
|
|
|
Key
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|