allow cloning living people (#932)

* allow cloning living people

* fix client

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas 2024-11-23 09:35:56 +00:00 committed by deltanedas
parent f8c086466c
commit c8ad050c69
2 changed files with 8 additions and 6 deletions

View File

@ -213,7 +213,7 @@ namespace Content.Server.Cloning
{
scanBodyInfo = MetaData(scanBody.Value).EntityName;
if (!_mobStateSystem.IsDead(scanBody.Value))
if (false) // GoobStation: Lets you clone living people
{
clonerStatus = ClonerStatus.ScannerOccupantAlive;
}

View File

@ -150,7 +150,8 @@ namespace Content.Server.Cloning
return false;
var mind = mindEnt.Comp;
if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
// GoobStation: Remove this logic entirely, infinite clone army
/*if (ClonesWaitingForMind.TryGetValue(mind, out var clone))
{
if (EntityManager.EntityExists(clone) &&
!_mobStateSystem.IsDead(clone) &&
@ -159,10 +160,11 @@ namespace Content.Server.Cloning
return false; // Mind already has clone
ClonesWaitingForMind.Remove(mind);
}
}*/
if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
return false; // Body controlled by mind is not dead
// GoobStation: Lets you clone living people
//if (mind.OwnedEntity != null && !_mobStateSystem.IsDead(mind.OwnedEntity.Value))
// return false; // Body controlled by mind is not dead
// Yes, we still need to track down the client because we need to open the Eui
if (mind.UserId == null || !_playerManager.TryGetSessionById(mind.UserId.Value, out var client))
@ -251,7 +253,7 @@ namespace Content.Server.Cloning
cloneMindReturn.Mind = mind;
cloneMindReturn.Parent = uid;
_containerSystem.Insert(mob, clonePod.BodyContainer);
ClonesWaitingForMind.Add(mind, mob);
//ClonesWaitingForMind.Add(mind, mob); // GoobStation
UpdateStatus(uid, CloningPodStatus.NoMind, clonePod);
_euiManager.OpenEui(new AcceptCloningEui(mindEnt, mind, this), client);