Files
tbd-station-14/Content.Server/GameObjects/EntitySystems/CloningSystem.cs
DrSmugleaf 5c0cf1b1a0 Use 'new' expression in places where the type is evident for content (#2590)
* 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>
2020-11-27 21:00:49 +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>())
{
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();
}
}
}