From b8bfb421bddf9577e74a6b37fade6658f8f5657c Mon Sep 17 00:00:00 2001 From: Michael Billard Date: Mon, 28 May 2018 08:39:12 -0700 Subject: [PATCH] WBT update --- .../000WildBlueTools/Readme.txt | 4 + .../Production/OmniConverters.cfg | 12 +- .../000WildBlueTools/WildBlueTools.version | 4 +- .../KerbalActuators.version | 4 +- .../001KerbalActuators/Readme.txt | 3 + .../Buffalo/Buffalo.version | 4 +- .../Buffalo/Parts/Control/RCS5Way2.cfg | 2 +- .../Buffalo/Parts/Control/RCSModule.cfg | 131 ++++++++++++- .../ClassicStockResources/Readme.txt | 3 + .../Templates/Production/OmniConverters.cfg | 172 ++++++++++++++++++ .../Templates/Storage/Hexagen.cfg | 2 +- .../Templates/Storage/Hydrokerbon.cfg | 33 +--- .../Templates/Storage/Nitronite.cfg | 86 ++++++++- .../Templates/Storage/OmniStorage.cfg | 62 +++++++ .../Templates/Storage/Oxium.cfg | 2 + .../Templates/Storage/Propellium.cfg | 25 +++ .../Templates/Storage/RHK1.cfg | 53 ++++++ .../Templates/Storage/Raptium.cfg | 58 ++++++ .../Templates/Utility/Scanners_SCANsat.cfg | 6 +- .../Templates/Utility/Scanners_Stock.cfg | 8 +- .../Parts/BoxedParts/Rangeland/Rangeland.cfg | 5 + .../Parts/BoxedParts/Rangeland/Rangeland.mu | Bin 111930 -> 111930 bytes .../Pathfinder/Parts/Utility/Chuckwagon.cfg | 2 +- .../Pathfinder/Parts/Utility/Conestoga.cfg | 2 +- .../Pathfinder/Parts/Utility/GoldDigger.cfg | 2 +- .../Pathfinder/Parts/Utility/Hacienda.cfg | 4 +- .../Pathfinder/Pathfinder.version | 4 +- .../WildBlueIndustries/Pathfinder/Readme.txt | 14 ++ .../Templates/ClassicStock/OmniLab.cfg | 12 +- .../Templates/ClassicStock/OmniShop.cfg | 12 +- .../Templates/ClassicStock/OmniWorks.cfg | 14 +- .../Templates/Common/PowerDistributor.cfg | 19 ++ .../{ => Habitat}/WBIClassConverterView.cs | 0 Pathfinder/Parts/WBIRangelandHeat.cs | 44 +++++ Pathfinder/Pathfinder.csproj | 3 +- .../ResourceDistribution/DistributionView.cs | 12 ++ .../WBIResourceDistributor.cs | 97 ++++++++-- .../Pathfinder.csproj.FileListAbsolute.txt | 5 +- 38 files changed, 826 insertions(+), 99 deletions(-) create mode 100644 GameData/WildBlueIndustries/ClassicStockResources/Templates/Production/OmniConverters.cfg create mode 100644 GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/OmniStorage.cfg create mode 100644 GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/RHK1.cfg create mode 100644 GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Raptium.cfg create mode 100644 GameData/WildBlueIndustries/Pathfinder/Templates/Common/PowerDistributor.cfg rename Pathfinder/{ => Habitat}/WBIClassConverterView.cs (100%) create mode 100644 Pathfinder/Parts/WBIRangelandHeat.cs diff --git a/GameData/WildBlueIndustries/000WildBlueTools/Readme.txt b/GameData/WildBlueIndustries/000WildBlueTools/Readme.txt index 01440ad..ca6ccf1 100644 --- a/GameData/WildBlueIndustries/000WildBlueTools/Readme.txt +++ b/GameData/WildBlueIndustries/000WildBlueTools/Readme.txt @@ -6,6 +6,10 @@ A KSP mod that provides common functionality for mods by Wild Blue Industries. Copy the contents of the mod's GameData directory into your GameData folder. +1.55.2 +- Bug fixes +- Classic Stock templates update - thanks JadeOfMaar! :) + 1.55.1 - Bug fixes diff --git a/GameData/WildBlueIndustries/000WildBlueTools/Templates/ClassicStock/Production/OmniConverters.cfg b/GameData/WildBlueIndustries/000WildBlueTools/Templates/ClassicStock/Production/OmniConverters.cfg index 47bb82c..0972220 100644 --- a/GameData/WildBlueIndustries/000WildBlueTools/Templates/ClassicStock/Production/OmniConverters.cfg +++ b/GameData/WildBlueIndustries/000WildBlueTools/Templates/ClassicStock/Production/OmniConverters.cfg @@ -341,7 +341,7 @@ OMNICONVERTER templateTags = lab TechRequired = advExploration ConverterName = Oxium -> MonoPropellant - description = Combine Oxium and Nitronite into MonoPropellant + description = Convert Propellium and Nitronite into MonoPropellant and Oxium StartActionName = Start Gasifier StopActionName = Stop Gasifier AutoShutdown = false @@ -353,7 +353,7 @@ OMNICONVERTER INPUT_RESOURCE { - ResourceName = Oxium + ResourceName = Propellium Ratio = 1 FlowMode = STAGE_PRIORITY_FLOW } @@ -378,6 +378,14 @@ OMNICONVERTER Ratio = 0.5 DumpExcess = false } + + OUTPUT_RESOURCE + { + ResourceName = Oxium + Ratio = 0.5 + FlowMode = STAGE_PRIORITY_FLOW + DumpExcess = true + } } //LiquidFuel diff --git a/GameData/WildBlueIndustries/000WildBlueTools/WildBlueTools.version b/GameData/WildBlueIndustries/000WildBlueTools/WildBlueTools.version index 577f8b1..fc663d3 100644 --- a/GameData/WildBlueIndustries/000WildBlueTools/WildBlueTools.version +++ b/GameData/WildBlueIndustries/000WildBlueTools/WildBlueTools.version @@ -12,13 +12,13 @@ { "MAJOR":1, "MINOR":55, - "PATCH":1 + "PATCH":2 }, "KSP_VERSION": { "MAJOR":1, "MINOR":4, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/GameData/WildBlueIndustries/001KerbalActuators/KerbalActuators.version b/GameData/WildBlueIndustries/001KerbalActuators/KerbalActuators.version index 284b777..26036a7 100644 --- a/GameData/WildBlueIndustries/001KerbalActuators/KerbalActuators.version +++ b/GameData/WildBlueIndustries/001KerbalActuators/KerbalActuators.version @@ -13,13 +13,13 @@ "MAJOR":1, "MINOR":3, "PATCH":0, - "BUILD":4 + "BUILD":5 }, "KSP_VERSION": { "MAJOR":1, "MINOR":4, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/GameData/WildBlueIndustries/001KerbalActuators/Readme.txt b/GameData/WildBlueIndustries/001KerbalActuators/Readme.txt index bae0fe9..8710ca6 100644 --- a/GameData/WildBlueIndustries/001KerbalActuators/Readme.txt +++ b/GameData/WildBlueIndustries/001KerbalActuators/Readme.txt @@ -24,6 +24,9 @@ Copy the contents of the mod's GameData directory into your GameData folder. ---REVISION HISORY--- +1.3.0.5 +- Minor edits to support VTOL ops. + 1.3.0.4 - Minor bug fixes diff --git a/GameData/WildBlueIndustries/Buffalo/Buffalo.version b/GameData/WildBlueIndustries/Buffalo/Buffalo.version index 2dbb99a..e16ea07 100644 --- a/GameData/WildBlueIndustries/Buffalo/Buffalo.version +++ b/GameData/WildBlueIndustries/Buffalo/Buffalo.version @@ -12,13 +12,13 @@ { "MAJOR":2, "MINOR":5, - "PATCH":3 + "PATCH":4 }, "KSP_VERSION": { "MAJOR":1, "MINOR":4, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCS5Way2.cfg b/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCS5Way2.cfg index 9e644fe..885ad22 100644 --- a/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCS5Way2.cfg +++ b/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCS5Way2.cfg @@ -37,7 +37,7 @@ PART subcategory = 0 title = Mk2 5-Way RCS Thruster manufacturer = Wild Blue Industries - description = This 5-way RCS thruster also has a built-in monopropellant engine that delivers a small amount of thrust. It also has probe core functionality for VTOL flights. + description = This 5-way RCS thruster also has a built-in monopropellant engine that delivers a small amount of thrust. It also has a jump jet engine for VTOL flights. // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision attachRules = 0,1,0,1,1 diff --git a/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCSModule.cfg b/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCSModule.cfg index 71c76f0..e2e4046 100644 --- a/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCSModule.cfg +++ b/GameData/WildBlueIndustries/Buffalo/Parts/Control/RCSModule.cfg @@ -113,6 +113,43 @@ PART } } + runningJumpJet2 + { + AUDIO + { + channel = Ship + clip = sound_rocket_mini + volume = 0.0 0.0 + volume = 1.0 1.0 + pitch = 0.0 0.2 + pitch = 1.0 1.0 + loop = true + } + PREFAB_PARTICLE + { + prefabName = fx_smokeTrail_aeroSpike + transformName = smokePoint + emission = 0.0 0.0 + emission = 0.05 0.0 + emission = 0.075 0.25 + emission = 1.0 1.25 + speed = 0.0 0.25 + speed = 1.0 1.0 + localOffset = 0, 0, 1 + } + MODEL_MULTI_PARTICLE + { + modelName = Squad/FX/LES_Thruster + transformName = thrustTransform + emission = 0.0 0.0 + emission = 0.05 0.0 + emission = 0.075 0.25 + emission = 1.0 1.25 + speed = 0.0 0.5 + speed = 1.0 1.2 + } + } + power_open { AUDIO @@ -139,6 +176,30 @@ PART } } + power_open2 + { + AUDIO + { + channel = Ship + clip = sound_rocket_mini + volume = 0.0 0.0 + volume = 0.05 0.0 + volume = 1.0 1.0 + pitch = 0.0 0.2 + pitch = 1.0 1.0 + loop = true + } + PREFAB_PARTICLE + { + prefabName = fx_exhaustFlame_yellow_tiny_Z + transformName = FXTransform + emission = 0.0 0.0 + emission = 1.0 1.0 + speed = 0.0 0.8 + speed = 1.0 1.0 + } + } + running_open { AUDIO @@ -222,7 +283,7 @@ PART exhaustDamage = True ignitionThreshold = 0.1 minThrust = 0 - maxThrust = 32 + maxThrust = 16.0 heatProduction = 133 fxOffset = 0, 0, 0 EngineType = MonoProp @@ -269,6 +330,74 @@ PART } } + MODULE + { + name = ModuleEnginesFX + engineID = JumpJet LFO + runningEffectName = runningJumpJet2 + powerEffectName = power_open2 + thrustVectorTransformName = thrustTransform + exhaustDamage = True + ignitionThreshold = 0.1 + minThrust = 0 + maxThrust = 16.0 + heatProduction = 133 + fxOffset = 0, 0, 0 + EngineType = LiquidFuel + PROPELLANT + { + name = LiquidFuel + ratio = 0.9 + DrawGauge = True + } + PROPELLANT + { + name = Oxidizer + ratio = 1.1 + DrawGauge = False + } + + atmosphereCurve + { + key = 0 355 + key = 1 120 + key = 4 0.001 + } + + moduleIsEnabled = false + showUpgradesInModuleInfo = true + UPGRADES + { + UPGRADE + { + name__ = WBIJumpJetUpgrade2 + techRequired__ = advScienceTech + description__ = Monopropellant/LFO dual mode enabled. + moduleIsEnabled = true + } + } + } + + MODULE + { + name = MultiModeEngine + primaryEngineID = JumpJet + secondaryEngineID = JumpJet LFO + autoSwitch = False + moduleIsEnabled = false + showUpgradesInModuleInfo = true + UPGRADES + { + UPGRADE + { + name__ = WBIJumpJetUpgrade2 + techRequired__ = advScienceTech + description__ = Monopropellant/LFO dual mode enabled. + moduleIsEnabled = true + } + } + } + MODULE { name = ModuleRCSFX diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Readme.txt b/GameData/WildBlueIndustries/ClassicStockResources/Readme.txt index ad2a8ae..48c2bd7 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Readme.txt +++ b/GameData/WildBlueIndustries/ClassicStockResources/Readme.txt @@ -10,6 +10,9 @@ Copy the contents of the mod's GameData directory into your GameData folder. --RELEASE NOTES--- +1.0.1 +- Updated resource definitions - thanks JadeOfMaar! :) + X Initial Release ---LICENSE--- diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Production/OmniConverters.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Production/OmniConverters.cfg new file mode 100644 index 0000000..0dd863e --- /dev/null +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Production/OmniConverters.cfg @@ -0,0 +1,172 @@ +//RHK1 (From Hydrokerbon) +OMNICONVERTER +{ + templateTags = lab + TechRequired = advExploration + ConverterName = Hydrokerbon -> RHK1 + description = Produce RHK1 from Hydrokerbon. This process is 100% efficient and very fast. + StartActionName = Start RHK1-100 + StopActionName = Stop RHK1-100 + AutoShutdown = false + UseSpecialistBonus = true + SpecialistEfficiencyFactor = 0.2 + SpecialistBonusBase = 0.05 + ExperienceEffect = ConverterSkill + EfficiencyBonus = 1 + + INPUT_RESOURCE + { + ResourceName = Hydrokerbon + Ratio = 1 + FlowMode = STAGE_PRIORITY_FLOW + } + + INPUT_RESOURCE + { + ResourceName = ElectricCharge + Ratio = 30 + } + + OUTPUT_RESOURCE + { + ResourceName = RHK1 + Ratio = 3 + DumpExcess = false + FlowMode = STAGE_PRIORITY_FLOW + } +} +//RHK1 (From Ore) +OMNICONVERTER +{ + TechRequired = advExploration + ConverterName = Ore -> RHK1 + description = Produce RHK1 from Ore. This process has some efficiency over Ore -> LiquidFuel and has its cost. + StartActionName = Start RHK1-033 + StopActionName = Stop RHK1-033 + AutoShutdown = false + UseSpecialistBonus = true + SpecialistEfficiencyFactor = 0.2 + SpecialistBonusBase = 0.05 + ExperienceEffect = ConverterSkill + EfficiencyBonus = 1 + + INPUT_RESOURCE + { + ResourceName = Ore + Ratio = 0.375 + FlowMode = STAGE_PRIORITY_FLOW + } + + INPUT_RESOURCE + { + ResourceName = ElectricCharge + Ratio = 45 + } + + OUTPUT_RESOURCE + { + ResourceName = RHK1 + Ratio = 0.9 + DumpExcess = false + FlowMode = STAGE_PRIORITY_FLOW + } +} + +//Raptium +OMNICONVERTER +{ + TechRequired = advExploration + ConverterName = Hydrokerbon -> Raptium + description = Produce Raptium from Hydrokerbon. This process is 100% efficient and very fast. + StartActionName = Start Raptium + StopActionName = Stop Raptium + AutoShutdown = false + UseSpecialistBonus = true + SpecialistEfficiencyFactor = 0.2 + SpecialistBonusBase = 0.05 + ExperienceEffect = ConverterSkill + EfficiencyBonus = 1 + + INPUT_RESOURCE + { + ResourceName = Hydrokerbon + Ratio = 1 + FlowMode = STAGE_PRIORITY_FLOW + } + + INPUT_RESOURCE + { + ResourceName = ElectricCharge + Ratio = 45 + } + + OUTPUT_RESOURCE + { + ResourceName = Raptium + Ratio = 5.8 + DumpExcess = false + FlowMode = STAGE_PRIORITY_FLOW + } +} + +//Rock Dust Sifter +OMNICONVERTER +{ + templateTags = lab + TechRequired = advExploration + ConverterName = Rock Dust Sifter + description = Sift Ore and other valuables from Rock, particularly that which may be found in dust form in planetary rings. + StartActionName = Start Rock Sifting + StopActionName = Stop Rock Sifting + AutoShutdown = false + UseSpecialistBonus = true + SpecialistEfficiencyFactor = 0.2 + SpecialistBonusBase = 0.05 + ExperienceEffect = ConverterSkill + EfficiencyBonus = 1 + + INPUT_RESOURCE + { + ResourceName = Rock + Ratio = 1 + FlowMode = STAGE_PRIORITY_FLOW + } + + INPUT_RESOURCE + { + ResourceName = ElectricCharge + Ratio = 10 + } + + OUTPUT_RESOURCE + { + ResourceName = Ore + Ratio = 0.06 + DumpExcess = true + FlowMode = STAGE_PRIORITY_FLOW + } + + OUTPUT_RESOURCE + { + ResourceName = Slag + Ratio = 1.5 + DumpExcess = true + FlowMode = STAGE_PRIORITY_FLOW + } + + OUTPUT_RESOURCE + { + ResourceName = Minerite + Ratio = 0.1 + DumpExcess = true + FlowMode = STAGE_PRIORITY_FLOW + } + + OUTPUT_RESOURCE + { + ResourceName = Nitronite + Ratio = 0.07 + DumpExcess = true + FlowMode = STAGE_PRIORITY_FLOW + } +} diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hexagen.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hexagen.cfg index 117ff89..529f14c 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hexagen.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hexagen.cfg @@ -5,7 +5,7 @@ RESOURCE_DEFINITION abbreviation = HX density = 0.005 unitCost = 4 - hsp = 120 + hsp = 4560 flowMode = STAGE_PRIORITY_FLOW transfer = PUMP isTweakable = true diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hydrokerbon.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hydrokerbon.cfg index ab2b3d5..26f41c4 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hydrokerbon.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Hydrokerbon.cfg @@ -1,3 +1,4 @@ +//A.K.A. Raw Methane RESOURCE_DEFINITION { name = Hydrokerbon @@ -15,26 +16,13 @@ RESOURCE_DEFINITION volume = 5 } -RESOURCE_DEFINITION -{ - name = RHK1 - displayName = RHK-1 - density = 0.0025 - unitCost = 0.32 - flowMode = STACK_PRIORITY_SEARCH - transfer = PUMP - isTweakable = True - isVisible = True - volume = 5 -} - STORAGE_TEMPLATE { name = Hydrokerbon author = JadeOfMaar logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Propellium glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropelliumGlow - description = This kit stores Hydrokerbon, a very rare, very potent natural gas. + description = This kit stores Hydrokerbon, a very rare, very potent, very raw combustible substance. templateTags = stowage RESOURCE @@ -44,23 +32,6 @@ STORAGE_TEMPLATE maxAmount = 1800 } -} -STORAGE_TEMPLATE -{ - name = RHK1 - author = JadeOfMaar - logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuel - glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuelGlow - description = This kit stores "Refined Hydrokerbon 1," distilled, liquefied Hydrokerbon. It burns clean and enables superior rocketry. - templateTags = stowage - - RESOURCE - { - name = RHK1 - amount = 1800 - maxAmount = 1800 - } - } @PART[PotatoRoid] diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Nitronite.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Nitronite.cfg index 3f1aff9..5429810 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Nitronite.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Nitronite.cfg @@ -19,7 +19,7 @@ STORAGE_TEMPLATE author = Angel-125 logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Organics glowPanel = WildBlueIndustries/000WildBlueTools/Decals/OrganicsGlow - description = This kit stores Nitronite, a family of organic Nitro-bearing compounds and an important component of MonoPropellant and LFO, and some distillation processes. It's plentiful here on Kerbin but we're not quite sure about other planets yet... + description = This kit stores Nitronite, a powerful Nitro-bearing compound, very versatile and largely produced by microbes. It is a key component in the production of MonoPropellant and LFO, is an inefficient propellant in itself, is useful in distillers, and can be used to turn frowns upside down! It's plentiful here on Kerbin but we're not quite sure about other planets yet... templateTags = stowage RESOURCE @@ -28,7 +28,6 @@ STORAGE_TEMPLATE amount = 1800 maxAmount = 1800 } - } @PART[PotatoRoid] @@ -52,7 +51,7 @@ GLOBAL_RESOURCE { PresenceChance = 70 MinAbundance = 0.01 - MaxAbundance = 4 + MaxAbundance = 3 Variance = 30 Dispersal = 10 } @@ -68,7 +67,7 @@ PLANETARY_RESOURCE { PresenceChance = 100 MinAbundance = 1 - MaxAbundance = 10 + MaxAbundance = 6 Variance = 50 Dispersal = 3 } @@ -90,6 +89,85 @@ PLANETARY_RESOURCE } } +// Oceanic +PLANETARY_RESOURCE +{ + ResourceName = Nitronite + ResourceType = 1 + PlanetName = Kerbin + + Distribution + { + PresenceChance = 100 + MinAbundance = 3 + MaxAbundance = 5 + Variance = 50 + Dispersal = 3 + } +} +PLANETARY_RESOURCE +{ + ResourceName = Nitronite + ResourceType = 1 + PlanetName = Laythe + + Distribution + { + PresenceChance = 100 + MinAbundance = 3 + MaxAbundance = 9 + Variance = 50 + Dispersal = 3 + } +} + +// Atmospheric +PLANETARY_RESOURCE +{ + ResourceName = Nitronite + ResourceType = 2 + PlanetName = Kerbin + + Distribution + { + PresenceChance = 100 + MinAbundance = 2 + MaxAbundance = 5 + Variance = 50 + Dispersal = 3 + } +} +PLANETARY_RESOURCE +{ + ResourceName = Nitronite + ResourceType = 2 + PlanetName = Duna + + Distribution + { + PresenceChance = 100 + MinAbundance = 0.1 + MaxAbundance = 2 + Variance = 50 + Dispersal = 3 + } +} +PLANETARY_RESOURCE +{ + ResourceName = Nitronite + ResourceType = 2 + PlanetName = Laythe + + Distribution + { + PresenceChance = 100 + MinAbundance = 2 + MaxAbundance = 8 + Variance = 50 + Dispersal = 3 + } +} + // Exospheric - Slivers of scoopable Nitronite at the real atmo edge PLANETARY_RESOURCE { diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/OmniStorage.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/OmniStorage.cfg new file mode 100644 index 0000000..04f4679 --- /dev/null +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/OmniStorage.cfg @@ -0,0 +1,62 @@ +//Resource combos make sure that the resources added stay in the correct ratios despite where the sliders are. For instance, +//many rocket engines use a ratio of 0.45/0.55 for LiquidFuel and Oxidizer. No matter where the sliders are, the omni storage +//will ensure that the resource units are automatically adjusted to follow the ratios. +//You can add any number of resources, but make sure that the ratios all add up to 1.0. It also helps if the resource volumes are all the same +//so that the unit volumes are also the same (5-liter units is the stock standard). +//NOTE: For now, only the first combo pattern to match the resources in the omni storage will be applied. +OMNIRESOURCECOMBO +{ + RESOURCE + { + name = RHK1 + ratio = 0.45 + } + + RESOURCE + { + name = Oxidizer + ratio = 0.55 + } +} +OMNIRESOURCECOMBO +{ + RESOURCE + { + name = Raptium + ratio = 0.5833 + } + + RESOURCE + { + name = Oxidizer + ratio = 0.4167 + } +} +OMNIRESOURCECOMBO +{ + RESOURCE + { + name = Propellium + ratio = 0.909 + } + + RESOURCE + { + name = Oxidizer + ratio = 0.091 + } +} +OMNIRESOURCECOMBO +{ + RESOURCE + { + name = Propellium + ratio = 0.909 + } + + RESOURCE + { + name = Oxium + ratio = 0.091 + } +} diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Oxium.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Oxium.cfg index d1694e4..cd9ccf4 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Oxium.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Oxium.cfg @@ -4,6 +4,8 @@ RESOURCE_DEFINITION name = Oxium displayName = Oxium density = 0.005705 + hsp = 918 // specific heat capacity (kJ/tonne-K as units) // recalc, mols are for O2 on wiki + vsp = 213000 // heat of vapourization (KJ/tonne as units) flowMode = ALL_VESSEL transfer = PUMP isTweakable = true diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Propellium.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Propellium.cfg index 2096c50..3f2371b 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Propellium.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Propellium.cfg @@ -5,6 +5,8 @@ RESOURCE_DEFINITION displayName = Propellium abbreviation = PR density = 0.000354 + hsp = 9690 // specific heat capacity (kJ/tonne-K as units) at Crygenic Storage temperature + vsp = 448500 // heat of vapourization (KJ/tonne as units) or 8.97 * 10^5 or 8.97E5? flowMode = ALL_VESSEL transfer = PUMP isTweakable = true @@ -28,7 +30,30 @@ STORAGE_TEMPLATE amount = 1800 maxAmount = 1800 } +} + +STORAGE_TEMPLATE +{ + name = PropLox + author = JadeOfMaar + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Propellium + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/PropelliumGlow + description = This kit stores Propellium and Oxidizer. The lighter solution for efficient upper stage and vacuum propulsion. + templateTags = stowage + // 10:1 approx + RESOURCE + { + name = Propellium + amount = 1636 + maxAmount = 1636 + } + RESOURCE + { + name = Oxidizer + amount = 163 + maxAmount = 163 + } } GLOBAL_RESOURCE diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/RHK1.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/RHK1.cfg new file mode 100644 index 0000000..818cd61 --- /dev/null +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/RHK1.cfg @@ -0,0 +1,53 @@ +// Alternative to LiquidFuel, 18% lighter, converts 100% from Hydrokerbon +RESOURCE_DEFINITION +{ + name = RHK1 + displayName = RHK1 + density = 0.0041 + unitCost = 0.32 + hsp = 2010 + flowMode = STACK_PRIORITY_SEARCH + transfer = PUMP + isTweakable = True + isVisible = True + volume = 5 +} + +STORAGE_TEMPLATE +{ + name = RHK1 + author = JadeOfMaar + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuel + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuelGlow + description = This kit stores "Refined Hydrokerbon #1," distilled, liquefied Hydrokerbon. It burns clean and enables superior rocketry. + templateTags = stowage + + RESOURCE + { + name = RHK1 + amount = 1800 + maxAmount = 1800 + } +} +STORAGE_TEMPLATE +{ + name = RHK1Ox + author = JadeOfMaar + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuel + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuelGlow + description = This kit stores "Refined Hydrokerbon 1" and Oxidizer: the industry standard formula for rocketry. + templateTags = stowage + + RESOURCE + { + name = RHK1 + amount = 810 + maxAmount = 810 + } + RESOURCE + { + name = Oxidizer + amount = 990 + maxAmount = 990 + } +} \ No newline at end of file diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Raptium.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Raptium.cfg new file mode 100644 index 0000000..d494730 --- /dev/null +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Storage/Raptium.cfg @@ -0,0 +1,58 @@ +//A.K.A. (refined) Liquid Methane +RESOURCE_DEFINITION +{ + name = Raptium + displayName = Raptium + density = 0.00042561 + unitCost = 0.05 + hsp = 3348.8 + vsp = 510000 + flowMode = STACK_PRIORITY_SEARCH + transfer = PUMP + isTweakable = True + isVisible = True + volume = 5 +} + +STORAGE_TEMPLATE +{ + name = Raptium + author = JadeOfMaar + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuel + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuelGlow + description = This kit stores Raptium, also known as "Refined Hydrokerbon #2." It burns cleaner and more effectively than RHK1 and enables superior heavy rocketry. + templateTags = stowage + + RESOURCE + { + name = Raptium + amount = 1800 + maxAmount = 1800 + } +} + +STORAGE_TEMPLATE +{ + STORAGE_TEMPLATE +{ + name = RaptaLox + author = JadeOfMaar + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuel + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/LiquidFuelGlow + description = This kit stores Raptium and Oxium. This mixture enables cryo-powered superior heavy rocketry. + templateTags = stowage + + // 1.4:1; thanks Taniwha + RESOURCE + { + name = Raptium + amount = 1050 + maxAmount = 1050 + } + RESOURCE + { + name = Oxium + amount = 750 + maxAmount = 750 + } +} \ No newline at end of file diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_SCANsat.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_SCANsat.cfg index f918fd4..a9fd6a3 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_SCANsat.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_SCANsat.cfg @@ -1,7 +1,7 @@ // Purge SCANsat list @SCANSAT_SENSOR:HAS[#SCANtype[64]]:BEFORE[SCANsat] { - @name = Hydrokarbon + @name = Hydrokerbon } @SCANSAT_SENSOR:HAS[#SCANtype[128]]:BEFORE[SCANsat] { @@ -134,12 +134,12 @@ } @Item[Dirt] { - @name = Hydrokarbon + @name = Hydrokerbon @Resource_Planetary_Config { @Item,* { - @resourceName = Hydrokarbon + @resourceName = Hydrokerbon } } } diff --git a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_Stock.cfg b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_Stock.cfg index 58a742e..2ed22b9 100644 --- a/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_Stock.cfg +++ b/GameData/WildBlueIndustries/ClassicStockResources/Templates/Utility/Scanners_Stock.cfg @@ -55,7 +55,7 @@ { name = ModuleResourceScanner ScannerType = 0 - ResourceName = Hydrokarbon + ResourceName = Hydrokerbon MaxAbundanceAltitude = 1000 RequiresUnlock = false } @@ -132,7 +132,7 @@ { name = ModuleResourceScanner ScannerType = 1 - ResourceName = Hydrokarbon + ResourceName = Hydrokerbon RequiresUnlock = false } MODULE @@ -178,7 +178,7 @@ { name = ModuleResourceScanner ScannerType = 2 - ResourceName = Hydrokarbon + ResourceName = Hydrokerbon RequiresUnlock = false } MODULE @@ -234,7 +234,7 @@ { name = ModuleResourceScanner ScannerType = 3 - ResourceName = Hydrokarbon + ResourceName = Hydrokerbon RequiresUnlock = false } MODULE diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.cfg b/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.cfg index 2148233..ad71ea4 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.cfg @@ -167,6 +167,11 @@ MODULE modifiedConductionFactor = 0.003 convectionFluxThreshold = 3000 } + + MODULE + { + name = WBIRangelandHeat + } } @PART[KIS_ContainerMount1]:NEEDS[KIS] diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.mu b/GameData/WildBlueIndustries/Pathfinder/Parts/BoxedParts/Rangeland/Rangeland.mu index 3d02b143dae7dd5afd1cc8edcb1db006fb06bb47..d8f6a48cceb5cefba2275076fe37d48130515d5b 100644 GIT binary patch delta 21 dcmdn>ifz{`wuUW?cQ-IIFf?p`uz@j(1psm*2|xe< delta 21 dcmdn>ifz{`wuUW?cQ-KakYnBcU;|?m3jlU537Y@_ diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Chuckwagon.cfg b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Chuckwagon.cfg index a4779fd..cf7cdfe 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Chuckwagon.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Chuckwagon.cfg @@ -105,7 +105,7 @@ PART defaultTemplate = LFO //name of the template nodes to use - templateNodes = GREENHOUSE;STORAGE_TEMPLATE + templateNodes = GREENHOUSE;STORAGE_TEMPLATE;PATH_POWER //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 diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Conestoga.cfg b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Conestoga.cfg index 7d76f8a..82a018f 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Conestoga.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Conestoga.cfg @@ -182,7 +182,7 @@ PART defaultTemplate = Bootstrap //name of the template nodes to use - templateNodes = CONESTOGA;STORAGE_TEMPLATE + templateNodes = CONESTOGA;STORAGE_TEMPLATE;PATH_POWER //Determines if the module allows in-field reconfiguring fieldReconfigurable = True diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/GoldDigger.cfg b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/GoldDigger.cfg index 6c60d26..2b5ab79 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/GoldDigger.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/GoldDigger.cfg @@ -7,7 +7,7 @@ PART MODEL { model = Squad/Parts/Resources/RadialDrill/TriBitDrill -// texture = TriBitDrill, WildBlueIndustries/Pathfinder/Assets/GoldDigger + texture = TriBitDrill, WildBlueIndustries/Pathfinder/Assets/GoldDigger scale = .25,.25,.25 } rescaleFactor = 1 diff --git a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Hacienda.cfg b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Hacienda.cfg index 5ef8cc9..492299a 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Hacienda.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Parts/Utility/Hacienda.cfg @@ -79,12 +79,12 @@ PART StartActionName = Start Ore StopActionName = Stop Ore ImpactTransform = ImpactTransform - ImpactRange = 5 + ImpactRange = 15 AutoShutdown = true UseSpecialistBonus = true SpecialistEfficiencyFactor = 0.2 SpecialistBonusBase = 0.05 - Specialty = Engineer + ExperienceEffect = DrillSkill EfficiencyBonus = 1 GeneratesHeat = false } diff --git a/GameData/WildBlueIndustries/Pathfinder/Pathfinder.version b/GameData/WildBlueIndustries/Pathfinder/Pathfinder.version index 08add42..435289a 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Pathfinder.version +++ b/GameData/WildBlueIndustries/Pathfinder/Pathfinder.version @@ -12,14 +12,14 @@ { "MAJOR":1, "MINOR":26, - "PATCH":3, + "PATCH":4, "BUILD":0 }, "KSP_VERSION": { "MAJOR":1, "MINOR":4, - "PATCH":2 + "PATCH":3 }, "KSP_VERSION_MIN":{ "MAJOR":1, diff --git a/GameData/WildBlueIndustries/Pathfinder/Readme.txt b/GameData/WildBlueIndustries/Pathfinder/Readme.txt index 501699e..509cbbc 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Readme.txt +++ b/GameData/WildBlueIndustries/Pathfinder/Readme.txt @@ -8,6 +8,20 @@ Copy the contents of the mod's GameData directory into your KSP's GameData folde ---REVISION HISTORY--- +X Sandcastle Lives! +This update sorts through more issues with resource distribution, adds a new distribution feature, and introduces a new Sandcastle part! + +Sandcastle +- Buffalo Bulldozer (Advanced Exploration): Tired of building bases on a hill? Need a level landing pad? Then the Buffalo Bulldozer is for you! The bulldozer lets you create regolith mounds on which you to place your bases and vessels. These regolith mounds aren't parts; they're static meshes attached to the terrain itself. Regolith mounds can be created without kerbal intervention, but those with the RepairSkill (stock Engineers have it) can reduce the time it takes to create a regolith mound. The more skilled the kerbal, and the more kerbals working on the project, the less time it takes. + +1.26.4 +- WBT Update +- Classic Stock templates update - thanks JadeOfMaar! :) +- You now have the option to distribute shared resources with the vessel during each distribution cycle. You can enable it by setting the "Shares resources with vessel" option. + +Templates +- Power Distributor: Available for the Chuckwagon and Conestoga, the Power Distributor takes ElectricCharge stored in the part and distributes it throughout the vessel. It works best with resource distribution turned on, the distributor set to consume ElectricCharge, and the "Shares resources with vessel" option set to Yes. This allows a remote power station to generate power and spread it throughout vessels and bases in the vicinity. + 1.26.3 - Updated BARIS support dll. - Gold Strike drills can now extract all resources in the biome as if they had a built-in Prospector. diff --git a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniLab.cfg b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniLab.cfg index bc728db..22c15ef 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniLab.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniLab.cfg @@ -120,7 +120,13 @@ PATH_SCIENCE name = WBIOmniStorage //In liters, how much can the part store. - storageVolume = 3000 + //Note: this is a standard size for a switcher capacity of 1.0 and based on + //the Titan 1800 fuel tank standard (on which the templates were originally based). + //Actual volume depends upon switcher's capacityFactor. + storageVolume = 500 + + //Adjust storage volume to account for resource switcher's capacity factor. + accountForSwitcherCapacity = true //Skill required to reconfigure the container. reconfigureSkill = ConverterSkill @@ -133,9 +139,5 @@ PATH_SCIENCE //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;IntakeLqd;IntakeAir;StaticCharge;EVA Propellant;Plants } } \ No newline at end of file diff --git a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniShop.cfg b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniShop.cfg index 9d56110..e34f66a 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniShop.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniShop.cfg @@ -99,7 +99,13 @@ PATH_HABITATION name = WBIOmniStorage //In liters, how much can the part store. - storageVolume = 2000 + //Note: this is a standard size for a switcher capacity of 1.0 and based on + //the Titan 1800 fuel tank standard (on which the templates were originally based). + //Actual volume depends upon switcher's capacityFactor. + storageVolume = 200 + + //Adjust storage volume to account for resource switcher's capacity factor. + accountForSwitcherCapacity = true //Skill required to reconfigure the container. reconfigureSkill = ConverterSkill @@ -112,9 +118,5 @@ PATH_HABITATION //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;IntakeLqd;IntakeAir;StaticCharge;EVA Propellant;Plants } } \ No newline at end of file diff --git a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniWorks.cfg b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniWorks.cfg index 1227537..acfee4b 100644 --- a/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniWorks.cfg +++ b/GameData/WildBlueIndustries/Pathfinder/Templates/ClassicStock/OmniWorks.cfg @@ -11,7 +11,7 @@ PATH_INDUSTRY glowPanel = WildBlueIndustries/Pathfinder/Decals/Omni toolTip = Don't like letting converters sit idle? With the OmniWorks, now you can set up the exact converters that you want! toolTipTitle = Your First OmniWorks - templateTags = orbitalWorkshop;industry + templateTags = orbitalWorkshop MODULE { @@ -157,7 +157,13 @@ PATH_INDUSTRY name = WBIOmniStorage //In liters, how much can the part store. - storageVolume = 4000 + //Note: this is a standard size for a switcher capacity of 1.0 and based on + //the Titan 1800 fuel tank standard (on which the templates were originally based). + //Actual volume depends upon switcher's capacityFactor. + storageVolume = 1000 + + //Adjust storage volume to account for resource switcher's capacity factor. + accountForSwitcherCapacity = true //Skill required to reconfigure the container. reconfigureSkill = ConverterSkill @@ -170,9 +176,5 @@ PATH_INDUSTRY //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;IntakeLqd;IntakeAir;StaticCharge;EVA Propellant;Plants } } \ No newline at end of file diff --git a/GameData/WildBlueIndustries/Pathfinder/Templates/Common/PowerDistributor.cfg b/GameData/WildBlueIndustries/Pathfinder/Templates/Common/PowerDistributor.cfg new file mode 100644 index 0000000..08e742b --- /dev/null +++ b/GameData/WildBlueIndustries/Pathfinder/Templates/Common/PowerDistributor.cfg @@ -0,0 +1,19 @@ +PATH_POWER +{ + author = Angel-125 + name = Power Distributor + logoPanel = WildBlueIndustries/000WildBlueTools/Decals/Battery + glowPanel = WildBlueIndustries/000WildBlueTools/Decals/Battery + description = This kit requires the part's resource distribution to be turned set to consume ElectricCharge, and share distributed resources with the vessel. It not only stores large amounts of ElectricCharge, it also distributes the E.C. throughout the vessel during each resource distribution cycle. + requiredResource = Equipment + requiredAmount = 250 + reconfigureSkill = ConverterSkill + + RESOURCE + { + name = ElectricCharge + amount = 8000 + maxAmount = 8000 + } + +} \ No newline at end of file diff --git a/Pathfinder/WBIClassConverterView.cs b/Pathfinder/Habitat/WBIClassConverterView.cs similarity index 100% rename from Pathfinder/WBIClassConverterView.cs rename to Pathfinder/Habitat/WBIClassConverterView.cs diff --git a/Pathfinder/Parts/WBIRangelandHeat.cs b/Pathfinder/Parts/WBIRangelandHeat.cs new file mode 100644 index 0000000..490eb0b --- /dev/null +++ b/Pathfinder/Parts/WBIRangelandHeat.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using UnityEngine; +using KSP.IO; + +/* +Source code copyright 2018, by Michael Billard (Angel-125) +License: GNU General Public License Version 3 +License URL: http://www.gnu.org/licenses/ +Wild Blue Industries is trademarked by Michael Billard and may be used for non-commercial purposes. All other rights reserved. +Note that Wild Blue Industries is a ficticious entity +created for entertainment purposes. It is in no way meant to represent a real entity. +Any similarity to a real entity is purely coincidental. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ +namespace WildBlueIndustries +{ + public class WBIRangelandHeat : PartModule + { + double originalMaxTemp; + + public override void OnStart(StartState state) + { + base.OnStart(state); + originalMaxTemp = this.part.maxTemp; + } + + public override void OnUpdate() + { + base.OnUpdate(); + if (HighLogic.LoadedSceneIsFlight == false) + return; + if (this.part.vessel.Landed || + this.part.vessel.Splashed || + this.part.vessel.situation == Vessel.Situations.PRELAUNCH) + this.part.maxTemp = double.MaxValue; + else + this.part.maxTemp = originalMaxTemp; + } + } +} diff --git a/Pathfinder/Pathfinder.csproj b/Pathfinder/Pathfinder.csproj index bd3ca5c..e1e9388 100644 --- a/Pathfinder/Pathfinder.csproj +++ b/Pathfinder/Pathfinder.csproj @@ -118,7 +118,8 @@ - + + diff --git a/Pathfinder/ResourceDistribution/DistributionView.cs b/Pathfinder/ResourceDistribution/DistributionView.cs index 0d8b4e0..6e7394f 100644 --- a/Pathfinder/ResourceDistribution/DistributionView.cs +++ b/Pathfinder/ResourceDistribution/DistributionView.cs @@ -46,6 +46,11 @@ public DistributionView(string title = "Distribute Resources") : public override void SetVisible(bool newValue) { base.SetVisible(newValue); + if (distributionMap == null) + { + Debug.Log("[DistributionView] - distributionMap is null!!"); + distributionMap = new Dictionary(); + } if (!newValue) { if (rebuildCache != null) @@ -68,6 +73,13 @@ public void DrawView() PartResourceDefinition definition; GUILayout.BeginVertical(); + if (distributionMap == null) + { + GUILayout.Label("WARNING! distributionMap is null!"); + GUILayout.EndVertical(); + return; + } + if (scrollStyle == null) scrollStyle = new GUIStyle(GUI.skin.textArea); GUILayout.BeginScrollView(scrollPanePos, scrollStyle, scrollOptions); diff --git a/Pathfinder/ResourceDistribution/WBIResourceDistributor.cs b/Pathfinder/ResourceDistribution/WBIResourceDistributor.cs index a0799b5..eb4120b 100644 --- a/Pathfinder/ResourceDistribution/WBIResourceDistributor.cs +++ b/Pathfinder/ResourceDistribution/WBIResourceDistributor.cs @@ -18,6 +18,8 @@ Any similarity to a real entity is purely coincidental. */ namespace WildBlueIndustries { + public delegate void ResourcesAcquiredDelegate(string resourceName, double amount); + public enum EDistributionModes { DistributionModeOff, @@ -39,6 +41,12 @@ public class WBIResourceDistributor : PartModule, IOpsView [UI_Toggle(enabledText = "Yes", disabledText = "No")] public bool isParticipating; + [KSPField(isPersistant = true, guiName = "Share resources with vessel")] + [UI_Toggle(enabledText = "Yes", disabledText = "No")] + public bool sharesWithVessel; + + public event ResourcesAcquiredDelegate onResourceDistributed; + public EDistributionModes distribution; public Dictionary distributionMap = new Dictionary(); string templateName; @@ -58,26 +66,9 @@ public void SetupDistribution() return; } - //Account for blacklisted resources - int blacklistCount = 0; - if (!string.IsNullOrEmpty(resourceBlacklist)) - { - for (int index = 0; index < resourceCount; index++) - { - if (resourceBlacklist.Contains(this.part.Resources[index].resourceName)) - blacklistCount += 1; - } - } - resourceCount -= blacklistCount; - if (resourceCount <= 0) - { - ScreenMessages.PostScreenMessage("No resources to distribute.", 5.0f, ScreenMessageStyle.UPPER_CENTER); + //Check distribution list + if (!checkDistributionList()) return; - } - - //If our distribution map doesn't match the resource count then rebuild the map. - if (distributionMap.Keys.Count != resourceCount) - RebuildDistributionList(); //Now show the view. distributionView.isParticipating = this.isParticipating; @@ -317,6 +308,7 @@ public virtual void GetResourcesToDistribute(out List sharedList, //Log info WBIDistributionManager.Log("[WBIResourceDistributor] - " + this.part.partInfo.title + " is gathering resources to distribute."); + RebuildDistributionCache(); sharedList = this.sharedResourcesCache; requiredList = this.requiredResourcesCache; } @@ -342,6 +334,17 @@ public virtual double FillRequiredResource(string resourceName, double grandTota if (resource.amount + grandTotal <= resource.maxAmount) { resource.amount += grandTotal; + if (onResourceDistributed != null) + onResourceDistributed(resourceName, grandTotal); + + //Share with vessel + if (sharesWithVessel) + { + double amount = this.part.Resources[resourceName].amount; + this.part.Resources[resourceName].amount = 0.0f; + this.part.RequestResource(resourceName, -amount, ResourceFlowMode.ALL_VESSEL); + } + return 0f; } @@ -351,6 +354,18 @@ public virtual double FillRequiredResource(string resourceName, double grandTota //Set amount to max. resource.amount = resource.maxAmount; + //Share with vessel + if (sharesWithVessel) + { + double amount = this.part.Resources[resourceName].amount; + this.part.Resources[resourceName].amount = 0.0f; + this.part.RequestResource(resourceName, -amount, ResourceFlowMode.ALL_VESSEL); + } + + //Fire event + if (onResourceDistributed != null) + onResourceDistributed(resourceName, resource.amount); + return amountRemaining; } @@ -364,6 +379,49 @@ public virtual void TakeShare(string resourceName, double sharePercent) //Set our share amount this.part.Resources[resourceName].amount = this.part.Resources[resourceName].maxAmount * sharePercent; + + //Share with vessel + if (sharesWithVessel) + { + double amount = this.part.Resources[resourceName].amount; + this.part.Resources[resourceName].amount = 0.0f; + this.part.RequestResource(resourceName, -amount, ResourceFlowMode.ALL_VESSEL); + } + + //Fire event + if (onResourceDistributed != null) + onResourceDistributed(resourceName, this.part.Resources[resourceName].amount); + } + + protected bool checkDistributionList() + { + //Get the resource count + int resourceCount = this.part.Resources.Count; + if (resourceCount == 0) + return false; + + //Account for blacklisted resources + int blacklistCount = 0; + if (!string.IsNullOrEmpty(resourceBlacklist)) + { + for (int index = 0; index < resourceCount; index++) + { + if (resourceBlacklist.Contains(this.part.Resources[index].resourceName)) + blacklistCount += 1; + } + } + resourceCount -= blacklistCount; + if (resourceCount <= 0) + { + ScreenMessages.PostScreenMessage("No resources to distribute.", 5.0f, ScreenMessageStyle.UPPER_CENTER); + return false; + } + + //If our distribution map doesn't match the resource count then rebuild the map. + if (distributionMap.Keys.Count != resourceCount) + RebuildDistributionList(); + + return true; } public void SetGUIVisible(bool isVisible) @@ -387,6 +445,7 @@ public virtual void DrawOpsWindow(string buttonLabel) { if (!isConsumer) { + checkDistributionList(); distributionView.DrawView(); isParticipating = distributionView.isParticipating; } diff --git a/Pathfinder/obj/Debug/Pathfinder.csproj.FileListAbsolute.txt b/Pathfinder/obj/Debug/Pathfinder.csproj.FileListAbsolute.txt index c43975c..5e79f46 100644 --- a/Pathfinder/obj/Debug/Pathfinder.csproj.FileListAbsolute.txt +++ b/Pathfinder/obj/Debug/Pathfinder.csproj.FileListAbsolute.txt @@ -14,11 +14,10 @@ C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\UnityEngine.U C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\WildBlueTools.dll C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\KSPTrackIR.dll C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\Mono.Cecil.dll +C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\Ionic.Zip.dll C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\TDx.TDxInput.dll +C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\RedShellSDK.dll C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\BARISBridge.pdb C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\WildBlueTools.pdb -C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\obj\Debug\Pathfinder.csprojResolveAssemblyReference.cache C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\obj\Debug\Pathfinder.dll C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\obj\Debug\Pathfinder.pdb -C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\Ionic.Zip.dll -C:\Projects\KSP\WildBlueIndustries\Pathfinder\Pathfinder\bin\Debug\RedShellSDK.dll