[Add] Adds uncloneable trait (#16688)
This commit is contained in:
@@ -38,6 +38,7 @@ using Content.Shared.Emag.Systems;
|
||||
using Robust.Shared.Audio;
|
||||
using System.Runtime.InteropServices;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Traits.Assorted;
|
||||
|
||||
namespace Content.Server.Cloning
|
||||
{
|
||||
@@ -194,6 +195,16 @@ namespace Content.Server.Cloning
|
||||
if (_configManager.GetCVar(CCVars.BiomassEasyMode))
|
||||
cloningCost = (int) Math.Round(cloningCost * EasyModeCloningCost);
|
||||
|
||||
// Check if they have the uncloneable trait
|
||||
if (TryComp<UncloneableComponent>(bodyToClone, out _))
|
||||
{
|
||||
if (clonePod.ConnectedConsole != null)
|
||||
_chatSystem.TrySendInGameICMessage(clonePod.ConnectedConsole.Value,
|
||||
Loc.GetString("cloning-console-uncloneable-trait-error"),
|
||||
InGameICChatType.Speak, false);
|
||||
return false;
|
||||
}
|
||||
|
||||
// biomass checks
|
||||
var biomassAmount = _material.GetMaterialAmount(uid, clonePod.RequiredMaterial);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user