using UnityEngine;

public class GoToBed : AI_Action
{
    public override bool PrePerform()
    {
        target = inventory.FindItemWithTag("Bed");
        if(target == null)
            return false;

        AI_World.Instance.GetWorld().ModifyState("TreatingPatient", 1);
        return true;
    }

    public override bool PostPerform()
    {
        
        AI_World.Instance.GetWorld().ModifyState("TreatingPatient", -1);
        AI_World.Instance.AddTreatmentBed(target);
        inventory.RemoveItem(target);
        // AI_World.Instance.GetWorld().ModifyState("FreeBeds", 1);
        return true;
    }
}
