Fixes power wire action electrocution (#8520)

This commit is contained in:
Flipp Syder
2022-07-24 21:53:30 -07:00
committed by GitHub
parent 151ed21a95
commit fab5aed3b8
5 changed files with 111 additions and 46 deletions

View File

@@ -267,16 +267,8 @@ namespace Content.Client.Wires.UI
_statusContainer.RemoveAllChildren();
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)
foreach (var status in state.Statuses)
{
if (status.Value is StatusLightData statusLightData)
{