From 2904af39d1153e1c6a137562bcdb8fe17f78e9d4 Mon Sep 17 00:00:00 2001
From: TerrificTrifid <99054745+TerrificTrifid@users.noreply.github.com>
Date: Sat, 17 Sep 2022 10:55:01 -0500
Subject: [PATCH] Detail stretch
---
NewHorizons/Builder/Props/DetailBuilder.cs | 2 +-
NewHorizons/External/Modules/PropModule.cs | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs
index 660956b6..5e4ab8e1 100644
--- a/NewHorizons/Builder/Props/DetailBuilder.cs
+++ b/NewHorizons/Builder/Props/DetailBuilder.cs
@@ -98,7 +98,7 @@ namespace NewHorizons.Builder.Props
prop.transform.rotation = go.transform.TransformRotation(rot);
}
- prop.transform.localScale = detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale;
+ prop.transform.localScale = detail.stretch ?? (detail.scale != 0 ? Vector3.one * detail.scale : prefab.transform.localScale);
prop.SetActive(true);
diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs
index 1644192d..4051e58f 100644
--- a/NewHorizons/External/Modules/PropModule.cs
+++ b/NewHorizons/External/Modules/PropModule.cs
@@ -200,6 +200,11 @@ namespace NewHorizons.External.Modules
///
[DefaultValue(1f)] public float scale = 1f;
+ ///
+ /// Scale each axis of the prop. Overrides `scale`.
+ ///
+ public MVector3 stretch;
+
///
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
///