Co-authored-by: Vera Aguilera Puerto <gradientvera@outlook.com>
This commit is contained in:
@@ -22,6 +22,7 @@ namespace Content.Server.NodeContainer.EntitySystems
|
||||
SubscribeLocalEvent<NodeContainerComponent, ComponentStartup>(OnStartupEvent);
|
||||
SubscribeLocalEvent<NodeContainerComponent, ComponentShutdown>(OnShutdownEvent);
|
||||
SubscribeLocalEvent<NodeContainerComponent, AnchorStateChangedEvent>(OnAnchorStateChanged);
|
||||
SubscribeLocalEvent<NodeContainerComponent, ReAnchorEvent>(OnReAnchor);
|
||||
SubscribeLocalEvent<NodeContainerComponent, RotateEvent>(OnRotateEvent);
|
||||
SubscribeLocalEvent<NodeContainerComponent, ExaminedEvent>(OnExamine);
|
||||
}
|
||||
@@ -71,6 +72,15 @@ namespace Content.Server.NodeContainer.EntitySystems
|
||||
}
|
||||
}
|
||||
|
||||
private void OnReAnchor(EntityUid uid, NodeContainerComponent component, ref ReAnchorEvent args)
|
||||
{
|
||||
foreach (var node in component.Nodes.Values)
|
||||
{
|
||||
_nodeGroupSystem.QueueNodeRemove(node);
|
||||
_nodeGroupSystem.QueueReflood(node);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnRotateEvent(EntityUid uid, NodeContainerComponent container, ref RotateEvent ev)
|
||||
{
|
||||
if (ev.NewRotation == ev.OldRotation)
|
||||
|
||||
Reference in New Issue
Block a user