Files
tbd-station-14/Content.Shared/GameObjects/Components/SharedWiresComponent.cs
DamianX 36078382e4 Airlock hacking (#329)
* Airlock hacking

* Added status text

* Whoops don't need this

* Update Content.Server/GameObjects/Components/Doors/AirlockComponent.cs

Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* ComponentReference ServerDoorComponent

* Suggested name
2019-09-06 10:05:02 +02:00

75 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components
{
public class SharedWiresComponent : Component
{
public override string Name => "Wires";
[Serializable, NetSerializable]
public enum WiresVisuals
{
MaintenancePanelState
}
[Serializable, NetSerializable]
public enum WiresUiKey
{
Key,
}
[Serializable, NetSerializable]
public enum WiresAction
{
Mend,
Cut,
Pulse,
}
[Serializable, NetSerializable]
public class WiresBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly List<ClientWire> WiresList;
public readonly List<string> Statuses;
public WiresBoundUserInterfaceState(List<ClientWire> wiresList, List<string> statuses)
{
WiresList = wiresList;
Statuses = statuses;
}
}
[Serializable, NetSerializable]
public class ClientWire
{
public Guid Guid;
public Color Color;
public bool IsCut;
public ClientWire(Guid guid, Color color, bool isCut)
{
Guid = guid;
Color = color;
IsCut = isCut;
}
}
[Serializable, NetSerializable]
public class WiresActionMessage : BoundUserInterfaceMessage
{
public readonly Guid Guid;
public readonly WiresAction Action;
public WiresActionMessage(Guid guid, WiresAction action)
{
Guid = guid;
Action = action;
}
}
}
}