mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Enable selection for decal colliders in flight, change layer
This commit is contained in:
parent
d8087cce3a
commit
5fc9394908
Binary file not shown.
@ -6,7 +6,7 @@ namespace ConformalDecals {
|
|||||||
public static class DecalConfig {
|
public static class DecalConfig {
|
||||||
private static Texture2D _blankNormal;
|
private static Texture2D _blankNormal;
|
||||||
private static List<string> _shaderBlacklist;
|
private static List<string> _shaderBlacklist;
|
||||||
private static int _decalLayer = 3;
|
private static int _decalLayer = 31;
|
||||||
|
|
||||||
public static Texture2D BlankNormal => _blankNormal;
|
public static Texture2D BlankNormal => _blankNormal;
|
||||||
public static int DecalLayer => _decalLayer;
|
public static int DecalLayer => _decalLayer;
|
||||||
|
@ -57,8 +57,6 @@ namespace ConformalDecals {
|
|||||||
|
|
||||||
|
|
||||||
// INTERNAL VALUES
|
// INTERNAL VALUES
|
||||||
|
|
||||||
|
|
||||||
[KSPField(guiName = "#LOC_ConformalDecals_gui-scale", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"),
|
[KSPField(guiName = "#LOC_ConformalDecals_gui-scale", guiActive = false, guiActiveEditor = true, isPersistant = true, guiFormat = "F2", guiUnits = "m"),
|
||||||
UI_FloatRange(stepIncrement = 0.05f)]
|
UI_FloatRange(stepIncrement = 0.05f)]
|
||||||
public float scale = 1.0f;
|
public float scale = 1.0f;
|
||||||
@ -79,6 +77,9 @@ namespace ConformalDecals {
|
|||||||
UI_FloatRange()]
|
UI_FloatRange()]
|
||||||
public float wear = 100;
|
public float wear = 100;
|
||||||
|
|
||||||
|
[KSPField(isPersistant = true)]
|
||||||
|
public bool projectMultiple; // reserved for future features. do not modify
|
||||||
|
|
||||||
[KSPField] public MaterialPropertyCollection materialProperties;
|
[KSPField] public MaterialPropertyCollection materialProperties;
|
||||||
|
|
||||||
[KSPField] public Transform decalFrontTransform;
|
[KSPField] public Transform decalFrontTransform;
|
||||||
@ -245,7 +246,7 @@ namespace ConformalDecals {
|
|||||||
|
|
||||||
materialProperties.RenderQueue = DecalQueue;
|
materialProperties.RenderQueue = DecalQueue;
|
||||||
|
|
||||||
_boundsCollider = decalProjectorTransform.GetComponent<BoxCollider>();
|
_boundsCollider = decalColliderTransform.GetComponent<BoxCollider>();
|
||||||
|
|
||||||
UpdateMaterials();
|
UpdateMaterials();
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ namespace ConformalDecals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (HighLogic.LoadedSceneIsFlight) {
|
if (HighLogic.LoadedSceneIsFlight) {
|
||||||
|
Part.layerMask |= 1 << DecalConfig.DecalLayer;
|
||||||
decalColliderTransform.gameObject.layer = DecalConfig.DecalLayer;
|
decalColliderTransform.gameObject.layer = DecalConfig.DecalLayer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user