From 161bbd1dcb3212bca209d0cee2df32c896a219b2 Mon Sep 17 00:00:00 2001 From: Noah Pilarski Date: Sat, 22 Apr 2023 15:15:21 -0400 Subject: [PATCH 1/2] Add teenager arc type --- NewHorizons/Builder/Props/NomaiTextBuilder.cs | 11 +++++++++++ .../Props/TranslatorText/TranslatorTextBuilder.cs | 4 ++++ .../Modules/Props/TranslatorText/NomaiTextArcInfo.cs | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/NewHorizons/Builder/Props/NomaiTextBuilder.cs b/NewHorizons/Builder/Props/NomaiTextBuilder.cs index 193acf96..afed4b3f 100644 --- a/NewHorizons/Builder/Props/NomaiTextBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiTextBuilder.cs @@ -24,6 +24,7 @@ namespace NewHorizons.Builder.Props { private static List _arcPrefabs; private static List _childArcPrefabs; + private static GameObject _teenagerArcPrefab; private static List _ghostArcPrefabs; private static GameObject _scrollPrefab; private static GameObject _computerPrefab; @@ -52,6 +53,7 @@ namespace NewHorizons.Builder.Props public static List GetArcPrefabs() { return _arcPrefabs; } public static List GetChildArcPrefabs() { return _childArcPrefabs; } + public static GameObject GetTeenagerArcPrefab() { return _teenagerArcPrefab; } public static List GetGhostArcPrefabs() { return _ghostArcPrefabs; } private static bool _isInit; @@ -85,6 +87,12 @@ namespace NewHorizons.Builder.Props } } + if (_teenagerArcPrefab == null) + { + _teenagerArcPrefab = GameObject.FindObjectsOfType().FirstOrDefault(x => x.name.Equals("Arc_GD_StatueIsland_WindowNote")) + ?.gameObject?.transform?.Find("Arc 1")?.gameObject.InstantiateInactive().Rename("Arc (Teenager)").DontDestroyOnLoad(); + } + if (_ghostArcPrefabs == null) { var existingGhostArcs = GameObject.FindObjectsOfType() @@ -667,6 +675,9 @@ namespace NewHorizons.Builder.Props : (variation % _childArcPrefabs.Count()); arc = _childArcPrefabs[variation].InstantiateInactive(); break; + case NomaiTextArcInfo.NomaiTextArcType.Teenager: + arc = _teenagerArcPrefab.InstantiateInactive(); + break; case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcPrefabs.Any(): variation = variation < 0 ? Random.Range(0, _ghostArcPrefabs.Count()) diff --git a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs index aeaa9878..2b63a692 100644 --- a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs +++ b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs @@ -565,6 +565,10 @@ namespace NewHorizons.Builder.Props.TranslatorText profile = NomaiTextArcBuilder.childSpiralProfile; mat = _childArcMaterial; break; + case NomaiTextArcInfo.NomaiTextArcType.Teenager: + profile = NomaiTextArcBuilder.adultSpiralProfile; + mat = _childArcMaterial; + break; case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcMaterial != null: profile = NomaiTextArcBuilder.strangerSpiralProfile; mat = _ghostArcMaterial; diff --git a/NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs b/NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs index 5616d003..aa8ab516 100644 --- a/NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs +++ b/NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs @@ -19,7 +19,9 @@ namespace NewHorizons.External.Modules.TranslatorText [EnumMember(Value = @"child")] Child = 1, - [EnumMember(Value = @"stranger")] Stranger = 2 + [EnumMember(Value = @"stranger")] Stranger = 2, + + [EnumMember(Value = @"teenager")] Teenager = 3 } /// From 7e3a8154602cf30e62575c6228ebabc0ceaeab64 Mon Sep 17 00:00:00 2001 From: Ben C Date: Sat, 22 Apr 2023 19:23:18 +0000 Subject: [PATCH 2/2] Updated Schemas --- NewHorizons/Schemas/body_schema.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index 2e17f844..6e6e8f1b 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -1516,12 +1516,14 @@ "x-enumNames": [ "Adult", "Child", - "Stranger" + "Stranger", + "Teenager" ], "enum": [ "adult", "child", - "stranger" + "stranger", + "teenager" ] }, "MVector2": {