diff --git a/Assets/CineboxAndrew b/Assets/CineboxAndrew index e07a544f..778f7fcd 160000 --- a/Assets/CineboxAndrew +++ b/Assets/CineboxAndrew @@ -1 +1 @@ -Subproject commit e07a544f43258f6ca20819fe598739a6366d9548 +Subproject commit 778f7fcd82cb1bf70c3cce6962bedf77418506ec diff --git a/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-e.dds b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-e.dds new file mode 100644 index 00000000..ea643d74 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-e.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-n.dds new file mode 100644 index 00000000..95d6162d Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.dds b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.dds new file mode 100644 index 00000000..e8f453d3 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.mu b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.mu new file mode 100644 index 00000000..cac2f9ce Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Coupling/restock-claw-125.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-apu-radial-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-apu-radial-1.mu new file mode 100644 index 00000000..9e61efd9 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-apu-radial-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-1.mu new file mode 100644 index 00000000..9483a4e3 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-2.mu b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-2.mu new file mode 100644 index 00000000..507d8d86 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcell-radial-2.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-e.dds b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-e.dds new file mode 100644 index 00000000..dfce699e Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-e.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-n.dds new file mode 100644 index 00000000..54997057 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1.dds new file mode 100644 index 00000000..7342fceb Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Electrical/restock-fuelcells-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1-n.dds new file mode 100644 index 00000000..60190edf Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1.dds new file mode 100644 index 00000000..32a7773c Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2-n.dds new file mode 100644 index 00000000..34fdc5c5 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2.dds new file mode 100644 index 00000000..e67ae822 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-2.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-1.mu new file mode 100644 index 00000000..e6210c0d Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-2.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-2.mu new file mode 100644 index 00000000..8100197e Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-drill-radial-2.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-e.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-e.dds new file mode 100644 index 00000000..102e2006 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-e.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-n.dds new file mode 100644 index 00000000..ea3b5490 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1.dds new file mode 100644 index 00000000..1965857f Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-125-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-125-1.mu new file mode 100644 index 00000000..7943c323 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-125-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-25-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-25-1.mu new file mode 100644 index 00000000..6cd9c655 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-isru-25-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-orbitalscanner-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-orbitalscanner-1.mu new file mode 100644 index 00000000..39c5cd26 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-orbitalscanner-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1-n.dds new file mode 100644 index 00000000..17e401e5 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1.dds new file mode 100644 index 00000000..9b2d943f Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-125-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-125-1.mu new file mode 100644 index 00000000..c9daf05e Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-125-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-25-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-25-1.mu new file mode 100644 index 00000000..cd7b9dd0 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-25-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-radial-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-radial-1.mu new file mode 100644 index 00000000..1778dca5 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-oretank-radial-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2-n.dds new file mode 100644 index 00000000..3753a4c3 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2.dds new file mode 100644 index 00000000..b17a46f3 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-scanners-2.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-e.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-e.dds new file mode 100644 index 00000000..d4eb43bc Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-e.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-n.dds new file mode 100644 index 00000000..e3325d93 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.dds new file mode 100644 index 00000000..19f2e1e2 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.mu new file mode 100644 index 00000000..4adf5006 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surfacescanner-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surveyscanner-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surveyscanner-1.mu new file mode 100644 index 00000000..a0ec1b6f Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Resource/restock-surveyscanner-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-dust.mu b/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-dust.mu new file mode 100644 index 00000000..7c4c2966 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-dust.mu differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-rocks.mu b/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-rocks.mu new file mode 100644 index 00000000..29ba12e4 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-fx-drill-rocks.mu differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-dust.mu b/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-dust.mu new file mode 100644 index 00000000..dbd67560 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-dust.mu differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-rocks.mu b/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-rocks.mu new file mode 100644 index 00000000..26f033ed Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-fx-minidrill-rocks.mu differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-particle-dust.dds b/Distribution/Restock/GameData/ReStock/FX/restock-particle-dust.dds new file mode 100644 index 00000000..bb079614 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-particle-dust.dds differ diff --git a/Distribution/Restock/GameData/ReStock/FX/restock-particle-rocks.dds b/Distribution/Restock/GameData/ReStock/FX/restock-particle-rocks.dds new file mode 100644 index 00000000..f6184423 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/FX/restock-particle-rocks.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Localization/en-us.cfg b/Distribution/Restock/GameData/ReStock/Localization/en-us.cfg index f92c846c..cc956966 100644 --- a/Distribution/Restock/GameData/ReStock/Localization/en-us.cfg +++ b/Distribution/Restock/GameData/ReStock/Localization/en-us.cfg @@ -8,6 +8,12 @@ Localization { en-us { + + // Actions and buttons + #LOC_Restock_scanner_screen_on = Screen On + #LOC_Restock_scanner_screen_off = Screen Off + #LOC_Restock_scanner_screen_toggle = Toggle Screen + #LOC_Restock_variant-engine_size0 = 0.625m #LOC_Restock_variant-engine_size1 = 1.25m #LOC_Restock_variant-engine_size1p5 = 1.875m @@ -69,5 +75,7 @@ Localization #LOC_Restock_variant-radiator_basic = Basic #LOC_Restock_variant-radiator_flat = Flat #LOC_Restock_variant-radiator_compact = Compact + + #LOC_Restock_description-FuelCellArray = Why have just one small fuel cell when you can have three large ones? The fuel cell array is ideal for situations where you need a large source of reliable power. Like the smaller fuel cells, this array operates by converting fuel and oxidizer into energy. } } diff --git a/Distribution/Restock/GameData/ReStock/Patches/Coupling/restock-claw.cfg b/Distribution/Restock/GameData/ReStock/Patches/Coupling/restock-claw.cfg new file mode 100644 index 00000000..78177461 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Coupling/restock-claw.cfg @@ -0,0 +1,133 @@ +// Patches applying art changes to the asteroid claw +// Contents: +// - Advanced Grabbing Unit (GrapplingDevice) + +// Advanced Grabbing Unit +@PART[GrapplingDevice] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Coupling/restock-claw-125 + } + + %rescaleFactor = 1 + %node_stack_top = 0.0, -0.14082675, 0.00, 0.0, -1.0, 0.0, 1 + + @MODULE[ModuleGrappleNode] + { + nodeTransformName = Pivot + } + + @MODULE[ModuleAnimateGeneric] + { + animationName = Deploy + } + + @MODULE[FlagDecal] + { + textureQuadName = flagTransform + } + + !MODULE[FXModuleLookAtConstraint] + + MODULE + { + name = FXModuleLookAtConstraint + + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.001 + targetName = act_cylL.001 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.001 + targetName = act_cylU.001 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.002 + targetName = act_cylL.002 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.002 + targetName = act_cylU.002 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.003 + targetName = act_cylL.003 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.003 + targetName = act_cylU.003 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.004 + targetName = act_cylL.004 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.004 + targetName = act_cylU.004 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.005 + targetName = act_cylL.005 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.005 + targetName = act_cylU.005 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.006 + targetName = act_cylL.006 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.006 + targetName = act_cylU.006 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.007 + targetName = act_cylL.007 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.007 + targetName = act_cylU.007 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylU.008 + targetName = act_cylL.008 + } + CONSTRAINLOOKFX + { + rotatorsName = act_cylL.008 + targetName = act_cylU.008 + } + } + + MODULE + { + name = ModuleLight + lightName = Lamp + useAnimationDim = true + lightBrightenSpeed = 2.5 + lightDimSpeed = 2.5 + resourceAmount = 0.02 + useResources = true + animationName = RestockClawLamp_On + } +} diff --git a/Distribution/Restock/GameData/ReStock/Patches/Electrical/restock-fuelcells.cfg b/Distribution/Restock/GameData/ReStock/Patches/Electrical/restock-fuelcells.cfg new file mode 100644 index 00000000..605ba240 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Electrical/restock-fuelcells.cfg @@ -0,0 +1,29 @@ +// Patches applying art changes to fuel cells +// Contents: +// - Fuel Cell (FuelCell) +// - Fuel Cell Array (FuelCellArray) + +// Fuel Cell +@PART[FuelCell] +{ + @author = Andrew Cassidy + + !MODEL {} + MODEL + { + model = ReStock/Assets/Electrical/restock-fuelcell-radial-1 + } +} + +// Fuel Cell Array +@PART[FuelCellArray] +{ + @author = Andrew Cassidy + + !MODEL {} + MODEL + { + model = ReStock/Assets/Electrical/restock-fuelcell-radial-2 + } +} + diff --git a/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-drills.cfg b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-drills.cfg new file mode 100644 index 00000000..30da84d0 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-drills.cfg @@ -0,0 +1,113 @@ +// Patches applying art changes to ore drills +// Contents: +// - Drill-O-Matic' Mining Excavator (RadialDrill) +// - Drill-O-Matic Junior' Mining Excavator (MiniDrill) + +// Drill-O-Matic' Mining Excavator +@PART[RadialDrill] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-drill-radial-2 + } + + @MODULE[ModuleAnimationGroup] + { + @deployAnimationName = Deploy + @activeAnimationName = Drill + deployEffectName = Deploy + activeEffectName = Active + retractEffectName = Retract + stopActiveAnimIfDisabled = true + } + + EFFECTS + { + drill + { + MODEL_MULTI_PARTICLE + { + name = dust + modelName = ReStock/FX/restock-fx-drill-dust + transformName = fxTransformDust + emission = 1.0 1.1 + speed = 1.0 1.0 + } + MODEL_MULTI_PARTICLE + { + name = rocks + modelName = ReStock/FX/restock-fx-drill-rocks + transformName = fxTransformRocks + emission = 1.0 1.0 + speed = 1.0 1.0 + } + } + Deploy { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/drill-start + } + } + Active { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/drill-loop + volume = 0.0 0.0 + volume = 1.0 1.0 + } + } + Retract { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/drill-end + } + } + } +} + +// Drill-O-Matic Junior' Mining Excavator +@PART[MiniDrill] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-drill-radial-1 + } + + @MODULE[ModuleAnimationGroup] + { + @deployAnimationName = Deploy + @activeAnimationName = Drill + } + + EFFECTS + { + drill + { + MODEL_MULTI_PARTICLE + { + name = dust + modelName = ReStock/FX/restock-fx-minidrill-dust + transformName = fxTransformDust + emission = 1.0 1.1 + speed = 1.0 1.0 + } + MODEL_MULTI_PARTICLE + { + name = rocks + modelName = ReStock/FX/restock-fx-minidrill-rocks + transformName = fxTransformRocks + emission = 1.0 1.0 + speed = 1.0 1.0 + } + } + } +} \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-isrus.cfg b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-isrus.cfg new file mode 100644 index 00000000..eaa1a4e1 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-isrus.cfg @@ -0,0 +1,111 @@ +// Patches applying art changes to ISRUs +// Contents: +// - Convert-O-Tron 125 (MiniISRU) +// - Convert-O-Tron 250 (ISRU) + +// Convert-O-Tron 125 +@PART[MiniISRU] +{ + @author = Andrew Cassidy + + !MODEL {} + MODEL + { + model = ReStock/Assets/Resource/restock-isru-125-1 + scale = 1.0, 1.0, 1.0 + } + + MODULE + { + name = ModuleRestockISRUAnimation + deployAnimationName = heater + needsEC = true + } + + MODULE + { + name = ModuleRestockHeatEffects + enableHeatEmissive = true + useCoreTemp = true + shaderProperty = _EmissiveColor + excludedRenderer = ISRU-125_heater + lerpMax = 2700 + redCurve + { + key = 0 0 2 2 + key = 1 1 0 0 + } + greenCurve + { + key = 0 0 1 1 + key = 1 1 1 1 + } + blueCurve + { + key = 0 0 1 1 + key = 1 1 1 1 + } + alphaCurve + { + key = 0 1 0 0 + key = 1 1 0 0 + } + disableBlackbody = true + } +} + +// Convert-O-Tron 250 +@PART[ISRU] +{ + @author = Andrew Cassidy + + !MODEL {} + MODEL + { + model = ReStock/Assets/Resource/restock-isru-25-1 + scale = 1.0, 1.0, 1.0 + } + + !MODULE[ModuleAnimationGroup] {} + + MODULE + { + name = ModuleRestockISRUAnimation + deployAnimationName = Deploy + activeAnimationName = Run + retractAnimationName = Retract + needsEC = true + waitForComplete = true + } + + MODULE + { + name = ModuleRestockHeatEffects + enableHeatEmissive = true + useCoreTemp = true + shaderProperty = _EmissiveColor + excludedRenderer = ISRU-25_heater + lerpMax = 2700 + redCurve + { + key = 0 0 2 2 + key = 1 1 0 0 + } + greenCurve + { + key = 0 0 1 1 + key = 1 1 1 1 + } + blueCurve + { + key = 0 0 1 1 + key = 1 1 1 1 + } + alphaCurve + { + key = 0 1 0 0 + key = 1 1 0 0 + } + disableBlackbody = true + } +} \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-oretanks.cfg b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-oretanks.cfg new file mode 100644 index 00000000..8040994d --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-oretanks.cfg @@ -0,0 +1,41 @@ +// Patches applying art changes to ore tanks +// Contents: +// - Radial Holding Tank (RadialOreTank) +// - Small Holding Tank (SmallTank) +// - Large Holding Tank (LargeTank) + +// Radial Holding Tank +@PART[RadialOreTank] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-oretank-radial-1 + } +} + +// Small Holding Tank +@PART[SmallTank] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-oretank-125-1 + } +} + +// Large Holding Tank +@PART[LargeTank] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-oretank-25-1 + } +} \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-scanners.cfg b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-scanners.cfg new file mode 100644 index 00000000..45ba3f28 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Resource/restock-scanners.cfg @@ -0,0 +1,182 @@ +// Patches applying art changes to ore scanners +// Contents: +// - Surface Scanning Module (SurfaceScanner) +// - M700 Survey Scanner (SurveyScanner) +// - M4435 Narrow-Band Scanner (OrbitalScanner) + +// Surface Scanning Module +@PART[SurfaceScanner] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-surfacescanner-1 + } + + MODULE + { + name = ModuleAnimateGeneric + animationName = screenon + startEventGUIName = #LOC_Restock_scanner_screen_on // Screen On + endEventGUIName = #LOC_Restock_scanner_screen_off // Screen Off + actionGUIName = #LOC_Restock_scanner_screen_toggle // Screen Toggle + evaDistance = 1.5 + } +} + +// M700 Survey Scanner +@PART[SurveyScanner] +{ + @author = Andrew Cassidy + + !MODEL {} + MODEL + { + model = ReStock/Assets/Resource/restock-surveyscanner-1 + scale = 1.0, 1.0, 1.0 + } + + @MODULE[ModuleAnimationGroup] + { + @deployAnimationName = Deploy + deployEffectName = Deploy + retractEffectName = Retract + } + + EFFECTS + { + Deploy { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/scanner-open + volume = 0.3 + } + } + Retract { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/scanner-close + volume = 0.3 + } + } + } + + MODULE + { + name = ModulePartVariants + baseVariant = Size0 + + VARIANT + { + name = Size0 + displayName = #LOC_Restock_variant-antenna_size0 + themeName = White + primaryColor = #C8C8C8 + secondaryColor = #707070 + GAMEOBJECTS + { + Body_Rad = false + Body_625 = true + Body_125 = false + } + } + + VARIANT + { + name = Size1 + displayName = #LOC_Restock_variant-antenna_size1 + themeName = White + primaryColor = #C8C8C8 + secondaryColor = #707070 + GAMEOBJECTS + { + Body_Rad = false + Body_625 = false + Body_125 = true + } + } + + VARIANT + { + name = Compact + displayName = #LOC_Restock_variant-antenna_compact + themeName = White + primaryColor = #C8C8C8 + secondaryColor = #999999 + GAMEOBJECTS + { + Body_Rad = true + Body_625 = false + Body_125 = false + } + } + } +} + +// M4435 Narrow-Band Scanner +@PART[OrbitalScanner] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Resource/restock-orbitalscanner-1 + } + + @MODULE[ModuleAnimationGroup] + { + @activeAnimationName = Spin + activeEffectName = Active + } + + EFFECTS + { + Active { + AUDIO + { + channel = Ship + clip = ReStock/Sounds/scanner-spin + volume = 0.1 + } + } + } + + MODULE + { + name = ModulePartVariants + baseVariant = Size0 + + VARIANT + { + name = Size0 + displayName = #LOC_Restock_variant-antenna_size0 + themeName = White + primaryColor = #AC6F54 + secondaryColor = #707070 + GAMEOBJECTS + { + Base_Compact = false + Base_625 = true + } + } + + VARIANT + { + name = Compact + displayName = #LOC_Restock_variant-antenna_compact + themeName = White + primaryColor = #AC6F54 + secondaryColor = #545454 + GAMEOBJECTS + { + Base_Compact = true + Base_625 = false + } + } + } +} \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll index 1abe30b5..264fd842 100644 Binary files a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll and b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll differ diff --git a/Distribution/Restock/GameData/ReStock/Restock.restockblacklist b/Distribution/Restock/GameData/ReStock/Restock.restockblacklist index 33928f99..b535a9da 100644 --- a/Distribution/Restock/GameData/ReStock/Restock.restockblacklist +++ b/Distribution/Restock/GameData/ReStock/Restock.restockblacklist @@ -112,3 +112,13 @@ Squad/Parts/Utility/rockomaxAdapters/ Squad/Parts/Utility/ServiceBay/ Squad/Parts/Utility/spotLightMk1/ Squad/Parts/Utility/spotLightMk2/ +Squad/Parts/Resources/RadialTank/ +Squad/Parts/Resources/SmallTank/ +Squad/Parts/Resources/LargeTank/ +Squad/Parts/Resources/FuelCell/ +Squad/Parts/Resources/MiniDrill/ +Squad/Parts/Resources/RadialDrill/ +Squad/Parts/Resources/SurfaceScanner/ +Squad/Parts/Resources/OrbitalScanner/ +Squad/Parts/Resources/SurveyScanner/ +Squad/Parts/Resources/MiniISRU/ \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Sounds/drill-end.ogg b/Distribution/Restock/GameData/ReStock/Sounds/drill-end.ogg new file mode 100644 index 00000000..527052b4 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/drill-end.ogg differ diff --git a/Distribution/Restock/GameData/ReStock/Sounds/drill-loop.ogg b/Distribution/Restock/GameData/ReStock/Sounds/drill-loop.ogg new file mode 100644 index 00000000..d9a026c4 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/drill-loop.ogg differ diff --git a/Distribution/Restock/GameData/ReStock/Sounds/drill-start.ogg b/Distribution/Restock/GameData/ReStock/Sounds/drill-start.ogg new file mode 100644 index 00000000..f9cbac6f Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/drill-start.ogg differ diff --git a/Distribution/Restock/GameData/ReStock/Sounds/scanner-close.ogg b/Distribution/Restock/GameData/ReStock/Sounds/scanner-close.ogg new file mode 100644 index 00000000..0c2664e4 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/scanner-close.ogg differ diff --git a/Distribution/Restock/GameData/ReStock/Sounds/scanner-open.ogg b/Distribution/Restock/GameData/ReStock/Sounds/scanner-open.ogg new file mode 100644 index 00000000..6f0ac923 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/scanner-open.ogg differ diff --git a/Distribution/Restock/GameData/ReStock/Sounds/scanner-spin.ogg b/Distribution/Restock/GameData/ReStock/Sounds/scanner-spin.ogg new file mode 100644 index 00000000..29601b0c Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Sounds/scanner-spin.ogg differ diff --git a/Distribution/Restock/changelog.txt b/Distribution/Restock/changelog.txt index 0d7ba4d1..5a2ff1c9 100644 --- a/Distribution/Restock/changelog.txt +++ b/Distribution/Restock/changelog.txt @@ -1,4 +1,4 @@ -v0.2.0 +v0.2.0 ------ - Phase 2 release - New stock part replacements @@ -54,6 +54,19 @@ v0.2.0 - Thermal Control System (small) (Nertea) - Thermal Control System (medium) (Nertea) - Thermal Control System (large) (Nertea) + - Resource + - Drill-O-Matic (Andrew) + - Drill-O-Matic Junior (Andrew) + - Radial Holding Tank (Andrew) + - Small Holding Tank (Andrew) + - Large Holding Tank (Andrew) + - Surface Scanning Module (Andrew) + - M700 Survey Scanner (Andrew) + - M4435 Narrow-Band Scanner (Andrew) + - Convert-O-Tron 125 ISRU (Andrew) + - Electrical + - Fuel Cell (Andrew) + - Fuel Cell Array (Andrew) - New Depth Mask module added - Some parts can now be inset into other parts without visible clipping inside them - Aero @@ -88,6 +101,8 @@ v0.2.0 - Tweaked Nerv plume to be prettier - Added optional structural strut variants on Baguette and Dumpling tanks - Fixed MH replacement for Stratus-V tank +- Stock parts included: + v0.1.4 ------ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-e.dds b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-e.dds new file mode 100644 index 00000000..fc9c1c57 Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-e.dds differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-n.dds b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-n.dds new file mode 100644 index 00000000..1c4c847a Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625-n.dds differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.dds b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.dds new file mode 100644 index 00000000..a578dd8b Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.dds differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.mu b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.mu new file mode 100644 index 00000000..20eccfdf Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Coupling/restock-claw-625.mu differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-1875-1.mu b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-1875-1.mu new file mode 100644 index 00000000..87239172 Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-1875-1.mu differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2-n.dds b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2-n.dds new file mode 100644 index 00000000..4d4283d9 Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2-n.dds differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2.dds b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2.dds new file mode 100644 index 00000000..80755954 Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-2.dds differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-375-1.mu b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-375-1.mu new file mode 100644 index 00000000..adf2bcea Binary files /dev/null and b/Distribution/RestockPlus/GameData/ReStockPlus/Assets/Resource/restock-oretank-375-1.mu differ diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg index 5fb961f8..10876c51 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg @@ -227,6 +227,11 @@ Localization #LOC_RestockPlus_restock-decoupler-radial-tiny-1_description = It's an extra small decoupler for very small separation events. #LOC_RestockPlus_restock-decoupler-radial-tiny-1_tags = restock break decouple separat split stag + // 0.625m + #LOC_RestockPlus_restock-claw-625-1_title = Advanced Grabbing Unit Junior + #LOC_RestockPlus_restock-claw-625-1_description = A smaller claw for grappling smaller things. Unfortunately, it does not pivot. + #LOC_RestockPlus_restock-claw-625-1_tags = restock a.r.m arm asteroid capture clam claw connect dock fasten grab join klaw nasa 625 + // 1.875m #LOC_RestockPlus_restock-decoupler-1875-1_title = TD-18 Decoupler #LOC_RestockPlus_restock-decoupler-1875-1_description = This stack decoupler is a medium sized tool for splitting rockets. @@ -294,6 +299,16 @@ Localization // ELECTRICAL // ========== + // Radial + #LOC_RestockPlus_restock-apu-radial-1_title = NH-24 Monopropellant APU + #LOC_RestockPlus_restock-apu-radial-1_description = After playing with a children's pinwheel toy and asking themselves "how could this become more awesome", one engineer tried pointing a small rocket engine at it. The engineering team immediately got to work using it to generate electricity, and the Monopropellant APU was born + #LOC_RestockPlus_restock-apu-radial-1_tags = APU backup turbine array bank charge convert e/c elect energ pack power volt watt + + #LOC_RestockPlus_restock-apu_name = APU turbine + #LOC_RestockPlus_restock-apu_start = Start turbine + #LOC_RestockPlus_restock-apu_stop = Stop turbine + #LOC_RestockPlus_restock-apu_toggle = Toggle turbine + // 1.875m #LOC_RestockPlus_restock-battery-1875-1_title = Z-2500 Rechargeable Battery Bank #LOC_RestockPlus_restock-battery-1875-1_description = Medium battery pack for medium battery applications. @@ -361,5 +376,18 @@ Localization #LOC_RestockPlus_restock-ladder-static-3_title = Pegasus III Mobility Enhancer #LOC_RestockPlus_restock-ladder-static-3_description = A much needed enhancement to a mobility enhancement. It is very long. #LOC_RestockPlus_restock-ladder-static-3_tags = + + // RESOURCE + // ============== + + // 1.875m + #LOC_RestockPlus_restock-oretank-1875-1_title = Medium Holding Tank + #LOC_RestockPlus_restock-oretank-1875-1_description = A medium tank that can be used for storing raw materials. Warranty void if used to store snacks. + #LOC_RestockPlus_restock-oretank-1875-1_tags = black isru mine )mining (ore resource store restock + + // 3.75m + #LOC_RestockPlus_restock-oretank-375-1_title = Jumbo Holding Tank + #LOC_RestockPlus_restock-oretank-375-1_description = A very large tank that can be used for storing raw materials. The manufacturer denies any claims that it has been re-purposed from a local farm + #LOC_RestockPlus_restock-oretank-375-1_tags = black isru mine )mining (ore resource store restock } } diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/0625/restock-claw-625-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/0625/restock-claw-625-1.cfg new file mode 100644 index 00000000..08da389f --- /dev/null +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/0625/restock-claw-625-1.cfg @@ -0,0 +1,75 @@ +// ReStock+ 0.1.0 +// size 0 claw +PART +{ + name = restock-claw-625-1 + module = Part + author = Andrew Cassidy + + MODEL + { + model = ReStockPlus/Assets/Coupling/restock-claw-625 + scale = 1.0, 1.0, 1.0 + } + rescaleFactor = 1.0 + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,0,0,0 + node_attach = 0.0, -0.01, 0.0, 0.0, 1.0, 0.0, 0 + node_stack_bottom = 0.0, -0.06, 0.0, 0.0, -1.0, 0.0, 0 + + TechRequired = actuators + entryCost = 4000 + cost = 350 + mass = 0.03 + category = Coupling + subcatagory = 0 + + title = #LOC_RestockPlus_restock-claw-625-1_title //Advanced Grabbing Unit Junior + manufacturer = #autoLOC_501631 //#autoLOC_501631 = STEADLER Engineering Corps + description = #LOC_RestockPlus_restock-claw-625-1_description + // A smaller claw for grappling smaller things. Unfortunately, it does not pivot. + + + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 8 + maxTemp = 2000 + bulkheadProfiles = size0, srf + tags = #LOC_RestockPlus_restock-claw-625-1_tags // restock a.r.m arm asteroid capture clam claw connect dock fasten grab join klaw nasa 625 + + MODULE + { + name = ModuleGrappleNode + nodeTransformName = Pivot + deployAnimationController = 1 + nodetype = size0 + captureRange = 0.06 + captureMinFwdDot = 0.733 + captureMaxRvel = 1 + pivotRange = 0 + } + + MODULE + { + name = ModuleAnimateGeneric + animationName = Deploy + startEventGUIName = #autoLOC_502073 //#autoLOC_502073 = Arm + endEventGUIName = #autoLOC_502074 //#autoLOC_502074 = Disarm + actionGUIName = #autoLOC_502075 //#autoLOC_502075 = Toggle Arming + } + + MODULE + { + name = ModuleLight + lightName = Spotlight + useAnimationDim = true + lightBrightenSpeed = 5 + lightDimSpeed = 3 + resourceAmount = 0.01 + useResources = true + animationName = RestockMiniClawLamp_On + } +} diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Electrical/radial/restock-apu-radial-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Electrical/radial/restock-apu-radial-1.cfg new file mode 100644 index 00000000..615e61e8 --- /dev/null +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Electrical/radial/restock-apu-radial-1.cfg @@ -0,0 +1,77 @@ +// ReStock+ 0.2.0 +// monopropellant APU/"Fuel Cell" +PART +{ + // --- general parameters --- + name = restock-apu-radial-1 + module = Part + author = Andrew Cassidy + // --- asset parameters --- + MODEL + { + model = ReStock/Assets/Electrical/restock-apu-radial-1 + } + scale = 1.0 + rescaleFactor = 1 + // --- node definitions --- + node_attach = 0, 0, 0, 1, 0, 0, 0 + // --- editor parameters --- + TechRequired = specializedElectrics + entryCost = 2000 + cost = 700 + category = Electrical + subcategory = 0 + title = #LOC_RestockPlus_restock-apu-radial-1_title //NH-24 Monopropellant APU + manufacturer = #autoLOC_501636 //#autoLOC_501636 = Zaltonic Electronics + description = #LOC_RestockPlus_restock-apu-radial-1_description + // After playing with a children's pinwheel toy and asking themselves "how could this become more awesome", one engineer tried pointing a small rocket engine at it. The engineering team immediately got to work using it to generate electricity, and the Monopropellant APU was born + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 0,1,0,0,0 + bulkheadProfiles = surf + // --- standard part parameters --- + mass = 0.075 + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 7 + maxTemp = 2000 + breakingForce = 5000 + breakingTorque = 5000 + tags = #LOC_RestockPlus_restock-apu-radial-1_tags //APU backup turbine array bank charge convert e/c elect energ pack power volt watt + + MODULE + { + name = ModuleResourceConverter + ConverterName = #LOC_RestockPlus_restock-apu_name //APU turbine + StartActionName = #LOC_RestockPlus_restock-apu_start //Start turbine + StopActionName = #LOC_RestockPlus_restock-apu_stop //Stop turbine + ToggleActionName = #LOC_RestockPlus_restock-apu_toggle //Toggle turbine + + FillAmount = 0.95 + AutoShutdown = false + GeneratesHeat = false + UseSpecialistBonus = false + + INPUT_RESOURCE + { + ResourceName = MonoPropellant + Ratio = 0.006 + FlowMode = STAGE_PRIORITY_FLOW + } + OUTPUT_RESOURCE + { + ResourceName = ElectricCharge + Ratio = 1.5 + DumpExcess = false + } + } + + RESOURCE + { + name = ElectricCharge + amount = 40 + maxAmount = 40 + } +} diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-1875-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-1875-1.cfg new file mode 100644 index 00000000..937c5ada --- /dev/null +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-1875-1.cfg @@ -0,0 +1,56 @@ +// ReStock+ 0.2.0 +// 1.875m Ore Tank +PART +{ + // --- general parameters --- + name = restock-oretank-1875-1 + module = Part + author = Andrew Cassidy + // --- asset parameters --- + MODEL + { + model = ReStockPlus/Assets/Resource/restock-oretank-1875-1 + } + scale = 1.0 + rescaleFactor = 1 + // --- node definitions --- + node_attach = 0,0,0.9,0,0,-1,2 + node_stack_top = 0.0, 0.9, 0.0, 0.0, 1.0, 0.0, 2 + node_stack_bottom = 0.0, -0.9, 0.0, 0.0, -1.0, 0.0, 2 + // --- editor parameters --- + TechRequired = experimentalScience + entryCost = 6000 + cost = 2000 + category = FuelTank // y tho + subcategory = 0 + title = #LOC_RestockPlus_restock-oretank-1875-1_title //Medium Holding Tank + manufacturer = #autoLOC_501627 //#autoLOC_501627 = Jebediah Kerman's Junkyard and Spacecraft Parts Co + description = #LOC_RestockPlus_restock-oretank-1875-1_description //A medium tank that can be used for storing raw materials. Warranty void if used to store snacks. + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,1,1,0 + bulkheadProfiles = size1p5 + // --- standard part parameters --- + mass = 1.2 + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 7 + maxTemp = 2000 + breakingForce = 5000 + breakingTorque = 5000 + tags = #LOC_RestockPlus_restock-oretank-1875-1_tags //black isru mine )mining (ore resource store restock + + RESOURCE + { + name = Ore + amount = 0 + maxAmount = 800 + } + + MODULE + { + name = ModuleFuelJettison + } +} diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-375-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-375-1.cfg new file mode 100644 index 00000000..869398e5 --- /dev/null +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Resource/restock-oretank-375-1.cfg @@ -0,0 +1,55 @@ +// ReStock+ 0.2.0 +// 3.75m Ore Tank +PART +{ + // --- general parameters --- + name = restock-oretank-375-1 + module = Part + author = Andrew Cassidy + // --- asset parameters --- + MODEL + { + model = ReStockPlus/Assets/Resource/restock-oretank-375-1 + } + scale = 1.0 + rescaleFactor = 1 + // --- node definitions --- + node_attach = 0,0,1.85,0,0,-1,3 + node_stack_top = 0.0, 0.9, 0.0, 0.0, 1.0, 0.0, 3 + node_stack_bottom = 0.0, -0.9, 0.0, 0.0, -1.0, 0.0, 3 + // --- editor parameters --- + TechRequired = experimentalScience + entryCost = 12000 + cost = 4000 + category = FuelTank // y tho + subcategory = 0 + title = #LOC_RestockPlus_restock-oretank-375-1_title //Jumbo Holding Tank + manufacturer = #autoLOC_501627 //#autoLOC_501627 = Jebediah Kerman's Junkyard and Spacecraft Parts Co + description = #LOC_RestockPlus_restock-oretank-375-1_description //A very large tank that can be used for storing raw materials. The manufacturer denies any claims that it has been re-purposed from a local farm + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,1,1,0 + bulkheadProfiles = size3 + // --- standard part parameters --- + mass = 4.3 + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 7 + maxTemp = 2000 + breakingForce = 5000 + breakingTorque = 5000 + tags = #LOC_RestockPlus_restock-oretank-375-1_tags //black isru mine )mining (ore resource store restock + + RESOURCE + { + name = Ore + amount = 0 + maxAmount = 3500 + } + + MODULE + { + name = ModuleFuelJettison + } +} diff --git a/Source/Restock/ModuleRestockHeatEffects.cs b/Source/Restock/ModuleRestockHeatEffects.cs new file mode 100644 index 00000000..61349689 --- /dev/null +++ b/Source/Restock/ModuleRestockHeatEffects.cs @@ -0,0 +1,160 @@ +using System; +using UnityEngine; +using System.Collections.Generic; + +namespace Restock +{ + public class ModuleRestockHeatEffects : PartModule + { + // enable the heat glow emissive + [KSPField] public bool enableHeatEmissive = false; + + // what shader property to modify. must be a color. + [KSPField] public string shaderProperty = "_EmissiveColor"; + + // animation curve for the red channel + [KSPField] public FloatCurve redCurve= new FloatCurve(); + + // animation curve for the green channel + [KSPField] public FloatCurve greenCurve = new FloatCurve(); + + // animation curve for the blue channel + [KSPField] public FloatCurve blueCurve = new FloatCurve(); + + // animation curve for the alpha channel + [KSPField] public FloatCurve alphaCurve = new FloatCurve(); + + // draper point, the temperature in Kelvin where materials start glowing + [KSPField] public double draperPoint = 798.0; + + // temperature where the animation is at its maximum + [KSPField] public double lerpMax = double.NaN; + + // temperature where the animation is at its minimum, added with draperPoint + [KSPField] public double lerpMin = 0.0; + + // use the part's core temperature? (overrides useSkinTemp) + [KSPField] public bool useCoreTemp = false; + + // use the part's skin temperature? + [KSPField] public bool useSkinTemp = false; + + // should the module disable the stock blackbody glow effect on the included renderers? + [KSPField] public bool disableBlackbody = false; + + [KSPField] public List renderers = new List(); + + private readonly string _shaderBlackbody = "_TemperatureColor"; + + private ModuleCoreHeat _coreHeatModule = null; + + private int _shaderPropertyID; + + private int _shaderBlackbodyID; + + private double _lerpRange; + + private Color _emissiveColor = new Color(); + private MaterialPropertyBlock _propertyBlock = new MaterialPropertyBlock(); + + public void Start() + { + if (base.vessel == null) return; + + if (enableHeatEmissive) + { + if (useCoreTemp) + { + _coreHeatModule = base.part.FindModuleImplementing(); + if (_coreHeatModule == null) + { + this.LogError("Part has no Core Heat module, skipping"); + useCoreTemp = false; + } + } + + if (double.IsNaN(lerpMax)) + { + if (useCoreTemp) + { + lerpMax = _coreHeatModule.CoreShutdownTemp; + } + else + { + lerpMax = useSkinTemp ? part.skinMaxTemp : part.maxTemp; + } + } + + _lerpRange = lerpMax - lerpMin - draperPoint; + + _shaderPropertyID = Shader.PropertyToID(shaderProperty); + } + + if (disableBlackbody) + { + _shaderBlackbodyID = Shader.PropertyToID(_shaderBlackbody); + } + } + + public override void OnLoad(ConfigNode node) + { + if (HighLogic.LoadedSceneIsEditor || HighLogic.LoadedSceneIsFlight) return; + + renderers = base.part.FindModelComponents(); + + if (node.HasValue("excludedRenderer")) + { + var excludedRenderers = new List(); + + excludedRenderers.AddRange(node.GetValues("excludedRenderer")); + + for (int i = renderers.Count - 1; i >= 0; i--) + { + if (renderers[i] == null || excludedRenderers.Contains(renderers[i].name)) + { + renderers.RemoveAt(i); + } + } + } + } + + public void LateUpdate() + { + if (!HighLogic.LoadedSceneIsFlight) return; + + if (enableHeatEmissive) + { + var temp = 0.0; + if (useCoreTemp) + { + temp = _coreHeatModule.CoreTemperature; + } + else + { + temp = useSkinTemp ? base.part.skinTemperature : base.part.temperature; + } + + var temp2 = (float) ((temp - draperPoint) / _lerpRange); + temp2 = Mathf.Clamp01(temp2); + + _emissiveColor.r = redCurve.Evaluate(temp2); + _emissiveColor.g = greenCurve.Evaluate(temp2); + _emissiveColor.b = blueCurve.Evaluate(temp2); + _emissiveColor.a = alphaCurve.Evaluate(temp2); + + _propertyBlock.SetColor(_shaderPropertyID, _emissiveColor); + } + + if (disableBlackbody) + { + _propertyBlock.SetColor(_shaderBlackbodyID, Color.black); + + } + + foreach (var r in renderers) + { + r.SetPropertyBlock(_propertyBlock); + } + } + } +} \ No newline at end of file diff --git a/Source/Restock/ModuleRestockISRUAnimation.cs b/Source/Restock/ModuleRestockISRUAnimation.cs new file mode 100644 index 00000000..b8fd27a7 --- /dev/null +++ b/Source/Restock/ModuleRestockISRUAnimation.cs @@ -0,0 +1,351 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Restock +{ + public class ModuleRestockISRUAnimation : PartModule + { + // name of the deploy animation to use + [KSPField] public string deployAnimationName = ""; + + // name of the retract animation to use + // will default to using the deploy animation in reverse + [KSPField] public string retractAnimationName = ""; + + // name of the active animation to use + [KSPField] public string activeAnimationName = ""; + + // name of the inactive animation to use + [KSPField] public string inactiveAnimationName = ""; + + // speed to run the animation when deploying + [KSPField] public float deploySpeed = 1.0f; + + // speed to run the animation when retracting + [KSPField] public float retractSpeed = 1.0f; + + // does this module need electric charge to be enabled? + [KSPField] public bool needsEC = false; + + // should the module wait until a current looping animation completes before changing state? + [KSPField] public bool waitForComplete = false; + + public bool IsDeployed => (CurrentState == State.InactiveWaiting || + CurrentState == State.Active || + CurrentState == State.Deploying); + + private enum State + { + Inactive, + InactiveWaiting, + Deploying, + Active, + ActiveWaiting, + Retracting + } + + private Animation DeployAnimation { get; set; } + private Animation RetractAnimation { get; set; } + private Animation ActiveAnimation { get; set; } + private Animation InactiveAnimation { get; set; } + + private State CurrentState { get; set; } + + private bool _deployAnimationPresent = false; + private bool _retractAnimationPresent = false; + private bool _activeAnimationPresent = false; + private bool _inactiveAnimationPresent = false; + + private List _modules; + + public void Start() + { + _modules = base.part.FindModulesImplementing(); + + _deployAnimationPresent = (deployAnimationName != string.Empty); + _retractAnimationPresent = (retractAnimationName != string.Empty); + _activeAnimationPresent = (activeAnimationName != string.Empty); + _inactiveAnimationPresent = (inactiveAnimationName != string.Empty); + + DeployAnimation = ((_deployAnimationPresent) ? + base.part.FindModelAnimators(deployAnimationName)[0] : null); + RetractAnimation = ((_retractAnimationPresent) ? + base.part.FindModelAnimators(retractAnimationName)[0] : null); + ActiveAnimation = ((_activeAnimationPresent) ? + base.part.FindModelAnimators(activeAnimationName)[0] : null); + InactiveAnimation = ((_inactiveAnimationPresent)? + base.part.FindModelAnimators(inactiveAnimationName)[0] : null); + + foreach (var a in base.part.FindModelAnimators()) a.Stop(); + + if (!HighLogic.LoadedSceneIsFlight) return; + + if (ConvertersEnabled()) + { + DeployStart(1000f); + } + else + { + RetractStart(1000f); + } + } + + public override void OnLoad(ConfigNode node) + { + } + + public void Update() + { + if (!HighLogic.LoadedSceneIsFlight) return; + + try + { + switch (CurrentState) + { + // System is inactive, and playing the inactive animation if present + case State.Inactive: + if (ConvertersEnabled()) + { + if (waitForComplete) + { + DeployWait(); + } + else + { + DeployStart(); + } + } + + break; + + // System is inactive, but waiting for the animation to end before deploying + case State.InactiveWaiting: + if (!waitForComplete || !_inactiveAnimationPresent) + { + this.LogError( + "Invalid state! waitForComplete not enabled or inactive animation not present."); + CurrentState = State.Inactive; + } + else if (!ConvertersEnabled()) + { + RetractEnd(); + } + else if (!InactiveAnimation.IsPlaying(inactiveAnimationName)) + { + DeployStart(); + } + + break; + + // System is deploying + case State.Deploying: + if (!_deployAnimationPresent) + { + this.LogError("Invalid state! Deploying without an animation present."); + CurrentState = State.Active; + } + else if (!ConvertersEnabled()) + { + RetractStart(); + } + else if (!DeployAnimation.IsPlaying(deployAnimationName)) + { + DeployEnd(); + } + + break; + + // System is active, and playing the active animation if present + case State.Active: + if (!ConvertersEnabled()) + { + if (waitForComplete) + { + RetractWait(); + } + else + { + RetractStart(); + } + } + + break; + + // System is active, but waiting for the animation to finish before retracting + case State.ActiveWaiting: + if (!waitForComplete || !_activeAnimationPresent) + { + this.LogError("Invalid state! waitForComplete not enabled or active animation not present."); + CurrentState = State.Active; + } + else if (ConvertersEnabled()) + { + DeployEnd(); + } + else if (!ActiveAnimation.IsPlaying(activeAnimationName)) + { + RetractStart(); + } + + break; + + // System is retracting + case State.Retracting: + if (!_retractAnimationPresent && !_deployAnimationPresent) + { + this.LogError("Invalid state! Retracting without an animation present."); + CurrentState = State.Inactive; + } + else if (ConvertersEnabled()) + { + DeployStart(); + } + else if (!RetractAnimation.IsPlaying(retractAnimationName)) + { + RetractEnd(); + } + + break; + + default: + throw new ArgumentOutOfRangeException(); + } + } + catch (Exception e) + { + this.LogException("Failed to update animation module", e); + } + } + + private void DeployWait() + { + if (_inactiveAnimationPresent){ + CurrentState = State.InactiveWaiting; + PlayAnimation(InactiveAnimation, inactiveAnimationName, loop: false); + } + else + { + DeployStart(); + } + } + + private void DeployStart(float speed = 1f) + { + if (_deployAnimationPresent) + { + if (_retractAnimationPresent && RetractAnimation.IsPlaying(retractAnimationName)) + { + RetractAnimation.Stop(retractAnimationName); + } + CurrentState = State.Deploying; + PlayAnimation(DeployAnimation, deployAnimationName, speed * deploySpeed); + } + else + { + DeployEnd(); + } + } + + private void DeployEnd() + { + CurrentState = State.Active; + + if (_activeAnimationPresent) + { + PlayAnimation(ActiveAnimation, activeAnimationName, loop: true); + } + } + + private void RetractWait() + { + if (_activeAnimationPresent) + { + CurrentState = State.ActiveWaiting; + PlayAnimation(ActiveAnimation, activeAnimationName, loop: false); + } + else + { + RetractStart(); + } + } + + private void RetractStart(float speed = 1f) + { + if (_retractAnimationPresent) + { + if (_deployAnimationPresent && DeployAnimation.IsPlaying(deployAnimationName)) + { + DeployAnimation.Stop(deployAnimationName); + } + CurrentState = State.Retracting; + PlayAnimation(RetractAnimation, retractAnimationName, speed * retractSpeed); + } + else if (_deployAnimationPresent) + { + CurrentState = State.Retracting; + PlayAnimation(DeployAnimation, deployAnimationName, speed * retractSpeed * -1); + } + else + { + RetractEnd(); + } + } + + private void RetractEnd() + { + CurrentState = State.Inactive; + + if (_inactiveAnimationPresent) + { + PlayAnimation(InactiveAnimation, inactiveAnimationName, loop: true); + } + } + + private bool ConvertersEnabled() + { + if (needsEC && !CheatOptions.InfiniteElectricity) + { + var ecHash = PartResourceLibrary.ElectricityHashcode; + base.vessel.GetConnectedResourceTotals(ecHash, out var ecAmount, out _, true); + if (ecAmount < 0.1) + { + return false; + } + } + + foreach (var m in _modules) + { + if (m.ModuleIsActive()) + { + return true; + } + } + + return false; + } + + private static void PlayAnimation(Animation anim, string name, float speed = 1f, bool loop = false) + { + var animState = anim[name]; + + if (animState.wrapMode != WrapMode.Loop) + { + if (speed < 0 && animState.time < Mathf.Epsilon) + { + animState.time = animState.length; + } + else if (speed > 0 && animState.time > animState.length - Mathf.Epsilon) + { + animState.time = 0.0f; + } + } + + animState.speed = speed; + animState.wrapMode = loop ? WrapMode.Loop : WrapMode.Once; + + //if (!anim.IsPlaying(name)) + anim.Play(name); + } + } +} \ No newline at end of file diff --git a/Source/Restock/Restock.csproj b/Source/Restock/Restock.csproj index d1904a8c..658d5fa5 100644 --- a/Source/Restock/Restock.csproj +++ b/Source/Restock/Restock.csproj @@ -49,6 +49,8 @@ + +