Wires refactor (#7699)

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
Flipp Syder
2022-05-05 19:35:06 -07:00
committed by GitHub
parent 39a35641ab
commit 2c6158e115
51 changed files with 2656 additions and 1660 deletions

View File

@@ -14,7 +14,7 @@ using Robust.Shared.Input;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using static Content.Shared.Wires.SharedWiresComponent;
using Robust.Shared.Random;
using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Content.Client.Wires.UI
@@ -267,7 +267,16 @@ namespace Content.Client.Wires.UI
_statusContainer.RemoveAllChildren();
foreach (var status in state.Statuses)
var originalStatuses = new List<StatusEntry>(state.Statuses); // TODO: maybe not this way?
var shuffledStatuses = new List<StatusEntry>();
for (var i = originalStatuses.Count; i > 0; i--)
{
var index = random.Next(originalStatuses.Count);
shuffledStatuses.Add(originalStatuses[index]);
originalStatuses.RemoveAt(index);
}
foreach (var status in shuffledStatuses)
{
if (status.Value is StatusLightData statusLightData)
{