// WARNING
// WARNING - Incomplete config. Don't enable unless you REALLY know what you're doing.
// WARNING

// Patches for RealismOverhaul/RealFuels


// Fuel tanks will need very specific rules, but for the moment, follow the stock-alike bulk update 
// rule. Most of these will be overwritten by tank-specific rules in other patch files.
@PART[RSB*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[ModuleFuelTanks]]:NEEDS[RealFuels|RealismOverhaul|ModularFuelTanks]:BEFORE[RealScaleBoosters]
{
	// This is a default, based on how stock tanks are altered. May need tweaking per tank.

	%Vol = #$RESOURCE[LiquidFuel]/maxAmount$
	@Vol += #$RESOURCE[Oxidizer]/maxAmount$
	@Vol *= 5

	MODULE
	{
		name = ModuleFuelTanks
		volume = #$../Vol$
		type = Default
	}

	!Vol = 0
}

// Some tanks are specifically cryogenic. This can be fairly incomplete since most
// tanks will be adjusted later on a case-by-case basis in other patch files.
@PART[RSBtankArianeVcore|RSBtankArianeVesc*|RSBtankSTSET|RSBtankAresIstage2|RSBinterstageAtlasCentaur*|RSBtankDeltaIVdcss*|RSBtankDeltaIVcore]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],MODULE[ModuleFuelTanks]]]:BEFORE[RealScaleBoosters]
{
	// Execute after ModuleFuelTanks is added, and just change the type.

	@MODULE[ModuleFuelTanks]
	{
		@type = Cryogenic
	}
}

