Cloning Refactor and bugfixes (#35555)
* cloning refactor * cleanup and fixes * don't pick from 0 * give dwarves the correct species * fix dna and bloodstream reagent data cloning * don't copy helmets * be less redundant
This commit is contained in:
20
Content.Server/Traits/Assorted/UnrevivableSystem.cs
Normal file
20
Content.Server/Traits/Assorted/UnrevivableSystem.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Content.Shared.Cloning.Events;
|
||||
using Content.Shared.Traits.Assorted;
|
||||
|
||||
namespace Content.Server.Traits.Assorted;
|
||||
|
||||
public sealed class UnrevivableSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<UnrevivableComponent, CloningAttemptEvent>(OnCloningAttempt);
|
||||
}
|
||||
|
||||
private void OnCloningAttempt(Entity<UnrevivableComponent> ent, ref CloningAttemptEvent args)
|
||||
{
|
||||
if (!ent.Comp.Cloneable)
|
||||
args.Cancelled = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user