Merge branch 'master' into 2020-08-31-click-attack
This commit is contained in:
@@ -1,24 +1,42 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Medical;
|
||||
using Content.Server.Mobs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Content.Shared.GameObjects.Components.Medical;
|
||||
using Microsoft.AspNetCore.Server.Kestrel.Core;
|
||||
|
||||
namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
internal sealed class CloningSystem : EntitySystem
|
||||
{
|
||||
public static List<EntityUid> scannedUids = new List<EntityUid>();
|
||||
|
||||
public static void AddToScannedUids(EntityUid uid)
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
if (!scannedUids.Contains(uid))
|
||||
foreach (var comp in ComponentManager.EntityQuery<CloningPodComponent>())
|
||||
{
|
||||
scannedUids.Add(uid);
|
||||
comp.Update(frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool HasUid(EntityUid uid)
|
||||
public static Dictionary<int, Mind> Minds = new Dictionary<int, Mind>();
|
||||
|
||||
public static void AddToDnaScans(Mind mind)
|
||||
{
|
||||
return scannedUids.Contains(uid);
|
||||
if (!Minds.ContainsValue(mind))
|
||||
{
|
||||
Minds.Add(Minds.Count(), mind);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool HasDnaScan(Mind mind)
|
||||
{
|
||||
return Minds.ContainsValue(mind);
|
||||
}
|
||||
|
||||
public static Dictionary<int, string> getIdToUser()
|
||||
{
|
||||
return Minds.ToDictionary(m => m.Key, m => m.Value.CharacterName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ using Content.Server.GameObjects.Components.GUI;
|
||||
using Content.Server.GameObjects.Components.Items.Storage;
|
||||
using Content.Server.GameObjects.Components.Stack;
|
||||
using Content.Server.GameObjects.EntitySystems.Click;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||
using Content.Server.Throw;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Input;
|
||||
using Content.Shared.Interfaces;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.EntitySystemMessages;
|
||||
using Robust.Server.Interfaces.Player;
|
||||
@@ -28,7 +28,6 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
internal sealed class HandsSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly IServerNotifyManager _notifyManager = default!;
|
||||
|
||||
private const float ThrowForce = 1.5f; // Throwing force of mobs in Newtons
|
||||
|
||||
@@ -202,9 +201,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
if (!inventoryComp.TryGetSlotItem(equipementSlot, out ItemComponent equipmentItem)
|
||||
|| !equipmentItem.Owner.TryGetComponent<ServerStorageComponent>(out var storageComponent))
|
||||
{
|
||||
_notifyManager.PopupMessage(plyEnt, plyEnt,
|
||||
Loc.GetString("You have no {0} to take something out of!",
|
||||
EquipmentSlotDefines.SlotNames[equipementSlot].ToLower()));
|
||||
plyEnt.PopupMessage(Loc.GetString("You have no {0} to take something out of!",
|
||||
EquipmentSlotDefines.SlotNames[equipementSlot].ToLower()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,9 +216,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
if (storageComponent.StoredEntities.Count == 0)
|
||||
{
|
||||
_notifyManager.PopupMessage(plyEnt, plyEnt,
|
||||
Loc.GetString("There's nothing in your {0} to take out!",
|
||||
EquipmentSlotDefines.SlotNames[equipementSlot].ToLower()));
|
||||
plyEnt.PopupMessage(Loc.GetString("There's nothing in your {0} to take out!",
|
||||
EquipmentSlotDefines.SlotNames[equipementSlot].ToLower()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
|
||||
if (!InRange(coords, player.Transform.GridPosition))
|
||||
{
|
||||
player.PopupMessage(player, Loc.GetString("You can't reach there!"));
|
||||
player.PopupMessage(Loc.GetString("You can't reach there!"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user