mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add location to nomai text info
This commit is contained in:
parent
24c43ae747
commit
200933d41d
@ -2,6 +2,7 @@ using NewHorizons.External.Modules;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using Enum = System.Enum;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -259,6 +260,7 @@ namespace NewHorizons.Builder.Props
|
||||
var computer = computerObject.GetComponent<NomaiComputer>();
|
||||
computer.SetSector(sector);
|
||||
|
||||
computer._location = (NomaiText.Location)Enum.Parse(typeof(NomaiText.Location), Enum.GetName(typeof(PropModule.NomaiTextInfo.NomaiTextLocation), info.location));
|
||||
computer._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
computer._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
computer._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
@ -305,6 +307,7 @@ namespace NewHorizons.Builder.Props
|
||||
var computer = computerObject.GetComponent<NomaiVesselComputer>();
|
||||
computer.SetSector(sector);
|
||||
|
||||
computer._location = (NomaiText.Location)Enum.Parse(typeof(NomaiText.Location), Enum.GetName(typeof(PropModule.NomaiTextInfo.NomaiTextLocation), info.location));
|
||||
computer._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
computer._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
computer._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
@ -380,6 +383,7 @@ namespace NewHorizons.Builder.Props
|
||||
var nomaiWallText = cairnObject.transform.Find("Props_TH_ClutterSmall/Arc_Short").GetComponent<NomaiWallText>();
|
||||
nomaiWallText.SetSector(sector);
|
||||
|
||||
nomaiWallText._location = (NomaiText.Location)Enum.Parse(typeof(NomaiText.Location), Enum.GetName(typeof(PropModule.NomaiTextInfo.NomaiTextLocation), info.location));
|
||||
nomaiWallText._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
nomaiWallText._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
nomaiWallText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
@ -431,6 +435,7 @@ namespace NewHorizons.Builder.Props
|
||||
var nomaiText = recorderObject.GetComponentInChildren<NomaiText>();
|
||||
nomaiText.SetSector(sector);
|
||||
|
||||
nomaiText._location = (NomaiText.Location)Enum.Parse(typeof(NomaiText.Location), Enum.GetName(typeof(PropModule.NomaiTextInfo.NomaiTextLocation), info.location));
|
||||
nomaiText._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
nomaiText._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
nomaiText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
@ -463,8 +468,11 @@ namespace NewHorizons.Builder.Props
|
||||
box.isTrigger = true;
|
||||
|
||||
nomaiWallTextObj.AddComponent<OWCollider>();
|
||||
|
||||
var nomaiWallText = nomaiWallTextObj.AddComponent<NomaiWallText>();
|
||||
|
||||
nomaiWallText._location = (NomaiText.Location)Enum.Parse(typeof(NomaiText.Location), Enum.GetName(typeof(PropModule.NomaiTextInfo.NomaiTextLocation), info.location));
|
||||
|
||||
var text = new TextAsset(xmlPath);
|
||||
|
||||
// Text assets need a name to be used with VoiceMod
|
||||
|
||||
17
NewHorizons/External/Modules/PropModule.cs
vendored
17
NewHorizons/External/Modules/PropModule.cs
vendored
@ -476,12 +476,22 @@ namespace NewHorizons.External.Modules
|
||||
[EnumMember(Value = @"cairn")] Cairn = 3,
|
||||
|
||||
[EnumMember(Value = @"recorder")] Recorder = 4,
|
||||
|
||||
|
||||
[EnumMember(Value = @"preCrashRecorder")] PreCrashRecorder = 5,
|
||||
|
||||
[EnumMember(Value = @"preCrashComputer")] PreCrashComputer = 6
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextLocation
|
||||
{
|
||||
[EnumMember(Value = @"unspecified")] UNSPECIFIED = 0,
|
||||
|
||||
[EnumMember(Value = @"a")] A = 1,
|
||||
|
||||
[EnumMember(Value = @"b")] B = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
@ -513,6 +523,11 @@ namespace NewHorizons.External.Modules
|
||||
/// </summary>
|
||||
[DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall;
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user