Files
tbd-station-14/Content.Shared/Administration/EditSolutionsEuiState.cs
Pieter-Jan Briers 3a2cd95d7f Fix solution editor UI (#24004)
Fixes #23645

The problem is that the solution editor UI is an EUI, so the UI updates before the game states are applied.

A correct fix would be to move it to a BUI in some way, but that's a little involved as we don't really have pre-existing code that uses BUIs in a manner good for this. I decided against this because I realized we'd want to have more tools similar to this and tbh I kinda figured integrating it with VV would be a better fix instead, so...

This is a bad workaround to manually synchronize the UI updates against game timing. It's not pretty but it works.
2024-01-13 15:52:42 +11:00

22 lines
604 B
C#

using Content.Shared.Eui;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
namespace Content.Shared.Administration
{
[Serializable, NetSerializable]
public sealed class EditSolutionsEuiState : EuiStateBase
{
public readonly NetEntity Target;
public readonly List<(string, NetEntity)>? Solutions;
public readonly GameTick Tick;
public EditSolutionsEuiState(NetEntity target, List<(string, NetEntity)>? solutions, GameTick tick)
{
Target = target;
Solutions = solutions;
Tick = tick;
}
}
}