Good fire skele (#1680)
* Revert "fire magic bad skele (#1679)"
This reverts commit b130d8aeec.
* skelehehehe
* kit conversation
This commit is contained in:
27
Content.Shared/_CP14/Skill/Restrictions/SpeciesBlacklist.cs
Normal file
27
Content.Shared/_CP14/Skill/Restrictions/SpeciesBlacklist.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Content.Shared._CP14.Skill.Prototypes;
|
||||
using Content.Shared.Humanoid;
|
||||
using Content.Shared.Humanoid.Prototypes;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared._CP14.Skill.Restrictions;
|
||||
|
||||
public sealed partial class SpeciesBlacklist : CP14SkillRestriction
|
||||
{
|
||||
[DataField(required: true)]
|
||||
public ProtoId<SpeciesPrototype> Species = new();
|
||||
|
||||
public override bool Check(IEntityManager entManager, EntityUid target, CP14SkillPrototype skill)
|
||||
{
|
||||
if (!entManager.TryGetComponent<HumanoidAppearanceComponent>(target, out var appearance))
|
||||
return false;
|
||||
|
||||
return appearance.Species != Species;
|
||||
}
|
||||
|
||||
public override string GetDescription(IEntityManager entManager, IPrototypeManager protoManager)
|
||||
{
|
||||
var species = protoManager.Index(Species);
|
||||
|
||||
return Loc.GetString("cp14-skill-req-notspecies", ("name", Loc.GetString(species.Name)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user