Термалки (#466)
* - add: Rewrite night vision. * - add: Thermals. * - remove: Remove stuff from maps. * - fix: Descriptions.
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Client.Clickable;
|
||||
using Content.Client.UserInterface;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Input;
|
||||
using Robust.Client.ComponentTrees;
|
||||
using Robust.Client.GameObjects;
|
||||
@@ -102,6 +103,13 @@ namespace Content.Client.Gameplay
|
||||
return first.IsValid() ? first : null;
|
||||
}
|
||||
|
||||
public EntityUid? GetDamageableClickedEntity(MapCoordinates coordinates) // WD
|
||||
{
|
||||
var first = GetClickableEntities(coordinates)
|
||||
.FirstOrDefault(e => _entityManager.HasComponent<DamageableComponent>(e));
|
||||
return first.IsValid() ? first : null;
|
||||
}
|
||||
|
||||
public IEnumerable<EntityUid> GetClickableEntities(EntityCoordinates coordinates)
|
||||
{
|
||||
return GetClickableEntities(coordinates.ToMap(_entityManager, _entitySystemManager.GetEntitySystem<SharedTransformSystem>()));
|
||||
|
||||
Reference in New Issue
Block a user