mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Make nh work with eye (partially)
This commit is contained in:
parent
7e020b2537
commit
aff44f3f18
@ -1,4 +1,5 @@
|
|||||||
using NewHorizons.Builder.Props;
|
using NewHorizons.Builder.Props;
|
||||||
|
using NewHorizons.Handlers;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ namespace NewHorizons.AchievementsPlus
|
|||||||
{
|
{
|
||||||
foreach (var fact in factIDs)
|
foreach (var fact in factIDs)
|
||||||
{
|
{
|
||||||
if (!Locator.GetShipLogManager().IsFactRevealed(fact)) return false;
|
if (!ShipLogHandler.KnowsFact(fact)) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
NewHorizons/Assets/eye symbol.png
Normal file
BIN
NewHorizons/Assets/eye symbol.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 25 KiB |
6
NewHorizons/Assets/translations/chinese_simple.json
Normal file
6
NewHorizons/Assets/translations/chinese_simple.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "飞船"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,7 +11,8 @@
|
|||||||
"FREQ_WARP_CORE": "Anti-Graviton Flux",
|
"FREQ_WARP_CORE": "Anti-Graviton Flux",
|
||||||
"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}",
|
||||||
|
"Vessel": "Vessel"
|
||||||
},
|
},
|
||||||
"AchievementTranslations": {
|
"AchievementTranslations": {
|
||||||
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
"INTERSTELLAR_MODE": "Mode Interstellaire",
|
"INTERSTELLAR_MODE": "Mode Interstellaire",
|
||||||
"FREQ_STATUE": "Statue Nomaï",
|
"FREQ_STATUE": "Statue Nomaï",
|
||||||
"FREQ_WARP_CORE": "Flux Anti-Gravitonique",
|
"FREQ_WARP_CORE": "Flux Anti-Gravitonique",
|
||||||
"FREQ_UNKNOWN": "???"
|
"FREQ_UNKNOWN": "???",
|
||||||
|
"Vessel": "Vaisseau"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
"INTERSTELLAR_MODE": "Interstellar Modus",
|
"INTERSTELLAR_MODE": "Interstellar Modus",
|
||||||
"FREQ_STATUE": "Nomai-Statue",
|
"FREQ_STATUE": "Nomai-Statue",
|
||||||
"FREQ_WARP_CORE": "Anti-Gravitations Flux",
|
"FREQ_WARP_CORE": "Anti-Gravitations Flux",
|
||||||
"FREQ_UNKNOWN": "???"
|
"FREQ_UNKNOWN": "???",
|
||||||
|
"Vessel": "Gefährts"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
6
NewHorizons/Assets/translations/italian.json
Normal file
6
NewHorizons/Assets/translations/italian.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "Vascello"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
NewHorizons/Assets/translations/japanese.json
Normal file
6
NewHorizons/Assets/translations/japanese.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "船"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
NewHorizons/Assets/translations/korean.json
Normal file
6
NewHorizons/Assets/translations/korean.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "함선"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
NewHorizons/Assets/translations/polish.json
Normal file
6
NewHorizons/Assets/translations/polish.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "Statku"
|
||||||
|
}
|
||||||
|
}
|
||||||
6
NewHorizons/Assets/translations/portuguese_br.json
Normal file
6
NewHorizons/Assets/translations/portuguese_br.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "Hospedeiro"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@
|
|||||||
"FREQ_WARP_CORE": "Гиперядро",
|
"FREQ_WARP_CORE": "Гиперядро",
|
||||||
"FREQ_UNKNOWN": "???",
|
"FREQ_UNKNOWN": "???",
|
||||||
"ENGAGE_WARP_PROMPT": "Телепортироваться к {0}",
|
"ENGAGE_WARP_PROMPT": "Телепортироваться к {0}",
|
||||||
"WARP_LOCKED": "АВТОПИЛОТ ЗАКРЕПЛЁН НА:\n{0}"
|
"WARP_LOCKED": "АВТОПИЛОТ ЗАКРЕПЛЁН НА:\n{0}",
|
||||||
|
"Vessel": "«Звездолёта»"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,8 @@
|
|||||||
"FREQ_WARP_CORE": "Flujo De Anti-Gravitones",
|
"FREQ_WARP_CORE": "Flujo De Anti-Gravitones",
|
||||||
"FREQ_UNKNOWN": "???",
|
"FREQ_UNKNOWN": "???",
|
||||||
"ENGAGE_WARP_PROMPT": "Iniciar teletransporte a {0}",
|
"ENGAGE_WARP_PROMPT": "Iniciar teletransporte a {0}",
|
||||||
"WARP_LOCKED": "Piloto automático fijado en:\n{0}"
|
"WARP_LOCKED": "Piloto automático fijado en:\n{0}",
|
||||||
|
"Vessel": "Nave"
|
||||||
},
|
},
|
||||||
"AchievementTranslations": {
|
"AchievementTranslations": {
|
||||||
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
"NH_EATEN_OUTSIDE_BRAMBLE": {
|
||||||
|
|||||||
6
NewHorizons/Assets/translations/turkish.json
Normal file
6
NewHorizons/Assets/translations/turkish.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/xen-42/outer-wilds-new-horizons/main/NewHorizons/Schemas/translation_schema.json",
|
||||||
|
"UIDictionary": {
|
||||||
|
"Vessel": "Tekne"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -36,9 +36,11 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
|
|
||||||
rulesetGO.AddComponent<AntiTravelMusicRuleset>();
|
rulesetGO.AddComponent<AntiTravelMusicRuleset>();
|
||||||
|
|
||||||
|
var gdRuleset = SearchUtilities.Find("GiantsDeep_Body/Sector_GD/Volumes_GD/RulesetVolumes_GD")?.GetComponent<EffectRuleset>();
|
||||||
|
if (gdRuleset != null)
|
||||||
|
{
|
||||||
EffectRuleset ER = rulesetGO.AddComponent<EffectRuleset>();
|
EffectRuleset ER = rulesetGO.AddComponent<EffectRuleset>();
|
||||||
ER._type = EffectRuleset.BubbleType.Underwater;
|
ER._type = EffectRuleset.BubbleType.Underwater;
|
||||||
var gdRuleset = SearchUtilities.Find("GiantsDeep_Body/Sector_GD/Volumes_GD/RulesetVolumes_GD").GetComponent<EffectRuleset>();
|
|
||||||
|
|
||||||
ER._material = gdRuleset._material;
|
ER._material = gdRuleset._material;
|
||||||
|
|
||||||
@ -48,6 +50,7 @@ namespace NewHorizons.Builder.Atmosphere
|
|||||||
cloudMaterial.SetColor(FogColor, config.Atmosphere.clouds.tint.ToColor());
|
cloudMaterial.SetColor(FogColor, config.Atmosphere.clouds.tint.ToColor());
|
||||||
}
|
}
|
||||||
ER._cloudMaterial = cloudMaterial;
|
ER._cloudMaterial = cloudMaterial;
|
||||||
|
}
|
||||||
|
|
||||||
if (config.Base.zeroGravityRadius != 0)
|
if (config.Base.zeroGravityRadius != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -29,7 +29,7 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
public static void Make(GameObject planetGO, NewHorizonsBody body)
|
public static void Make(GameObject planetGO, NewHorizonsBody body)
|
||||||
{
|
{
|
||||||
if (lavaMaterial == null) lavaMaterial = SearchUtilities.FindObjectOfTypeAndName<ProxyOrbiter>("VolcanicMoon_Body").transform.Find("LavaSphere").GetComponent<MeshRenderer>().material;
|
if (lavaMaterial == null) lavaMaterial = SearchUtilities.FindObjectOfTypeAndName<ProxyOrbiter>("VolcanicMoon_Body")?.transform.Find("LavaSphere").GetComponent<MeshRenderer>().material;
|
||||||
|
|
||||||
var proxyName = $"{body.Config.name}_Proxy";
|
var proxyName = $"{body.Config.name}_Proxy";
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,10 @@ namespace NewHorizons.Builder.General
|
|||||||
{
|
{
|
||||||
public static void Make(GameObject planetGO, Sector sector, float scale, float intensity)
|
public static void Make(GameObject planetGO, Sector sector, float scale, float intensity)
|
||||||
{
|
{
|
||||||
GameObject lightGO = GameObject.Instantiate(SearchUtilities.Find("BrittleHollow_Body/AmbientLight_BH_Surface"), sector?.transform ?? planetGO.transform);
|
var bhAmbientLight = SearchUtilities.Find("BrittleHollow_Body/AmbientLight_BH_Surface");
|
||||||
|
if (bhAmbientLight == null) return;
|
||||||
|
|
||||||
|
GameObject lightGO = GameObject.Instantiate(bhAmbientLight, sector?.transform ?? planetGO.transform);
|
||||||
lightGO.transform.position = planetGO.transform.position;
|
lightGO.transform.position = planetGO.transform.position;
|
||||||
lightGO.name = "Light";
|
lightGO.name = "Light";
|
||||||
|
|
||||||
|
|||||||
17
NewHorizons/Components/EyeAstroObject.cs
Normal file
17
NewHorizons/Components/EyeAstroObject.cs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
using NewHorizons.Utility;
|
||||||
|
|
||||||
|
namespace NewHorizons.Components.Orbital
|
||||||
|
{
|
||||||
|
public class EyeAstroObject : AstroObject
|
||||||
|
{
|
||||||
|
public new void Awake()
|
||||||
|
{
|
||||||
|
_owRigidbody = GetComponent<OWRigidbody>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Register()
|
||||||
|
{
|
||||||
|
Locator.RegisterAstroObject(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -63,6 +63,7 @@ namespace NewHorizons.Components
|
|||||||
// Conditions to allow warping into that system (either no planets (stock system) or has a ship spawn point)
|
// Conditions to allow warping into that system (either no planets (stock system) or has a ship spawn point)
|
||||||
var flag = false;
|
var flag = false;
|
||||||
if (starSystem.Equals("SolarSystem")) flag = true;
|
if (starSystem.Equals("SolarSystem")) flag = true;
|
||||||
|
else if (starSystem.Equals("EyeOfTheUniverse")) flag = false;
|
||||||
else if (config.Spawn?.shipSpawnPoint != null) flag = true;
|
else if (config.Spawn?.shipSpawnPoint != null) flag = true;
|
||||||
|
|
||||||
if (!StarChartHandler.HasUnlockedSystem(starSystem)) continue;
|
if (!StarChartHandler.HasUnlockedSystem(starSystem)) continue;
|
||||||
@ -73,10 +74,8 @@ namespace NewHorizons.Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//AddSystemCard("EyeOfTheUniverse");
|
/*
|
||||||
|
if(VesselCoordinatePromptHandler.KnowsEyeCoordinates())
|
||||||
/* Ship log manager isnt initiatiized yet
|
|
||||||
if(Locator.GetShipLogManager().IsFactRevealed("OPC_EYE_COORDINATES_X1"))
|
|
||||||
{
|
{
|
||||||
AddSystemCard("EyeOfTheUniverse");
|
AddSystemCard("EyeOfTheUniverse");
|
||||||
}
|
}
|
||||||
@ -130,6 +129,10 @@ namespace NewHorizons.Components
|
|||||||
{
|
{
|
||||||
texture = ImageUtilities.GetTexture(Main.Instance, "Assets/hearthian system.png");
|
texture = ImageUtilities.GetTexture(Main.Instance, "Assets/hearthian system.png");
|
||||||
}
|
}
|
||||||
|
else if (uniqueID.Equals("EyeOfTheUniverse"))
|
||||||
|
{
|
||||||
|
texture = ImageUtilities.GetTexture(Main.Instance, "Assets/eye symbol.png");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var path = $"planets/{uniqueID}.png";
|
var path = $"planets/{uniqueID}.png";
|
||||||
|
|||||||
@ -29,22 +29,24 @@ namespace NewHorizons.Components
|
|||||||
{
|
{
|
||||||
_blackHolePrefab = SearchUtilities.Find(_blackHolePath);
|
_blackHolePrefab = SearchUtilities.Find(_blackHolePath);
|
||||||
_whiteHolePrefab = SearchUtilities.Find(_whiteHolePath);
|
_whiteHolePrefab = SearchUtilities.Find(_whiteHolePath);
|
||||||
}
|
|
||||||
|
|
||||||
public void Start()
|
|
||||||
{
|
|
||||||
MakeBlackHole();
|
MakeBlackHole();
|
||||||
MakeWhiteHole();
|
MakeWhiteHole();
|
||||||
|
|
||||||
_isWarpingIn = false;
|
if (_oneShotSource == null)
|
||||||
|
{
|
||||||
var audioObject = new GameObject("WarpOneShot");
|
var audioObject = new GameObject("WarpOneShot");
|
||||||
audioObject.transform.parent = transform;
|
audioObject.transform.parent = transform;
|
||||||
audioObject.SetActive(false);
|
audioObject.SetActive(false);
|
||||||
_oneShotSource = audioObject.AddComponent<OWAudioSource>();
|
_oneShotSource = audioObject.AddComponent<OWAudioSource>();
|
||||||
_oneShotSource._track = OWAudioMixer.TrackName.Ship;
|
_oneShotSource._track = OWAudioMixer.TrackName.Ship;
|
||||||
audioObject.SetActive(true);
|
audioObject.SetActive(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Start()
|
||||||
|
{
|
||||||
|
_isWarpingIn = false;
|
||||||
GlobalMessenger.AddListener("FinishOpenEyes", new Callback(OnFinishOpenEyes));
|
GlobalMessenger.AddListener("FinishOpenEyes", new Callback(OnFinishOpenEyes));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +57,9 @@ namespace NewHorizons.Components
|
|||||||
|
|
||||||
private void MakeBlackHole()
|
private void MakeBlackHole()
|
||||||
{
|
{
|
||||||
|
if (_blackhole != null) return;
|
||||||
|
if (_blackHolePrefab == null) return;
|
||||||
|
|
||||||
var blackHoleShader = _blackHolePrefab.GetComponent<MeshRenderer>().material.shader;
|
var blackHoleShader = _blackHolePrefab.GetComponent<MeshRenderer>().material.shader;
|
||||||
if (blackHoleShader == null) blackHoleShader = _blackHolePrefab.GetComponent<MeshRenderer>().sharedMaterial.shader;
|
if (blackHoleShader == null) blackHoleShader = _blackHolePrefab.GetComponent<MeshRenderer>().sharedMaterial.shader;
|
||||||
|
|
||||||
@ -79,6 +84,9 @@ namespace NewHorizons.Components
|
|||||||
|
|
||||||
private void MakeWhiteHole()
|
private void MakeWhiteHole()
|
||||||
{
|
{
|
||||||
|
if (_whitehole != null) return;
|
||||||
|
if (_whiteHolePrefab == null) return;
|
||||||
|
|
||||||
var whiteHoleShader = _whiteHolePrefab.GetComponent<MeshRenderer>().material.shader;
|
var whiteHoleShader = _whiteHolePrefab.GetComponent<MeshRenderer>().material.shader;
|
||||||
if (whiteHoleShader == null) whiteHoleShader = _whiteHolePrefab.GetComponent<MeshRenderer>().sharedMaterial.shader;
|
if (whiteHoleShader == null) whiteHoleShader = _whiteHolePrefab.GetComponent<MeshRenderer>().sharedMaterial.shader;
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,8 @@ namespace NewHorizons.Handlers
|
|||||||
_existingBodyDict = new();
|
_existingBodyDict = new();
|
||||||
_customBodyDict = new();
|
_customBodyDict = new();
|
||||||
|
|
||||||
|
if (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse")
|
||||||
|
{
|
||||||
// Set up stars
|
// Set up stars
|
||||||
// Need to manage this when there are multiple stars
|
// Need to manage this when there are multiple stars
|
||||||
var sun = SearchUtilities.Find("Sun_Body");
|
var sun = SearchUtilities.Find("Sun_Body");
|
||||||
@ -59,6 +61,7 @@ namespace NewHorizons.Handlers
|
|||||||
StarLightController.AddStar(starController);
|
StarLightController.AddStar(starController);
|
||||||
|
|
||||||
starLightGO.SetActive(true);
|
starLightGO.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Load all planets
|
// Load all planets
|
||||||
var toLoad = bodies.ToList();
|
var toLoad = bodies.ToList();
|
||||||
@ -124,7 +127,7 @@ namespace NewHorizons.Handlers
|
|||||||
|
|
||||||
// Events.FireOnNextUpdate(PlanetDestroyer.RemoveAllProxies);
|
// Events.FireOnNextUpdate(PlanetDestroyer.RemoveAllProxies);
|
||||||
|
|
||||||
if (Main.SystemDict[Main.Instance.CurrentStarSystem].Config.destroyStockPlanets) PlanetDestructionHandler.RemoveSolarSystem();
|
if (Main.SystemDict[Main.Instance.CurrentStarSystem].Config.destroyStockPlanets) PlanetDestructionHandler.RemoveStockPlanets();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool LoadBody(NewHorizonsBody body, bool defaultPrimaryToSun = false)
|
public static bool LoadBody(NewHorizonsBody body, bool defaultPrimaryToSun = false)
|
||||||
|
|||||||
@ -31,12 +31,26 @@ namespace NewHorizons.Handlers
|
|||||||
"White Hole"
|
"White Hole"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static readonly string[] _eyeOfTheUniverseBodies = new string[]
|
||||||
|
{
|
||||||
|
"Eye Of The Universe",
|
||||||
|
"Vessel"
|
||||||
|
};
|
||||||
|
|
||||||
private static readonly string[] _suspendBlacklist = new string[]
|
private static readonly string[] _suspendBlacklist = new string[]
|
||||||
{
|
{
|
||||||
"Player_Body",
|
"Player_Body",
|
||||||
"Ship_Body"
|
"Ship_Body"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static void RemoveStockPlanets()
|
||||||
|
{
|
||||||
|
if (Main.Instance.CurrentStarSystem == "EyeOfTheUniverse")
|
||||||
|
RemoveEyeOfTheUniverse();
|
||||||
|
else
|
||||||
|
RemoveSolarSystem();
|
||||||
|
}
|
||||||
|
|
||||||
public static void RemoveSolarSystem()
|
public static void RemoveSolarSystem()
|
||||||
{
|
{
|
||||||
// Stop the sun from killing the player
|
// Stop the sun from killing the player
|
||||||
@ -54,6 +68,16 @@ namespace NewHorizons.Handlers
|
|||||||
Delay.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 3);
|
Delay.FireInNUpdates(() => { if (Locator.GetAstroObject(AstroObject.Name.Sun).gameObject.activeInHierarchy) { sunVolumes.SetActive(true); } }, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void RemoveEyeOfTheUniverse()
|
||||||
|
{
|
||||||
|
foreach (var name in _eyeOfTheUniverseBodies)
|
||||||
|
{
|
||||||
|
var ao = AstroObjectLocator.GetAstroObject(name);
|
||||||
|
if (ao != null) Delay.FireInNUpdates(() => RemoveBody(ao, false), 2);
|
||||||
|
else Logger.LogError($"Couldn't find [{name}]");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void RemoveBody(AstroObject ao, bool delete = false, List<AstroObject> toDestroy = null)
|
public static void RemoveBody(AstroObject ao, bool delete = false, List<AstroObject> toDestroy = null)
|
||||||
{
|
{
|
||||||
Logger.LogVerbose($"Removing [{ao.name}]");
|
Logger.LogVerbose($"Removing [{ao.name}]");
|
||||||
|
|||||||
@ -40,6 +40,12 @@ namespace NewHorizons.Handlers
|
|||||||
SunConfig.name = "Sun";
|
SunConfig.name = "Sun";
|
||||||
_rootNode = ConstructGraph(new NewHorizonsBody(SunConfig, Main.Instance), bodies);
|
_rootNode = ConstructGraph(new NewHorizonsBody(SunConfig, Main.Instance), bodies);
|
||||||
}
|
}
|
||||||
|
else if (centers.Length == 0 && Main.Instance.CurrentStarSystem == "EyeOfTheUniverse")
|
||||||
|
{
|
||||||
|
var EyeConfig = new PlanetConfig();
|
||||||
|
EyeConfig.name = "Eye Of The Universe";
|
||||||
|
_rootNode = ConstructGraph(new NewHorizonsBody(EyeConfig, Main.Instance), bodies);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger.LogError($"There must be one and only one centerOfSolarSystem! Found [{centers.Length}]");
|
Logger.LogError($"There must be one and only one centerOfSolarSystem! Found [{centers.Length}]");
|
||||||
|
|||||||
@ -108,5 +108,13 @@ namespace NewHorizons.Handlers
|
|||||||
{
|
{
|
||||||
return _nhBodyToAstroIDs.ContainsKey(body) && _nhBodyToAstroIDs[body].Length > 0;
|
return _nhBodyToAstroIDs.ContainsKey(body) && _nhBodyToAstroIDs[body].Length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool KnowsFact(string fact)
|
||||||
|
{
|
||||||
|
// Works normally in the main system, else check save data directly
|
||||||
|
var shipLogManager = Locator.GetShipLogManager();
|
||||||
|
if (Main.Instance.CurrentStarSystem == "SolarSystem" && shipLogManager != null) return shipLogManager.IsFactRevealed(fact);
|
||||||
|
else return PlayerData._currentGameSave.shipLogFactSaves.ContainsKey(fact) && PlayerData._currentGameSave.shipLogFactSaves[fact].revealOrder > -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,6 +25,9 @@ namespace NewHorizons.Handlers
|
|||||||
SkyboxBuilder.Make(system.Config.Skybox, system.Mod);
|
SkyboxBuilder.Make(system.Config.Skybox, system.Mod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (Main.Instance.CurrentStarSystem == "EyeOfTheUniverse") return;
|
||||||
|
|
||||||
if (system.Config.enableTimeLoop)
|
if (system.Config.enableTimeLoop)
|
||||||
{
|
{
|
||||||
var timeLoopController = new GameObject("TimeLoopController");
|
var timeLoopController = new GameObject("TimeLoopController");
|
||||||
|
|||||||
@ -44,6 +44,7 @@ namespace NewHorizons.Handlers
|
|||||||
{
|
{
|
||||||
var texture = MakeTexture(coords.x, coords.y, coords.z);
|
var texture = MakeTexture(coords.x, coords.y, coords.z);
|
||||||
|
|
||||||
|
if (_textureCache == null) _textureCache = new List<Texture2D>();
|
||||||
_textureCache.Add(texture);
|
_textureCache.Add(texture);
|
||||||
|
|
||||||
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(texture.width / 2f, texture.height / 2f));
|
var sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(texture.width / 2f, texture.height / 2f));
|
||||||
@ -61,15 +62,18 @@ namespace NewHorizons.Handlers
|
|||||||
// Gets called from the patches
|
// Gets called from the patches
|
||||||
public static void SetPromptVisibility(bool visible)
|
public static void SetPromptVisibility(bool visible)
|
||||||
{
|
{
|
||||||
|
if (_factSystemIDPrompt == null) return;
|
||||||
foreach (var pair in _factSystemIDPrompt)
|
foreach (var pair in _factSystemIDPrompt)
|
||||||
{
|
{
|
||||||
var fact = pair.Item1;
|
var fact = pair.Item1;
|
||||||
var systemID = pair.Item2;
|
var systemID = pair.Item2;
|
||||||
var prompt = pair.Item3;
|
var prompt = pair.Item3;
|
||||||
|
|
||||||
|
if (prompt != null)
|
||||||
|
{
|
||||||
if (visible)
|
if (visible)
|
||||||
{
|
{
|
||||||
if (Main.Instance.CurrentStarSystem != systemID && (string.IsNullOrEmpty(fact) || Locator.GetShipLogManager().IsFactRevealed(fact)))
|
if (Main.Instance.CurrentStarSystem != systemID && (string.IsNullOrEmpty(fact) || ShipLogHandler.KnowsFact(fact)))
|
||||||
{
|
{
|
||||||
prompt.SetVisibility(true);
|
prompt.SetVisibility(true);
|
||||||
}
|
}
|
||||||
@ -84,6 +88,7 @@ namespace NewHorizons.Handlers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Texture2D MakeTexture(params int[][] coords)
|
private static Texture2D MakeTexture(params int[][] coords)
|
||||||
{
|
{
|
||||||
@ -191,11 +196,6 @@ namespace NewHorizons.Handlers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool KnowsEyeCoordinates()
|
public static bool KnowsEyeCoordinates() => ShipLogHandler.KnowsFact("OPC_EYE_COORDINATES_X1");
|
||||||
{
|
|
||||||
// Works normally in the main system, else check save data directly
|
|
||||||
if (Main.Instance.CurrentStarSystem == "SolarSystem") return Locator.GetShipLogManager().IsFactRevealed("OPC_EYE_COORDINATES_X1");
|
|
||||||
else return PlayerData._currentGameSave.shipLogFactSaves.ContainsKey("OPC_EYE_COORDINATES_X1") && PlayerData._currentGameSave.shipLogFactSaves["OPC_EYE_COORDINATES_X1"].revealOrder > -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using NewHorizons.Builder.Atmosphere;
|
|||||||
using NewHorizons.Builder.Body;
|
using NewHorizons.Builder.Body;
|
||||||
using NewHorizons.Builder.Props;
|
using NewHorizons.Builder.Props;
|
||||||
using NewHorizons.Components;
|
using NewHorizons.Components;
|
||||||
|
using NewHorizons.Components.Orbital;
|
||||||
using NewHorizons.External;
|
using NewHorizons.External;
|
||||||
using NewHorizons.External.Configs;
|
using NewHorizons.External.Configs;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
@ -58,7 +59,7 @@ namespace NewHorizons
|
|||||||
public static bool HasWarpDrive { get; private set; } = false;
|
public static bool HasWarpDrive { get; private set; } = false;
|
||||||
|
|
||||||
private string _defaultStarSystem = "SolarSystem";
|
private string _defaultStarSystem = "SolarSystem";
|
||||||
private string _currentStarSystem = "SolarSystem";
|
internal string _currentStarSystem = "SolarSystem";
|
||||||
private bool _firstLoad = true;
|
private bool _firstLoad = true;
|
||||||
private ShipWarpController _shipWarpController;
|
private ShipWarpController _shipWarpController;
|
||||||
|
|
||||||
@ -144,6 +145,8 @@ namespace NewHorizons
|
|||||||
{
|
{
|
||||||
Config =
|
Config =
|
||||||
{
|
{
|
||||||
|
destroyStockPlanets = false,
|
||||||
|
factRequiredForWarp = "OPC_EYE_COORDINATES_X1",
|
||||||
Vessel = new StarSystemConfig.VesselModule()
|
Vessel = new StarSystemConfig.VesselModule()
|
||||||
{
|
{
|
||||||
coords = new StarSystemConfig.NomaiCoordinates
|
coords = new StarSystemConfig.NomaiCoordinates
|
||||||
@ -231,6 +234,7 @@ namespace NewHorizons
|
|||||||
var isTitleScreen = scene.name == "TitleScreen";
|
var isTitleScreen = scene.name == "TitleScreen";
|
||||||
var isSolarSystem = scene.name == "SolarSystem";
|
var isSolarSystem = scene.name == "SolarSystem";
|
||||||
var isEyeOfTheUniverse = scene.name == "EyeOfTheUniverse";
|
var isEyeOfTheUniverse = scene.name == "EyeOfTheUniverse";
|
||||||
|
if (isEyeOfTheUniverse) _currentStarSystem = scene.name;
|
||||||
|
|
||||||
if (!SystemDict.ContainsKey(_currentStarSystem) || !BodyDict.ContainsKey(_currentStarSystem))
|
if (!SystemDict.ContainsKey(_currentStarSystem) || !BodyDict.ContainsKey(_currentStarSystem))
|
||||||
{
|
{
|
||||||
@ -268,24 +272,55 @@ namespace NewHorizons
|
|||||||
TitleSceneHandler.InitSubtitles();
|
TitleSceneHandler.InitSubtitles();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isEyeOfTheUniverse && IsWarpingFromShip)
|
if (isSolarSystem && _ship == null)
|
||||||
{
|
{
|
||||||
if (_ship != null)
|
var ship = SearchUtilities.Find("Ship_Body", false);
|
||||||
|
if (ship != null)
|
||||||
{
|
{
|
||||||
SceneManager.MoveGameObjectToScene(_ship, SceneManager.GetActiveScene());
|
_ship = ship.InstantiateInactive();
|
||||||
_ship.transform.position = new Vector3(50, 0, 0);
|
_ship.name = ship.name;
|
||||||
_ship.SetActive(true);
|
_ship.AddComponent<ShipWarpController>().Init();
|
||||||
|
DontDestroyOnLoad(_ship);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isEyeOfTheUniverse)
|
||||||
|
{
|
||||||
|
var eyeOfTheUniverse = SearchUtilities.Find("EyeOfTheUniverse_Body");
|
||||||
|
var eyeSector = eyeOfTheUniverse.FindChild("Sector_EyeOfTheUniverse").GetComponent<Sector>();
|
||||||
|
var eyeAO = eyeOfTheUniverse.AddComponent<EyeAstroObject>();
|
||||||
|
eyeAO._owRigidbody = eyeOfTheUniverse.GetAttachedOWRigidbody();
|
||||||
|
eyeAO._rootSector = eyeSector;
|
||||||
|
eyeAO._gravityVolume = eyeSector.GetComponentInChildren<GravityVolume>();
|
||||||
|
eyeAO._customName = "Eye Of The Universe";
|
||||||
|
eyeAO._name = AstroObject.Name.Eye;
|
||||||
|
eyeAO._type = AstroObject.Type.None;
|
||||||
|
eyeAO.Register();
|
||||||
|
|
||||||
|
var vessel = SearchUtilities.Find("Vessel_Body");
|
||||||
|
var vesselSector = vessel.FindChild("Sector_VesselBridge").GetComponent<Sector>();
|
||||||
|
var vesselAO = vessel.AddComponent<EyeAstroObject>();
|
||||||
|
vesselAO._owRigidbody = vessel.GetAttachedOWRigidbody();
|
||||||
|
vesselAO._primaryBody = eyeAO;
|
||||||
|
eyeAO._satellite = vesselAO;
|
||||||
|
vesselAO._rootSector = vesselSector;
|
||||||
|
vesselAO._customName = "Vessel";
|
||||||
|
vesselAO._name = AstroObject.Name.CustomString;
|
||||||
|
vesselAO._type = AstroObject.Type.SpaceStation;
|
||||||
|
vesselAO.Register();
|
||||||
|
|
||||||
|
if (IsWarpingFromShip && _ship != null)
|
||||||
|
{
|
||||||
|
var eyeShip = GameObject.Instantiate(_ship);
|
||||||
|
eyeShip.name = "Ship_Body";
|
||||||
|
_shipWarpController = eyeShip.GetComponent<ShipWarpController>();
|
||||||
|
SceneManager.MoveGameObjectToScene(eyeShip, scene);
|
||||||
|
eyeShip.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isSolarSystem || isEyeOfTheUniverse)
|
if (isSolarSystem || isEyeOfTheUniverse)
|
||||||
{
|
{
|
||||||
if (_ship != null)
|
|
||||||
{
|
|
||||||
_ship = SearchUtilities.Find("Ship_Body").InstantiateInactive();
|
|
||||||
DontDestroyOnLoad(_ship);
|
|
||||||
}
|
|
||||||
|
|
||||||
IsSystemReady = false;
|
IsSystemReady = false;
|
||||||
|
|
||||||
NewHorizonsData.Load();
|
NewHorizonsData.Load();
|
||||||
@ -300,13 +335,9 @@ namespace NewHorizons
|
|||||||
AtmosphereBuilder.Init();
|
AtmosphereBuilder.Init();
|
||||||
BrambleNodeBuilder.Init(BodyDict[CurrentStarSystem].Select(x => x.Config).Where(x => x.Bramble?.dimension != null).ToArray());
|
BrambleNodeBuilder.Init(BodyDict[CurrentStarSystem].Select(x => x.Config).Where(x => x.Bramble?.dimension != null).ToArray());
|
||||||
|
|
||||||
if (isSolarSystem)
|
|
||||||
{
|
|
||||||
PlanetCreationHandler.Init(BodyDict[CurrentStarSystem]);
|
PlanetCreationHandler.Init(BodyDict[CurrentStarSystem]);
|
||||||
|
if (isSolarSystem) VesselWarpHandler.LoadVessel();
|
||||||
VesselWarpHandler.LoadVessel();
|
|
||||||
SystemCreationHandler.LoadSystem(SystemDict[CurrentStarSystem]);
|
SystemCreationHandler.LoadSystem(SystemDict[CurrentStarSystem]);
|
||||||
}
|
|
||||||
|
|
||||||
LoadTranslations(ModHelper.Manifest.ModFolderPath + "Assets/", this);
|
LoadTranslations(ModHelper.Manifest.ModFolderPath + "Assets/", this);
|
||||||
|
|
||||||
@ -315,8 +346,11 @@ namespace NewHorizons
|
|||||||
{
|
{
|
||||||
// Warp drive
|
// Warp drive
|
||||||
HasWarpDrive = StarChartHandler.CanWarp();
|
HasWarpDrive = StarChartHandler.CanWarp();
|
||||||
|
if (_shipWarpController == null)
|
||||||
|
{
|
||||||
_shipWarpController = SearchUtilities.Find("Ship_Body").AddComponent<ShipWarpController>();
|
_shipWarpController = SearchUtilities.Find("Ship_Body").AddComponent<ShipWarpController>();
|
||||||
_shipWarpController.Init();
|
_shipWarpController.Init();
|
||||||
|
}
|
||||||
if (HasWarpDrive == true) EnableWarpDrive();
|
if (HasWarpDrive == true) EnableWarpDrive();
|
||||||
|
|
||||||
var shouldWarpInFromShip = IsWarpingFromShip && _shipWarpController != null;
|
var shouldWarpInFromShip = IsWarpingFromShip && _shipWarpController != null;
|
||||||
@ -380,6 +414,16 @@ namespace NewHorizons
|
|||||||
var remoteViewer = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_NorthPoleSurface/Interactables_NorthPoleSurface/LowBuilding/Prefab_NOM_RemoteViewer").GetComponent<NomaiRemoteCameraPlatform>();
|
var remoteViewer = SearchUtilities.Find("BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_NorthPoleSurface/Interactables_NorthPoleSurface/LowBuilding/Prefab_NOM_RemoteViewer").GetComponent<NomaiRemoteCameraPlatform>();
|
||||||
remoteViewer._visualSector = northPoleSurface;
|
remoteViewer._visualSector = northPoleSurface;
|
||||||
}
|
}
|
||||||
|
else if (isEyeOfTheUniverse)
|
||||||
|
{
|
||||||
|
Instance.ModHelper.Events.Unity.FireOnNextUpdate(() =>
|
||||||
|
{
|
||||||
|
IsSystemReady = true;
|
||||||
|
OnSystemReady(false, false);
|
||||||
|
});
|
||||||
|
IsWarpingFromShip = false;
|
||||||
|
IsWarpingFromVessel = false;
|
||||||
|
}
|
||||||
|
|
||||||
//Stop starfield from disappearing when there is no lights
|
//Stop starfield from disappearing when there is no lights
|
||||||
var playerBody = SearchUtilities.Find("Player_Body");
|
var playerBody = SearchUtilities.Find("Player_Body");
|
||||||
@ -629,6 +673,8 @@ namespace NewHorizons
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
PlayerData.SaveEyeCompletion();
|
||||||
|
|
||||||
if (SystemDict[_currentStarSystem].Config.enableTimeLoop) SecondsElapsedInLoop = TimeLoop.GetSecondsElapsed();
|
if (SystemDict[_currentStarSystem].Config.enableTimeLoop) SecondsElapsedInLoop = TimeLoop.GetSecondsElapsed();
|
||||||
else SecondsElapsedInLoop = -1;
|
else SecondsElapsedInLoop = -1;
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
namespace NewHorizons.Patches
|
namespace NewHorizons.Patches
|
||||||
{
|
{
|
||||||
@ -13,6 +13,13 @@ namespace NewHorizons.Patches
|
|||||||
return (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse");
|
return (Main.Instance.CurrentStarSystem != "EyeOfTheUniverse");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(SubmitActionLoadScene), nameof(SubmitActionLoadScene.ConfirmSubmit))]
|
||||||
|
public static void SubmitActionLoadScene_ConfirmSubmit(SubmitActionLoadScene __instance)
|
||||||
|
{
|
||||||
|
if (__instance._sceneToLoad == SubmitActionLoadScene.LoadableScenes.EYE) Main.Instance._currentStarSystem = "EyeOfTheUniverse";
|
||||||
|
}
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(ShipThrusterController), nameof(ShipThrusterController.ReadTranslationalInput))]
|
[HarmonyPatch(typeof(ShipThrusterController), nameof(ShipThrusterController.ReadTranslationalInput))]
|
||||||
public static bool ShipThrusterController_ReadTranslationalInput(ShipThrusterController __instance, ref Vector3 __result)
|
public static bool ShipThrusterController_ReadTranslationalInput(ShipThrusterController __instance, ref Vector3 __result)
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
|
using NewHorizons.Components;
|
||||||
|
|
||||||
namespace NewHorizons.Patches
|
namespace NewHorizons.Patches
|
||||||
{
|
{
|
||||||
[HarmonyPatch]
|
[HarmonyPatch]
|
||||||
public static class LocatorPatches
|
public static class LocatorPatches
|
||||||
{
|
{
|
||||||
|
public static AstroObject _eye;
|
||||||
|
|
||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
[HarmonyPatch(typeof(Locator), nameof(Locator.RegisterCloakFieldController))]
|
[HarmonyPatch(typeof(Locator), nameof(Locator.RegisterCloakFieldController))]
|
||||||
public static bool Locator_RegisterCloakFieldController()
|
public static bool Locator_RegisterCloakFieldController()
|
||||||
@ -31,5 +35,36 @@ namespace NewHorizons.Patches
|
|||||||
{
|
{
|
||||||
__result = __result || Components.CloakSectorController.isShipInside;
|
__result = __result || Components.CloakSectorController.isShipInside;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(Locator), nameof(Locator.GetAstroObject))]
|
||||||
|
public static bool Locator_GetAstroObject(AstroObject.Name astroObjectName, ref AstroObject __result)
|
||||||
|
{
|
||||||
|
if (astroObjectName == AstroObject.Name.Eye && _eye != null)
|
||||||
|
{
|
||||||
|
__result = _eye;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPrefix]
|
||||||
|
[HarmonyPatch(typeof(Locator), nameof(Locator.RegisterAstroObject))]
|
||||||
|
public static bool Locator_RegisterAstroObject(AstroObject astroObject)
|
||||||
|
{
|
||||||
|
if (astroObject._name == AstroObject.Name.Eye)
|
||||||
|
{
|
||||||
|
_eye = astroObject;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(Locator), nameof(Locator.ClearReferences))]
|
||||||
|
public static void Locator_ClearReferences()
|
||||||
|
{
|
||||||
|
_eye = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ namespace NewHorizons.Patches
|
|||||||
{
|
{
|
||||||
bool canWarpToEye = __instance._coordinateInterface.CheckEyeCoordinates();
|
bool canWarpToEye = __instance._coordinateInterface.CheckEyeCoordinates();
|
||||||
bool canWarpToStarSystem = __instance._coordinateInterface.CheckAllCoordinates(out string targetSystem);
|
bool canWarpToStarSystem = __instance._coordinateInterface.CheckAllCoordinates(out string targetSystem);
|
||||||
if (slot == __instance._warpVesselSlot && __instance._hasPower && (canWarpToEye || (canWarpToStarSystem && targetSystem != Main.Instance.CurrentStarSystem)) && __instance._blackHole.GetState() == SingularityController.State.Collapsed && LoadManager.GetCurrentScene() != OWScene.EyeOfTheUniverse)
|
if (slot == __instance._warpVesselSlot && __instance._hasPower && ((canWarpToEye && Main.Instance.CurrentStarSystem != "EyeOfTheUniverse") || (canWarpToStarSystem && targetSystem != Main.Instance.CurrentStarSystem)) && __instance._blackHole.GetState() == SingularityController.State.Collapsed)
|
||||||
{
|
{
|
||||||
__instance._blackHole.Create();
|
__instance._blackHole.Create();
|
||||||
RumbleManager.StartVesselWarp();
|
RumbleManager.StartVesselWarp();
|
||||||
@ -56,7 +56,10 @@ namespace NewHorizons.Patches
|
|||||||
__instance.enabled = true;
|
__instance.enabled = true;
|
||||||
Locator.GetPauseCommandListener().AddPauseCommandLock();
|
Locator.GetPauseCommandListener().AddPauseCommandLock();
|
||||||
if (canWarpToEye || (canWarpToStarSystem && targetSystem == "EyeOfTheUniverse"))
|
if (canWarpToEye || (canWarpToStarSystem && targetSystem == "EyeOfTheUniverse"))
|
||||||
|
{
|
||||||
|
Main.Instance._currentStarSystem = "EyeOfTheUniverse";
|
||||||
LoadManager.LoadSceneAsync(OWScene.EyeOfTheUniverse, false, LoadManager.FadeType.ToWhite);
|
LoadManager.LoadSceneAsync(OWScene.EyeOfTheUniverse, false, LoadManager.FadeType.ToWhite);
|
||||||
|
}
|
||||||
else if (canWarpToStarSystem)
|
else if (canWarpToStarSystem)
|
||||||
Main.Instance.ChangeCurrentStarSystem(targetSystem, false, true);
|
Main.Instance.ChangeCurrentStarSystem(targetSystem, false, true);
|
||||||
__instance._blackHoleOneShot.PlayOneShot(AudioType.VesselSingularityCreate);
|
__instance._blackHoleOneShot.PlayOneShot(AudioType.VesselSingularityCreate);
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using NewHorizons.Components.Orbital;
|
using NewHorizons.Components.Orbital;
|
||||||
using NewHorizons.Handlers;
|
using NewHorizons.Handlers;
|
||||||
using System;
|
using System;
|
||||||
@ -16,14 +16,18 @@ namespace NewHorizons.Patches
|
|||||||
|
|
||||||
if (ao == null || ao._name != AstroObject.Name.CustomString) return true;
|
if (ao == null || ao._name != AstroObject.Name.CustomString) return true;
|
||||||
|
|
||||||
if (ao is NHAstroObject)
|
__result = string.Empty;
|
||||||
|
|
||||||
|
if (ao is NHAstroObject nhao && nhao.HideDisplayName) return false;
|
||||||
|
|
||||||
|
var customName = ao.GetCustomName();
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(customName))
|
||||||
{
|
{
|
||||||
if ((ao as NHAstroObject).HideDisplayName) __result = "";
|
__result = TranslationHandler.GetTranslation(customName, TranslationHandler.TextType.UI);
|
||||||
else __result = TranslationHandler.GetTranslation(ao.GetCustomName(), TranslationHandler.TextType.UI);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HarmonyPostfix]
|
[HarmonyPostfix]
|
||||||
|
|||||||
@ -35,6 +35,7 @@ namespace NewHorizons.Utility
|
|||||||
if (stringID.Equals("ASH_TWIN")) stringID = "TOWER_TWIN";
|
if (stringID.Equals("ASH_TWIN")) stringID = "TOWER_TWIN";
|
||||||
if (stringID.Equals("EMBER_TWIN")) stringID = "CAVE_TWIN";
|
if (stringID.Equals("EMBER_TWIN")) stringID = "CAVE_TWIN";
|
||||||
if (stringID.Equals("INTERLOPER")) stringID = "COMET";
|
if (stringID.Equals("INTERLOPER")) stringID = "COMET";
|
||||||
|
if (stringID.Equals("EYE")) stringID = "EYE_OF_THE_UNIVERSE";
|
||||||
|
|
||||||
string key;
|
string key;
|
||||||
if (stringID.ToUpper().Replace("_", "").Equals("MAPSATELLITE"))
|
if (stringID.ToUpper().Replace("_", "").Equals("MAPSATELLITE"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user