-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Major features - Adds title screen configuration (fixes #1027) Todo list: - [x] menuColor - [x] factRequiredForTitle - [x] conditionRequiredForTitle - [x] skyBox - [x] Music - [x] rotationSpeed - [x] menuPlanet - [x] mergeWithOtherTitles - [x] title screen handler api method - [x] Docs - [x] Multiple title screens for one mod 
- Loading branch information
Showing
21 changed files
with
1,531 additions
and
263 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
using NewHorizons.External.Modules; | ||
using NewHorizons.External.Modules.Props; | ||
using NewHorizons.External.SerializableData; | ||
using NewHorizons.Handlers; | ||
using Newtonsoft.Json; | ||
|
||
namespace NewHorizons.External.Configs | ||
{ | ||
[JsonObject] | ||
public class TitleScreenConfig | ||
{ | ||
/// <summary> | ||
/// Create title screens | ||
/// </summary> | ||
public TitleScreenInfo[] titleScreens = new TitleScreenInfo[0]; | ||
} | ||
|
||
[JsonObject] | ||
public class TitleScreenInfo | ||
{ | ||
/// <summary> | ||
/// Colour of the text on the main menu | ||
/// </summary> | ||
public MColor menuTextTint; | ||
|
||
/// <summary> | ||
/// Ship log fact required for this title screen to appear. | ||
/// </summary> | ||
public string factRequiredForTitle; | ||
|
||
/// <summary> | ||
/// Persistent condition required for this title screen to appear. | ||
/// </summary> | ||
public string persistentConditionRequiredForTitle; | ||
|
||
/// <summary> | ||
/// If set to true, NH generated planets will not show on the title screen. If false, this title screen has the same chance as other NH planet title screens to show. | ||
/// </summary> | ||
public bool disableNHPlanets = true; | ||
|
||
/// <summary> | ||
/// If set to true, this custom title screen will merge with all other custom title screens with shareTitleScreen set to true. If false, NH will randomly select between this and other valid title screens that are loaded. | ||
/// </summary> | ||
public bool shareTitleScreen = true; | ||
|
||
/// <summary> | ||
/// Customize the skybox for this title screen | ||
/// </summary> | ||
public SkyboxModule Skybox; | ||
|
||
/// <summary> | ||
/// The music audio that will play on the title screen. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. | ||
/// </summary> | ||
public string music; | ||
|
||
/// <summary> | ||
/// The ambience audio that will play on the title screen. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. | ||
/// </summary> | ||
public string ambience; | ||
|
||
/// <summary> | ||
/// Edit properties of the background | ||
/// </summary> | ||
public BackgroundModule Background; | ||
|
||
/// <summary> | ||
/// Edit properties of the main menu planet | ||
/// </summary> | ||
public MenuPlanetModule MenuPlanet; | ||
|
||
[JsonObject] | ||
public class BackgroundModule | ||
{ | ||
/// <summary> | ||
/// Changes the speed the background rotates (and by extension the main menu planet). This is in degrees per second. | ||
/// </summary> | ||
public float rotationSpeed = 1; | ||
|
||
/// <summary> | ||
/// Disables the renderers of objects at the provided paths | ||
/// </summary> | ||
public string[] removeChildren; | ||
|
||
/// <summary> | ||
/// A list of DetailInfos to populate the background with. | ||
/// </summary> | ||
public SimplifiedDetailInfo[] details; | ||
} | ||
|
||
[JsonObject] | ||
public class MenuPlanetModule | ||
{ | ||
/// <summary> | ||
/// Disables the renderers of the main menu planet and all objects on it (this is to improve compatibility with other mods that don't use the NH title screen json). | ||
/// </summary> | ||
public bool destroyMenuPlanet = false; | ||
|
||
/// <summary> | ||
/// Disables the renderers of objects at the provided paths | ||
/// </summary> | ||
public string[] removeChildren; | ||
|
||
/// <summary> | ||
/// A list of DetailInfos to populate the main menu planet with. | ||
/// </summary> | ||
public SimplifiedDetailInfo[] details; | ||
|
||
/// <summary> | ||
/// Changes the speed the main menu planet. This is in degrees per second. | ||
/// </summary> | ||
public float rotationSpeed = 2; | ||
} | ||
|
||
/// <summary> | ||
/// Extra data that may be used by extension mods | ||
/// </summary> | ||
public object extras; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace NewHorizons.External.Modules | ||
{ | ||
[JsonObject] | ||
public class SkyboxModule | ||
{ | ||
/// <summary> | ||
/// Whether to destroy the star field around the player | ||
/// </summary> | ||
public bool destroyStarField; | ||
|
||
/// <summary> | ||
/// Whether to use a cube for the skybox instead of a smooth sphere | ||
/// </summary> | ||
public bool useCube; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's positive X direction | ||
/// </summary> | ||
public string rightPath; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's negative X direction | ||
/// </summary> | ||
public string leftPath; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's positive Y direction | ||
/// </summary> | ||
public string topPath; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's negative Y direction | ||
/// </summary> | ||
public string bottomPath; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's positive Z direction | ||
/// </summary> | ||
public string frontPath; | ||
|
||
/// <summary> | ||
/// Relative filepath to the texture to use for the skybox's negative Z direction | ||
/// </summary> | ||
public string backPath; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.