Files
tbd-station-14/Content.Server/GameObjects/EntitySystems/CloningSystem.cs
metalgearsloth 684ec60be6 Pausing content (#3061)
* Change EntityQuery to not retrieve paused by default

* GetAllComponents

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-04 00:20:48 +11:00

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>(true))
{
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();
}
}
}