diff --git a/GameData/DMagicOrbitalScience/Change Log.txt b/GameData/DMagicOrbitalScience/Change Log.txt index 5ef65df..f0860e5 100644 --- a/GameData/DMagicOrbitalScience/Change Log.txt +++ b/GameData/DMagicOrbitalScience/Change Log.txt @@ -1,4 +1,7 @@ -v1.4 +v1.4.1 +- Fixed problems with parts that consume Electricity or other resources + +v1.4 - Update for Universal Storage II - New versions of Orbital Science parts for Universal Storage - Stock science parts no longer available for US (will be added by US at a later date) diff --git a/GameData/DMagicOrbitalScience/DMagicOrbitalScience.version b/GameData/DMagicOrbitalScience/DMagicOrbitalScience.version index 329e997..4a3fbe5 100644 --- a/GameData/DMagicOrbitalScience/DMagicOrbitalScience.version +++ b/GameData/DMagicOrbitalScience/DMagicOrbitalScience.version @@ -10,7 +10,7 @@ "VERSION":{ "MAJOR":1, "MINOR":4, - "PATCH":0, + "PATCH":1, "BUILD":0 }, "KSP_VERSION":{ diff --git a/GameData/DMagicOrbitalScience/ProbeScience/ASERT/ASERT.cfg b/GameData/DMagicOrbitalScience/ProbeScience/ASERT/ASERT.cfg index c4c6495..d9e0792 100644 --- a/GameData/DMagicOrbitalScience/ProbeScience/ASERT/ASERT.cfg +++ b/GameData/DMagicOrbitalScience/ProbeScience/ASERT/ASERT.cfg @@ -1,69 +1,73 @@ PART { -name = dmASERT -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/ProbeScience/ASERT/modelASERT - scale = 0.7, 0.7, 0.7 -} - -rescaleFactor = 1 - -node_attach = 0.0, -0.056, 0.0, 0.0, -1.0, 0.0 -attachRules = 0,1,0,0,0 - -TechRequired = actuators -entryCost = 20000 -cost = 6500 -category = Science -subcategory = 0 -title = Asteroid Sounding Experiment by Radiowave Transmission -manufacturer = DMagic -description = The ASERT is an asteroid-only experiment used to study the interior composition of asteroids. It must be paired with a second module placed on the opposite side of an asteroid. When two modules are properly positioned the experiment can be conducted with the science amount dependent on how much of the asteroid the signal passed through. - -// --- standard part parameters --- -mass = 0.02 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1400 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 + name = dmASERT + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid sounding - -MODULE -{ - name=ModuleAsteroidAnalysis -} - -MODULE -{ - name=ModuleAnalysisResource - resourceName = Ore -} - -MODULE + MODEL { - name = DMAsteroidScanner - animationName = dishDeploy - greenLight = greenAnim - yellowLight = yellowAnim + model = DMagicOrbitalScience/ProbeScience/ASERT/modelASERT + scale = 0.7, 0.7, 0.7 + } + + rescaleFactor = 1 + + node_attach = 0.0, -0.056, 0.0, 0.0, -1.0, 0.0 + attachRules = 0,1,0,0,0 + + TechRequired = actuators + entryCost = 20000 + cost = 6500 + category = Science + subcategory = 0 + title = Asteroid Sounding Experiment by Radiowave Transmission + manufacturer = DMagic + description = The ASERT is an asteroid-only experiment used to study the interior composition of asteroids. It must be paired with a second module placed on the opposite side of an asteroid. When two modules are properly positioned the experiment can be conducted with the science amount dependent on how much of the asteroid the signal passed through. - experimentID = dmAsteroidScan - rerunnable = True - transmitValue = 1.0 - dataIsCollectable = True - collectActionName = Take Data - experimentResource = ElectricCharge - resourceCost = 0.25 - usageReqMaskExternal = 8 + // --- standard part parameters --- + mass = 0.02 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1400 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 + + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid sounding + + MODULE + { + name=ModuleAsteroidAnalysis + } + + MODULE + { + name=ModuleAnalysisResource + resourceName = Ore + } + + MODULE + { + name = DMAsteroidScanner + animationName = dishDeploy + greenLight = greenAnim + yellowLight = yellowAnim + + experimentID = dmAsteroidScan + rerunnable = True + transmitValue = 1.0 + dataIsCollectable = True + collectActionName = Take Data + usageReqMaskExternal = 8 + + RESOURCE + { + name = ElectricCharge + rate = 0.25 + } } } diff --git a/GameData/DMagicOrbitalScience/ProbeScience/MagBoom/MagBoom.cfg b/GameData/DMagicOrbitalScience/ProbeScience/MagBoom/MagBoom.cfg index 051b765..53757a0 100644 --- a/GameData/DMagicOrbitalScience/ProbeScience/MagBoom/MagBoom.cfg +++ b/GameData/DMagicOrbitalScience/ProbeScience/MagBoom/MagBoom.cfg @@ -1,46 +1,46 @@ PART { -name = dmmagBoom -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/ProbeScience/MagBoom/modelMagBoom -} - -scale = 1 -rescaleFactor = 1 - -node_stack_bottom = 0.0, -0.195, 0.0, 0.0, -1.0, 0.0, 0 -node_attach = 0.0, -0.160, 0.0, 0.0, -1.0, 0.0, 0 - -TechRequired = engineering101 -entryCost = 3000 -cost = 1000 -category = Science -subcategory = 0 -title = Magnetometer Boom -manufacturer = DMagic -description = The magnetometer instruments are used to determine the magnitude and direction of planetary magnetic fields. The long boom separates these instruments from any interference caused by magnetic elements in the probe. Use in low to high orbit or on the surface. Not for use during atmospheric flight. -attachRules = 1,1,0,0,0 - -// --- standard part parameters --- -mass = 0.015 -bulkheadProfiles = size0, srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos (mag field asteroid + name = dmmagBoom + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -MODULE + MODEL + { + model = DMagicOrbitalScience/ProbeScience/MagBoom/modelMagBoom + } + + scale = 1 + rescaleFactor = 1 + + node_stack_bottom = 0.0, -0.195, 0.0, 0.0, -1.0, 0.0, 0 + node_attach = 0.0, -0.160, 0.0, 0.0, -1.0, 0.0, 0 + + TechRequired = engineering101 + entryCost = 3000 + cost = 1000 + category = Science + subcategory = 0 + title = Magnetometer Boom + manufacturer = DMagic + description = The magnetometer instruments are used to determine the magnitude and direction of planetary magnetic fields. The long boom separates these instruments from any interference caused by magnetic elements in the probe. Use in low to high orbit or on the surface. Not for use during atmospheric flight. + attachRules = 1,1,0,0,0 + + // --- standard part parameters --- + mass = 0.015 + bulkheadProfiles = size0, srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 + + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos (mag field asteroid + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 + + MODULE { name = ModuleResourceScanner MaxAbundanceAltitude = 60000 @@ -48,59 +48,63 @@ MODULE ScannerType = 0 ResourceName = Ore } - -MODULE - { - name = DMModuleScienceAnimate - - animationName = magBoom - - experimentID = magScan - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = -1 - keepDeployedMode = 2 + MODULE + { + name = DMModuleScienceAnimate - deployingMessage = Close proximity to the craft scrambles the magnetometer's sensors, deploying the scanner now. - customFailMessage = The magnetometer is not suitable for use during atmospheric flight, try again on the ground or in space. + animationName = magBoom + + experimentID = magScan - animSpeed = 2 - endEventGUIName = Retract Magnetometer - showEndEvent = false - startEventGUIName = Deploy Magnetometer - showStartEvent = false - toggleEventGUIName = Toggle Magnetometer - showToggleEvent = true - showEditorEvents = true - - experimentActionName = Log Magnetometer Data - resetActionName = Discard Magnetometer Data + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = -1 + keepDeployedMode = 2 + + deployingMessage = Close proximity to the craft scrambles the magnetometer's sensors, deploying the scanner now. + customFailMessage = The magnetometer is not suitable for use during atmospheric flight, try again on the ground or in space. + + animSpeed = 2 + endEventGUIName = Retract Magnetometer + showEndEvent = false + startEventGUIName = Deploy Magnetometer + showStartEvent = false + toggleEventGUIName = Toggle Magnetometer + showToggleEvent = true + showEditorEvents = true + + experimentActionName = Log Magnetometer Data + resetActionName = Discard Magnetometer Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 - - asteroidReports = True - asteroidTypeDependent = True + asteroidReports = True + asteroidTypeDependent = True } - + MODULE { - name = DMMagBoomModule - - runMagnetometer = True - resourceToUse = ElectricCharge - resourceCost = 0.05 + name = DMMagBoomModule + + runMagnetometer = True + + RESOURCE + { + name = ElectricCharge + rate = 0.05 + } } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/AnomSensor/AnomScanner.cfg b/GameData/DMagicOrbitalScience/RoverScience/AnomSensor/AnomScanner.cfg index f3703b6..c0e1cd7 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/AnomSensor/AnomScanner.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/AnomSensor/AnomScanner.cfg @@ -1,80 +1,83 @@ PART { -name = dmAnomScanner -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/RoverScience/AnomSensor/modelAnomaly - scale = 0.9, 0.9, 0.9 - -} -scale = 1 -rescaleFactor = 1 - -node_stack_bottom = 0.0, -0.0675, 0.0, 0.0, -1.0, 0.0, 0 -node_attach = 0.0, -0.0315, 0.0, 0.0, -1.0, 0.0, 0 - -TechRequired = advScienceTech -entryCost = 20000 -cost = 12000 -category = Science -subcategory = 0 -title = Anomalous Signal Sensor -manufacturer = DMagic -description = This small sensor is designed to scan for anomalous signals across several regions of the electromagnetic spectrum. You must be within 250m of the signal to obtain science results; use it from further out to obtain an estimate of the range and distance to the signal. For the best results, return the device to the KSC for further study. -attachRules = 1,1,0,0,0 - -mass = 0.015 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 + name = dmAnomScanner + module = Part + author = DMagic -tags = experiment research science dmagic dmos (non anomaly mystery unknown + MODEL + { + model = DMagicOrbitalScience/RoverScience/AnomSensor/modelAnomaly + scale = 0.9, 0.9, 0.9 -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - + } + scale = 1 + rescaleFactor = 1 -MODULE -{ - name = DMAnomalyScanner - - animationName = deployDish - camAnimate = camDeploy - foundAnimate = foundLight - - experimentID = AnomalyScan + node_stack_bottom = 0.0, -0.0675, 0.0, 0.0, -1.0, 0.0, 0 + node_attach = 0.0, -0.0315, 0.0, 0.0, -1.0, 0.0, 0 - experimentAnimation = true - keepDeployedMode = 2 + TechRequired = advScienceTech + entryCost = 20000 + cost = 12000 + category = Science + subcategory = 0 + title = Anomalous Signal Sensor + manufacturer = DMagic + description = This small sensor is designed to scan for anomalous signals across several regions of the electromagnetic spectrum. You must be within 250m of the signal to obtain science results; use it from further out to obtain an estimate of the range and distance to the signal. For the best results, return the device to the KSC for further study. + attachRules = 1,1,0,0,0 - endEventGUIName = Retract Dish - showEndEvent = false - startEventGUIName = Deploy Dish - showStartEvent = false - toggleEventGUIName = Toggle Dish - showToggleEvent = true - showEditorEvents = true - - experimentActionName = Collect Anomalous Data - resetActionName = Discard Anomalous Data - - resourceExperiment = ElectricCharge - resourceCost = 1 - - xmitDataScalar = 0.5 - useActionGroups = True - rerunnable = false - resetLevel = 4 + mass = 0.015 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 + + tags = experiment research science dmagic dmos (non anomaly mystery unknown + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 - dataIsCollectable = false - resettableOnEVA = true - interactionRange = 1.5 -} + + MODULE + { + name = DMAnomalyScanner + + animationName = deployDish + camAnimate = camDeploy + foundAnimate = foundLight + + experimentID = AnomalyScan + + experimentAnimation = true + keepDeployedMode = 2 + + endEventGUIName = Retract Dish + showEndEvent = false + startEventGUIName = Deploy Dish + showStartEvent = false + toggleEventGUIName = Toggle Dish + showToggleEvent = true + showEditorEvents = true + + experimentActionName = Collect Anomalous Data + resetActionName = Discard Anomalous Data + + xmitDataScalar = 0.5 + useActionGroups = True + rerunnable = false + resetLevel = 4 + + dataIsCollectable = false + resettableOnEVA = true + interactionRange = 1.5 + + RESOURCE + { + name = ElectricCharge + rate = 1 + } + } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/Bathymetry/Bathymetry.cfg b/GameData/DMagicOrbitalScience/RoverScience/Bathymetry/Bathymetry.cfg index 4ed2783..3370974 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/Bathymetry/Bathymetry.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/Bathymetry/Bathymetry.cfg @@ -42,47 +42,52 @@ minimum_drag = 0.1 MODULE { - name = DMBathymetry + name = DMBathymetry + + animationName = Default Take + redLightName = redLight + blueLightName = blueLight + redLightMaterial = redLightMaterial + blueLightMaterial = blueLightMaterial + + depthThreshold = 100 - animationName = Default Take - redLightName = redLight - blueLightName = blueLight - redLightMaterial = redLightMaterial - blueLightMaterial = blueLightMaterial - lightResourceCost = 0.04 + experimentAnimation = true + experimentWaitForAnimation = true + keepDeployedMode = 2 - depthThreshold = 100 - - experimentAnimation = true - experimentWaitForAnimation = true - keepDeployedMode = 2 - - animSpeed = 1.5 - showEndEvent = false - showStartEvent = false - showToggleEvent = true - startEventGUIName = Deploy - endEventGUIName = Retract - toggleEventGUIName = Toggle - - customFailMessage = The probe can only be used under water - - experimentID = dmbathymetryscan + animSpeed = 1.5 + showEndEvent = false + showStartEvent = false + showToggleEvent = true + startEventGUIName = Deploy + endEventGUIName = Retract + toggleEventGUIName = Toggle + + customFailMessage = The probe can only be used under water + + experimentID = dmbathymetryscan + + experimentActionName = Collect Bathymetry Data + resetActionName = Discard Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - experimentActionName = Collect Bathymetry Data - resetActionName = Discard Data - - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True - - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 + + RESOURCE + { + name = ElectricCharge + rate = 0.04 + } } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/BioDrill/BioDrill.cfg b/GameData/DMagicOrbitalScience/RoverScience/BioDrill/BioDrill.cfg index 38b5615..e2c07fa 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/BioDrill/BioDrill.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/BioDrill/BioDrill.cfg @@ -1,86 +1,89 @@ PART { -name = dmbioDrill -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/RoverScience/BioDrill/modelBioDrill - scale = 0.8, 0.8, 0.8 -} -scale = 1 -rescaleFactor = 1 - -node_stack_bottom = 0.0, -0.108, 0.0, 0.0, -1.0, 0.0, 0 -node_attach = 0.0, -0.08, 0.0, 0.0, -1.0, 0.0, 0 - -TechRequired = scienceTech -entryCost = 15000 -cost = 6500 -category = Science -subcategory = 0 -title = ExoKerbol Core Drill -manufacturer = DMagic -description = The ExoKerbol Core Drill (XKCD) is designed to collect subsurface core samples to search for signs of biological activity on atmospheric planets. Three drill core samples can be stored in the incubation chambers for return. Check drill animator orientation with the preview in the VAB/SPH. -attachRules = 1,1,0,0,0 - -// --- standard part parameters --- -mass = 0.015 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 - -tags = experiment research science dmagic dmos (non biological incubation + name = dmbioDrill + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -MODULE -{ - name = DMBioDrill + MODEL + { + model = DMagicOrbitalScience/RoverScience/BioDrill/modelBioDrill + scale = 0.8, 0.8, 0.8 + } + scale = 1 + rescaleFactor = 1 + + node_stack_bottom = 0.0, -0.108, 0.0, 0.0, -1.0, 0.0, 0 + node_attach = 0.0, -0.08, 0.0, 0.0, -1.0, 0.0, 0 + + TechRequired = scienceTech + entryCost = 15000 + cost = 6500 + category = Science + subcategory = 0 + title = ExoKerbol Core Drill + manufacturer = DMagic + description = The ExoKerbol Core Drill (XKCD) is designed to collect subsurface core samples to search for signs of biological activity on atmospheric planets. Three drill core samples can be stored in the incubation chambers for return. Check drill animator orientation with the preview in the VAB/SPH. + attachRules = 1,1,0,0,0 - animationName = horizontalDrill - verticalDrill = verticalDrill - sampleAnim = sampleFill - sampleEmptyAnim = sampleEmpty - - customFailMessage = The XKCD is only meant to be used on the surface of atmospheric planets. - animSpeed = 1 + // --- standard part parameters --- + mass = 0.015 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = 8 - oneWayAnimation = true - - startEventGUIName = Systems Check - showStartEvent = true - showEndEvent = false - showEditorEvents = true + tags = experiment research science dmagic dmos (non biological incubation + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 - experimentID = dmbiodrillscan - experimentLimit = 3 - xmitDataScalar = 0.3 + MODULE + { + name = DMBioDrill + + animationName = horizontalDrill + verticalDrill = verticalDrill + sampleAnim = sampleFill + sampleEmptyAnim = sampleEmpty - experimentActionName = Collect Core Sample + customFailMessage = The XKCD is only meant to be used on the surface of atmospheric planets. + animSpeed = 1 + + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = 8 + oneWayAnimation = true - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = False - resetLevel = 3 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 + startEventGUIName = Systems Check + showStartEvent = true + showEndEvent = false + showEditorEvents = true + + experimentID = dmbiodrillscan + experimentLimit = 3 + xmitDataScalar = 0.3 + + experimentActionName = Collect Core Sample + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = False + resetLevel = 3 - resourceExperiment = ElectricCharge - resourceExpCost = 8 + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 + + RESOURCE + { + name = ElectricCharge + rate = 8 + } } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/DAN/DAN.cfg b/GameData/DMagicOrbitalScience/RoverScience/DAN/DAN.cfg index 13bb345..faa237c 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/DAN/DAN.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/DAN/DAN.cfg @@ -1,85 +1,88 @@ PART { -name = dmDAN -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/RoverScience/DAN/modelDAN - scale = 1.1, 1.1, 1.1 -} - -scale = 1 -rescaleFactor = 1 - -node_attach = 0.0, -0.044, 0.0, 0.0, -1.0, 0.0, 0 - -TechRequired = advElectrics -entryCost = 13000 -cost = 5500 -category = Science -subcategory = 0 -title = Dynamic Albedo of Neutrons -manufacturer = DMagic -description = The Dynamic Albedo of Neutrons instrument scans the upper layers of the surface to detect any hydrogen molecules within, specifically searching for water. -attachRules = 0,1,0,0,0 - -// --- standard part parameters --- -mass = 0.01 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid (dan water + name = dmDAN + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -MODULE + MODEL { - name = DMModuleScienceAnimate + model = DMagicOrbitalScience/RoverScience/DAN/modelDAN + scale = 1.1, 1.1, 1.1 + } + + scale = 1 + rescaleFactor = 1 - animationName = DANHeatSink - - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = 5 - oneWayAnimation = true - - startEventGUIName = Systems Check - showStartEvent = true - showEndEvent = false - showEditorEvents = true + node_attach = 0.0, -0.044, 0.0, 0.0, -1.0, 0.0, 0 - customFailMessage = This instrument is only suitable for surface based observations. + TechRequired = advElectrics + entryCost = 13000 + cost = 5500 + category = Science + subcategory = 0 + title = Dynamic Albedo of Neutrons + manufacturer = DMagic + description = The Dynamic Albedo of Neutrons instrument scans the upper layers of the surface to detect any hydrogen molecules within, specifically searching for water. + attachRules = 0,1,0,0,0 - experimentID = dmNAlbedoScan + // --- standard part parameters --- + mass = 0.01 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 + + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid (dan water + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 + + MODULE + { + name = DMModuleScienceAnimate + + animationName = DANHeatSink - experimentActionName = Collect Hydrogen Data - resetActionName = Discard Hydrogen Data + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = 5 + oneWayAnimation = true - resourceExperiment = ElectricCharge - resourceExpCost = 10 + startEventGUIName = Systems Check + showStartEvent = true + showEndEvent = false + showEditorEvents = true + + customFailMessage = This instrument is only suitable for surface based observations. + + experimentID = dmNAlbedoScan + + experimentActionName = Collect Hydrogen Data + resetActionName = Discard Hydrogen Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.8 + externalDeploy = True + usageReqMaskExternal = 8 - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.8 - externalDeploy = True - usageReqMaskExternal = 8 - - asteroidReports = True - asteroidTypeDependent = True + asteroidReports = True + asteroidTypeDependent = True + + RESOURCE + { + name = ElectricCharge + rate = 10 + } } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/Laser/Laser.cfg b/GameData/DMagicOrbitalScience/RoverScience/Laser/Laser.cfg index 14fcab5..c0a21b9 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/Laser/Laser.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/Laser/Laser.cfg @@ -1,86 +1,89 @@ PART { -name = dmsurfacelaser -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/RoverScience/Laser/modelLaser - scale = 0.7, 0.7, 0.7 -} - -scale = 1 -rescaleFactor = 1 - -node_stack_bottom = -0.14, -0.1155, 0.0, 0.0, -1.0, 0.0, 0 -node_attach = -0.14, -0.0875, 0.0, 0.0, -1.0, 0.0, 0 - -TechRequired = spaceExploration -entryCost = 12000 -cost = 4500 -category = Science -subcategory = 0 -title = Surface Ablation Laser Light Imager -manufacturer = DMagic -description = Presenting the latest in laser based geological science. This device is capable of vaporizing surface samples to study their composition and expose hidden layers of the surface for further study. Warning: DMagic Orbital Science does not condone the use of this laser in any space combat related hijinks, please refrain from such activities. -attachRules = 1,1,0,0,0 - -// --- standard part parameters --- -mass = 0.015 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid chemcam + name = dmsurfacelaser + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -MODULE -{ - name = DMModuleScienceAnimate + MODEL + { + model = DMagicOrbitalScience/RoverScience/Laser/modelLaser + scale = 0.7, 0.7, 0.7 + } + + scale = 1 + rescaleFactor = 1 + + node_stack_bottom = -0.14, -0.1155, 0.0, 0.0, -1.0, 0.0, 0 + node_attach = -0.14, -0.0875, 0.0, 0.0, -1.0, 0.0, 0 + + TechRequired = spaceExploration + entryCost = 12000 + cost = 4500 + category = Science + subcategory = 0 + title = Surface Ablation Laser Light Imager + manufacturer = DMagic + description = Presenting the latest in laser based geological science. This device is capable of vaporizing surface samples to study their composition and expose hidden layers of the surface for further study. Warning: DMagic Orbital Science does not condone the use of this laser in any space combat related hijinks, please refrain from such activities. + attachRules = 1,1,0,0,0 - animationName = laserBlast - - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = 4 - oneWayAnimation = true - - startEventGUIName = Systems Check - showStartEvent = true - showEndEvent = false - showEditorEvents = true + // --- standard part parameters --- + mass = 0.015 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 - customFailMessage = The laser is only suitable for surface based observations. + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid chemcam + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 - experimentID = dmlaserblastscan + MODULE + { + name = DMModuleScienceAnimate + + animationName = laserBlast - experimentActionName = Collect Laser Data - resetActionName = Discard Laser Data + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = 4 + oneWayAnimation = true - resourceExperiment = ElectricCharge - resourceExpCost = 20 + startEventGUIName = Systems Check + showStartEvent = true + showEndEvent = false + showEditorEvents = true + + customFailMessage = The laser is only suitable for surface based observations. + + experimentID = dmlaserblastscan + + experimentActionName = Collect Laser Data + resetActionName = Discard Laser Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 - - asteroidReports = True - asteroidTypeDependent = True + asteroidReports = True + asteroidTypeDependent = True + + RESOURCE + { + name = ElectricCharge + rate = 20 + } } } diff --git a/GameData/DMagicOrbitalScience/RoverScience/XRay/XRay.cfg b/GameData/DMagicOrbitalScience/RoverScience/XRay/XRay.cfg index 3d7eee9..b4bc4a6 100644 --- a/GameData/DMagicOrbitalScience/RoverScience/XRay/XRay.cfg +++ b/GameData/DMagicOrbitalScience/RoverScience/XRay/XRay.cfg @@ -1,103 +1,106 @@ PART { -name = dmXRay -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/RoverScience/XRay/modelXRay - scale = 2.2, 2.2, 2.2 -} - -scale = 1 -rescaleFactor = 1 - -node_attach = 0.0, 0.0, 0.1144, 0.0, 0.0, -1.0, 0 - -TechRequired = fieldScience -entryCost = 14500 -cost = 7500 -category = Science -subcategory = 0 -title = XRD Surface Analyzer -manufacturer = DMagic -description = This instrument collects a small surface sample and determines its exact mineral composition through powder X-Ray diffraction. Because Kerbals don't trust what they can't see the chamber has been filled with a special scintillation gas to allow for easy visibility of the X-Ray beam. The drill must contact the surface to obtain a usable sample; perform adequate tests before launch! -attachRules = 0,1,0,0,0 - -// --- standard part parameters --- -mass = 0.015 -bulkheadProfiles = srf -crashTolerance = 10 -maxTemp = 1200 -emissiveConstant = 0.85 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid xray chemin + name = dmXRay + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default -maximum_drag = 0.1 -minimum_drag = 0.1 - -MODULE -{ - name=ModuleBiomeScanner -} - -MODULE -{ - name=ModuleAsteroidAnalysis -} - -MODULE -{ - name=ModuleAnalysisResource - resourceName = Ore -} - -MODULE -{ - name = DMXRayDiffract + MODEL + { + model = DMagicOrbitalScience/RoverScience/XRay/modelXRay + scale = 2.2, 2.2, 2.2 + } + + scale = 1 + rescaleFactor = 1 + + node_attach = 0.0, 0.0, 0.1144, 0.0, 0.0, -1.0, 0 - drillLength = 4 + TechRequired = fieldScience + entryCost = 14500 + cost = 7500 + category = Science + subcategory = 0 + title = XRD Surface Analyzer + manufacturer = DMagic + description = This instrument collects a small surface sample and determines its exact mineral composition through powder X-Ray diffraction. Because Kerbals don't trust what they can't see the chamber has been filled with a special scintillation gas to allow for easy visibility of the X-Ray beam. The drill must contact the surface to obtain a usable sample; perform adequate tests before launch! + attachRules = 0,1,0,0,0 - animationName = SampleDrill - - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = 10 - oneWayAnimation = true - - startEventGUIName = Systems Check - showStartEvent = true - showEndEvent = false - showEditorEvents = true + // --- standard part parameters --- + mass = 0.015 + bulkheadProfiles = srf + crashTolerance = 10 + maxTemp = 1200 + emissiveConstant = 0.85 + thermalMassModifier = 4.0 - customFailMessage = This instrument is only suitable for surface based observations. + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos asteroid xray chemin + + angularDrag = 1 + dragModelType = default + maximum_drag = 0.1 + minimum_drag = 0.1 + + MODULE + { + name=ModuleBiomeScanner + } + + MODULE + { + name=ModuleAsteroidAnalysis + } + + MODULE + { + name=ModuleAnalysisResource + resourceName = Ore + } - experimentID = dmXRayDiffract + MODULE + { + name = DMXRayDiffract + + drillLength = 4 + + animationName = SampleDrill - experimentActionName = Collect X-Ray Data - resetActionName = Discard X-Ray Data + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = 10 + oneWayAnimation = true - resourceExperiment = ElectricCharge - resourceExpCost = 10 + startEventGUIName = Systems Check + showStartEvent = true + showEndEvent = false + showEditorEvents = true + + customFailMessage = This instrument is only suitable for surface based observations. + + experimentID = dmXRayDiffract + + experimentActionName = Collect X-Ray Data + resetActionName = Discard X-Ray Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 - - asteroidReports = True - asteroidTypeDependent = True + asteroidReports = True + asteroidTypeDependent = True + + RESOURCE + { + name = ElectricCharge + rate = 10 + } } } diff --git a/GameData/DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT.cfg b/GameData/DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT.cfg index 0d12009..1dd13b9 100644 --- a/GameData/DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT.cfg +++ b/GameData/DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT.cfg @@ -1,87 +1,91 @@ PART:NEEDS[UniversalStorage2] { -name = dmUS2Asert -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT - texture = ASERT_DIFF, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_DIFF - texture = ASERT_NRM, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_NRM - texture = ASERT_EMIT, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_EMIT - texture = Stock_US_DIFF, DMagicOrbitalScience/UniversalStorage/USStock/Stock_US_DIFF - texture = Stock_US_NRM, DMagicOrbitalScience/UniversalStorage/USStock/Stock_US_NRM - texture = AtlasFuel01D, UniversalStorage2/Parts/Fuels/AtlasFuel01D - texture = AtlasFuel01N, UniversalStorage2/Parts/Fuels/AtlasFuel01N - rotation = 0, 180, 0 -} - -NODE -{ - name = attach - transform = Node - size = 0 - method = FIXED_JOINT -} - -scale = 1 -rescaleFactor = 1 - -attachRules = 1,0,1,1,0 - -TechRequired = actuators -entryCost = 20000 -cost = 6750 -category = Science -subcategory = 0 -title = Univ. Storage 2 - ASERT -manufacturer = DMagic -description = The ASERT is an asteroid-only experiment used to study the interior composition of asteroids. It must be paired with a second module placed on the opposite side of an asteroid. When two modules are properly positioned the experiment can be conducted with the science amount dependent on how much of the asteroid the signal passed through. - -// --- standard part parameters --- -mass = 0.05 -bulkheadProfiles = wedge -crashTolerance = 10 -maxTemp = 2200 -emissiveConstant = 0.95 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos universal wedge asteroid sounding + name = dmUS2Asert + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default - -MODULE -{ - name=ModuleAsteroidAnalysis -} - -MODULE -{ - name=ModuleAnalysisResource - resourceName = Ore -} - -MODULE + MODEL { - name = DMAsteroidScanner + model = DMagicOrbitalScience/UniversalStorageScience/USASERT/USASERT + texture = ASERT_DIFF, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_DIFF + texture = ASERT_NRM, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_NRM + texture = ASERT_EMIT, DMagicOrbitalScience/ProbeScience/ASERT/ASERT_EMIT + texture = Stock_US_DIFF, DMagicOrbitalScience/UniversalStorage/USStock/Stock_US_DIFF + texture = Stock_US_NRM, DMagicOrbitalScience/UniversalStorage/USStock/Stock_US_NRM + texture = AtlasFuel01D, UniversalStorage2/Parts/Fuels/AtlasFuel01D + texture = AtlasFuel01N, UniversalStorage2/Parts/Fuels/AtlasFuel01N + rotation = 0, 180, 0 + } - animationName = Deploy + NODE + { + name = attach + transform = Node + size = 0 + method = FIXED_JOINT + } - greenLight = GreenLoop - yellowLight = YellowLoop + scale = 1 + rescaleFactor = 1 - USTwoScience = true - RaySourceTransform = DoorSource + attachRules = 1,0,1,1,0 - experimentID = dmAsteroidScan - rerunnable = True - transmitValue = 1.0 - dataIsCollectable = True - collectActionName = Take Data - experimentResource = ElectricCharge - resourceCost = 0.25 - usageReqMaskExternal = 8 + TechRequired = actuators + entryCost = 20000 + cost = 6750 + category = Science + subcategory = 0 + title = Univ. Storage 2 - ASERT + manufacturer = DMagic + description = The ASERT is an asteroid-only experiment used to study the interior composition of asteroids. It must be paired with a second module placed on the opposite side of an asteroid. When two modules are properly positioned the experiment can be conducted with the science amount dependent on how much of the asteroid the signal passed through. + + // --- standard part parameters --- + mass = 0.05 + bulkheadProfiles = wedge + crashTolerance = 10 + maxTemp = 2200 + emissiveConstant = 0.95 + thermalMassModifier = 4.0 + + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos universal wedge asteroid sounding + + angularDrag = 1 + dragModelType = default + + MODULE + { + name=ModuleAsteroidAnalysis + } + + MODULE + { + name=ModuleAnalysisResource + resourceName = Ore + } + + MODULE + { + name = DMAsteroidScanner + + animationName = Deploy + + greenLight = GreenLoop + yellowLight = YellowLoop + + USTwoScience = true + RaySourceTransform = DoorSource + + experimentID = dmAsteroidScan + rerunnable = True + transmitValue = 1.0 + dataIsCollectable = True + collectActionName = Take Data + usageReqMaskExternal = 8 + + RESOURCE + { + name = ElectricCharge + rate = 0.25 + } } } diff --git a/GameData/DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag.cfg b/GameData/DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag.cfg index 8fa1aad..68a5962 100644 --- a/GameData/DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag.cfg +++ b/GameData/DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag.cfg @@ -1,52 +1,52 @@ PART:NEEDS[UniversalStorage2] { -name = dmUS2MagBoom -module = Part -author = DMagic - -MODEL -{ - model = DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag - texture = AtlasFuel01D, UniversalStorage2/Parts/Fuels/AtlasFuel01D - texture = AtlasFuel01N, UniversalStorage2/Parts/Fuels/AtlasFuel01N - rotation = 0, 180, 0 -} - -NODE -{ - name = attach - transform = Node - size = 0 - method = FIXED_JOINT -} - -rescaleFactor = 1.0 - -attachRules = 1,0,1,1,0 -TechRequired = miniaturization -entryCost = 6500 -cost = 2200 -category = Science -subcategory = 0 -title = Univ. Storage 2 - Magnetometer Boom -manufacturer = DMagic -description = The magnetometer instruments are used to determine the magnitude and direction of planetary magnetic fields. The long boom separates these instruments from any interference caused by magnetic elements in the probe. Use in low to high orbit or on the surface. Not for use during atmospheric flight. Use with New Horizon's Universal Storage system. - - -// --- standard part parameters --- -mass = 0.05 -bulkheadProfiles = wedge -crashTolerance = 10 -maxTemp = 2200 -emissiveConstant = 0.95 -thermalMassModifier = 4.0 - -tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos universal wedge (mag field asteroid + name = dmUS2MagBoom + module = Part + author = DMagic -angularDrag = 1 -dragModelType = default - -MODULE + MODEL + { + model = DMagicOrbitalScience/UniversalStorageScience/USMagRPWS/USMag + texture = AtlasFuel01D, UniversalStorage2/Parts/Fuels/AtlasFuel01D + texture = AtlasFuel01N, UniversalStorage2/Parts/Fuels/AtlasFuel01N + rotation = 0, 180, 0 + } + + NODE + { + name = attach + transform = Node + size = 0 + method = FIXED_JOINT + } + + rescaleFactor = 1.0 + + attachRules = 1,0,1,1,0 + TechRequired = miniaturization + entryCost = 6500 + cost = 2200 + category = Science + subcategory = 0 + title = Univ. Storage 2 - Magnetometer Boom + manufacturer = DMagic + description = The magnetometer instruments are used to determine the magnitude and direction of planetary magnetic fields. The long boom separates these instruments from any interference caused by magnetic elements in the probe. Use in low to high orbit or on the surface. Not for use during atmospheric flight. Use with New Horizon's Universal Storage system. + + + // --- standard part parameters --- + mass = 0.05 + bulkheadProfiles = wedge + crashTolerance = 10 + maxTemp = 2200 + emissiveConstant = 0.95 + thermalMassModifier = 4.0 + + tags = experiment research rerun re-run reus re-us redo re-do reset re-set science dmagic dmos universal wedge (mag field asteroid + + angularDrag = 1 + dragModelType = default + + MODULE { name = ModuleResourceScanner MaxAbundanceAltitude = 60000 @@ -55,59 +55,63 @@ MODULE ResourceName = Ore } -MODULE + MODULE { - name = DMUniversalStorageScience - - animationName = Deploy - - experimentID = magScan - - RaySourceTransform = DoorSource - - experimentAnimation = true - experimentWaitForAnimation = true - waitForAnimationTime = -1 - keepDeployedMode = 2 + name = DMUniversalStorageScience - deployingMessage = Close proximity to the craft scrambles the magnetometer's sensors, deploying the scanner now. - customFailMessage = The magnetometer is not suitable for use during atmospheric flight, try again on the ground or in space. + animationName = Deploy + + experimentID = magScan - animSpeed = 2 - endEventGUIName = Retract Magnetometer - showEndEvent = false - startEventGUIName = Deploy Magnetometer - showStartEvent = false - toggleEventGUIName = Toggle Magnetometer - showToggleEvent = true - showEditorEvents = true - - experimentActionName = Log Magnetometer Data - resetActionName = Discard Magnetometer Data + RaySourceTransform = DoorSource + + experimentAnimation = true + experimentWaitForAnimation = true + waitForAnimationTime = -1 + keepDeployedMode = 2 + + deployingMessage = Close proximity to the craft scrambles the magnetometer's sensors, deploying the scanner now. + customFailMessage = The magnetometer is not suitable for use during atmospheric flight, try again on the ground or in space. + + animSpeed = 2 + endEventGUIName = Retract Magnetometer + showEndEvent = false + startEventGUIName = Deploy Magnetometer + showStartEvent = false + toggleEventGUIName = Toggle Magnetometer + showToggleEvent = true + showEditorEvents = true + + experimentActionName = Log Magnetometer Data + resetActionName = Discard Magnetometer Data + + useStaging = False + useActionGroups = True + hideUIwhenUnavailable = False + rerunnable = True + + xmitDataScalar = 1.0 - useStaging = False - useActionGroups = True - hideUIwhenUnavailable = False - rerunnable = True + dataIsCollectable = True + collectActionName = Take Data + interactionRange = 1.2 + externalDeploy = True + usageReqMaskExternal = 8 - xmitDataScalar = 1.0 - - dataIsCollectable = True - collectActionName = Take Data - interactionRange = 1.2 - externalDeploy = True - usageReqMaskExternal = 8 - - asteroidReports = True - asteroidTypeDependent = True + asteroidReports = True + asteroidTypeDependent = True } -MODULE + MODULE { - name = DMMagBoomModule - - runMagnetometer = True - resourceToUse = ElectricCharge - resourceCost = 0.05 + name = DMMagBoomModule + + runMagnetometer = True + + RESOURCE + { + name = ElectricCharge + rate = 0.05 + } } } diff --git a/Source/Part Modules/DMAnomalyScanner.cs b/Source/Part Modules/DMAnomalyScanner.cs index d283d4e..2db34ad 100644 --- a/Source/Part Modules/DMAnomalyScanner.cs +++ b/Source/Part Modules/DMAnomalyScanner.cs @@ -32,6 +32,7 @@ using DMagic.Scenario; using System.Collections; using UnityEngine; +using KSP.Localization; namespace DMagic.Part_Modules { @@ -41,8 +42,6 @@ class DMAnomalyScanner : DMModuleScienceAnimate public string camAnimate = ""; [KSPField] public string foundAnimate = ""; - [KSPField] - public float resourceCost = 0f; private string closestAnom = ""; private bool anomCloseRange, anomInRange, anomScienceInRange, camDeployed, rotating, closeRange, fullyDeployed = false; @@ -53,6 +52,8 @@ class DMAnomalyScanner : DMModuleScienceAnimate private const string camTransform = "camBase"; private const string dishTransform = "radarBaseArmNode0"; + private bool resourcesRunning; + public override void OnStart(PartModule.StartState state) { base.OnStart(state); @@ -79,12 +80,12 @@ protected override void Update() { if (IsDeployed) { - if (PartResourceLibrary.Instance.GetDefinition(resourceExperiment) != null) - { - float cost = resourceCost * Time.deltaTime; - part.RequestResource(resourceExperiment, cost, ResourceFlowMode.ALL_VESSEL); - } - if (fullyDeployed) + //if (PartResourceLibrary.Instance.GetDefinition(resourceExperiment) != null) + //{ + // float cost = resourceCost * Time.deltaTime; + // part.RequestResource(resourceExperiment, cost, ResourceFlowMode.ALL_VESSEL); + //} + if (fullyDeployed && resourcesRunning) { inRange(); rotating = true; @@ -101,8 +102,29 @@ protected override void Update() spinDishDown(); } } - - protected override void OnDestroy() + + protected override void FixedUpdate() + { + if (HighLogic.LoadedSceneIsFlight) + { + if (IsDeployed) + { + if (useResources) + { + if (resHandler.UpdateModuleResourceInputs(ref resError, 1, 0.9, true, false)) + resourcesRunning = true; + else + { + retractEvent(); + ScreenMessages.PostScreenMessage("Not enough " + Localizer.Format(resHandler.inputResources[0].title) + ", shutting down experiment", 4f, ScreenMessageStyle.UPPER_CENTER); + resourcesRunning = false; + } + } + } + } + } + + protected override void OnDestroy() { base.OnDestroy(); diff --git a/Source/Part Modules/DMAsteroidScanner.cs b/Source/Part Modules/DMAsteroidScanner.cs index 58de216..f55b955 100644 --- a/Source/Part Modules/DMAsteroidScanner.cs +++ b/Source/Part Modules/DMAsteroidScanner.cs @@ -35,6 +35,7 @@ using UnityEngine; using DMagic.Scenario; using KSP.UI.Screens.Flight.Dialogs; +using KSP.Localization; namespace DMagic.Part_Modules { @@ -59,15 +60,11 @@ class DMAsteroidScanner : PartModule, IScienceDataContainer public bool USTwoScience = false; [KSPField] public string RaySourceTransform = String.Empty; - [KSPField] - public string experimentResource = "ElectricCharge"; [KSPField] public bool rerunnable = true; [KSPField] public bool dataIsCollectable = true; [KSPField] - public float resourceCost = 0f; - [KSPField] public float transmitValue = 1f; [KSPField(isPersistant=true)] public bool IsDeployed = false; @@ -113,11 +110,14 @@ class DMAsteroidScanner : PartModule, IScienceDataContainer private Shader lineShader; private Material lineMaterial; - #endregion + private string resError; + private bool useResources; - #region PartModule + #endregion - public override void OnAwake() + #region PartModule + + public override void OnAwake() { GameEvents.onGamePause.Add(onPause); GameEvents.onGameUnpause.Add(onUnPause); @@ -157,7 +157,12 @@ public override void OnStart(PartModule.StartState state) dish = part.FindModelTransform(transformName); dishArm = part.FindModelTransform(transformRotatorName); - if (FlightGlobals.Bodies.Count >= 17) + if (resHandler != null && resHandler.inputResources != null && resHandler.inputResources.Count > 0 && resHandler.inputResources[0].rate > 0) + useResources = true; + else + useResources = false; + + if (FlightGlobals.Bodies.Count >= 17) asteroidBodyNameFixed = FlightGlobals.Bodies[16].bodyName; if (!HighLogic.LoadedSceneIsEditor) @@ -360,7 +365,7 @@ private void Update() searchForTarget(); rotating = true; } - else if (fullyDeployed && !resourceOn && resourceCost > 0f) + else if (fullyDeployed && !resourceOn && useResources) { s = "No Power"; targetDistance = 0f; @@ -510,9 +515,9 @@ public override string GetInfo() { string info = base.GetInfo(); info += string.Format("Transmission: {0:P0}\n", transmitValue); - if (resourceCost > 0f && PartResourceLibrary.Instance.GetDefinition(experimentResource) != null) - { - info += string.Format("Requires:\n-{0}: {1}/s\n", experimentResource, resourceCost); + if (resHandler != null && resHandler.inputResources != null && resHandler.inputResources.Count > 0 && resHandler.inputResources[0].rate > 0) + { + info += string.Format("Requires:\n-{0}: {1:F1}/s\n", Localizer.Format(resHandler.inputResources[0].title), resHandler.inputResources[0].rate); } return info; } @@ -521,21 +526,24 @@ private void FixedUpdate() { if (HighLogic.LoadedSceneIsFlight) { - if (resourceCost > 0f) + if (useResources) { - if (IsDeployed) - { - if (PartResourceLibrary.Instance.GetDefinition(experimentResource) != null) - { - float cost = 0.001f; - if (resourceOn) - cost = resourceCost * TimeWarp.fixedDeltaTime; - if (part.RequestResource(experimentResource, cost, ResourceFlowMode.ALL_VESSEL) < cost) - resourceOn = false; - else - resourceOn = true; - } - } + if (IsDeployed) + { + if (resHandler.UpdateModuleResourceInputs(ref resError, 1, 0.9, true, false)) + resourceOn = true; + else + { + if (!fullyDeployed) + StopCoroutine("deployEvent"); + + StartCoroutine("retractEvent"); + + ScreenMessages.PostScreenMessage("Not enough " + Localizer.Format(resHandler.inputResources[0].title) + ", shutting down experiment", 4f, ScreenMessageStyle.UPPER_CENTER); + + resourceOn = false; + } + } } else resourceOn = true; diff --git a/Source/Part Modules/DMBathymetry.cs b/Source/Part Modules/DMBathymetry.cs index dc3f7cd..4aa1d07 100644 --- a/Source/Part Modules/DMBathymetry.cs +++ b/Source/Part Modules/DMBathymetry.cs @@ -48,10 +48,6 @@ public class DMBathymetry : DMModuleScienceAnimate public string redLightMaterial = "redLightMaterial"; [KSPField] public string blueLightMaterial = "blueLightMaterial"; - [KSPField] - public string lightResource = "ElectricCharge"; - [KSPField] - public float lightResourceCost = 0.04f; [KSPField(isPersistant = true)] public bool lightsOn = false; @@ -63,6 +59,8 @@ public class DMBathymetry : DMModuleScienceAnimate private Color blueLightColor = new Color(0.596f, 0.890f, 0.933f, 1); private Color offColor = new Color(); + private string resError; + public override void OnStart(PartModule.StartState state) { base.OnStart(state); @@ -111,21 +109,12 @@ protected override void FixedUpdate() if (redLight == null || blueLight == null) return; - - if (!lightsOn || lightResourceCost <= 0) - return; - - if (PartResourceLibrary.Instance.GetDefinition(lightResource) == null) + + if (!lightsOn) return; - - float cost = lightResourceCost * TimeWarp.fixedDeltaTime; - double available = part.RequestResource(lightResource, cost, ResourceFlowMode.ALL_VESSEL); - - float lightModifier = 0; - - if (available != 0) - lightModifier = cost / (float)available; - + + float lightModifier = (float)resHandler.UpdateModuleResourceInputs(ref resError, 1, 0.9, false, false, false); + float redNow = redLight.intensity; float blueNow = blueLight.intensity; float redNext = 1 * lightModifier; diff --git a/Source/Part Modules/DMMagBoomModule.cs b/Source/Part Modules/DMMagBoomModule.cs index 499688e..97e1cc9 100644 --- a/Source/Part Modules/DMMagBoomModule.cs +++ b/Source/Part Modules/DMMagBoomModule.cs @@ -34,6 +34,7 @@ using System.Linq; using System.Collections.Generic; using System; +using KSP.Localization; namespace DMagic.Part_Modules { @@ -78,10 +79,6 @@ public class DMMagBoomModule : PartModule [KSPField] public bool runMagnetometer; - [KSPField] - public string resourceToUse = "ElectricCharge"; - [KSPField] - public float resourceCost = 0; private DMModuleScienceAnimate primaryModule = null; private float lastUpdate = 0f; @@ -89,6 +86,8 @@ public class DMMagBoomModule : PartModule private List Cities = new List(); private DMAnomalyStorage currentAnomalies; + private string resError; + public override void OnStart(PartModule.StartState state) { base.OnStart(state); @@ -99,7 +98,10 @@ public override void OnStart(PartModule.StartState state) public override string GetInfo() { string info = base.GetInfo(); - info += "Requires:\n- " + resourceToUse + ": " + resourceCost.ToString() + "/s\n"; + if (resHandler != null && resHandler.inputResources != null && resHandler.inputResources.Count > 0 && resHandler.inputResources[0].rate > 0) + { + info += "Requires:\n- " + Localizer.Format(resHandler.inputResources[0].title) + ": " + resHandler.inputResources[0].rate.ToString("F1") + "/s\n"; + } return info; } @@ -126,7 +128,7 @@ public void FixedUpdate() if (TimeWarp.CurrentRate < 15000) { - part.RequestResource(resourceToUse, resourceCost * TimeWarp.fixedDeltaTime, ResourceFlowMode.ALL_VESSEL); + resHandler.UpdateModuleResourceInputs(ref resError, 1, 0.9, false, false); } } } diff --git a/Source/Part Modules/DMModuleScienceAnimate.cs b/Source/Part Modules/DMModuleScienceAnimate.cs index e6762fb..fd459bb 100644 --- a/Source/Part Modules/DMModuleScienceAnimate.cs +++ b/Source/Part Modules/DMModuleScienceAnimate.cs @@ -36,6 +36,7 @@ using DMagic.Scenario; using KSP.UI.Screens.Flight.Dialogs; using Experience.Effects; +using KSP.Localization; namespace DMagic.Part_Modules { @@ -89,10 +90,6 @@ public class DMModuleScienceAnimate : ModuleScienceExperiment, IScienceDataConta [KSPField] public bool oneShot = false; [KSPField] - public string resourceExperiment = "ElectricCharge"; - [KSPField] - public float resourceExpCost = 0; - [KSPField] public bool asteroidReports = false; [KSPField] public bool asteroidTypeDependent = false; @@ -143,6 +140,9 @@ public class DMModuleScienceAnimate : ModuleScienceExperiment, IScienceDataConta protected string failMessage = ""; private ExperimentsResultDialog resultsDialog; + protected string resError; + protected bool useResources; + /// /// For external use to determine if a module can conduct science /// @@ -292,26 +292,22 @@ protected virtual void onLabReset() if (keepDeployedMode == 0) retractEvent(); } - protected virtual void FixedUpdate() - { - if (HighLogic.LoadedSceneIsFlight) - { - if (resourceOn) - { - if (PartResourceLibrary.Instance.GetDefinition(resourceExperiment) != null) - { - float cost = resourceExpCost * TimeWarp.fixedDeltaTime; - if (part.RequestResource(resourceExperiment, cost, ResourceFlowMode.ALL_VESSEL) < cost) - { - StopCoroutine("WaitForAnimation"); - resourceOn = false; - ScreenMessages.PostScreenMessage("Not enough " + resourceExperiment + ", shutting down experiment", 4f, ScreenMessageStyle.UPPER_CENTER); - if (keepDeployedMode == 0 || keepDeployedMode == 1) retractEvent(); - } - } - } - } - } + protected virtual void FixedUpdate() + { + if (HighLogic.LoadedSceneIsFlight) + { + if (resourceOn && useResources) + { + if (!resHandler.UpdateModuleResourceInputs(ref resError, 1, 0.9, true, false)) + { + StopCoroutine("WaitForAnimation"); + resourceOn = false; + ScreenMessages.PostScreenMessage("Not enough " + Localizer.Format(resHandler.inputResources[0].title) + ", shutting down experiment", 4f, ScreenMessageStyle.UPPER_CENTER); + if (keepDeployedMode == 0 || keepDeployedMode == 1) retractEvent(); + } + } + } + } public override string GetInfo() { @@ -324,63 +320,68 @@ public override string GetInfo() info += string.Format("Max Samples: {0}\n", experimentLimit); info += string.Format("Scientist Level For Reset: {0}\n", resetLevel); } - if (resourceExpCost > 0) - { - float time = waitForAnimationTime; - if (time == -1 && anim != null && !string.IsNullOrEmpty(animationName)) - time = anim[animationName].length; - info += string.Format("Requires:\n-{0}: {1}/s for {2} s\n", resourceExperiment, resourceExpCost, waitForAnimationTime); - } + if (resHandler != null && resHandler.inputResources != null && resHandler.inputResources.Count > 0 && resHandler.inputResources[0].rate > 0) + { + if (waitForAnimationTime <= 0) + info += string.Format("Requires:\n-{0}: {1:F1}/s\n", Localizer.Format(resHandler.inputResources[0].title), resHandler.inputResources[0].rate); + else + info += string.Format("Requires:\n-{0}: {1:F1}/s for {2} s\n", Localizer.Format(resHandler.inputResources[0].title), resHandler.inputResources[0].rate, waitForAnimationTime); + } if (oneShot) info += string.Format("OneShot: {0}\n", RUIutils.GetYesNoUIString(oneShot)); return info; } - private void setup() - { - Events["deployEvent"].guiActive = showStartEvent || oneShot; - Events["retractEvent"].guiActive = showEndEvent && !oneShot; - Events["toggleEvent"].guiActive = showToggleEvent; - Events["deployEvent"].guiName = startEventGUIName; - Events["retractEvent"].guiName = endEventGUIName; - Events["toggleEvent"].guiName = toggleEventGUIName; - Events["CollectDataExternalEvent"].guiName = collectActionName; - Events["ResetExperimentExternal"].guiName = resetActionName; - Events["ResetExperiment"].guiName = resetActionName; - Events["DeployExperiment"].guiName = experimentActionName; - Events["DeployExperiment"].guiActiveUnfocused = externalDeploy; - Events["DeployExperiment"].externalToEVAOnly = externalDeploy; - Events["DeployExperiment"].unfocusedRange = interactionRange; - Actions["DeployAction"].active = useActionGroups; - Actions["deployAction"].guiName = startEventGUIName; - Actions["retractAction"].guiName = endEventGUIName; - Actions["toggleAction"].guiName = toggleEventGUIName; - Actions["DeployAction"].guiName = experimentActionName; - if (!primary) - { - primaryList = this.part.FindModulesImplementing(); - if (primaryList.Count > 0) - { - foreach (DMModuleScienceAnimate DMS in primaryList) - if (DMS.primary) primaryModule = DMS; - } - } - if (USStock) - enviroList = this.part.FindModulesImplementing(); - if (waitForAnimationTime == -1 && animSpeed != 0) - waitForAnimationTime = anim[animationName].length / animSpeed; - if (!string.IsNullOrEmpty(experimentID)) - { - scienceExp = ResearchAndDevelopment.GetExperiment(experimentID); - if (scienceExp != null) - { - sitMask = (int)scienceExp.situationMask; - bioMask = (int)scienceExp.biomeMask; - } - } - if (FlightGlobals.Bodies.Count >= 17) - bodyNameFixed = FlightGlobals.Bodies[16].bodyName; - } + private void setup() + { + Events["deployEvent"].guiActive = showStartEvent || oneShot; + Events["retractEvent"].guiActive = showEndEvent && !oneShot; + Events["toggleEvent"].guiActive = showToggleEvent; + Events["deployEvent"].guiName = startEventGUIName; + Events["retractEvent"].guiName = endEventGUIName; + Events["toggleEvent"].guiName = toggleEventGUIName; + Events["CollectDataExternalEvent"].guiName = collectActionName; + Events["ResetExperimentExternal"].guiName = resetActionName; + Events["ResetExperiment"].guiName = resetActionName; + Events["DeployExperiment"].guiName = experimentActionName; + Events["DeployExperiment"].guiActiveUnfocused = externalDeploy; + Events["DeployExperiment"].externalToEVAOnly = externalDeploy; + Events["DeployExperiment"].unfocusedRange = interactionRange; + Actions["DeployAction"].active = useActionGroups; + Actions["deployAction"].guiName = startEventGUIName; + Actions["retractAction"].guiName = endEventGUIName; + Actions["toggleAction"].guiName = toggleEventGUIName; + Actions["DeployAction"].guiName = experimentActionName; + if (!primary) + { + primaryList = this.part.FindModulesImplementing(); + if (primaryList.Count > 0) + { + foreach (DMModuleScienceAnimate DMS in primaryList) + if (DMS.primary) primaryModule = DMS; + } + } + if (USStock) + enviroList = this.part.FindModulesImplementing(); + if (waitForAnimationTime == -1 && animSpeed != 0) + waitForAnimationTime = anim[animationName].length / animSpeed; + if (!string.IsNullOrEmpty(experimentID)) + { + scienceExp = ResearchAndDevelopment.GetExperiment(experimentID); + if (scienceExp != null) + { + sitMask = (int)scienceExp.situationMask; + bioMask = (int)scienceExp.biomeMask; + } + } + if (resHandler != null && resHandler.inputResources != null && resHandler.inputResources.Count > 0 && resHandler.inputResources[0].rate > 0) + useResources = true; + else + useResources = false; + + if (FlightGlobals.Bodies.Count >= 17) + bodyNameFixed = FlightGlobals.Bodies[16].bodyName; + } private void editorSetup() { @@ -791,14 +792,15 @@ public virtual void gatherScienceData(bool silent = false) ScreenMessages.PostScreenMessage(deployingMessage, 5f, ScreenMessageStyle.UPPER_CENTER); if (experimentWaitForAnimation) { - if (resourceExpCost > 0) + if (useResources) resourceOn = true; + StartCoroutine("WaitForAnimation", silent); } else runExperiment(getSituation(), silent); } - else if (resourceExpCost > 0) + else if (useResources) { resourceOn = true; StartCoroutine("WaitForAnimation", silent); diff --git a/Source/Part Modules/DMXRayDiffract.cs b/Source/Part Modules/DMXRayDiffract.cs index 8e85cdc..44446a3 100644 --- a/Source/Part Modules/DMXRayDiffract.cs +++ b/Source/Part Modules/DMXRayDiffract.cs @@ -28,11 +28,7 @@ * */ #endregion - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; + using UnityEngine; namespace DMagic.Part_Modules diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index d91bae5..8a04cca 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -19,7 +19,7 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("5428988e-53a6-4d8e-8af4-014572513e22")] -[assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] -[assembly: AssemblyInformationalVersion("v1.4.0.0")] +[assembly: AssemblyVersion("1.4.1.0")] +[assembly: AssemblyFileVersion("1.4.1.0")] +[assembly: AssemblyInformationalVersion("v1.4.1.0")] [assembly: KSPAssembly("DMagic", 1, 4)]