Esempio n. 1
0
 void onVesselModify(Vessel vsl)
 {
     if (vsl == null || vsl != vessel)
     {
         return;
     }
     //this.Log("onVesselModify: vsl.id {}, old.id {}", vsl.id,
     //VSL != null && VSL.vessel != null? VSL.vessel.id.ToString() : "null");//debug
     AllModules.ForEach(m => m.SaveToConfig());
     activate_master_TCA(vessel);
     if (GroupMaster)
     {
         ChangeGID();
     }
     if (!TCA_Active)
     {
         reset();
     }
     else if (VSL == null || VSL.vessel == null || vsl.id != VSL.vessel.id)
     {
         reset();
         if (CFG != null)
         {
             CFG = CFG.Clone <VesselConfig>();
         }
         init();
     }
     else
     {
         VSL.Engines.ForceUpdateParts = true;
         StartCoroutine(updateUnpackDistance());
     }
 }