mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* number 15 * evil * borgar * Generic Target System * jafhfjasj * borger * whoops * rename * a * whoop * whoop * thars your problem! * asssssssssssssssssssssssssss * fasfasfsa * random --------- Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
22 lines
759 B
C#
22 lines
759 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
using Content.Shared.Humanoid;
|
|
using Content.Shared.Mind;
|
|
using Content.Shared.Mobs.Systems;
|
|
|
|
namespace Content.Shared.Objectives.Systems;
|
|
|
|
public sealed partial class AliveHumanoidTargetSystem : MindTargetSystem<MindComponent>
|
|
{
|
|
[Dependency] private MobStateSystem _mobState = default!;
|
|
|
|
protected override bool ValidateEntity(Entity<MindComponent> entity, [NotNullWhen(true)] out Entity<MindComponent>? mind)
|
|
{
|
|
mind = entity;
|
|
if (entity.Comp.CurrentEntity is not { } humanoid)
|
|
return false;
|
|
|
|
return _mobState.IsAlive(humanoid) && HasComp<HumanoidProfileComponent>(humanoid);
|
|
}
|
|
}
|
|
|
|
public sealed partial class AliveHumansPool : MindPool<AliveHumanoidTargetSystem>;
|