using Godot; using System; public partial class Caffeinate : Action { public Caffeinate(Node2D OWNER) : base(OWNER) { _triggers.Add(Trigger.On.Collision); } public override void Fire() { if (_target != null) { if (_target is Worker) { Worker target = (Worker)_target; if (!target.HasCondition(GetType().ToString())) { target._conditions.AddChild(new Caffeinated(target)); } } _target = null; } } }