diff --git a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-crewed-endcap-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-crewed-endcap-1.mu index 323aa179..7f61dcc8 100644 Binary files a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-crewed-endcap-1.mu and b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-crewed-endcap-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-1.mu index 52144048..42fc092c 100644 Binary files a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-1.mu and b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt-n.tga b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt-n.tga new file mode 100644 index 00000000..cd469939 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt-n.tga differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt.tga b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt.tga new file mode 100644 index 00000000..d32153a2 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-cupola-lab-1-alt.tga differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-lab-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-lab-1.mu index 6e5333a8..a5a011dd 100644 Binary files a/Distribution/Restock/GameData/ReStock/Assets/Command/restock-lab-1.mu and b/Distribution/Restock/GameData/ReStock/Assets/Command/restock-lab-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Patches/Command/restock-command-pods.cfg b/Distribution/Restock/GameData/ReStock/Patches/Command/restock-command-pods.cfg index 78b7c41c..7881dd35 100644 --- a/Distribution/Restock/GameData/ReStock/Patches/Command/restock-command-pods.cfg +++ b/Distribution/Restock/GameData/ReStock/Patches/Command/restock-command-pods.cfg @@ -27,6 +27,44 @@ scale = 1,-1,1 rotation = 0, 0, 0 } + + @MODULE[ModuleColorChanger] + { + moduleID = hullLightColor + } + MODULE + { + name = ModuleRestockLinkedColorChanger + parentModuleID = hullLightColor + moduleID = fresnelLightColor + shaderProperty = _TintColor + animRate = 0.8 + animState = false + useRate = true + toggleInEditor = false + toggleInFlight = false + unfocusedRange = 5 + toggleAction = false + redCurve + { + key = 0 0 0 3 + key = 1 1 0 0 + } + greenCurve + { + key = 0 0 0 1 + key = 1 1 1 0 + } + blueCurve + { + key = 0 0 0 0 + key = 1 0.7 1.5 0 + } + alphaCurve + { + key = 0 1 + } + } } // Mk1 Pod diff --git a/Distribution/Restock/GameData/ReStock/Patches/Command/restock-utility-pods.cfg b/Distribution/Restock/GameData/ReStock/Patches/Command/restock-utility-pods.cfg index 2d7efdbd..a3960d0d 100644 --- a/Distribution/Restock/GameData/ReStock/Patches/Command/restock-utility-pods.cfg +++ b/Distribution/Restock/GameData/ReStock/Patches/Command/restock-utility-pods.cfg @@ -29,6 +29,46 @@ scale = 1,1,1 rotation = 0, 0, 0 } + + @MODULE[ModuleColorChanger] + { + moduleID = hullLightColor + } + MODULE + { + name = ModuleRestockLinkedColorChanger + parentModuleID = hullLightColor + moduleID = fresnelLightColor + shaderProperty = _TintColor + animRate = 0.8 + animState = false + useRate = true + toggleInEditor = false + toggleInFlight = false + unfocusedRange = 5 + toggleAction = false + redCurve + { + key = 0 0 0 3 + key = 1 1 0 0 + } + greenCurve + { + key = 0 0 0 1 + key = 1 1 1 0 + } + blueCurve + { + key = 0 0 0 0 + key = 1 0.7 1.5 0 + } + alphaCurve + { + key = 0 1 + } + } +} + } // Hitchhiker diff --git a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll index f92c4c0a..f6347629 100644 Binary files a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll and b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll differ diff --git a/Source/Restock/ModuleRestockLinkedColorChanger.cs b/Source/Restock/ModuleRestockLinkedColorChanger.cs new file mode 100644 index 00000000..af001dab --- /dev/null +++ b/Source/Restock/ModuleRestockLinkedColorChanger.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using UnityEngine; + +namespace Restock +{ + public class ModuleRestockLinkedColorChanger : ModuleColorChanger + { + + // The module to link this ColorChanger to + [KSPField] public string parentModuleID = "moduleName"; + + public ModuleColorChanger parentModuleColorChanger; + + public override void Start() + { + base.Start(); + + if (HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor) + { + + foreach (ModuleColorChanger mcc in part.GetComponents()) + { + Debug.Log(mcc.moduleID); + if (mcc.moduleID == parentModuleID) + { + parentModuleColorChanger = mcc; + } + } + } + } + + public override void FixedUpdate() + { + base.FixedUpdate(); + if (!parentModuleColorChanger) + return; + + SetScalar(parentModuleColorChanger.GetScalar); + + } + } +} \ No newline at end of file diff --git a/Source/Restock/Restock.csproj b/Source/Restock/Restock.csproj index 8c469675..c4cf7d0c 100644 --- a/Source/Restock/Restock.csproj +++ b/Source/Restock/Restock.csproj @@ -33,14 +33,17 @@ False + ..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\Assembly-CSharp.dll False + ..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.CoreModule.dll False + ..\..\..\..\..\..\..\Games\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Data\Managed\UnityEngine.AnimationModule.dll @@ -55,6 +58,7 @@ + @@ -66,8 +70,12 @@ + + + - sh -e -c "cp -v '$(TargetPath)' '$(SolutionDir)/../Distribution/Restock/GameData/ReStock/Plugins'" + + \ No newline at end of file