diff --git a/NewHorizons/Builder/Props/TranslatorText/NomaiTextArcBuilder.cs b/NewHorizons/Builder/Props/TranslatorText/NomaiTextArcBuilder.cs index 817084a5..4a78a3d6 100644 --- a/NewHorizons/Builder/Props/TranslatorText/NomaiTextArcBuilder.cs +++ b/NewHorizons/Builder/Props/TranslatorText/NomaiTextArcBuilder.cs @@ -1,3 +1,4 @@ +using NewHorizons.Utility.OWML; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -37,7 +38,6 @@ namespace NewHorizons.Builder.Props.TranslatorText ) .ToArray(); - return BuildSpiralGameObject(_points, mesh, goName); } @@ -67,15 +67,52 @@ namespace NewHorizons.Builder.Props.TranslatorText public struct SpiralProfile { // all of the Vector2 params here refer to a range of valid values public string profileName; + + /// + /// What is this + /// public Vector2 a; + + /// + /// What is this + /// public Vector2 b; + + /// + /// What is this + /// public Vector2 startS; + + /// + /// What is this + /// public Vector2 endS; + + /// + /// What is this + /// public Vector2 skeletonScale; + + /// + /// What is this + /// public int numSkeletonPoints; + + /// + /// What is this + /// public float uvScale; - public float innerWidth; // width at the tip - public float outerWidth; // width at the base + + /// + /// Width at tip + /// + public float innerWidth; + + /// + /// Width at base + /// + public float outerWidth; + public Material material; } @@ -119,8 +156,6 @@ namespace NewHorizons.Builder.Props.TranslatorText innerWidth = 0.75f, outerWidth = 0.75f, uvScale = 1f/1.8505f, - - }; diff --git a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs index 9c1a4eba..18a09f87 100644 --- a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs +++ b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs @@ -583,7 +583,12 @@ namespace NewHorizons.Builder.Props.TranslatorText case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcMaterial != null: profile = NomaiTextArcBuilder.strangerSpiralProfile; mat = _ghostArcMaterial; - overrideMesh = MeshUtilities.RectangleMeshFromCorners(new Vector3[]{ new Vector3(-0.9f, 0.0f, 0.0f), new Vector3(0.9f, 0.0f, 0.0f), new Vector3(-0.9f, 2.0f, 0.0f), new Vector3(0.9f, 2.0f, 0.0f) }); + overrideMesh = MeshUtilities.RectangleMeshFromCorners(new Vector3[]{ + new Vector3(-0.9f, 0.0f, 0.0f), + new Vector3(0.9f, 0.0f, 0.0f), + new Vector3(-0.9f, 2.0f, 0.0f), + new Vector3(0.9f, 2.0f, 0.0f) + }); overrideColor = new Color(0.0158f, 1.0f, 0.5601f, 1f); break; case NomaiTextArcInfo.NomaiTextArcType.Adult: @@ -603,6 +608,19 @@ namespace NewHorizons.Builder.Props.TranslatorText else arc = NomaiTextArcArranger.CreateSpiral(profile, conversationZone).gameObject; } + // Hardcoded stranger point fix + if (type == NomaiTextArcInfo.NomaiTextArcType.Stranger) + { + Delay.FireOnNextUpdate(() => + { + var text = arc.GetComponent(); + for (int i = 0; i < text._points.Length; i++) + { + text._points[i] = new Vector3(0f, 2f * i / text._points.Length, 0f); + } + }); + } + if (mat != null) arc.GetComponent().sharedMaterial = mat; arc.transform.parent = conversationZone.transform;