* Predict dumping - This got soaped really fucking hard. - Dumping is predicted, this required disposals to be predicte.d - Disposals required mailing (because it's tightly coupled), and a smidge of other content systems. - I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict. * Fix a bunch of stuff * nasty merge * Some reviews * Some more reviews while I stash * Fix merge * Fix merge * Half of review * Review * re(h)f * lizards * feexes * feex
26 lines
793 B
C#
26 lines
793 B
C#
using Content.Client.Configurable.UI;
|
|
using Content.Shared.Configurable;
|
|
|
|
namespace Content.Client.Configurable;
|
|
|
|
public sealed class ConfigurationSystem : SharedConfigurationSystem
|
|
{
|
|
[Dependency] private readonly SharedUserInterfaceSystem _uiSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
SubscribeLocalEvent<ConfigurationComponent, AfterAutoHandleStateEvent>(OnConfigurationState);
|
|
}
|
|
|
|
private void OnConfigurationState(Entity<ConfigurationComponent> ent, ref AfterAutoHandleStateEvent args)
|
|
{
|
|
if (_uiSystem.TryGetOpenUi<ConfigurationBoundUserInterface>(ent.Owner,
|
|
ConfigurationComponent.ConfigurationUiKey.Key,
|
|
out var bui))
|
|
{
|
|
bui.Refresh(ent);
|
|
}
|
|
}
|
|
}
|