mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Update dialogue + nomai text to give the text asset a name
This commit is contained in:
parent
339ddfa35e
commit
351694bb8c
@ -1,6 +1,7 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.Handlers;
|
||||
using OWML.Common;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
namespace NewHorizons.Builder.Props
|
||||
@ -76,8 +77,9 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
var dialogueTree = conversationZone.AddComponent<CharacterDialogueTree>();
|
||||
|
||||
var xml = System.IO.File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile);
|
||||
var xml = File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile);
|
||||
var text = new TextAsset(xml);
|
||||
text.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
|
||||
dialogueTree.SetTextXml(text);
|
||||
AddTranslation(xml);
|
||||
|
||||
@ -3,6 +3,7 @@ using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
@ -195,6 +196,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
computer._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
computer._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
computer._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
AddTranslation(xmlPath);
|
||||
|
||||
// Make sure the computer model is loaded
|
||||
@ -242,6 +244,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
nomaiWallText._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
nomaiWallText._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
nomaiWallText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
AddTranslation(xmlPath);
|
||||
|
||||
// Make sure the computer model is loaded
|
||||
@ -253,7 +256,7 @@ namespace NewHorizons.Builder.Props
|
||||
case PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder:
|
||||
case PropModule.NomaiTextInfo.NomaiTextType.Recorder:
|
||||
{
|
||||
var recorderObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder? _preCrashRecorderPrefab : _recorderPrefab).InstantiateInactive();
|
||||
var recorderObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab).InstantiateInactive();
|
||||
|
||||
recorderObject.transform.parent = sector?.transform ?? planetGO.transform;
|
||||
recorderObject.transform.position = planetGO.transform.TransformPoint(info?.position ?? Vector3.zero);
|
||||
@ -273,6 +276,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
nomaiText._dictNomaiTextData = MakeNomaiTextDict(xmlPath);
|
||||
nomaiText._nomaiTextAsset = new TextAsset(xmlPath);
|
||||
nomaiText._nomaiTextAsset.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
AddTranslation(xmlPath);
|
||||
|
||||
// Make sure the recorder model is loaded
|
||||
@ -306,6 +310,7 @@ namespace NewHorizons.Builder.Props
|
||||
var nomaiWallText = nomaiWallTextObj.AddComponent<NomaiWallText>();
|
||||
|
||||
var text = new TextAsset(xmlPath);
|
||||
text.name = Path.GetFileNameWithoutExtension(info.xmlFile);
|
||||
|
||||
BuildArcs(xmlPath, nomaiWallText, nomaiWallTextObj, info);
|
||||
AddTranslation(xmlPath);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user