Remove component.Initialize calls (#18230)

This commit is contained in:
metalgearsloth
2023-07-26 22:37:52 +10:00
committed by GitHub
parent 32d8fd2cc7
commit b478d5326b
9 changed files with 91 additions and 153 deletions

View File

@@ -25,21 +25,10 @@ namespace Content.Server.Power.Components
public TNetType? Net { get => _net; set => SetNet(value); }
private TNetType? _net;
[ViewVariables]
private bool _needsNet => _net != null;
[ViewVariables] public bool NeedsNet => _net != null;
[DataField("node")] public string? NodeId { get; set; }
protected override void Initialize()
{
base.Initialize();
if (_needsNet)
{
TryFindAndSetNet();
}
}
protected override void OnRemove()
{
ClearNet();