Add most of research

This commit is contained in:
Bram verhulst
2025-05-31 15:54:23 +02:00
commit 70f128f092
270 changed files with 80847 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
using UnityEngine;
public class GetPatient : AI_Action
{
GameObject m_Resource;
public override bool PrePerform()
{
target = AI_World.Instance.RemovePatient();
if(target == null)
{
return false;
}
m_Resource = AI_World.Instance.RemoveTreatmentBed();
if (m_Resource != null)
{
inventory.AddItem(m_Resource);
} else {
AI_World.Instance.AddPatient(target);
target = null;
return false;
}
return true;
}
public override bool PostPerform()
{
AI_World.Instance.GetWorld().ModifyState("Waiting", -1);
if (target)
{
target.GetComponent<AI_Agent>().inventory.AddItem(m_Resource);
}
return true;
}
}