public IEnumerable <Act.Status> PutResources() { if (BuildRoom.MeetsBuildRequirements()) { yield return(Act.Status.Success); } if (BuildRoom.ResourcesReservedFor == Agent) { Agent.Creature.Inventory.Remove(Resources, Inventory.RestockType.None); BuildRoom.AddResources(Resources); BuildRoom.ResourcesReservedFor = null; } yield return(Act.Status.Success); }
public override IEnumerable <Status> Run() { if (BuildRoom == null || BuildRoom.IsBuilt || BuildRoom.VoxelOrders.Count == 0) { yield return(Status.Fail); } else { BuildRoom.AddResources(Resources); Creature.Inventory.Remove(Resources); Creature.Stats.NumRoomsBuilt++; Creature.AI.AddXP(10); yield return(Status.Success); } }
public IEnumerable <Act.Status> PutResources() { if (BuildRoom.MeetsBuildRequirements()) { yield return(Act.Status.Success); } if (BuildRoom.ResourcesReservedFor == Agent) { var resources = Agent.Blackboard.GetData <List <Resource> >("zone_resources"); Agent.Creature.Inventory.Remove(resources, Inventory.RestockType.None); BuildRoom.AddResources(resources); BuildRoom.ResourcesReservedFor = null; } yield return(Act.Status.Success); }