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

99 lines
2.8 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()]
2020-05-01 23:34:04 -05:00
public class SharedMicrowaveComponent : Component
{
[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
}
}
[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;
}
}
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
{
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)
2020-05-01 23:34:04 -05:00
{
ReagentQuantities = reagents;
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
}
}