Predict dumping (#32394)
* 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
This commit is contained in:
25
Content.Client/Configurable/ConfigurationSystem.cs
Normal file
25
Content.Client/Configurable/ConfigurationSystem.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user