mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
parent
43e58bc987
commit
f56d97fcf4
@ -22,7 +22,8 @@
|
|||||||
"DEBUG_PLACE_TEXT": "Place Nomai Text",
|
"DEBUG_PLACE_TEXT": "Place Nomai Text",
|
||||||
"DEBUG_UNDO": "Undo",
|
"DEBUG_UNDO": "Undo",
|
||||||
"DEBUG_REDO": "Redo",
|
"DEBUG_REDO": "Redo",
|
||||||
"Vessel": "Vessel"
|
"Vessel": "Vessel",
|
||||||
|
"DLC_REQUIRED": "WARNING\n\nYou have addons (like {0}) installed which require the DLC but it is not enabled.\n\nYour mods may not function as intended."
|
||||||
},
|
},
|
||||||
"OtherDictionary": {
|
"OtherDictionary": {
|
||||||
"NOMAI_SHUTTLE_COMPUTER": "The <![CDATA[<color=orange>shuttle</color>]]> is currently resting at <![CDATA[<color=lightblue>{0}</color>]]>."
|
"NOMAI_SHUTTLE_COMPUTER": "The <![CDATA[<color=orange>shuttle</color>]]> is currently resting at <![CDATA[<color=lightblue>{0}</color>]]>."
|
||||||
|
|||||||
@ -17,7 +17,8 @@
|
|||||||
"RICH_PRESENCE_WARPING": "En route vers {0}.",
|
"RICH_PRESENCE_WARPING": "En route vers {0}.",
|
||||||
"OUTDATED_VERSION_WARNING": "AVERTISSEMENT\n\nNew Horizons fonctionne seulement sur la version {0} ou plus récente. Vous êtes sur la version {1}.\n\nVeuillez mettre à jour votre jeu ou désinstaller NH.",
|
"OUTDATED_VERSION_WARNING": "AVERTISSEMENT\n\nNew Horizons fonctionne seulement sur la version {0} ou plus récente. Vous êtes sur la version {1}.\n\nVeuillez mettre à jour votre jeu ou désinstaller NH.",
|
||||||
"JSON_FAILED_TO_LOAD": "Fichier(s) invalide(s): {0}",
|
"JSON_FAILED_TO_LOAD": "Fichier(s) invalide(s): {0}",
|
||||||
"Vessel": "Vaisseau"
|
"Vessel": "Vaisseau",
|
||||||
|
"DLC_REQUIRED": "AVERTISSEMENT\n\nVous avez installé des addons (par exemple, {0}) qui nécessitent le DLC mais il n'est pas activé.\n\nVos mods peuvent ne pas fonctionner."
|
||||||
},
|
},
|
||||||
"AchievementTranslations": {
|
"AchievementTranslations": {
|
||||||
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
||||||
|
|||||||
9
NewHorizons/External/NewHorizonBody.cs
vendored
9
NewHorizons/External/NewHorizonBody.cs
vendored
@ -26,6 +26,15 @@ namespace NewHorizons.External
|
|||||||
|
|
||||||
public GameObject Object;
|
public GameObject Object;
|
||||||
|
|
||||||
|
public bool RequiresDLC()
|
||||||
|
{
|
||||||
|
var detailPaths = Config.Props.details.Select(x => x.path);
|
||||||
|
return Config.Cloak != null
|
||||||
|
|| Config.Props?.rafts != null
|
||||||
|
|| Config.Props?.slideShows != null
|
||||||
|
|| detailPaths.Any(x => x.StartsWith("Ringworld") || x.StartsWith("Dreamworld"));
|
||||||
|
}
|
||||||
|
|
||||||
#region Cache
|
#region Cache
|
||||||
public void LoadCache()
|
public void LoadCache()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -99,6 +99,8 @@ namespace NewHorizons
|
|||||||
public bool PlayerSpawned { get; set; }
|
public bool PlayerSpawned { get; set; }
|
||||||
public bool ForceClearCaches { get; set; } // for reloading configs
|
public bool ForceClearCaches { get; set; } // for reloading configs
|
||||||
|
|
||||||
|
public bool FlagDLCRequired { get; set; }
|
||||||
|
|
||||||
public ShipWarpController ShipWarpController { get; private set; }
|
public ShipWarpController ShipWarpController { get; private set; }
|
||||||
|
|
||||||
// API events
|
// API events
|
||||||
@ -690,6 +692,14 @@ namespace NewHorizons
|
|||||||
var relativeDirectory = file.Replace(folder, "");
|
var relativeDirectory = file.Replace(folder, "");
|
||||||
var body = LoadConfig(mod, relativeDirectory);
|
var body = LoadConfig(mod, relativeDirectory);
|
||||||
|
|
||||||
|
// Only bother checking if they need the DLC if they don't have it
|
||||||
|
if (!HasDLC && !FlagDLCRequired && body.RequiresDLC())
|
||||||
|
{
|
||||||
|
FlagDLCRequired = true;
|
||||||
|
var popupText = TranslationHandler.GetTranslation("DLC_REQUIRED", TranslationHandler.TextType.UI).Replace("{0}", mod.ModHelper.Manifest.Name);
|
||||||
|
MenuHandler.RegisterOneTimePopup(this, popupText, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (body != null)
|
if (body != null)
|
||||||
{
|
{
|
||||||
// Wanna track the spawn point of each system
|
// Wanna track the spawn point of each system
|
||||||
@ -921,10 +931,17 @@ namespace NewHorizons
|
|||||||
{
|
{
|
||||||
CurrentStarSystem = _defaultSystemOverride;
|
CurrentStarSystem = _defaultSystemOverride;
|
||||||
|
|
||||||
// Sometimes the override will not support spawning regularly, so always warp in
|
if (BodyDict.TryGetValue(_defaultSystemOverride, out var bodies) && bodies.Any(x => x.Config?.Spawn?.shipSpawn != null))
|
||||||
|
{
|
||||||
|
// #738 - Sometimes the override will not support spawning regularly, so always warp in if possible
|
||||||
IsWarpingFromShip = true;
|
IsWarpingFromShip = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
IsWarpingFromShip = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Ignore first load because it doesn't even know what systems we have
|
// Ignore first load because it doesn't even know what systems we have
|
||||||
if (!_firstLoad && !string.IsNullOrEmpty(_defaultSystemOverride))
|
if (!_firstLoad && !string.IsNullOrEmpty(_defaultSystemOverride))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user