Exemplo n.º 1
0
 private static void RemoveModuleFromList(List<ModuleNoFlowTransfer> list, ModuleNoFlowTransfer module)
 {
     var remModule = list.FirstOrDefault(m => m.Id == module.Id);
     if (remModule != null)
     {
         list.Remove(remModule);
     }
 }
Exemplo n.º 2
0
 internal void SetTransferPartner(ModuleNoFlowTransfer partnerModule)
 {
     this._transferPartner = partnerModule;
     if (this._transferOut)
     {
         this._highlightAsTargeter();
     }
     else
     {
         this._highlightAsTarget();
     }
 }
Exemplo n.º 3
0
 private static List<ModuleNoFlowTransfer> GetAllOtherModules(ModuleNoFlowTransfer excludeModule)
 {
     if (excludeModule.part == null || excludeModule.part.vessel == null)
     {
         Debug.Log("[NoFlowTransfer] unable to get vessel parts");
         return new List<ModuleNoFlowTransfer>();
     }
     var modules = excludeModule.part.vessel.Parts
                                .Where(p => p.Modules.Contains(ModuleName))
                                .Select(p => p.Modules[ModuleName] as ModuleNoFlowTransfer);
     return modules.Where(m => m.Id != excludeModule.Id && m.ResourceName == excludeModule.ResourceName).ToList();
 }
Exemplo n.º 4
0
 internal void Reset()
 {
     this.part.SetHighlightDefault();
     this._readyToTransfer = false;
     this._transferPartner = null;
     this.UpdateGui(false);
 }