From c8ad050c69bffc7a832a64fdb1a52ccc8bb28610 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Sat, 23 Nov 2024 09:35:56 +0000 Subject: [PATCH] allow cloning living people (#932) * allow cloning living people * fix client --------- Co-authored-by: deltanedas <@deltanedas:kde.org> --- Content.Server/Cloning/CloningConsoleSystem.cs | 2 +- Content.Server/Cloning/CloningSystem.cs | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Content.Server/Cloning/CloningConsoleSystem.cs b/Content.Server/Cloning/CloningConsoleSystem.cs index ad0d642f54..8e8bf9ca83 100644 --- a/Content.Server/Cloning/CloningConsoleSystem.cs +++ b/Content.Server/Cloning/CloningConsoleSystem.cs @@ -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; } diff --git a/Content.Server/Cloning/CloningSystem.cs b/Content.Server/Cloning/CloningSystem.cs index ab593b607c..4b7dfc7082 100644 --- a/Content.Server/Cloning/CloningSystem.cs +++ b/Content.Server/Cloning/CloningSystem.cs @@ -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);