B9HX_TEMPLATE
{
	name = LFO
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/BiPropLFO
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/BiPropLFOGlow
	description = This kit stores LiquidFuel and Oxidizer, the usual(tm) propellant mix for rockets.
	templateTags = stowage
	RESOURCE
	{
		 name = LiquidFuel
		 amount = 26550
		 maxAmount = 26550
	}
	RESOURCE
	{
		name = Oxidizer
		amount = 32450
		maxAmount = 32450
	}
}
B9HX_TEMPLATE
{
	name = LiquidFuel
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/PropLF
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropLFGlow
	description = This kit stores typical Kerosene-alike Liquid Fuel.
	templateTags = stowage
	RESOURCE
	{
		name = LiquidFuel
		amount = 59000
		maxAmount = 59000
	}
}
B9HX_TEMPLATE
{
	name = Oxidizer
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Prop
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropGlow
	description = This kit stores Oxidizer, the standard secondary propellant for most chemical engines. It could be cryogenic, or an Oxygenated compound that stays liquid at room temperature.
	templateTags = stowage
	RESOURCE
	{
		name = Oxidizer
		amount = 59000
		maxAmount = 59000
	}
}
B9HX_TEMPLATE
{
	name = MonoProp
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/PropHydra
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropHydraGlow
	description = This kit stores MonoPropellant, a usually highly volatile, highly toxic substance that ignites well on contact with a hot surface.
	templateTags = stowage
	RESOURCE
	{
		name = MonoPropellant
		amount = 59000
		maxAmount = 59000
	}
}
B9HX_TEMPLATE
{
	name = Propellium
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/PropCryoLight
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropCryoLightGlow
	description = This kit stores Propellium, the lightest weight and highest efficiency propellant known to chemical rocketry. It is cryogenic liquid hydrons and is required for the creation of LiquidFuel, Water and so on.
	templateTags = stowage
	RESOURCE
	{
		name = Propellium
		amount = 295000
		maxAmount = 295000
	}
}
B9HX_TEMPLATE
{
	name = Explodium
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/PropNSW
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropNSWGlow
	description = Also called nuclear salt water, this kit stores Explodium, whether made from dissolving Blutonium in Water or scooped fresh from Eve's oceans. Asteroids might have some as well. It can power mighty and terrible rocket engines or be separated back into Water and Blutonium.
	templateTags = stowage
	RESOURCE
	{
		name = Explodium
		amount = 59000
		maxAmount = 59000
	}
}
B9HX_TEMPLATE
{
	name = Battery
	author = JadeOfMaar
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Battery
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/BatteryGlow
	description = This kit stores ElectricCharge, and lots of it!
	templateTags = stowage
	RESOURCE
	{
		name = ElectricCharge
		amount = 236000
		maxAmount = 236000
	}
}
B9HX_TEMPLATE
{
	author = JadeOfMaar
	name = Empty
	description = Sometimes we just want the hull and nothing else.
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Void
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/Void
}

// Globals
B9HX_TEMPLATE
{
	name = OmniStorage
	author = Angel-125
	logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Omni
	glowPanel = WildBlueIndustries/000WildBlueTools/Decals/OmniGlow
	description = This kit can store a wide variety of resources in varying amounts.
	templateTags = stowage

	MODULE
	{
		name = WBIOmniStorage

		//In liters, how much can the part store.
		//Note: this is a standard size for a switcher capacity of 1.0 and based on
		//the Titan 59000 fuel tank standard (on which the templates were originally based).
		//Actual volume depends upon switcher's capacityFactor.
		storageVolume = 295000

		//Adjust storage volume to account for resource switcher's capacity factor.
		accountForSwitcherCapacity = true

		//Skill required to reconfigure the container.
		reconfigureSkill = ConverterSkill

		//Minimum rank to reconfigure the container.
		reconfigureRank = 1

		//Resource required to reconfigure the container.
		requiredResource = Equipment

		//Amount of the required resource to reconfigure the container.
		requiredAmount = 0

		//Blacklisted resources that can't be added to the container.
		//Separate by semicolon. Below is the default.
		resourceBlacklist = GeoEnergy;ElectroPlasma;CoreHeat;Atmosphere;CompressedAtmosphere;LabTime;ExposureTime;ScopeTime;SolarReports;SimulatorTime;GravityWaves;IntakeAir;StaticCharge;EVA Propellant;Plants
	}
}

@PART[B9_Structure_HX*]:HAS[@MODULE[ModuleB9PartSwitch]:HAS[#baseVolume[>0]]]:FOR[B9_Aerospace_HX]
{
	MODULE
	{
		name = WBIConvertibleStorage
		enableLogging = True

		//Determines if the module allows in-field reconfiguring
		fieldReconfigurable = True

		//Require a confirmation click before changing resources
		confirmResourceSwitch = True

		//Determines whether or not to show the context menu GUI
		showGUI = True

		//Short name of the default module template.
		//This is used when selecting the part in the editor.
		//User will then right-click on the module to change its type.
		defaultTemplate = LFO

		//name of the template nodes to use
		templateNodes = B9HX_TEMPLATE

		//Some containers don't hold as much resources as the template specifies, while others hold more.
		//Since the resource templates specify base amounts, the capacity factor specifies a multiplier to
		//factor into the resource amounts.
		capacityFactor = #$../MODULE[ModuleB9PartSwitch]/baseVolume$
		@capacityFactor /= 59000

		//Name of the logo panel transforms
		// logoPanelTransforms = logoPanel001
		// decalsVisible = true

		//If the part has a KIS container, this is the base and max amount
		baseStorage = .001
		maxStorage = 3000
	}

	MODULE:NEEDS[BARIS]
	{
		name = ModuleBreakableFuelTank
	}

	MODULE:NEEDS[BARIS]
	{
		name = ModuleQualityControl
		mtbf = 7500
	}
	
	!MODULE[ModuleB9PartSwitch]:HAS[#moduleID[fuelSwitch]] {}
}

@PART[B9_Structure_HX_S_2]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options

		SUBTYPE
		{
			name = Structural
			transform = STR
		}

		SUBTYPE
		{
			name = LFO
			transform = LFO
			primaryColor = ResourceColorLiquidFuel
			secondaryColor = ResourceColorOxidizer
		}

		SUBTYPE
		{
			name = MonoPropellant
			title = MonoProp
			transform = RCS
			primaryColor = ResourceColorMonoPropellant
			secondaryColor = ResourceColorMonoPropellant
		}

		SUBTYPE
		{
			name = Structural_125m
			title = Adapter
			addedMass = 0.058
			addedCost = 100.0
			transform = Adapter
		}
	}
}

@PART[B9_Structure_HX_S_8]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options
		SUBTYPE
		{
			name = Structural
			transform = STR
		}

		SUBTYPE
		{
			name = LFO
			transform = LFO
			primaryColor = ResourceColorLiquidFuel
			secondaryColor = ResourceColorOxidizer
		}

		SUBTYPE
		{
			name = MonoPropellant
			title = MonoProp
			transform = RCS
			primaryColor = ResourceColorMonoPropellant
			secondaryColor = ResourceColorMonoPropellant
		}
	}
}

@PART[B9_Structure_HX1_A_375C]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options
		SUBTYPE
		{
			name = a_str
			title = Type A-Str
			addedMass = 1.828
			addedCost = 3115.0
			transform = STR1
		}

		SUBTYPE
		{
			name = b_str
			title = Type B-Str
			transform = STR2
		}
	}
}

@PART[B9_Structure_HX1_U]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options
		SUBTYPE
		{
			name = str_a
			title = Structure A
			transform = STR1
		}

		SUBTYPE
		{
			name = str_b
			title = Structure B
			transform = STR2
		}

		SUBTYPE
		{
			name = str_c
			title = Structure C
			transform = STR3
		}

		SUBTYPE
		{
			name = tank_lfo
			title = LFO
			transform = LFO
			primaryColor = ResourceColorLiquidFuel
			secondaryColor = ResourceColorOxidizer
		}

		SUBTYPE
		{
			name = tank_mono
			title = MonoProp
			transform = RCS
			primaryColor = ResourceColorMonoPropellant
			secondaryColor = ResourceColorMonoPropellant
		}

		SUBTYPE
		{
			name = battery
			title = Battery
			transform = Capacitor
			primaryColor = ResourceColorElectricChargePrimary
			secondaryColor = ResourceColorElectricChargeSecondary
		}
	}
}

@PART[B9_Structure_HX1_U_S|B9_Structure_HX2_U]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options
		SUBTYPE
		{
			name = Structural
			transform = STR
		}

		SUBTYPE
		{
			name = LFO
			transform = LFO
			primaryColor = ResourceColorLiquidFuel
			secondaryColor = ResourceColorOxidizer
		}

		SUBTYPE
		{
			name = MonoPropellant
			title = MonoProp
			transform = RCS
			primaryColor = ResourceColorMonoPropellant
			secondaryColor = ResourceColorMonoPropellant
		}

		SUBTYPE
		{
			name = Battery
			transform = Capacitor
			primaryColor = ResourceColorElectricChargePrimary
			secondaryColor = ResourceColorElectricChargeSecondary
		}
	}
}

@PART[B9_Structure_HX4_U]
{
	MODULE
	{
		name = ModuleB9PartSwitch
		moduleID = meshSwitch
		switcherDescription = Hull Option
		switcherDescriptionPlural = Hull Options
		SUBTYPE
		{
			name = Structural
			transform = model_hx_size3_structure1
		}

		SUBTYPE
		{
			name = LFO
			transform = model_hx_size3_fuel1
			primaryColor = ResourceColorLiquidFuel
			secondaryColor = ResourceColorOxidizer
		}
	}
}