Files
crystall-punk-14/Content.Shared/Kitchen/Components/SharedMicrowaveComponent.cs

97 lines
2.7 KiB
C#
Raw Normal View History

using System;
using Content.Shared.Chemistry.Components;
2020-05-01 23:34:04 -05:00
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
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
{
[NetworkedComponent()]
public abstract class SharedMicrowaveComponent : Component
2020-05-01 23:34:04 -05:00
{
[Serializable, NetSerializable]
public sealed class MicrowaveStartCookMessage : BoundUserInterfaceMessage
2020-05-01 23:34:04 -05:00
{
public MicrowaveStartCookMessage()
{
}
}
[Serializable, NetSerializable]
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]
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
}
}
[Serializable, NetSerializable]
public sealed class MicrowaveVaporizeReagentIndexedMessage : BoundUserInterfaceMessage
{
public Solution.ReagentQuantity ReagentQuantity;
public MicrowaveVaporizeReagentIndexedMessage(Solution.ReagentQuantity reagentQuantity)
{
ReagentQuantity = reagentQuantity;
}
}
[Serializable, NetSerializable]
public sealed class MicrowaveSelectCookTimeMessage : BoundUserInterfaceMessage
{
public int ButtonIndex;
public uint NewCookTime;
public MicrowaveSelectCookTimeMessage(int buttonIndex, uint inputTime)
{
ButtonIndex = buttonIndex;
NewCookTime = inputTime;
}
}
2020-05-01 23:34:04 -05:00
}
[NetSerializable, Serializable]
public sealed class MicrowaveUpdateUserInterfaceState : BoundUserInterfaceState
2020-05-01 23:34:04 -05:00
{
public EntityUid[] ContainedSolids;
public bool IsMicrowaveBusy;
public int ActiveButtonIndex;
public uint CurrentCookTime;
2022-02-12 17:53:54 -07:00
public MicrowaveUpdateUserInterfaceState(EntityUid[] containedSolids,
bool isMicrowaveBusy, int activeButtonIndex, uint currentCookTime)
2020-05-01 23:34:04 -05:00
{
ContainedSolids = containedSolids;
IsMicrowaveBusy = isMicrowaveBusy;
ActiveButtonIndex = activeButtonIndex;
CurrentCookTime = currentCookTime;
2020-05-01 23:34:04 -05:00
}
2020-05-01 23:34:04 -05:00
}
[Serializable, NetSerializable]
public enum MicrowaveVisualState
{
Idle,
Cooking,
Broken
2020-05-01 23:34:04 -05:00
}
[NetSerializable, Serializable]
public enum MicrowaveUiKey
{
Key
}
}