[tweak] Sleeping while cloning

# Conflicts:
#	Content.Server/Cloning/CloningSystem.cs
This commit is contained in:
rhailrake
2023-04-26 01:26:24 +06:00
committed by Remuchi
parent 20c1628913
commit 122988d384

View File

@@ -14,6 +14,7 @@ using Content.Server.Traits.Assorted;
using Content.Shared.Atmos;
using Content.Shared.CCVar;
using Content.Shared.Chemistry.Components;
using Content.Shared.Bed.Sleep;
using Content.Shared.Cloning;
using Content.Shared.Damage;
using Content.Shared.DeviceLinking.Events;
@@ -261,6 +262,10 @@ namespace Content.Server.Cloning
AddComp<ActiveCloningPodComponent>(uid);
//WD-EDIT
AddComp<ForcedSleepingComponent>(mob);
//WD-EDIT
// TODO: Ideally, components like this should be components on the mind entity so this isn't necessary.
// Add on special job components to the mob.
if (_jobs.MindTryGetJob(mindEnt, out _, out var prototype))
@@ -330,6 +335,7 @@ namespace Content.Server.Cloning
clonePod.UsedBiomass = 0;
UpdateStatus(uid, CloningPodStatus.Idle, clonePod);
RemCompDeferred<ActiveCloningPodComponent>(uid);
RemComp<ForcedSleepingComponent>(entity); //WD-EDIT
}
private void EndFailedCloning(EntityUid uid, CloningPodComponent clonePod)