2020-08-19 10:23:20 -04:00
|
|
|
|
using System.Collections.Generic;
|
2020-09-02 06:07:54 -04:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using Content.Server.GameObjects.Components.Medical;
|
|
|
|
|
|
using Content.Server.Mobs;
|
2020-08-19 10:23:20 -04:00
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
using Robust.Shared.GameObjects.Systems;
|
2020-09-02 06:07:54 -04:00
|
|
|
|
using Content.Shared.GameObjects.Components.Medical;
|
|
|
|
|
|
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
2020-08-19 10:23:20 -04:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.GameObjects.EntitySystems
|
|
|
|
|
|
{
|
|
|
|
|
|
internal sealed class CloningSystem : EntitySystem
|
|
|
|
|
|
{
|
2020-09-02 06:07:54 -04:00
|
|
|
|
public override void Update(float frameTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
foreach (var comp in ComponentManager.EntityQuery<CloningPodComponent>())
|
|
|
|
|
|
{
|
|
|
|
|
|
comp.Update(frameTime);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2020-08-19 10:23:20 -04:00
|
|
|
|
|
2020-09-02 06:07:54 -04:00
|
|
|
|
public static Dictionary<int, Mind> Minds = new Dictionary<int, Mind>();
|
|
|
|
|
|
|
|
|
|
|
|
public static void AddToDnaScans(Mind mind)
|
2020-08-19 10:23:20 -04:00
|
|
|
|
{
|
2020-09-02 06:07:54 -04:00
|
|
|
|
if (!Minds.ContainsValue(mind))
|
2020-08-19 10:23:20 -04:00
|
|
|
|
{
|
2020-09-02 06:07:54 -04:00
|
|
|
|
Minds.Add(Minds.Count(), mind);
|
2020-08-19 10:23:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-09-02 06:07:54 -04:00
|
|
|
|
public static bool HasDnaScan(Mind mind)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Minds.ContainsValue(mind);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Dictionary<int, string> getIdToUser()
|
2020-08-19 10:23:20 -04:00
|
|
|
|
{
|
2020-09-02 06:07:54 -04:00
|
|
|
|
return Minds.ToDictionary(m => m.Key, m => m.Value.CharacterName);
|
2020-08-19 10:23:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|