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-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-04 13:54:54 -04:00
|
|
|
|
public uint newCookTime;
|
|
|
|
|
|
public MicrowaveSelectCookTimeMessage(uint inputTime)
|
2020-05-03 23:58:29 -05:00
|
|
|
|
{
|
2020-05-04 13:54:54 -04:00
|
|
|
|
newCookTime = inputTime;
|
2020-05-03 23:58:29 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-05-01 23:34:04 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
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-04 14:39:33 -05:00
|
|
|
|
public readonly IReadOnlyList<Solution.ReagentQuantity> ReagentsReagents;
|
2020-05-03 01:34:00 -05:00
|
|
|
|
public readonly List<EntityUid> ContainedSolids;
|
2020-05-04 14:39:33 -05:00
|
|
|
|
public MicrowaveUpdateUserInterfaceState(IReadOnlyList<Solution.ReagentQuantity> reagents, List<EntityUid> solids)
|
2020-05-01 23:34:04 -05:00
|
|
|
|
{
|
2020-05-02 01:29:20 -05:00
|
|
|
|
ReagentsReagents = reagents;
|
|
|
|
|
|
ContainedSolids = solids;
|
2020-05-01 23:34:04 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public enum MicrowaveVisualState
|
|
|
|
|
|
{
|
|
|
|
|
|
Idle,
|
|
|
|
|
|
Cooking
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[NetSerializable, Serializable]
|
|
|
|
|
|
public enum MicrowaveUiKey
|
|
|
|
|
|
{
|
|
|
|
|
|
Key
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|