medical scanner machine upgrading (#12487)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Timing;
|
||||
using Content.Server.Medical.Components;
|
||||
using Content.Server.Cloning.Components;
|
||||
using Content.Server.Power.Components;
|
||||
@@ -17,7 +16,7 @@ using Content.Shared.Cloning;
|
||||
using Content.Shared.MachineLinking.Events;
|
||||
using Content.Shared.IdentityManagement;
|
||||
|
||||
namespace Content.Server.Cloning.Systems
|
||||
namespace Content.Server.Cloning
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class CloningConsoleSystem : EntitySystem
|
||||
@@ -130,10 +129,12 @@ namespace Content.Server.Cloning.Systems
|
||||
if (!consoleComponent.CloningPodInRange || !consoleComponent.GeneticScannerInRange)
|
||||
return;
|
||||
|
||||
if (scannerComp.BodyContainer.ContainedEntity is null)
|
||||
var body = scannerComp.BodyContainer.ContainedEntity;
|
||||
|
||||
if (body is null)
|
||||
return;
|
||||
|
||||
if (!TryComp<MindComponent>(scannerComp.BodyContainer.ContainedEntity.Value, out var mindComp))
|
||||
if (!TryComp<MindComponent>(body, out var mindComp))
|
||||
return;
|
||||
|
||||
var mind = mindComp.Mind;
|
||||
@@ -141,7 +142,7 @@ namespace Content.Server.Cloning.Systems
|
||||
if (mind == null || mind.UserId.HasValue == false || mind.Session == null)
|
||||
return;
|
||||
|
||||
bool cloningSuccessful = _cloningSystem.TryCloning(cloningPodUid, scannerComp.BodyContainer.ContainedEntity.Value, mind, cloningPod);
|
||||
_cloningSystem.TryCloning(cloningPodUid, body.Value, mind, cloningPod, scannerComp.CloningFailChanceMultiplier);
|
||||
}
|
||||
|
||||
public void RecheckConnections(EntityUid console, EntityUid? cloningPod, EntityUid? scanner, CloningConsoleComponent? consoleComp = null)
|
||||
|
||||
Reference in New Issue
Block a user