CatStation/Content.Shared/Objectives/Systems/AliveHumanoidTargetSystem.cs
Princess Cheeseballs c5f5a43dd7
Generic Target System (#43554)
* 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>
2026-07-11 04:11:24 +00:00

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>;