fix(FieldGenerators): Add missing connection check (#30468)

.
This commit is contained in:
Brandon Hu
2024-08-07 03:43:21 +00:00
committed by GitHub
parent 9903d36c7d
commit 2dabf33d46

View File

@@ -117,7 +117,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
private void OnUnanchorAttempt(EntityUid uid, ContainmentFieldGeneratorComponent component, private void OnUnanchorAttempt(EntityUid uid, ContainmentFieldGeneratorComponent component,
UnanchorAttemptEvent args) UnanchorAttemptEvent args)
{ {
if (component.Enabled) if (component.Enabled || component.IsConnected)
{ {
_popupSystem.PopupEntity(Loc.GetString("comp-containment-anchor-warning"), args.User, args.User, PopupType.LargeCaution); _popupSystem.PopupEntity(Loc.GetString("comp-containment-anchor-warning"), args.User, args.User, PopupType.LargeCaution);
args.Cancel(); args.Cancel();