void add_workshop(WorkshopBase workshop) { var info = new ProtoWorkshop(workshop); Workshops[info.id] = workshop; add_protoworkshop(info); workshop.Manager = this; }
public void CheckoutWorkshop(WorkshopBase workshop) { if (workshop.vessel == null || workshop.part == null || workshop.vessel != vessel) { return; } // this.Log("Checked Out: {}:{}", workshop, workshop.part.flightID);//debug remove_workshop(workshop); }
public void CheckinWorkshop(WorkshopBase workshop) { if (workshop.vessel == null || workshop.part == null || workshop.vessel != vessel) { return; } // this.Log("Checked In: {}:{}", workshop, workshop.part.flightID);//debug add_workshop(workshop); }
public ProtoWorkshop(WorkshopBase workshop) { VesselName = workshop.vessel.name; vesselID = workshop.vessel.id; workshopType = workshop.workshopType; isOperable = workshop.isOperable; id = workshop.part.flightID; PartName = workshop.part.partInfo.title; Workforce = workshop.Workforce_Display; Stage = workshop.Stage_Display; State = Status.IDLE; EndUT = workshop.EndUT; var task = workshop.GetCurrentTask(); if (task != null && task.Valid) { update(task.Name); } }
public void CheckoutWorker(WorkshopBase module) => workers.Remove(module.part.flightID);
public void CheckinWorker(WorkshopBase module) => workers[module.part.flightID] = module.Workforce;