//private Dictionary<int, FarmPlantLogic> m_WorkingPlants; //private Dictionary<int, int> m_WorkingPlantsHelp; //private Dictionary<int, Vector3> m_WorkingPlantPos; //private Dictionary<int, ClodChunk> m_WorkingChunks; public CSFarm() { m_Type = CSConst.etFarm; // Init Workers m_Workers = new CSPersonnel[MAX_WORKER_COUNT]; m_WorkSpaces = new PersonnelSpace[1]; m_WorkSpaces[0] = new PersonnelSpace(this); m_Plants = new Dictionary <int, FarmPlantLogic>(); //m_WateringIDs = new Queue<int>(); //m_CleaningIDs = new Queue<int>(); //m_DeadIDs = new Queue<int>(); //m_RipedIDs = new Queue<int>(); //m_WorkingPlants = new Dictionary<int, FarmPlantLogic>(); //m_WorkingPlantsHelp = new Dictionary<int, int>(); //m_WorkingPlantPos = new Dictionary<int, Vector3>(); m_WateringIds = new List <int>(); m_CleaningIds = new List <int>(); m_RipedIds = new List <int>(); m_DeadIds = new List <int>(); //m_WorkingChunks = new Dictionary<int, ClodChunk>(); m_Grade = CSConst.egtLow; }
/// <summary> /// Sets the work room. /// </summary> /// <param name="workRoom">Work room. : NULL means clear the work room, /// note thant it will remeber by brain.</param> private void SetWorkRoom(CSCommon workRoom) { if (m_WorkRoom != workRoom) { if (m_WorkRoom != null) { m_WorkRoom.RemoveWorker(this); if (workRoom == null) { WorkMachine = null; } else { PersonnelSpace ps = workRoom.FindEmptySpace(this); if (ps != null) { ps.m_Person = this; WorkMachine = ps.WorkMachine; HospitalMachine = ps.HospitalMachine; TrainerMachine = ps.TrainerMachine; } workRoom.AddWorker(this); } } else { PersonnelSpace ps = workRoom.FindEmptySpace(this); if (ps != null) { ps.m_Person = this; WorkMachine = ps.WorkMachine; HospitalMachine = ps.HospitalMachine; TrainerMachine = ps.TrainerMachine; } workRoom.AddWorker(this); } m_WorkRoom = workRoom; if (workRoom != null) { Data.m_WorkRoomID = workRoom.ID; } else { Data.m_WorkRoomID = -1; } if (m_NpcCmpt != null) { m_NpcCmpt.WorkEntity = m_WorkRoom; m_NpcCmpt.Work = WorkMachine; m_NpcCmpt.Cure = HospitalMachine; m_NpcCmpt.Trainner = TrainerMachine; } } }
public override void UpdateWorkSpace(PersonnelSpace ps) { WorkMachine = ps.WorkMachine; HospitalMachine = ps.HospitalMachine; TrainerMachine = ps.TrainerMachine; if (m_NpcCmpt != null) { m_NpcCmpt.Work = WorkMachine; m_NpcCmpt.Cure = HospitalMachine; m_NpcCmpt.Trainner = TrainerMachine; } }
public CSRepair() { m_Type = CSConst.etRepair; // Init Workers m_Workers = new CSPersonnel[4]; m_WorkSpaces = new PersonnelSpace[4]; for (int i = 0; i < m_WorkSpaces.Length; i++) { m_WorkSpaces[i] = new PersonnelSpace(this); } m_Grade = CSConst.egtLow; }
public CSStorage() { m_Type = CSConst.etStorage; m_Package = new ItemPackage(); // Init Workers m_Workers = new CSPersonnel[2]; m_WorkSpaces = new PersonnelSpace[2]; for (int i = 0; i < m_WorkSpaces.Length; i++) { m_WorkSpaces[i] = new PersonnelSpace(this); } m_Grade = CSConst.egtLow; }
public CSTrade(CSCreator creator) { m_Creator = creator; m_Type = CSConst.etTrade; m_Workers = new CSPersonnel[1]; m_WorkSpaces = new PersonnelSpace[1]; for (int i = 0; i < m_WorkSpaces.Length; i++) { m_WorkSpaces[i] = new PersonnelSpace(this); } m_Grade = CSConst.egtLow; if (IsMine) { BindEvent(); } }
public CSProcessing(CSCreator creator) { m_Creator = creator; m_Type = CSConst.etProcessing; // Init Workers m_Workers = new CSPersonnel[ProcessingConst.WORKER_AMOUNT_MAX]; m_WorkSpaces = new PersonnelSpace[ProcessingConst.WORKER_AMOUNT_MAX]; for (int i = 0; i < m_WorkSpaces.Length; i++) { m_WorkSpaces[i] = new PersonnelSpace(this); } m_Grade = CSConst.egtLow; if (IsMine) { BindEvent(); } }
public CSMedicalTent(CSCreator creator) { m_Creator = creator; m_Type = CSConst.dtTent; // Init Workers m_Workers = new CSPersonnel[WORKER_AMOUNT_MAX]; m_WorkSpaces = new PersonnelSpace[WORKER_AMOUNT_MAX]; for (int i = 0; i < m_WorkSpaces.Length; i++) { m_WorkSpaces[i] = new PersonnelSpace(this); } //allSickbeds = new Sickbed[BED_AMOUNT_MAX]; m_Grade = CSConst.egtLow; if (IsMine) { BindEvent(); } }
public abstract void UpdateWorkSpace(PersonnelSpace ps);