From 29a892e4d47322173bffb12b163f9d4377eb83e5 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Wed, 29 Jun 2022 14:48:32 -0700 Subject: [PATCH] use translation thingy for galaxy map text --- .../GalaxyMap/GalaxyMapManager.cs | 18 ++++++++++++++---- QSB/Localisation/Translation.cs | 4 ++-- QSB/QSBCore.cs | 2 -- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/QSB/EyeOfTheUniverse/GalaxyMap/GalaxyMapManager.cs b/QSB/EyeOfTheUniverse/GalaxyMap/GalaxyMapManager.cs index 32fdcb6c..75034db9 100644 --- a/QSB/EyeOfTheUniverse/GalaxyMap/GalaxyMapManager.cs +++ b/QSB/EyeOfTheUniverse/GalaxyMap/GalaxyMapManager.cs @@ -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(); - Tree._xmlCharacterDialogueAsset = QSBCore.TextAssetsBundle.LoadAsset("Assets/TextAssets/GalaxyMap.txt"); + Tree._xmlCharacterDialogueAsset = new TextAsset( + $@" + SIGN + + DEFAULT + + {QSBLocalization.Current.GalaxyMapEveryoneNotPresent} + + + " + ); Tree._attentionPoint = map.transform; Tree._attentionPointOffset = new Vector3(0, 1, 0); Tree._turnOffFlashlight = true; Tree._turnOnFlashlight = true; map.SetActive(true); } -} \ No newline at end of file +} diff --git a/QSB/Localisation/Translation.cs b/QSB/Localisation/Translation.cs index a7d7a666..622307bc 100644 --- a/QSB/Localisation/Translation.cs +++ b/QSB/Localisation/Translation.cs @@ -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 DeathMessages; + public string GalaxyMapEveryoneNotPresent; } diff --git a/QSB/QSBCore.cs b/QSB/QSBCore.cs index dc39ffa0..650da060 100644 --- a/QSB/QSBCore.cs +++ b/QSB/QSBCore.cs @@ -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();