Guardians (Holo and holoclown) have syndicate faction ai (#19816)

This commit is contained in:
Whisper
2023-09-13 23:51:10 -04:00
committed by GitHub
parent a622844a5f
commit 1b3f4c3d7b
2 changed files with 12 additions and 11 deletions

View File

@@ -300,11 +300,6 @@ namespace Content.Server.Guardian
RetractGuardian(hostUid, hostComponent, guardianUid, guardianComponent);
}
private bool CanRelease(EntityUid guardian)
{
return HasComp<ActorComponent>(guardian);
}
private void ReleaseGuardian(EntityUid host, GuardianHostComponent hostComponent, EntityUid guardian, GuardianComponent guardianComponent)
{
if (guardianComponent.GuardianLoose)
@@ -313,12 +308,6 @@ namespace Content.Server.Guardian
return;
}
if (!CanRelease(guardian))
{
_popupSystem.PopupEntity(Loc.GetString("guardian-no-soul"), host, host);
return;
}
DebugTools.Assert(hostComponent.GuardianContainer.Contains(guardian));
hostComponent.GuardianContainer.Remove(guardian);
DebugTools.Assert(!hostComponent.GuardianContainer.Contains(guardian));