* Wires!

* Use state instead of messages

* cleanup

* Update submodule

* actually fix conflict

* Maybe fix conflicts?

* Localized strings, removed hardcoded sprite path

* cleanup

* More localization and sounds
This commit is contained in:
DamianX
2019-09-01 22:15:34 +02:00
committed by Pieter-Jan Briers
parent 70e3cffa90
commit 264a63b7f6
11 changed files with 524 additions and 4 deletions

View File

@@ -0,0 +1,72 @@
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 WiresBoundUserInterfaceState(List<ClientWire> wiresList)
{
WiresList = wiresList;
}
}
[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;
}
}
}
}