Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
153 lines (135 sloc) 3.55 KB
// Lifting tanks
@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
%LF = #$RESOURCE[LiquidFuel]/maxAmount$
%OX = #$RESOURCE[Oxidizer]/maxAmount$
%totalCap = #$RESOURCE[LiquidFuel]/maxAmount$
@totalCap += #$RESOURCE[Oxidizer]/maxAmount$
%massOffset = #$totalCap$
@massOffset *= 0.000625 // standard dry mass per units of LF/OX
@massOffset *= -1
@LF *= #$@RESOURCE_DEFINITION[LiquidFuel]/unitCost$
@OX *= #$@RESOURCE_DEFINITION[Oxidizer]/unitCost$
%costOffset = #$LF$
@costOffset += #$OX$
@costOffset *= -1
!RESOURCE[LiquidFuel] {}
!RESOURCE[Oxidizer] {}
!MODULE[ModuleB9PartSwitch]:HAS[#moduleID[fuelSwitch]] {}
MODULE
{
name = ModuleB9PartSwitch
moduleID = fuelSwitch
switcherDescription = #LOC_CryoTanks_switcher_fuel_title
baseVolume = #$../totalCap$
SUBTYPE
{
name = LF/O
title = #LOC_CryoTanks_switcher_fuel_lfox
tankType = LFOX
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = LH2/O
title = #LOC_CryoTanks_switcher_fuel_lh2ox
tankType = LH2O
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = LH2
title = #LOC_CryoTanks_switcher_fuel_lh2
tankType = LH2
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = Oxidizer
title = #LOC_CryoTanks_switcher_fuel_ox
tankType = OX
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = LiquidFuel
title = #LOC_CryoTanks_switcher_fuel_lf
tankType = LF
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
}
MODULE
{
name = ModuleCryoTank
CoolingCost = 0.09
CoolingEnabled = False
BOILOFFCONFIG
{
FuelName = LqdHydrogen
// in % per hr
BoiloffRate = 0.05
}
}
}
// ZBO tanks
@PART[*]:HAS[@RESOURCE[LqdHydrogen],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch],!MODULE[WBIConvertibleStorage],!MODULE[WBIResourceSwitcher]]:NEEDS[!ModularFuelTanks&!RealFuels]:FOR[zzz_CryoTanks]
{
%LH2 = #$RESOURCE[LqdHydrogen]/maxAmount$
%massOffset = #$LH2$
@massOffset *= 0.00001417 // <- EDIT HERE (dry mass per unit LH2 capacity)
@massOffset *= -1
%costOffset = #$LH2$
@costOffset *= #$@RESOURCE_DEFINITION[LqdHydrogen]/unitCost$
@costOffset *= -1
!RESOURCE[LqdHydrogen] {}
MODULE
{
name = ModuleB9PartSwitch
moduleID = fuelSwitch
switcherDescription = #LOC_CryoTanks_switcher_fuel_title
baseVolume = #$../LH2$
@baseVolume /= 7.5
SUBTYPE
{
name = LH2/O
title = #LOC_CryoTanks_switcher_fuel_lh2ox
tankType = LH2OCryo
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = LH2
title = #LOC_CryoTanks_switcher_fuel_lh2
tankType = LH2Cryo
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
SUBTYPE
{
name = Oxidizer
title = #LOC_CryoTanks_switcher_fuel_ox
tankType = OX
addedMass = #$../../massOffset$
addedCost = #$../../costOffset$
}
}
MODULE
{
name = ModuleCryoTank
// in Ec per 1000 units per second
CoolingCost = 0.05
CoolingEnabled = True
BOILOFFCONFIG
{
FuelName = LqdHydrogen
// in % per hr
BoiloffRate = 0.05
}
}
}
You can’t perform that action at this time.