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 eye-of-the-universe
This commit is contained in:
commit
01ee3e9ad8
22
.github/pull_request_template.md
vendored
22
.github/pull_request_template.md
vendored
@ -1,13 +1,15 @@
|
||||
<!-- Enter the title of your PR here -->
|
||||
# My Changes
|
||||
<!-- A new module or something else important -->
|
||||
## Major features
|
||||
-
|
||||
|
||||
<!-- (Only do this if you're targeting a specific issue) -->
|
||||
Fixes # .
|
||||
<!-- A new parameter added to a module, or API feature -->
|
||||
## Minor features
|
||||
-
|
||||
|
||||
<!-- Enter what you changed here -->
|
||||
## What's new?
|
||||
- .
|
||||
- .
|
||||
- .
|
||||
<!-- Some improvement that requires no action on the part of add-on creators i.e., improved star graphics -->
|
||||
## Improvements
|
||||
-
|
||||
|
||||
<!-- Enter any other information down here -->
|
||||
<!-- Be sure to reference the existing issue if it exists -->
|
||||
## Bug fixes
|
||||
-
|
||||
|
||||
1
.github/workflows/release_build.yml
vendored
1
.github/workflows/release_build.yml
vendored
@ -13,6 +13,7 @@ on:
|
||||
branches: [main]
|
||||
types:
|
||||
- synchronize
|
||||
- labeled
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "*.md"
|
||||
|
||||
@ -87,7 +87,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
var dialogueTree = conversationZone.AddComponent<CharacterDialogueTree>();
|
||||
|
||||
var xml = File.ReadAllText(mod.Manifest.ModFolderPath + info.xmlFile);
|
||||
var xml = File.ReadAllText(Path.Combine(mod.Manifest.ModFolderPath, info.xmlFile));
|
||||
var text = new TextAsset(xml);
|
||||
|
||||
// Text assets need a name to be used with VoiceMod
|
||||
|
||||
@ -2,12 +2,12 @@ using NewHorizons.External.Modules;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using Enum = System.Enum;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
using Enum = System.Enum;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using Random = UnityEngine.Random;
|
||||
namespace NewHorizons.Builder.Props
|
||||
@ -119,7 +119,7 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
var xmlPath = File.ReadAllText(mod.ModHelper.Manifest.ModFolderPath + info.xmlFile);
|
||||
var xmlPath = File.ReadAllText(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, info.xmlFile));
|
||||
|
||||
switch (info.type)
|
||||
{
|
||||
|
||||
@ -4,6 +4,7 @@ using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using UnityEngine;
|
||||
using static NewHorizons.External.Modules.PropModule;
|
||||
@ -385,8 +386,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
else
|
||||
{
|
||||
// Don't use Path.Combine here else you break the Vision
|
||||
imageLoader.PathsToLoad.Add((i, mod.ModHelper.Manifest.ModFolderPath + slideInfo.imagePath));
|
||||
imageLoader.PathsToLoad.Add((i, Path.Combine(mod.ModHelper.Manifest.ModFolderPath, slideInfo.imagePath)));
|
||||
}
|
||||
|
||||
AddModules(slideInfo, ref slide, mod);
|
||||
|
||||
@ -4,6 +4,7 @@ using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Linq;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
@ -53,7 +54,7 @@ namespace NewHorizons.Builder.ShipLog
|
||||
public static void AddBodyToShipLog(ShipLogManager manager, NewHorizonsBody body)
|
||||
{
|
||||
string systemName = body.Config.starSystem;
|
||||
XElement astroBodyFile = XElement.Load(body.Mod.ModHelper.Manifest.ModFolderPath + "/" + body.Config.ShipLog.xmlFile);
|
||||
XElement astroBodyFile = XElement.Load(Path.Combine(body.Mod.ModHelper.Manifest.ModFolderPath, body.Config.ShipLog.xmlFile));
|
||||
XElement astroBodyId = astroBodyFile.Element("ID");
|
||||
if (astroBodyId == null)
|
||||
{
|
||||
|
||||
@ -2,6 +2,7 @@ using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
@ -65,7 +66,7 @@ namespace NewHorizons.Handlers
|
||||
var id = mod.ModHelper.Manifest.UniqueName + "_" + audioPath;
|
||||
if (_customAudioTypes.TryGetValue(id, out audioType)) return audioType;
|
||||
|
||||
var audioClip = AudioUtilities.LoadAudio(mod.ModHelper.Manifest.ModFolderPath + "/" + audioPath);
|
||||
var audioClip = AudioUtilities.LoadAudio(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, audioPath));
|
||||
|
||||
if (audioClip == null)
|
||||
{
|
||||
|
||||
@ -173,7 +173,7 @@ namespace NewHorizons
|
||||
TextTranslation.Get().SetLanguage(TextTranslation.Get().GetLanguage());
|
||||
}
|
||||
|
||||
LoadTranslations(Instance.ModHelper.Manifest.ModFolderPath + "Assets/", this);
|
||||
LoadTranslations(Path.Combine(Instance.ModHelper.Manifest.ModFolderPath, "Assets/"), this);
|
||||
}
|
||||
|
||||
public void Awake()
|
||||
|
||||
@ -36,10 +36,10 @@ namespace NewHorizons
|
||||
if (name == null) return;
|
||||
|
||||
var relativePath = $"temp/{name}.json";
|
||||
var fullPath = Main.Instance.ModHelper.Manifest.ModFolderPath + relativePath;
|
||||
if (!Directory.Exists(Main.Instance.ModHelper.Manifest.ModFolderPath + "temp"))
|
||||
var fullPath = Path.Combine(Main.Instance.ModHelper.Manifest.ModFolderPath, relativePath);
|
||||
if (!Directory.Exists(Path.Combine(Main.Instance.ModHelper.Manifest.ModFolderPath, "temp")))
|
||||
{
|
||||
Directory.CreateDirectory(Main.Instance.ModHelper.Manifest.ModFolderPath + "temp");
|
||||
Directory.CreateDirectory(Path.Combine(Main.Instance.ModHelper.Manifest.ModFolderPath, "temp"));
|
||||
}
|
||||
JsonHelper.SaveJsonObject(fullPath, config);
|
||||
var body = Main.Instance.LoadConfig(Main.Instance, relativePath);
|
||||
@ -126,7 +126,7 @@ namespace NewHorizons
|
||||
var planet = Main.BodyDict[Main.Instance.CurrentStarSystem].Find((b) => b.Config.name == bodyName);
|
||||
return planet == null
|
||||
? null
|
||||
: QueryJson(outType, planet.Mod.ModHelper.Manifest.ModFolderPath + planet.RelativePath, jsonPath);
|
||||
: QueryJson(outType, Path.Combine(planet.Mod.ModHelper.Manifest.ModFolderPath, planet.RelativePath), jsonPath);
|
||||
}
|
||||
|
||||
public object QuerySystem(Type outType, string jsonPath)
|
||||
@ -134,7 +134,7 @@ namespace NewHorizons
|
||||
var system = Main.SystemDict[Main.Instance.CurrentStarSystem];
|
||||
return system == null
|
||||
? null
|
||||
: QueryJson(outType, system.Mod.ModHelper.Manifest.ModFolderPath + system.RelativePath, jsonPath);
|
||||
: QueryJson(outType, Path.Combine(system.Mod.ModHelper.Manifest.ModFolderPath, system.RelativePath), jsonPath);
|
||||
}
|
||||
|
||||
public GameObject SpawnObject(GameObject planet, Sector sector, string propToCopyPath, Vector3 position, Vector3 eulerAngles,
|
||||
|
||||
@ -38,10 +38,10 @@ namespace NewHorizons.OtherMods.VoiceActing
|
||||
{
|
||||
foreach (var mod in Main.Instance.GetDependants().Append(Main.Instance))
|
||||
{
|
||||
var folder = $"{mod.ModHelper.Manifest.ModFolderPath}voicemod";
|
||||
var folder = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, "voicemod");
|
||||
if (!Directory.Exists(folder)) {
|
||||
// Fallback to PascalCase bc it used to be like that
|
||||
folder = $"{mod.ModHelper.Manifest.ModFolderPath}VoiceMod";
|
||||
folder = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, "VoiceMod");
|
||||
}
|
||||
if (Directory.Exists(folder))
|
||||
{
|
||||
|
||||
@ -32,6 +32,7 @@ namespace NewHorizons.Patches
|
||||
ProxyPlanet_Initialize(__instance);
|
||||
__instance._moon.SetOriginalBodies(Locator.GetAstroObject(AstroObject.Name.VolcanicMoon).transform, Locator.GetAstroObject(AstroObject.Name.BrittleHollow).transform);
|
||||
if (!__instance._fragmentsResolved) __instance.ResolveFragments();
|
||||
__instance.AssignBrittleHollowReference();
|
||||
__instance._blackHoleMaterial = new Material(__instance._blackHoleRenderer.sharedMaterial);
|
||||
__instance._blackHoleRenderer.sharedMaterial = __instance._blackHoleMaterial;
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using OWML.Common;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -34,7 +34,7 @@ namespace NewHorizons.Utility
|
||||
}
|
||||
else
|
||||
{
|
||||
var completePath = mod.ModHelper.Manifest.ModFolderPath + assetBundleRelativeDir;
|
||||
var completePath = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, assetBundleRelativeDir);
|
||||
bundle = AssetBundle.LoadFromFile(completePath);
|
||||
if (bundle == null)
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
@ -19,7 +20,7 @@ namespace NewHorizons.Utility
|
||||
{
|
||||
try
|
||||
{
|
||||
var clip = LoadAudio(mod.ModHelper.Manifest.ModFolderPath + "/" + audio);
|
||||
var clip = LoadAudio(Path.Combine(mod.ModHelper.Manifest.ModFolderPath, audio));
|
||||
source._audioLibraryClip = AudioType.None;
|
||||
source._clipArrayIndex = 0;
|
||||
source._clipArrayLength = 0;
|
||||
|
||||
@ -210,7 +210,7 @@ namespace NewHorizons.Utility.DebugMenu
|
||||
continue;
|
||||
}
|
||||
|
||||
loadedConfigFiles[folder + body.RelativePath] = body.Config;
|
||||
loadedConfigFiles[Path.Combine(folder, body.RelativePath)] = body.Config;
|
||||
submenus.ForEach(submenu => submenu.LoadConfigFile(this, body.Config));
|
||||
}
|
||||
}
|
||||
@ -235,9 +235,9 @@ namespace NewHorizons.Utility.DebugMenu
|
||||
|
||||
try
|
||||
{
|
||||
var path = loadedMod.ModHelper.Manifest.ModFolderPath + backupFolderName + relativePath;
|
||||
var path = Path.Combine(loadedMod.ModHelper.Manifest.ModFolderPath, backupFolderName, relativePath);
|
||||
Logger.LogVerbose($"Backing up... {relativePath} to {path}");
|
||||
var oldPath = loadedMod.ModHelper.Manifest.ModFolderPath + relativePath;
|
||||
var oldPath = Path.Combine(loadedMod.ModHelper.Manifest.ModFolderPath, relativePath);
|
||||
var directoryName = Path.GetDirectoryName(path);
|
||||
Directory.CreateDirectory(directoryName);
|
||||
|
||||
@ -254,7 +254,7 @@ namespace NewHorizons.Utility.DebugMenu
|
||||
try
|
||||
{
|
||||
Logger.Log($"Saving... {relativePath} to {filePath}");
|
||||
var path = loadedMod.ModHelper.Manifest.ModFolderPath + relativePath;
|
||||
var path = Path.Combine(loadedMod.ModHelper.Manifest.ModFolderPath, relativePath);
|
||||
var directoryName = Path.GetDirectoryName(path);
|
||||
Directory.CreateDirectory(directoryName);
|
||||
|
||||
|
||||
@ -17,14 +17,14 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static bool IsTextureLoaded(IModBehaviour mod, string filename)
|
||||
{
|
||||
var path = mod.ModHelper.Manifest.ModFolderPath + filename;
|
||||
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, filename);
|
||||
return _loadedTextures.ContainsKey(path);
|
||||
}
|
||||
|
||||
public static Texture2D GetTexture(IModBehaviour mod, string filename, bool useMipmaps = true, bool wrap = false)
|
||||
{
|
||||
// Copied from OWML but without the print statement lol
|
||||
var path = mod.ModHelper.Manifest.ModFolderPath + filename;
|
||||
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, filename);
|
||||
if (_loadedTextures.ContainsKey(path))
|
||||
{
|
||||
Logger.LogVerbose($"Already loaded image at path: {path}");
|
||||
@ -53,7 +53,7 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static void DeleteTexture(IModBehaviour mod, string filename, Texture2D texture)
|
||||
{
|
||||
var path = mod.ModHelper.Manifest.ModFolderPath + filename;
|
||||
var path = Path.Combine(mod.ModHelper.Manifest.ModFolderPath, filename);
|
||||
if (_loadedTextures.ContainsKey(path))
|
||||
{
|
||||
if (_loadedTextures[path] == texture)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Hawkbar, Trifid, Book",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.5.1",
|
||||
"version": "1.6.0",
|
||||
"owmlVersion": "2.6.0",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "_nebula.MenuFramework", "xen.CommonCameraUtility" ],
|
||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],
|
||||
|
||||
@ -18,6 +18,7 @@ Check the ship's log for how to use your warp drive to travel between star syste
|
||||
<!-- TOC -->
|
||||
|
||||
- [Incompatible mods](#incompatible-mods)
|
||||
- [Supported mods](#supported-mods)
|
||||
- [Development](#development)
|
||||
- [Contact](#contact)
|
||||
- [Credits](#credits)
|
||||
@ -28,6 +29,12 @@ Check the ship's log for how to use your warp drive to travel between star syste
|
||||
- Quantum Space Buddies.
|
||||
- OW Randomizer.
|
||||
|
||||
## Supported Mods
|
||||
New Horizons has optional support for a few other mods:
|
||||
- [Discord Rich Presence](https://outerwildsmods.com/mods/discordrichpresence/): Showcase what New Horizons worlds you're exploring in your Discord status!
|
||||
- [Voice Acting Mod](https://outerwildsmods.com/mods/voiceactingmod/): Characters in NH can be given voice lines which will work with this mod installed. Try it out by downloading NH Examples and talking to Ernesto!
|
||||
- [Achievements+](https://outerwildsmods.com/mods/achievements/): New Horizons and its addons have achievements you can unlock with this mod installed!
|
||||
|
||||
## Features
|
||||
- Load planet meshes or details from asset bundles
|
||||
- Use our [template Unity project](https://github.com/xen-42/outer-wilds-unity-template) to create assets for use in NH, including all game scripts recovered using UtinyRipper
|
||||
|
||||
@ -17,3 +17,7 @@ Uh idk what to put here thought it would be funny haha
|
||||
## Test
|
||||
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
|
||||
## 9/2/22
|
||||
|
||||
Where were you when new horizons docs died, im going gorbo mode
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user