Wire hacking is now fancy.
1. new UI 2. wires are correctly randomized. 3. wires layouts are shared across machines in the same round.
This commit is contained in:
@@ -1,17 +1,11 @@
|
||||
using System;
|
||||
using Robust.Client.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
using static Content.Shared.GameObjects.Components.SharedWiresComponent;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Wires
|
||||
{
|
||||
public class WiresBoundUserInterface : BoundUserInterface
|
||||
{
|
||||
#pragma warning disable 649
|
||||
[Dependency] private readonly ILocalizationManager _localizationManager;
|
||||
#pragma warning restore 649
|
||||
public WiresBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
|
||||
{
|
||||
}
|
||||
@@ -21,7 +15,7 @@ namespace Content.Client.GameObjects.Components.Wires
|
||||
protected override void Open()
|
||||
{
|
||||
base.Open();
|
||||
_menu = new WiresMenu(_localizationManager) {Owner = this};
|
||||
_menu = new WiresMenu(this);
|
||||
|
||||
_menu.OnClose += Close;
|
||||
_menu.OpenCentered();
|
||||
@@ -33,9 +27,16 @@ namespace Content.Client.GameObjects.Components.Wires
|
||||
_menu.Populate((WiresBoundUserInterfaceState) state);
|
||||
}
|
||||
|
||||
public void PerformAction(Guid guid, WiresAction action)
|
||||
public void PerformAction(int id, WiresAction action)
|
||||
{
|
||||
SendMessage(new WiresActionMessage(guid, action));
|
||||
SendMessage(new WiresActionMessage(id, action));
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
|
||||
_menu.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user