Add teenager arc type

This commit is contained in:
Noah Pilarski 2023-04-22 15:15:21 -04:00
parent f82a04c4f8
commit 161bbd1dcb
3 changed files with 18 additions and 1 deletions

View File

@ -24,6 +24,7 @@ namespace NewHorizons.Builder.Props
{
private static List<GameObject> _arcPrefabs;
private static List<GameObject> _childArcPrefabs;
private static GameObject _teenagerArcPrefab;
private static List<GameObject> _ghostArcPrefabs;
private static GameObject _scrollPrefab;
private static GameObject _computerPrefab;
@ -52,6 +53,7 @@ namespace NewHorizons.Builder.Props
public static List<GameObject> GetArcPrefabs() { return _arcPrefabs; }
public static List<GameObject> GetChildArcPrefabs() { return _childArcPrefabs; }
public static GameObject GetTeenagerArcPrefab() { return _teenagerArcPrefab; }
public static List<GameObject> GetGhostArcPrefabs() { return _ghostArcPrefabs; }
private static bool _isInit;
@ -85,6 +87,12 @@ namespace NewHorizons.Builder.Props
}
}
if (_teenagerArcPrefab == null)
{
_teenagerArcPrefab = GameObject.FindObjectsOfType<NomaiWallText>().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<GhostWallText>()
@ -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())

View File

@ -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;

View File

@ -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
}
/// <summary>