mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Use the image keys and update API
This commit is contained in:
parent
27dee5867b
commit
7228b1a248
@ -12,7 +12,7 @@
|
|||||||
"FREQ_UNKNOWN": "???",
|
"FREQ_UNKNOWN": "???",
|
||||||
"ENGAGE_WARP_PROMPT": "Engage Warp To {0}",
|
"ENGAGE_WARP_PROMPT": "Engage Warp To {0}",
|
||||||
"WARP_LOCKED": "AUTOPILOT LOCKED TO:\n{0}",
|
"WARP_LOCKED": "AUTOPILOT LOCKED TO:\n{0}",
|
||||||
"OWRP_EXPLORING": "Exploring {0}"
|
"RICH_PRESENCE_EXPLORING": "Exploring {0}"
|
||||||
},
|
},
|
||||||
"AchievementTranslations": {
|
"AchievementTranslations": {
|
||||||
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
||||||
|
|||||||
@ -10,6 +10,6 @@
|
|||||||
"FREQ_STATUE": "Statue Nomaï",
|
"FREQ_STATUE": "Statue Nomaï",
|
||||||
"FREQ_WARP_CORE": "Flux Anti-Gravitonique",
|
"FREQ_WARP_CORE": "Flux Anti-Gravitonique",
|
||||||
"FREQ_UNKNOWN": "???",
|
"FREQ_UNKNOWN": "???",
|
||||||
"OWRP_EXPLORING": "En train d'explorer {0}"
|
"RICH_PRESENCE_EXPLORING": "En train d'explorer {0}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -55,7 +55,6 @@ namespace NewHorizons.Handlers
|
|||||||
// Try to default to English
|
// Try to default to English
|
||||||
if (dictionary.TryGetValue(TextTranslation.Language.ENGLISH, out var englishTable))
|
if (dictionary.TryGetValue(TextTranslation.Language.ENGLISH, out var englishTable))
|
||||||
{
|
{
|
||||||
|
|
||||||
if (englishTable.TryGetValue(text, out var englishText))
|
if (englishTable.TryGetValue(text, out var englishText))
|
||||||
{
|
{
|
||||||
translatedLanguage = TextTranslation.Language.ENGLISH;
|
translatedLanguage = TextTranslation.Language.ENGLISH;
|
||||||
|
|||||||
@ -5,8 +5,10 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
|||||||
public interface IRichPresenceAPI
|
public interface IRichPresenceAPI
|
||||||
{
|
{
|
||||||
public void SetRichPresence(string message, int imageKey);
|
public void SetRichPresence(string message, int imageKey);
|
||||||
|
public void SetRichPresence(string message, string imageKey);
|
||||||
public void SetTriggerActivation(bool active);
|
public void SetTriggerActivation(bool active);
|
||||||
public void CreateTrigger(GameObject parent, Sector sector, string details, string imageKey);
|
public GameObject CreateTrigger(GameObject parent, string message, string imageKey);
|
||||||
|
public GameObject CreateTrigger(GameObject parent, Sector sector, string message, string imageKey);
|
||||||
public void SetCurrentRootPresence(string message, string imageKey);
|
public void SetCurrentRootPresence(string message, string imageKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,10 +35,9 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
|||||||
Logger.LogVerbose($"Registering {go.name} to OWRichPresence");
|
Logger.LogVerbose($"Registering {go.name} to OWRichPresence");
|
||||||
|
|
||||||
var localizedName = TranslationHandler.GetTranslation(name, TranslationHandler.TextType.UI);
|
var localizedName = TranslationHandler.GetTranslation(name, TranslationHandler.TextType.UI);
|
||||||
var localizedMessage = TranslationHandler.GetTranslation("OWRP_EXPLORING", TranslationHandler.TextType.UI);
|
var message = TranslationHandler.GetTranslation("RICH_PRESENCE_EXPLORING", TranslationHandler.TextType.UI).Replace("{0}", localizedName);
|
||||||
var message = localizedMessage.Replace("{0}", localizedName);
|
|
||||||
|
|
||||||
API.CreateTrigger(go, sector, message, "sun");
|
API.CreateTrigger(go, sector, message, name.Replace(" ", "").ToLowerInvariant());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetUpSolarSystem(string name)
|
public static void SetUpSolarSystem(string name)
|
||||||
@ -46,8 +45,7 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
|||||||
if (name == "SolarSystem") return;
|
if (name == "SolarSystem") return;
|
||||||
|
|
||||||
var localizedName = ShipLogStarChartMode.UniqueIDToName(name);
|
var localizedName = ShipLogStarChartMode.UniqueIDToName(name);
|
||||||
var localizedMessage = TranslationHandler.GetTranslation("OWRP_EXPLORING", TranslationHandler.TextType.UI);
|
var message = TranslationHandler.GetTranslation("RICH_PRESENCE_EXPLORING", TranslationHandler.TextType.UI).Replace("{0}", localizedName);
|
||||||
var message = localizedMessage.Replace("{0}", localizedName);
|
|
||||||
|
|
||||||
API.SetCurrentRootPresence(message, "sun");
|
API.SetCurrentRootPresence(message, "sun");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user