Пример #1
0
        void add_workshop(WorkshopBase workshop)
        {
            var info = new ProtoWorkshop(workshop);

            Workshops[info.id] = workshop;
            add_protoworkshop(info);
            workshop.Manager = this;
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
            }
        }
Пример #5
0
 public void CheckoutWorker(WorkshopBase module) =>
 workers.Remove(module.part.flightID);
Пример #6
0
 public void CheckinWorker(WorkshopBase module) =>
 workers[module.part.flightID] = module.Workforce;