* Content.Client * Content.Benchmarks * Content.IntegrationTests * Content.Server * Content.Server.Database * Content.Shared * Content.Tests * Merge fixes Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Content.Server.GameObjects.Components.Medical;
|
|
using Content.Server.Mobs;
|
|
using Content.Shared.GameTicking;
|
|
using Robust.Shared.GameObjects.Systems;
|
|
|
|
namespace Content.Server.GameObjects.EntitySystems
|
|
{
|
|
internal sealed class CloningSystem : EntitySystem, IResettingEntitySystem
|
|
{
|
|
public override void Update(float frameTime)
|
|
{
|
|
foreach (var comp in ComponentManager.EntityQuery<CloningPodComponent>())
|
|
{
|
|
comp.Update(frameTime);
|
|
}
|
|
}
|
|
|
|
public readonly Dictionary<int, Mind> Minds = new();
|
|
|
|
public void AddToDnaScans(Mind mind)
|
|
{
|
|
if (!Minds.ContainsValue(mind))
|
|
{
|
|
Minds.Add(Minds.Count(), mind);
|
|
}
|
|
}
|
|
|
|
public bool HasDnaScan(Mind mind)
|
|
{
|
|
return Minds.ContainsValue(mind);
|
|
}
|
|
|
|
public Dictionary<int, string> GetIdToUser()
|
|
{
|
|
return Minds.ToDictionary(m => m.Key, m => m.Value.CharacterName);
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
Minds.Clear();
|
|
}
|
|
}
|
|
}
|