// TODO glitch where progress ends at -1 public override void Interact(DwarfControl entity) { base.Interact(entity); progress--; // chip at progress if (progress <= 0) { //we done harvested = true; //idle entity entity.setTask("Idle", null); } else { // wait a bit before reseting hasInteracted StartCoroutine(pause(1.0f, entity)); } if (progress == -1) { //make the building construct(); } }
public override void Interact(DwarfControl entity) { Resource x = entity.carriedResource; resources.Add(entity.carriedResource); entity.carriedResource = null; print("Resource: " + x.resourceName + " added to stockpile"); //idle entity entity.setTask("Idle", null); }
public override void Interact(DwarfControl entity) { base.Interact(entity); //give entity wood entity.CarryResource(resource); //send to stockpile entity.setTask("Deposit", null); quantity--; if (quantity <= 0) { harvested = true; } }