mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Do the overload with boolean for UI translations being uppercase (#1064)
## Bug fixes - Fixed broken implementation of #1062 by changing TranslationHandler.AddUI to take a bool for translations being uppercase.
This commit is contained in:
commit
8dce58c4a5
@ -3,7 +3,6 @@
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Configs;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using UnityEngine;
|
||||
|
||||
#endregion
|
||||
@ -16,7 +15,7 @@ namespace NewHorizons.Builder.General
|
||||
{
|
||||
var module = config.MapMarker;
|
||||
NHMapMarker mapMarker = body.AddComponent<NHMapMarker>();
|
||||
mapMarker._labelID = (UITextType)TranslationHandler.AddUI(config.name.ToUpperFixed());
|
||||
mapMarker._labelID = (UITextType)TranslationHandler.AddUI(config.name, true);
|
||||
|
||||
var markerType = MapMarker.MarkerType.Planet;
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ namespace NewHorizons.Handlers
|
||||
vesselAO._type = AstroObject.Type.SpaceStation;
|
||||
vesselAO.Register();
|
||||
vesselMapMarker._markerType = MapMarker.MarkerType.Moon;
|
||||
vesselMapMarker._labelID = (UITextType)TranslationHandler.AddUI("VESSEL");
|
||||
vesselMapMarker._labelID = (UITextType)TranslationHandler.AddUI("Vessel", true);
|
||||
RFVolumeBuilder.Make(vessel, vesselBody, 600, new External.Modules.ReferenceFrameModule { localPosition = new MVector3(0, 0, -207.375f) });
|
||||
|
||||
// Resize vessel sector so that the vessel is fully collidable.
|
||||
|
||||
@ -205,11 +205,14 @@ namespace NewHorizons.Handlers
|
||||
TextTranslation.Get().m_table.theShipLogTable[key] = value;
|
||||
}
|
||||
|
||||
public static int AddUI(string rawText)
|
||||
public static int AddUI(string rawText) => AddUI(rawText, false);
|
||||
|
||||
public static int AddUI(string rawText, bool upper)
|
||||
{
|
||||
var uiTable = TextTranslation.Get().m_table.theUITable;
|
||||
|
||||
var text = GetTranslation(rawText, TextType.UI);
|
||||
if (upper) text = text.ToUpperFixed();
|
||||
|
||||
var key = uiTable.Keys.Max() + 1;
|
||||
try
|
||||
|
||||
@ -210,7 +210,7 @@ namespace NewHorizons.Handlers
|
||||
vesselWarpController._whiteHoleOneShot = vesselWarpController._whiteHole.transform.parent.Find("WhiteHoleAudio_OneShot").GetComponent<OWAudioSource>();
|
||||
vesselWarpController._whiteHole._startActive = true;
|
||||
|
||||
vesselObject.GetComponent<MapMarker>()._labelID = (UITextType)TranslationHandler.AddUI("VESSEL");
|
||||
vesselObject.GetComponent<MapMarker>()._labelID = (UITextType)TranslationHandler.AddUI("Vessel", true);
|
||||
|
||||
var hasParentBody = !string.IsNullOrEmpty(system.Config.Vessel?.vesselSpawn?.parentBody);
|
||||
var hasPhysics = system.Config.Vessel?.hasPhysics ?? !hasParentBody;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, and friends",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.27.2",
|
||||
"version": "1.27.3",
|
||||
"owmlVersion": "2.12.1",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||
"conflicts": [ "PacificEngine.OW_CommonResources" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user