2020-05-01 23:34:04 -05:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using Content.Shared.Chemistry;
|
|
|
|
|
|
using Content.Shared.GameObjects;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
|
|
|
|
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Kitchen
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-05-03 01:34:00 -05:00
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public class MicrowaveEjectSolidIndexedMessage : BoundUserInterfaceMessage
|
|
|
|
|
|
{
|
|
|
|
|
|
|
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]
|
|
|
|
|
|
public class MicrowaveVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
public Solution.ReagentQuantity ReagentQuantity;
|
|
|
|
|
|
public MicrowaveVaporizeReagentIndexedMessage(Solution.ReagentQuantity reagentQuantity)
|
|
|
|
|
|
{
|
|
|
|
|
|
ReagentQuantity = reagentQuantity;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-05-03 23:58:29 -05:00
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public class MicrowaveSelectCookTimeMessage : BoundUserInterfaceMessage
|
|
|
|
|
|
{
|
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]
|
2020-05-03 01:34:00 -05:00
|
|
|
|
public class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState
|
2020-05-01 23:34:04 -05:00
|
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
|
public Solution.ReagentQuantity[] ReagentQuantities;
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
public MicrowaveUpdateUserInterfaceState(Solution.ReagentQuantity[] reagents, EntityUid[] containedSolids,
|
|
|
|
|
|
bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime)
|
2020-05-01 23:34:04 -05:00
|
|
|
|
{
|
2020-05-28 15:28:35 -05:00
|
|
|
|
ReagentQuantities = reagents;
|
|
|
|
|
|
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,
|
|
|
|
|
|
Cooking
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[NetSerializable, Serializable]
|
|
|
|
|
|
public enum MicrowaveUiKey
|
|
|
|
|
|
{
|
|
|
|
|
|
Key
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|