Example #1
0
 public void addPresetRatios(ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry)
 {
     container.addPresetRatios(preset);
     if (updateSymmetry)
     {
         foreach (Part p in part.symmetryCounterparts)
         {
             SSTUVolumeContainer symmetryModule          = p.GetComponent <SSTUVolumeContainer>();
             ContainerDefinition symmetryModuleContainer = symmetryModule.getContainer(container.name);
             ContainerFuelPreset symmetryModulePreset    = symmetryModuleContainer.internalGetFuelPreset(preset.name);
             symmetryModule.addPresetRatios(symmetryModuleContainer, symmetryModulePreset, false);
         }
     }
 }
Example #2
0
 public void subtractPresetRatios(ContainerDefinition container, ContainerFuelPreset preset, bool updateSymmetry)
 {
     container.subtractPresetRatios(preset);
     if (updateSymmetry)
     {
         foreach (Part p in part.symmetryCounterparts)
         {
             SSTUVolumeContainer mod     = p.GetComponent <SSTUVolumeContainer>();
             ContainerDefinition def2    = mod.getContainer(container.name);
             ContainerFuelPreset preset2 = def2.internalGetFuelPreset(preset.name);
             mod.subtractPresetRatios(def2, preset2, false);
         }
     }
 }