public string CurrentActionToString(StaffPathfinding.StaffAction action) { switch (action) { case StaffPathfinding.StaffAction.enteringStore: return("Entering the store"); case StaffPathfinding.StaffAction.leavingStore: return("Leaving the store"); case StaffPathfinding.StaffAction.waiting: return("Waiting for a job"); case StaffPathfinding.StaffAction.wandering: return("Wandering the dispensary"); case StaffPathfinding.StaffAction.awaitingJobAction: return("Awaiting job action"); case StaffPathfinding.StaffAction.performingJobAction: return("Performing a job action"); case StaffPathfinding.StaffAction.leavingScene: return("Going home"); case StaffPathfinding.StaffAction.nothing: return("Absolutely nothing"); } return("Error"); }
public StaffPathfinding_s(StaffPathfinding.StaffAction action_, Vector3 targetPos, bool isMovingOutside_, bool isMovingInside_) { action = action_; targetPosX = targetPos.x; targetPosY = targetPos.y; targetPosZ = targetPos.z; isMovingOutside = isMovingOutside_; isMovingInside = isMovingInside_; }
// ------------------------------------------------------ /*public void AssignJobDropdown() * { * List<Action<Job>> actions = new List<Action<Job>>(); * List<string> actionNames = new List<string>(); * List<Job> parameters = new List<Job>(); * foreach (Job job in dm.dispensary.availableJobs) * { * actions.Add(AssignJob); * actionNames.Add(job.jobName); * parameters.Add(job); * } * ddm.SetupDropdown(actions, actionNames, parameters); * }*/ public void SetAction(StaffPathfinding.StaffAction action) { if (pathfinding == null) { Start(); } pathfinding.ChangeStatus(action); if (action == StaffPathfinding.StaffAction.leavingStore && HasJob()) { switch (parentStaff.jobType) { case Dispensary.JobType.Cashier: Cashier cashier = (Cashier)job; cashier.register.assigned = null; Staff possibleStaff_needsRegister = dm.dispensary.StaffNeedsRegister(); if (possibleStaff_needsRegister != null) { if (possibleStaff_needsRegister.HasJob()) { possibleStaff_needsRegister.job.OnEnterStore(); possibleStaff_needsRegister.parentStaff.ErrorFixed(); } } break; case Dispensary.JobType.StoreBudtender: StoreBudtender budtender = (StoreBudtender)job; budtender.station.assigned = null; Staff possibleStaff_needsBudtenderStation = dm.dispensary.StaffNeedsBudtenderStation(); if (possibleStaff_needsBudtenderStation != null) { if (possibleStaff_needsBudtenderStation.HasJob()) { possibleStaff_needsBudtenderStation.job.OnEnterStore(); possibleStaff_needsBudtenderStation.parentStaff.ErrorFixed(); } } break; } } }