From 6cd78839ae90a6395b1f47ab1414cdfca5b08793 Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Tue, 3 Dec 2019 12:41:33 -0800 Subject: [PATCH 1/6] Update ModuleRestockHeatEffects to fix instantiation issues Untested (will test when I get home) --- .../GameData/ReStock/Plugins/Restock.dll | Bin 36864 -> 36864 bytes Source/Restock/ModuleRestockHeatEffects.cs | 41 ++++++++++-------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll index 57c0b58514d3699a678d8b6a6cea95b96dce7e5c..c6c487cdcbb7d7e8195b6704b784d9688c78ac67 100644 GIT binary patch delta 2391 zcmYk82~1R16o&u%VBo>PILII{qO!Ok`zDLB$S^WguxhEPTGADZwkj5kwjJy+r3FMp zr_X}g4J{J2iIR+Mj9S|!Mw@7w+Er3DB{s&ybTPKkYG`}zg7Px&-us>Z+aXd1qihzH&C0#QnZ#VAn@O)x#X-hZz1EBY%&t&%i@MODfF^SQ zHZ-;qGUNDgk?YCIcei`~lIx_GmVnzXPnwcF?kTReR`*+Nqj zG>WW)WZ|Tas(pBTnjn zF}7z^vseAY86hDaD?K;hEcycKSOks97NsEMEk%crHPI?q3l4!#jMfoH~;ew(X(xUK#q7!Op!MB(w1VdnjSFVMPMwa_p<3d;FunFE+7V` z97)qm46#U8bT@`my`p&XjK!!T8+qE1oGa(0P-X1cEy#y%>!Z3Iad}*mHJpl<16CeczpZ zReB=26a^7Y$8JT#k*oBX7$lXdDd&+qDk&qAVA*>wx zB(WWIg357FX-SjIh=wG2Sg!38y&Sid>t}jZ4ns;aw=K<|M&ujn7fmJ@a=T&Qtz zzoNB*J{KhOcHx{PQA8KMRvJ&+g-c4~X}gf?KU%^}LBouHyNw~o5r2I}gvsx&DhQl8 zid$MRyQ&qiO#yD|7vQS4jrv=xh>fB;C_&rA0RN9Q8JX4tUp7UZ`u3iy?NYK`^~LTreJglZbC#@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/Source/Restock/ModuleRestockHeatEffects.cs +++ b/Source/Restock/ModuleRestockHeatEffects.cs @@ -13,11 +13,11 @@ namespace Restock [KSPField] public string shaderProperty = "_EmissiveColor"; // animation curve for the red channel - [KSPField] public FloatCurve redCurve= new FloatCurve(); + [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(); @@ -26,41 +26,44 @@ namespace Restock // 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(); + + 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(); + private Color _emissiveColor; + private MaterialPropertyBlock _propertyBlock; public void Start() { if (base.vessel == null) return; - + + _emissiveColor = new Color(); + _propertyBlock = new MaterialPropertyBlock(); + if (enableHeatEmissive) { if (useCoreTemp) @@ -72,7 +75,7 @@ namespace Restock useCoreTemp = false; } } - + if (double.IsNaN(lerpMax)) { if (useCoreTemp) @@ -95,17 +98,17 @@ namespace Restock _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--) @@ -121,7 +124,7 @@ namespace Restock public void LateUpdate() { if (!HighLogic.LoadedSceneIsFlight) return; - if (renderers == null) return; + if (renderers == null) return; //when switching to the flight scene LateUpdate gets called AFTER OnLoad for some reason // so renderers should hopefully only be null for one frame @@ -136,10 +139,10 @@ namespace Restock { 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); From da201e23ce6d2c905f5776f79c5697866ff93354 Mon Sep 17 00:00:00 2001 From: Poodmund Date: Mon, 23 Dec 2019 14:13:23 +0000 Subject: [PATCH 2/6] Fix 1.875m decoupler/separator tech tree node requirement flags. --- .../Parts/Coupling/1875/restock-decoupler-1875-1.cfg | 2 +- .../Parts/Coupling/1875/restock-separator-1875-1.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-decoupler-1875-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-decoupler-1875-1.cfg index f52e7f90..292363d0 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-decoupler-1875-1.cfg +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-decoupler-1875-1.cfg @@ -12,7 +12,7 @@ PART rescaleFactor = 1.0 node_stack_top = 0.0, 0.075, 0.0, 0.0, 1.0, 0.0, 1 node_stack_bottom = 0.0, -0.075, 0.0, 0.0, -1.0, 0.0, 1 - TechRequired = advancedConstruction + TechRequired = advConstruction entryCost = 1800 cost = 475 category = Coupling diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-separator-1875-1.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-separator-1875-1.cfg index 98ec65a5..39ce86a4 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-separator-1875-1.cfg +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Coupling/1875/restock-separator-1875-1.cfg @@ -12,7 +12,7 @@ PART rescaleFactor = 1.0 node_stack_top = 0.0, 0.075, 0.0, 0.0, 1.0, 0.0, 1 node_stack_bottom = 0.0, -0.075, 0.0, 0.0, -1.0, 0.0, 1 - TechRequired = advancedConstruction + TechRequired = advConstruction entryCost = 1800 cost = 475 category = Coupling From 9a31df1547fa6f50a66114f640460ff8fc789cd5 Mon Sep 17 00:00:00 2001 From: ChrisAdderley Date: Sat, 28 Dec 2019 12:20:19 -0800 Subject: [PATCH 3/6] Some fixes - Including #765, #766 --- .../Aero/restock-heatshield-inflatable-1.mu | Bin 1240448 -> 1240448 bytes .../GameData/ReStock/Localization/en-us.cfg | 4 ++-- Distribution/Restock/changelog.txt | 5 +++++ Distribution/RestockPlus/changelog.txt | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Distribution/Restock/GameData/ReStock/Assets/Aero/restock-heatshield-inflatable-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Aero/restock-heatshield-inflatable-1.mu index 49cb8a5a508ebe707ee6f1c8c8c4c7ed43034bf1..b84f697bf14728003c4a3197075c36a093a4fb2c 100644 GIT binary patch delta 98 zcmZp;?cD%GTNu-1d6vy~*_|)cY&C19 Date: Sat, 28 Dec 2019 12:20:58 -0800 Subject: [PATCH 4/6] Version file updates --- .../Restock/GameData/ReStock/Versioning/ReStock.version | 2 +- .../GameData/ReStockPlus/Versioning/ReStockPlus.version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Distribution/Restock/GameData/ReStock/Versioning/ReStock.version b/Distribution/Restock/GameData/ReStock/Versioning/ReStock.version index 009ae13a..2f90257b 100644 --- a/Distribution/Restock/GameData/ReStock/Versioning/ReStock.version +++ b/Distribution/Restock/GameData/ReStock/Versioning/ReStock.version @@ -6,7 +6,7 @@ { "MAJOR":1, "MINOR":0, - "PATCH":1, + "PATCH":2, "BUILD":0 }, "KSP_VERSION": diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Versioning/ReStockPlus.version b/Distribution/RestockPlus/GameData/ReStockPlus/Versioning/ReStockPlus.version index 67b8464a..04f9059d 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Versioning/ReStockPlus.version +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Versioning/ReStockPlus.version @@ -6,7 +6,7 @@ { "MAJOR":1, "MINOR":0, - "PATCH":1, + "PATCH":2, "BUILD":0 }, "KSP_VERSION": From 03e63787f46e2518705abd8a43d6547ef3ea6b8a Mon Sep 17 00:00:00 2001 From: ChrisAdderley Date: Wed, 1 Jan 2020 22:40:44 -0800 Subject: [PATCH 5/6] Castor SRB fix. --- Distribution/Restock/changelog.txt | 1 + .../ReStockPlus/Parts/Engine/1875/restock-srb-castor.cfg | 2 +- Distribution/RestockPlus/changelog.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Distribution/Restock/changelog.txt b/Distribution/Restock/changelog.txt index d88b8234..071ee826 100644 --- a/Distribution/Restock/changelog.txt +++ b/Distribution/Restock/changelog.txt @@ -3,6 +3,7 @@ v1.0.2 - Fixed 'tankbutt' localizations for Skiff showing 1.875m when they should be 2.5m (#766) - Fixed inflatable heatshield fairing (#765) + v1.0.1 ----- - Fixed lack of bundled ModuleManager diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Engine/1875/restock-srb-castor.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Engine/1875/restock-srb-castor.cfg index c780cc31..5c809be0 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Engine/1875/restock-srb-castor.cfg +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Parts/Engine/1875/restock-srb-castor.cfg @@ -2,7 +2,7 @@ // 1.875m SRB for post-1.8 (mirrors Pollux) PART { - name = restock-srb-anvil-1 + name = restock-srb-castor-1 module = Part author = Chris Adderley (Nertea) rescaleFactor = 1 diff --git a/Distribution/RestockPlus/changelog.txt b/Distribution/RestockPlus/changelog.txt index 2e112f8e..eaa12c3e 100644 --- a/Distribution/RestockPlus/changelog.txt +++ b/Distribution/RestockPlus/changelog.txt @@ -1,6 +1,7 @@ v1.0.2 ----- - Fixed tech tree locations for 1.875m decoupler and separator +- Fixed Castor SRB having the same part name as old Anvil v1.0.1 ------ From 326eacce4d4046214ef57076ff4e2c9bc83acd97 Mon Sep 17 00:00:00 2001 From: ChrisAdderley Date: Thu, 2 Jan 2020 20:30:59 -0800 Subject: [PATCH 6/6] Changelog update --- Distribution/Restock/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Distribution/Restock/changelog.txt b/Distribution/Restock/changelog.txt index 071ee826..8a3f0cb4 100644 --- a/Distribution/Restock/changelog.txt +++ b/Distribution/Restock/changelog.txt @@ -1,5 +1,6 @@ v1.0.2 ----- +- Fixed plugin instantiation issue - Fixed 'tankbutt' localizations for Skiff showing 1.875m when they should be 2.5m (#766) - Fixed inflatable heatshield fairing (#765)