mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Remove subtitle from system config, default to "subtitle.png"
This commit is contained in:
parent
f53d7356c6
commit
c0e6c1191a
@ -1,4 +1,4 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Configs
|
||||
@ -51,11 +51,6 @@ namespace NewHorizons.External.Configs
|
||||
/// </summary>
|
||||
public bool startHere;
|
||||
|
||||
/// <summary>
|
||||
/// Relative path to the image file to use as the subtitle image (replaces the eote banner)
|
||||
/// </summary>
|
||||
public string subtitle;
|
||||
|
||||
public class NomaiCoordinates
|
||||
{
|
||||
public int[] x;
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Handlers
|
||||
{
|
||||
@ -49,6 +50,8 @@ namespace NewHorizons.Handlers
|
||||
|
||||
public static void AddSubtitle(IModBehaviour mod, string filepath)
|
||||
{
|
||||
Logger.Log($"Adding subtitle for {mod.ModHelper.Manifest.Name}");
|
||||
|
||||
var tex = ImageUtilities.GetTexture(mod, filepath);
|
||||
if (tex == null) return;
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using HarmonyLib;
|
||||
using HarmonyLib;
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Configs;
|
||||
@ -316,11 +316,6 @@ namespace NewHorizons
|
||||
if (name != "SolarSystem") SetDefaultSystem(name);
|
||||
}
|
||||
|
||||
if (starSystemConfig.subtitle != null)
|
||||
{
|
||||
SubtitlesHandler.AddSubtitle(mod, starSystemConfig.subtitle);
|
||||
}
|
||||
|
||||
var system = new NewHorizonsSystem(name, starSystemConfig, mod);
|
||||
SystemDict[name] = system;
|
||||
}
|
||||
@ -347,6 +342,10 @@ namespace NewHorizons
|
||||
{
|
||||
LoadTranslations(folder, mod);
|
||||
}
|
||||
if (File.Exists($"{mod.ModHelper.Manifest.ModFolderPath}subtitle.png"))
|
||||
{
|
||||
SubtitlesHandler.AddSubtitle(mod, "subtitle.png");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user