use translation thingy for galaxy map text

This commit is contained in:
JohnCorby 2022-06-29 14:48:32 -07:00
parent 3686cff032
commit 29a892e4d4
3 changed files with 16 additions and 8 deletions

View File

@ -1,6 +1,6 @@
using QSB.Utility;
using QSB.Localisation;
using QSB.Utility;
using QSB.WorldSync;
using System.Linq;
using UnityEngine;
namespace QSB.EyeOfTheUniverse.GalaxyMap;
@ -29,11 +29,21 @@ internal class GalaxyMapManager : MonoBehaviour, IAddComponentOnStart
map.SetActive(false);
Tree = map.AddComponent<CustomDialogueTree>();
Tree._xmlCharacterDialogueAsset = QSBCore.TextAssetsBundle.LoadAsset<TextAsset>("Assets/TextAssets/GalaxyMap.txt");
Tree._xmlCharacterDialogueAsset = new TextAsset(
$@"<DialogueTree>
<NameField>SIGN</NameField>
<DialogueNode>
<EntryCondition>DEFAULT</EntryCondition>
<Dialogue>
<Page>{QSBLocalization.Current.GalaxyMapEveryoneNotPresent}</Page>
</Dialogue>
</DialogueNode>
</DialogueTree>"
);
Tree._attentionPoint = map.transform;
Tree._attentionPointOffset = new Vector3(0, 1, 0);
Tree._turnOffFlashlight = true;
Tree._turnOnFlashlight = true;
map.SetActive(true);
}
}
}

View File

@ -1,5 +1,4 @@
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Collections.Generic;
namespace QSB.Localisation;
@ -42,4 +41,5 @@ public class Translation
public string TimeSyncWaitForAllToReady;
public string TimeSyncWaitForAllToDie;
public Dictionary<DeathType, string[]> DeathMessages;
public string GalaxyMapEveryoneNotPresent;
}

View File

@ -47,7 +47,6 @@ public class QSBCore : ModBehaviour
public static AssetBundle NetworkAssetBundle { get; private set; }
public static AssetBundle ConversationAssetBundle { get; private set; }
public static AssetBundle DebugAssetBundle { get; private set; }
public static AssetBundle TextAssetsBundle { get; private set; }
public static bool IsHost => NetworkServer.active;
public static bool IsInMultiplayer => QSBNetworkManager.singleton.isNetworkActive;
public static string QSBVersion => Helper.Manifest.Version;
@ -126,7 +125,6 @@ public class QSBCore : ModBehaviour
NetworkAssetBundle = Helper.Assets.LoadBundle("AssetBundles/network");
ConversationAssetBundle = Helper.Assets.LoadBundle("AssetBundles/conversation");
DebugAssetBundle = Helper.Assets.LoadBundle("AssetBundles/debug");
TextAssetsBundle = Helper.Assets.LoadBundle("AssetBundles/textassets");
QSBPatchManager.Init();
DeterministicManager.Init();