Skip to content

Instantly share code, notes, and snippets.

@DeltaDizzy
Last active September 12, 2019 05:20
Show Gist options
  • Save DeltaDizzy/99b87c031a5aed8ceee0b0c83d285450 to your computer and use it in GitHub Desktop.
Save DeltaDizzy/99b87c031a5aed8ceee0b0c83d285450 to your computer and use it in GitHub Desktop.
Convert Bluedog Design Bureau from LqdHydrogen to Propellium if any WBI mods are installed
//Modify Hydrolox engines to use Propellium and correct the ratios accordingly
@PART[bluedog_Centaur*,bluedog_Titan*]:HAS[@MODULE[ModuleEnginesFX]]:HAS[@PROPELLANT[LqdHydrogen]]:NEEDS[Bluedog_DB,WildBlueIndustries/ClassicStockResources]
{
@MODULE[ModuleEnginesFX]
{
@PROPELLANT[LqdHydrogen]
{
@name = Propellium
@ratio = 10
}
}
MODULE
{
name = ModuleB9PartSwitch
moduleID = engineSwitch
switcherDescription = Fuel Type
switcherDescriptionPlural = Fuel Types
SUBTYPE
{
name = LqdHydrogen
title = Liquid Hydrogen
MODULE
{
IDENTIFIER
{
name = ModuleEnginesFX
}
DATA
{
//all the fields of ModuleEnginesFX except the name
PROPELLANT
{
name = LqdHydrogen
ratio = #$../../../../MODULE[ModuleEnginesFX]/PROPELLANT[LqdHydrogen]/ratio$
}
}
}
}
SUBTYPE
{
name = Propellium
MODULE
{
IDENTIFIER
{
name = ModuleEnginesFX
}
DATA
{
PROPELLANT
{
name = Propellium
ratio = 10
}
}
}
}
}
}
//Modify tank resources and ratios for those that are not affected by cryotanks
@PART[bluedog_Centaur*,bluedog_Titan*]:HAS[!MODULE[ModuleEnginesFX,ModuleB9PartSwitch:HAS[#moduleId[fuelSwitch]]]]:NEEDS[Bluedog_DB,WildBlueIndustries/ClassicStockResources]
{
@RESOURCE[LqdHydrogen]
{
@name = Propellium
@maxAmount = #$../RESOURCE[Oxidizer]/maxAmount$
@maxAmount *= 10
@amount = #$maxAmount$
}
}
//AddmPropellium tank types
+B9_TANK_TYPE[bdbLH2]
{
@RESOURCE
{
@name = Propellium
@unitsPerVolume = 10
}
}
+B9_TANK_TYPE[bdbLH2,bdbLH2O]
{
@name = bdbPR
@RESOURCE[LqdHydrogen]
{
@name = Propellium
@unitsPerVolume = 10
}
}
@PART[bluedog_*]:HAS[@MODULE[ModuleB9PartSwitch]:HAS[#moduleId[fuelSwitch]]]:AFTER[zzCryoTanks]
{
@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[fuelSwitch]]
{
+SUBTYPE[LH2/O]
{
@name = Pr/O
@title = #$name$
@tankType = bdbPR
@addedMass = 0
@addedCost = 0
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment