From ed9553d1fd6741f6a069981102d77501f665d47e Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Mon, 1 Jun 2020 16:54:07 -0700 Subject: [PATCH] Fix decal projection being scaled twice --- .../ConformalDecals/Assets/decal-blank.mu | 2 +- .../ConformalDecals/Localization/en-us.cfg | 16 ++++++++-------- .../ConformalDecals/Plugins/ConformalDecals.dll | 2 +- Source/ConformalDecals/ModuleConformalDecal.cs | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu b/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu index 434aa24..c1e7fff 100644 --- a/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu +++ b/Distribution/GameData/ConformalDecals/Assets/decal-blank.mu @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:670e33a0323f71039433bc3b562bb689595590100745228405556ae0f47993cd +oid sha256:ff2aa629b4f34a2c1f7d7fb25a40c0e4fc16c749d9178378c999e4a01c458726 size 4294 diff --git a/Distribution/GameData/ConformalDecals/Localization/en-us.cfg b/Distribution/GameData/ConformalDecals/Localization/en-us.cfg index 37f4af2..e00f16f 100644 --- a/Distribution/GameData/ConformalDecals/Localization/en-us.cfg +++ b/Distribution/GameData/ConformalDecals/Localization/en-us.cfg @@ -1,11 +1,11 @@ Localization { - en-us - { - #LOC_ConformalDecals_gui_scale = Scale - #LOC_ConformalDecals_gui_depth = Depth - #LOC_ConformalDecals_gui_opacity = Opacity - #LOC_ConformalDecals_gui_cutoff = Cutoff - #LOC_ConformalDecals_gui_aspect-ratio = Aspect Ratio - } + en-us + { + #LOC_ConformalDecals_gui-scale = Scale + #LOC_ConformalDecals_gui-depth = Depth + #LOC_ConformalDecals_gui-opacity = Opacity + #LOC_ConformalDecals_gui-cutoff = Cutoff + #LOC_ConformalDecals_gui-aspectratio = Aspect Ratio + } } \ No newline at end of file diff --git a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll index 9aaf405..0b3f101 100644 --- a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll +++ b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5cd7699beb81806ecb67f960516d89c97d25c0d576312744058c07f1dc956f9e +oid sha256:b7bca0055ccf123563b0f98713febc87961848cdfb73c3616300c7de77405442 size 26624 diff --git a/Source/ConformalDecals/ModuleConformalDecal.cs b/Source/ConformalDecals/ModuleConformalDecal.cs index b8e7039..20a28f7 100644 --- a/Source/ConformalDecals/ModuleConformalDecal.cs +++ b/Source/ConformalDecals/ModuleConformalDecal.cs @@ -13,11 +13,11 @@ namespace ConformalDecals { UI_FloatRange(minValue = 0.05f, maxValue = 4f, stepIncrement = 0.05f)] public float depth = 1.0f; - [KSPField(guiName = "#LOC_ConformalDecals_gui-opacity", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + [KSPField(guiName = "#LOC_ConformalDecals_gui-opacity", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "P0"), UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)] public float opacity = 1.0f; - [KSPField(guiName = "#LOC_ConformalDecals_gui-cutoff", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"), + [KSPField(guiName = "#LOC_ConformalDecals_gui-cutoff", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "P0"), UI_FloatRange(minValue = 0.0f, maxValue = 1f, stepIncrement = 0.05f)] public float cutoff = 0.5f; @@ -97,7 +97,7 @@ namespace ConformalDecals { // find projector transform if (string.IsNullOrEmpty(decalProjector)) { - decalProjectorTransform = part.transform.Find("model"); + decalProjectorTransform = part.transform; } else { decalProjectorTransform = part.FindModelTransform(decalProjector);