* buzz buzz

* Darn now i'm all out of periods   thanks mirror
fix toy issue

* desc edits.

* rng and alphabee

* adds some missed parens
This commit is contained in:
Moony
2021-11-25 00:06:13 -06:00
committed by GitHub
parent 2a409de436
commit d5c5cbeaf4
12 changed files with 236 additions and 4 deletions

View File

@@ -0,0 +1,25 @@
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Tag;
using JetBrains.Annotations;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Chemistry.ReagentEffectConditions;
[UsedImplicitly]
public class HasTag : ReagentEffectCondition
{
[DataField("tag", customTypeSerializer: typeof(PrototypeIdSerializer<TagPrototype>))]
public string Tag = default!;
[DataField("invert")]
public bool Invert = false;
public override bool Condition(ReagentEffectArgs args)
{
if (args.EntityManager.TryGetComponent<TagComponent>(args.SolutionEntity, out var tag))
return tag.HasTag(Tag) ^ Invert;
return false;
}
}