[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);
|
||||
|
||||
|
||||
10
Content.Server/Traits/Assorted/UncloneableComponent.cs
Normal file
10
Content.Server/Traits/Assorted/UncloneableComponent.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
|
||||
/// <summary>
|
||||
/// This is used for the uncloneable trait.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class UncloneableComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
@@ -26,4 +26,5 @@ cloning-console-component-msg-no-cloner = Not Ready: No Cloner Detected
|
||||
cloning-console-component-msg-no-mind = Not Ready: No Soul Activity Detected
|
||||
|
||||
cloning-console-chat-error = ERROR: INSUFFICIENT BIOMASS. CLONING THIS BODY REQUIRES {$units} UNITS OF BIOMASS.
|
||||
cloning-console-uncloneable-trait-error = ERROR: SOUL IS ABSENT, CLONING IS IMPOSSIBLE.
|
||||
cloning-console-cellular-warning = WARNING: GENEFSCK CONFIDENCE SCORE IS {$percent}%. CLONING MAY HAVE UNEXPECTED RESULTS.
|
||||
|
||||
@@ -16,3 +16,6 @@ trait-muted-desc = You can't speak
|
||||
|
||||
trait-paracusia-name = Paracusia
|
||||
trait-paracusia-desc = You hear sounds that aren't really there
|
||||
|
||||
trait-uncloneable-name = Uncloneable
|
||||
trait-uncloneable-desc = Cannot be cloned
|
||||
|
||||
@@ -42,3 +42,10 @@
|
||||
description: trait-muted-desc
|
||||
components:
|
||||
- type: Muted
|
||||
|
||||
- type: trait
|
||||
id: Uncloneable
|
||||
name: trait-uncloneable-name
|
||||
description: trait-uncloneable-desc
|
||||
components:
|
||||
- type: Uncloneable
|
||||
|
||||
Reference in New Issue
Block a user