mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' into funnel
This commit is contained in:
commit
e827399255
@ -466,7 +466,7 @@ namespace NewHorizons.Handlers
|
||||
});
|
||||
}
|
||||
|
||||
RichPresenceHandler.SetUpPlanet(body.Config.name, go, sector);
|
||||
RichPresenceHandler.SetUpPlanet(body.Config.name, go, sector, body.Config.Star != null, body.Config.Atmosphere != null);
|
||||
|
||||
Logger.LogVerbose($"Finished creating [{body.Config.name}]");
|
||||
|
||||
|
||||
@ -9,6 +9,14 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
||||
public void SetTriggerActivation(bool active);
|
||||
public GameObject CreateTrigger(GameObject parent, string message, string imageKey);
|
||||
public GameObject CreateTrigger(GameObject parent, Sector sector, string message, string imageKey);
|
||||
public GameObject CreateTrigger(GameObject parent, string message, string imageKey, string fallback);
|
||||
public GameObject CreateTrigger(GameObject parent, Sector sector, string message, string imageKey, string fallback);
|
||||
public void CreateTriggerVolume(OWTriggerVolume triggerVolume, string message, string imageKey);
|
||||
public void CreateTriggerVolume(OWTriggerVolume triggerVolume, string message, string imageKey, string fallback);
|
||||
public GameObject CreateTriggerVolume(GameObject parent, float radius, string message, string imageKey);
|
||||
public GameObject CreateTriggerVolume(GameObject parent, float radius, string message, string imageKey, string fallback);
|
||||
public GameObject CreateTriggerVolume(GameObject parent, Vector3 localPosition, float radius, string message, string imageKey);
|
||||
public GameObject CreateTriggerVolume(GameObject parent, Vector3 localPosition, float radius, string message, string imageKey, string fallback);
|
||||
public void SetCurrentRootPresence(string message, string imageKey);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetUpPlanet(string name, GameObject go, Sector sector)
|
||||
public static void SetUpPlanet(string name, GameObject go, Sector sector, bool isStar = false, bool hasAtmosphere = false)
|
||||
{
|
||||
if (!Enabled) return;
|
||||
|
||||
@ -47,7 +47,11 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
||||
var localizedName = TranslationHandler.GetTranslation(name, TranslationHandler.TextType.UI);
|
||||
var message = TranslationHandler.GetTranslation("RICH_PRESENCE_EXPLORING", TranslationHandler.TextType.UI).Replace("{0}", localizedName);
|
||||
|
||||
API.CreateTrigger(go, sector, message, name.Replace(" ", "").Replace("'", "").Replace("-", "").ToLowerInvariant());
|
||||
string fallbackKey = "defaultplanet";
|
||||
if (isStar) fallbackKey = "defaultstar";
|
||||
else if (hasAtmosphere) fallbackKey = "defaultplanetatmosphere";
|
||||
|
||||
API.CreateTrigger(go, sector, message, name.Replace(" ", "").Replace("'", "").Replace("-", "").ToLowerInvariant(), fallbackKey);
|
||||
}
|
||||
|
||||
public static void OnStarSystemLoaded(string name)
|
||||
@ -59,7 +63,7 @@ namespace NewHorizons.OtherMods.OWRichPresence
|
||||
var localizedName = ShipLogStarChartMode.UniqueIDToName(name);
|
||||
var message = TranslationHandler.GetTranslation("RICH_PRESENCE_EXPLORING", TranslationHandler.TextType.UI).Replace("{0}", localizedName);
|
||||
|
||||
API.SetCurrentRootPresence(message, "sun");
|
||||
API.SetCurrentRootPresence(message, "newhorizons");
|
||||
}
|
||||
|
||||
public static void OnChangeStarSystem(string destination)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user