コード例 #1
0
        private void updatePartResources()
        {
            float resourceScalar = Mathf.Pow(getScale(), thrustScalePower);
            float currentVolume  = resourceVolume * resourceScalar;

            SSTUResourceList list = new SSTUResourceList();

            fuelType.addResources(list, currentVolume);
            list.setResourcesToPart(part, 1, HighLogic.LoadedSceneIsFlight);
        }
コード例 #2
0
        private void updatePartResources()
        {
            float resourceScalar = Mathf.Pow(getScale(), thrustScalePower);
            float currentVolume  = resourceVolume * resourceScalar;

            if (!SSTUModInterop.onPartFuelVolumeUpdate(part, currentVolume * 1000))
            {
                SSTUResourceList list = new SSTUResourceList();
                fuelType.addResources(list, currentVolume);
                list.setResourcesToPart(part);
            }
        }
コード例 #3
0
        private void updateResources()
        {
            float scale  = Mathf.Pow(getEngineScale(), thrustScalePower);
            float volume = resourceVolume * scale * numberOfEngines;

            if (!SSTUModInterop.onPartFuelVolumeUpdate(part, volume * 1000))
            {
                SSTUResourceList resources = new SSTUResourceList();
                fuelType.addResources(resources, volume);
                resources.setResourcesToPart(part);
            }
        }
コード例 #4
0
 private void updateResources()
 {
     float scale = Mathf.Pow(getEngineScale(), thrustScalePower);
     float volume = resourceVolume * scale * numberOfEngines;
     if (!SSTUModInterop.onPartFuelVolumeUpdate(part, volume*1000))
     {
         SSTUResourceList resources = new SSTUResourceList();
         fuelType.addResources(resources, volume);
         resources.setResourcesToPart(part);
     }
 }