Fixes power components (#39)
Fixes the power components not having node set if they get a node added as a component in OnAdd()
This commit is contained in:
committed by
Pieter-Jan Briers
parent
7554d51b0a
commit
98bd1552b9
@@ -93,6 +93,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
if (!Owner.TryGetComponent(out PowerNodeComponent node))
|
||||
{
|
||||
Owner.AddComponent<PowerNodeComponent>();
|
||||
node = Owner.GetComponent<PowerNodeComponent>();
|
||||
}
|
||||
node.OnPowernetConnect += PowernetConnect;
|
||||
node.OnPowernetDisconnect += PowernetDisconnect;
|
||||
|
||||
Reference in New Issue
Block a user