mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Big reorganize
This commit is contained in:
parent
2b64edd23d
commit
85797df25c
@ -1,16 +1,13 @@
|
||||
using HarmonyLib;
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.Components.Orbital;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using static NewHorizons.Main;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
|
||||
namespace NewHorizons.Builder.Body
|
||||
{
|
||||
@ -104,7 +101,7 @@ namespace NewHorizons.Builder.Body
|
||||
default: geometryPrefab = _hubGeometry; break;
|
||||
}
|
||||
|
||||
var geometry = DetailBuilder.Make(go, sector, geometryPrefab, new PropModule.DetailInfo());
|
||||
var geometry = DetailBuilder.Make(go, sector, geometryPrefab, new DetailInfo());
|
||||
|
||||
var exitWarps = _exitWarps.InstantiateInactive();
|
||||
var repelVolume = _repelVolume.InstantiateInactive();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using NewHorizons.Builder.General;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
@ -16,7 +17,7 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
public static class DetailBuilder
|
||||
{
|
||||
private static readonly Dictionary<PropModule.DetailInfo, GameObject> _detailInfoToCorrespondingSpawnedGameObject = new();
|
||||
private static readonly Dictionary<DetailInfo, GameObject> _detailInfoToCorrespondingSpawnedGameObject = new();
|
||||
private static readonly Dictionary<(Sector, string), (GameObject prefab, bool isItem)> _fixedPrefabCache = new();
|
||||
|
||||
static DetailBuilder()
|
||||
@ -34,7 +35,7 @@ namespace NewHorizons.Builder.Props
|
||||
_detailInfoToCorrespondingSpawnedGameObject.Clear();
|
||||
}
|
||||
|
||||
public static GameObject GetSpawnedGameObjectByDetailInfo(PropModule.DetailInfo detail)
|
||||
public static GameObject GetSpawnedGameObjectByDetailInfo(DetailInfo detail)
|
||||
{
|
||||
if (!_detailInfoToCorrespondingSpawnedGameObject.ContainsKey(detail))
|
||||
{
|
||||
@ -49,7 +50,7 @@ namespace NewHorizons.Builder.Props
|
||||
/// <summary>
|
||||
/// Create a detail using an asset bundle or a path in the scene hierarchy of the item to copy.
|
||||
/// </summary>
|
||||
public static GameObject Make(GameObject go, Sector sector, IModBehaviour mod, PropModule.DetailInfo detail)
|
||||
public static GameObject Make(GameObject go, Sector sector, IModBehaviour mod, DetailInfo detail)
|
||||
{
|
||||
if (detail.assetBundle != null)
|
||||
{
|
||||
@ -65,7 +66,7 @@ namespace NewHorizons.Builder.Props
|
||||
/// <summary>
|
||||
/// Create a detail using a path in the scene hierarchy of the item to copy.
|
||||
/// </summary>
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, PropModule.DetailInfo info)
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, DetailInfo info)
|
||||
{
|
||||
var prefab = SearchUtilities.Find(info.path);
|
||||
if (prefab == null)
|
||||
@ -80,7 +81,7 @@ namespace NewHorizons.Builder.Props
|
||||
/// <summary>
|
||||
/// Create a detail using a prefab.
|
||||
/// </summary>
|
||||
public static GameObject Make(GameObject go, Sector sector, GameObject prefab, PropModule.DetailInfo detail)
|
||||
public static GameObject Make(GameObject go, Sector sector, GameObject prefab, DetailInfo detail)
|
||||
{
|
||||
if (prefab == null) return null;
|
||||
|
||||
@ -121,7 +122,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
else FixSectoredComponent(component, sector, isTorch, detail.keepLoaded);
|
||||
|
||||
FixComponent(component, go);
|
||||
FixComponent(component, go, detail.ignoreSun);
|
||||
}
|
||||
|
||||
if (detail.path != null)
|
||||
@ -284,13 +285,19 @@ namespace NewHorizons.Builder.Props
|
||||
return false;
|
||||
}
|
||||
|
||||
private static void FixComponent(Component component, GameObject planetGO)
|
||||
private static void FixComponent(Component component, GameObject planetGO, bool ignoreSun)
|
||||
{
|
||||
// Fix other components
|
||||
// IgnoreSun is just a shadow casting optimization for caves and stuff so we can get rid of it
|
||||
if (component is Transform && component.gameObject.layer == Layer.IgnoreSun)
|
||||
if (component is Transform)
|
||||
{
|
||||
component.gameObject.layer = Layer.Default;
|
||||
if (!ignoreSun && component.gameObject.layer == Layer.IgnoreSun)
|
||||
{
|
||||
component.gameObject.layer = Layer.Default;
|
||||
}
|
||||
else if (ignoreSun && component.gameObject.layer == Layer.Default)
|
||||
{
|
||||
component.gameObject.layer = Layer.IgnoreSun;
|
||||
}
|
||||
}
|
||||
// I forget why this is here
|
||||
else if (component is GhostIK or GhostEffects)
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules.Props.Dialogue;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using OWML.Common;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using UnityEngine;
|
||||
using NewHorizons.Utility;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
|
||||
namespace NewHorizons.Builder.Props
|
||||
{
|
||||
public static class DialogueBuilder
|
||||
{
|
||||
// Returns the character dialogue tree and remote dialogue trigger, if applicable.
|
||||
public static (CharacterDialogueTree, RemoteDialogueTrigger) Make(GameObject go, Sector sector, PropModule.DialogueInfo info, IModBehaviour mod)
|
||||
public static (CharacterDialogueTree, RemoteDialogueTrigger) Make(GameObject go, Sector sector, DialogueInfo info, IModBehaviour mod)
|
||||
{
|
||||
// In stock I think they disable dialogue stuff with conditions
|
||||
// Here we just don't make it at all
|
||||
@ -39,7 +39,7 @@ namespace NewHorizons.Builder.Props
|
||||
return (dialogue, remoteTrigger);
|
||||
}
|
||||
|
||||
private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, CharacterDialogueTree dialogue)
|
||||
private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, DialogueInfo info, CharacterDialogueTree dialogue)
|
||||
{
|
||||
var conversationTrigger = GeneralPropBuilder.MakeNew("ConversationTrigger", planetGO, sector, info.remoteTrigger, defaultPosition: info.position, defaultParentPath: info.pathToAnimController);
|
||||
|
||||
@ -70,7 +70,7 @@ namespace NewHorizons.Builder.Props
|
||||
return remoteDialogueTrigger;
|
||||
}
|
||||
|
||||
private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, IModHelper mod)
|
||||
private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, DialogueInfo info, IModHelper mod)
|
||||
{
|
||||
var conversationZone = GeneralPropBuilder.MakeNew("ConversationZone", planetGO, sector, info, defaultParentPath: info.pathToAnimController);
|
||||
|
||||
@ -106,15 +106,15 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
switch (info.flashlightToggle)
|
||||
{
|
||||
case PropModule.DialogueInfo.FlashlightToggle.TurnOff:
|
||||
case FlashlightToggle.TurnOff:
|
||||
dialogueTree._turnOffFlashlight = true;
|
||||
dialogueTree._turnOnFlashlight = false;
|
||||
break;
|
||||
case PropModule.DialogueInfo.FlashlightToggle.TurnOffThenOn:
|
||||
case FlashlightToggle.TurnOffThenOn:
|
||||
dialogueTree._turnOffFlashlight = true;
|
||||
dialogueTree._turnOnFlashlight = true;
|
||||
break;
|
||||
case PropModule.DialogueInfo.FlashlightToggle.None:
|
||||
case FlashlightToggle.None:
|
||||
default:
|
||||
dialogueTree._turnOffFlashlight = false;
|
||||
dialogueTree._turnOnFlashlight = false;
|
||||
@ -126,7 +126,7 @@ namespace NewHorizons.Builder.Props
|
||||
return dialogueTree;
|
||||
}
|
||||
|
||||
private static void MakePlayerTrackingZone(GameObject go, CharacterDialogueTree dialogue, PropModule.DialogueInfo info)
|
||||
private static void MakePlayerTrackingZone(GameObject go, CharacterDialogueTree dialogue, DialogueInfo info)
|
||||
{
|
||||
var character = go.transform.Find(info.pathToAnimController);
|
||||
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Props
|
||||
{
|
||||
@ -15,7 +14,7 @@ namespace NewHorizons.Builder.Props
|
||||
if (_geyserPrefab == null) _geyserPrefab = SearchUtilities.Find("TimberHearth_Body/Sector_TH/Interactables_TH/Geysers/Geyser_Village").InstantiateInactive().Rename("Prefab_TH_Geyser").DontDestroyOnLoad();
|
||||
}
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, PropModule.GeyserInfo info)
|
||||
public static void Make(GameObject planetGO, Sector sector, GeyserInfo info)
|
||||
{
|
||||
InitPrefab();
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.TranslatorText;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
@ -33,16 +34,16 @@ namespace NewHorizons.Builder.Props
|
||||
private static GameObject _preCrashRecorderPrefab;
|
||||
private static GameObject _trailmarkerPrefab;
|
||||
|
||||
private static Dictionary<PropModule.NomaiTextArcInfo, GameObject> arcInfoToCorrespondingSpawnedGameObject = new Dictionary<PropModule.NomaiTextArcInfo, GameObject>();
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(PropModule.NomaiTextArcInfo arc)
|
||||
private static Dictionary<NomaiTextArcInfo, GameObject> arcInfoToCorrespondingSpawnedGameObject = new();
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(NomaiTextArcInfo arc)
|
||||
{
|
||||
if (!arcInfoToCorrespondingSpawnedGameObject.ContainsKey(arc)) return null;
|
||||
return arcInfoToCorrespondingSpawnedGameObject[arc];
|
||||
}
|
||||
|
||||
private static Dictionary<PropModule.NomaiTextInfo, GameObject> conversationInfoToCorrespondingSpawnedGameObject = new Dictionary<PropModule.NomaiTextInfo, GameObject>();
|
||||
private static Dictionary<NomaiTextInfo, GameObject> conversationInfoToCorrespondingSpawnedGameObject = new();
|
||||
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextInfo(PropModule.NomaiTextInfo convo)
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextInfo(NomaiTextInfo convo)
|
||||
{
|
||||
Logger.LogVerbose("Retrieving wall text obj for " + convo);
|
||||
if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null;
|
||||
@ -143,7 +144,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, PropModule.NomaiTextInfo info, IModBehaviour mod)
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, NomaiTextInfo info, IModBehaviour mod)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -151,7 +152,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
switch (info.type)
|
||||
{
|
||||
case PropModule.NomaiTextType.Wall:
|
||||
case NomaiTextType.Wall:
|
||||
{
|
||||
var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath).gameObject;
|
||||
|
||||
@ -216,7 +217,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
return nomaiWallTextObj;
|
||||
}
|
||||
case PropModule.NomaiTextType.Scroll:
|
||||
case NomaiTextType.Scroll:
|
||||
{
|
||||
var customScroll = _scrollPrefab.InstantiateInactive();
|
||||
|
||||
@ -305,7 +306,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
return customScroll;
|
||||
}
|
||||
case PropModule.NomaiTextType.Computer:
|
||||
case NomaiTextType.Computer:
|
||||
{
|
||||
var computerObject = _computerPrefab.InstantiateInactive();
|
||||
|
||||
@ -358,9 +359,9 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
return computerObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.PreCrashComputer:
|
||||
case NomaiTextType.PreCrashComputer:
|
||||
{
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, _preCrashComputerPrefab, new PropModule.DetailInfo(info));
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, _preCrashComputerPrefab, new DetailInfo(info));
|
||||
computerObject.SetActive(false);
|
||||
|
||||
var up = computerObject.transform.position - planetGO.transform.position;
|
||||
@ -401,10 +402,10 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
return computerObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.Cairn:
|
||||
case PropModule.NomaiTextType.CairnVariant:
|
||||
case NomaiTextType.Cairn:
|
||||
case NomaiTextType.CairnVariant:
|
||||
{
|
||||
var cairnObject = (info.type == PropModule.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab).InstantiateInactive();
|
||||
var cairnObject = (info.type == NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab).InstantiateInactive();
|
||||
|
||||
if (!string.IsNullOrEmpty(info.rename))
|
||||
{
|
||||
@ -476,11 +477,11 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
return cairnObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.PreCrashRecorder:
|
||||
case PropModule.NomaiTextType.Recorder:
|
||||
case NomaiTextType.PreCrashRecorder:
|
||||
case NomaiTextType.Recorder:
|
||||
{
|
||||
var prefab = (info.type == PropModule.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab);
|
||||
var recorderObject = DetailBuilder.Make(planetGO, sector, prefab, new PropModule.DetailInfo(info));
|
||||
var prefab = (info.type == NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab);
|
||||
var recorderObject = DetailBuilder.Make(planetGO, sector, prefab, new DetailInfo(info));
|
||||
recorderObject.SetActive(false);
|
||||
|
||||
if (info.rotation == null)
|
||||
@ -504,7 +505,7 @@ namespace NewHorizons.Builder.Props
|
||||
conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject;
|
||||
return recorderObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.Trailmarker:
|
||||
case NomaiTextType.Trailmarker:
|
||||
{
|
||||
var trailmarkerObject = _trailmarkerPrefab.InstantiateInactive();
|
||||
|
||||
@ -576,7 +577,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
private static NomaiWallText MakeWallText(GameObject go, Sector sector, PropModule.NomaiTextInfo info, string xmlPath)
|
||||
private static NomaiWallText MakeWallText(GameObject go, Sector sector, NomaiTextInfo info, string xmlPath)
|
||||
{
|
||||
GameObject nomaiWallTextObj = new GameObject("NomaiWallText");
|
||||
nomaiWallTextObj.SetActive(false);
|
||||
@ -605,7 +606,7 @@ namespace NewHorizons.Builder.Props
|
||||
nomaiWallText.SetTextAsset(text);
|
||||
|
||||
// #433 fuzzy stranger text
|
||||
if (info.arcInfo != null && info.arcInfo.Any(x => x.type == PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger))
|
||||
if (info.arcInfo != null && info.arcInfo.Any(x => x.type == NomaiTextArcInfo.NomaiTextArcType.Stranger))
|
||||
{
|
||||
StreamingHandler.SetUpStreaming(AstroObject.Name.RingWorld, sector);
|
||||
}
|
||||
@ -613,7 +614,7 @@ namespace NewHorizons.Builder.Props
|
||||
return nomaiWallText;
|
||||
}
|
||||
|
||||
internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info)
|
||||
internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info)
|
||||
{
|
||||
var dict = MakeNomaiTextDict(xml);
|
||||
|
||||
@ -622,7 +623,7 @@ namespace NewHorizons.Builder.Props
|
||||
RefreshArcs(nomaiWallText, conversationZone, info);
|
||||
}
|
||||
|
||||
internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info)
|
||||
internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info)
|
||||
{
|
||||
var dict = nomaiWallText._dictNomaiTextData;
|
||||
Random.InitState(info.seed);
|
||||
@ -653,26 +654,26 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
internal static GameObject MakeArc(PropModule.NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID)
|
||||
internal static GameObject MakeArc(NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID)
|
||||
{
|
||||
GameObject arc;
|
||||
var type = arcInfo != null ? arcInfo.type : PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult;
|
||||
var type = arcInfo != null ? arcInfo.type : NomaiTextArcInfo.NomaiTextArcType.Adult;
|
||||
var variation = arcInfo != null ? arcInfo.variation : -1;
|
||||
switch (type)
|
||||
{
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Child:
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Child:
|
||||
variation = variation < 0
|
||||
? Random.Range(0, _childArcPrefabs.Count())
|
||||
: (variation % _childArcPrefabs.Count());
|
||||
arc = _childArcPrefabs[variation].InstantiateInactive();
|
||||
break;
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcPrefabs.Any():
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcPrefabs.Any():
|
||||
variation = variation < 0
|
||||
? Random.Range(0, _ghostArcPrefabs.Count())
|
||||
: (variation % _ghostArcPrefabs.Count());
|
||||
arc = _ghostArcPrefabs[variation].InstantiateInactive();
|
||||
break;
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult:
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Adult:
|
||||
default:
|
||||
variation = variation < 0
|
||||
? Random.Range(0, _arcPrefabs.Count())
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
@ -65,20 +67,20 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static void Make(GameObject go, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod)
|
||||
public static void Make(GameObject go, Sector sector, ProjectionInfo info, IModBehaviour mod)
|
||||
{
|
||||
switch (info.type)
|
||||
{
|
||||
case PropModule.ProjectionInfo.SlideShowType.AutoProjector:
|
||||
case ProjectionInfo.SlideShowType.AutoProjector:
|
||||
MakeAutoProjector(go, sector, info, mod);
|
||||
break;
|
||||
case PropModule.ProjectionInfo.SlideShowType.SlideReel:
|
||||
case ProjectionInfo.SlideShowType.SlideReel:
|
||||
MakeSlideReel(go, sector, info, mod);
|
||||
break;
|
||||
case PropModule.ProjectionInfo.SlideShowType.VisionTorchTarget:
|
||||
case ProjectionInfo.SlideShowType.VisionTorchTarget:
|
||||
MakeMindSlidesTarget(go, sector, info, mod);
|
||||
break;
|
||||
case PropModule.ProjectionInfo.SlideShowType.StandingVisionTorch:
|
||||
case ProjectionInfo.SlideShowType.StandingVisionTorch:
|
||||
MakeStandingVisionTorch(go, sector, info, mod);
|
||||
break;
|
||||
default:
|
||||
@ -87,7 +89,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
private static GameObject MakeSlideReel(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod)
|
||||
private static GameObject MakeSlideReel(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -160,7 +162,7 @@ namespace NewHorizons.Builder.Props
|
||||
return slideReelObj;
|
||||
}
|
||||
|
||||
public static GameObject MakeAutoProjector(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod)
|
||||
public static GameObject MakeAutoProjector(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -195,7 +197,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
|
||||
// Makes a target for a vision torch to scan
|
||||
public static GameObject MakeMindSlidesTarget(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod)
|
||||
public static GameObject MakeMindSlidesTarget(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -232,7 +234,7 @@ namespace NewHorizons.Builder.Props
|
||||
return g;
|
||||
}
|
||||
|
||||
public static GameObject MakeStandingVisionTorch(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod)
|
||||
public static GameObject MakeStandingVisionTorch(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -327,48 +329,60 @@ namespace NewHorizons.Builder.Props
|
||||
return imageLoader;
|
||||
}
|
||||
|
||||
private static void AddModules(PropModule.SlideInfo slideInfo, ref Slide slide, IModBehaviour mod)
|
||||
private static void AddModules(SlideInfo slideInfo, ref Slide slide, IModBehaviour mod)
|
||||
{
|
||||
var modules = new List<SlideFunctionModule>();
|
||||
if (!String.IsNullOrEmpty(slideInfo.beatAudio))
|
||||
{
|
||||
var audioBeat = new SlideBeatAudioModule();
|
||||
audioBeat._audioType = AudioTypeHandler.GetAudioType(slideInfo.beatAudio, mod);
|
||||
audioBeat._delay = slideInfo.beatDelay;
|
||||
var audioBeat = new SlideBeatAudioModule
|
||||
{
|
||||
_audioType = AudioTypeHandler.GetAudioType(slideInfo.beatAudio, mod),
|
||||
_delay = slideInfo.beatDelay
|
||||
};
|
||||
modules.Add(audioBeat);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(slideInfo.backdropAudio))
|
||||
{
|
||||
var audioBackdrop = new SlideBackdropAudioModule();
|
||||
audioBackdrop._audioType = AudioTypeHandler.GetAudioType(slideInfo.backdropAudio, mod);
|
||||
audioBackdrop._fadeTime = slideInfo.backdropFadeTime;
|
||||
var audioBackdrop = new SlideBackdropAudioModule
|
||||
{
|
||||
_audioType = AudioTypeHandler.GetAudioType(slideInfo.backdropAudio, mod),
|
||||
_fadeTime = slideInfo.backdropFadeTime
|
||||
};
|
||||
modules.Add(audioBackdrop);
|
||||
}
|
||||
if (slideInfo.ambientLightIntensity > 0)
|
||||
{
|
||||
var ambientLight = new SlideAmbientLightModule();
|
||||
ambientLight._intensity = slideInfo.ambientLightIntensity;
|
||||
ambientLight._range = slideInfo.ambientLightRange;
|
||||
ambientLight._color = slideInfo.ambientLightColor.ToColor();
|
||||
ambientLight._spotIntensityMod = slideInfo.spotIntensityMod;
|
||||
var ambientLight = new SlideAmbientLightModule
|
||||
{
|
||||
_intensity = slideInfo.ambientLightIntensity,
|
||||
_range = slideInfo.ambientLightRange,
|
||||
_color = slideInfo.ambientLightColor.ToColor(),
|
||||
_spotIntensityMod = slideInfo.spotIntensityMod
|
||||
};
|
||||
modules.Add(ambientLight);
|
||||
}
|
||||
if (slideInfo.playTimeDuration != 0)
|
||||
{
|
||||
var playTime = new SlidePlayTimeModule();
|
||||
playTime._duration = slideInfo.playTimeDuration;
|
||||
var playTime = new SlidePlayTimeModule
|
||||
{
|
||||
_duration = slideInfo.playTimeDuration
|
||||
};
|
||||
modules.Add(playTime);
|
||||
}
|
||||
if (slideInfo.blackFrameDuration != 0)
|
||||
{
|
||||
var blackFrame = new SlideBlackFrameModule();
|
||||
blackFrame._duration = slideInfo.blackFrameDuration;
|
||||
var blackFrame = new SlideBlackFrameModule
|
||||
{
|
||||
_duration = slideInfo.blackFrameDuration
|
||||
};
|
||||
modules.Add(blackFrame);
|
||||
}
|
||||
if (!String.IsNullOrEmpty(slideInfo.reveal))
|
||||
{
|
||||
var shipLogEntry = new SlideShipLogEntryModule();
|
||||
shipLogEntry._entryKey = slideInfo.reveal;
|
||||
var shipLogEntry = new SlideShipLogEntryModule
|
||||
{
|
||||
_entryKey = slideInfo.reveal
|
||||
};
|
||||
modules.Add(shipLogEntry);
|
||||
}
|
||||
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
using HarmonyLib;
|
||||
using NewHorizons.Components.Quantum;
|
||||
using NewHorizons.External.Configs;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props.Quantum;
|
||||
using NewHorizons.Utility.Geometry;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
@ -28,17 +24,17 @@ namespace NewHorizons.Builder.Props
|
||||
public static class QuantumBuilder
|
||||
{
|
||||
|
||||
public static void Make(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
public static void Make(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
{
|
||||
switch(quantumGroup.type)
|
||||
{
|
||||
case PropModule.QuantumGroupType.Sockets: MakeSocketGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||
case PropModule.QuantumGroupType.States: MakeStateGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||
case QuantumGroupType.Sockets: MakeSocketGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||
case QuantumGroupType.States: MakeStateGroup (go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||
// case PropModule.QuantumGroupType.Shuffle: MakeShuffleGroup(go, sector, config, mod, quantumGroup, propsInGroup); return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeSocketGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
public static void MakeSocketGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
{
|
||||
var groupRoot = new GameObject("Quantum Sockets - " + quantumGroup.id);
|
||||
groupRoot.transform.parent = sector?.transform ?? go.transform;
|
||||
@ -72,7 +68,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeStateGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
public static void MakeStateGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
{
|
||||
var groupRoot = new GameObject("Quantum States - " + quantumGroup.id);
|
||||
groupRoot.transform.parent = sector?.transform ?? go.transform;
|
||||
@ -119,7 +115,7 @@ namespace NewHorizons.Builder.Props
|
||||
groupRoot.SetActive(true);
|
||||
}
|
||||
|
||||
public static void MakeShuffleGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
public static void MakeShuffleGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup)
|
||||
{
|
||||
//var averagePosition = propsInGroup.Aggregate(Vector3.zero, (avg, prop) => avg + prop.transform.position) / propsInGroup.Count();
|
||||
GameObject shuffleParent = new GameObject("Quantum Shuffle - " + quantumGroup.id);
|
||||
|
||||
@ -2,6 +2,7 @@ using NewHorizons.Components;
|
||||
using NewHorizons.Components.Achievement;
|
||||
using NewHorizons.Components.Volumes;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using UnityEngine;
|
||||
@ -46,7 +47,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, PropModule.RaftInfo info, OWRigidbody planetBody)
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, RaftInfo info, OWRigidbody planetBody)
|
||||
{
|
||||
InitPrefab();
|
||||
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
using NewHorizons.Builder.Props.TranslatorText;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.Props.Remote;
|
||||
using NewHorizons.External.Modules.TranslatorText;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
@ -119,7 +122,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static void Make(GameObject go, Sector sector, PropModule.RemoteInfo info, NewHorizonsBody nhBody)
|
||||
public static void Make(GameObject go, Sector sector, RemoteInfo info, NewHorizonsBody nhBody)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -170,7 +173,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static void MakeWhiteboard(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.WhiteboardInfo info, NewHorizonsBody nhBody)
|
||||
public static void MakeWhiteboard(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, RemoteWhiteboardInfo info, NewHorizonsBody nhBody)
|
||||
{
|
||||
var whiteboard = DetailBuilder.Make(go, sector, _whiteboardPrefab, new DetailInfo(info));
|
||||
whiteboard.SetActive(false);
|
||||
@ -210,7 +213,7 @@ namespace NewHorizons.Builder.Props
|
||||
whiteboard.SetActive(true);
|
||||
}
|
||||
|
||||
public static void MakePlatform(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.PlatformInfo info, IModBehaviour mod)
|
||||
public static void MakePlatform(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PlatformInfo info, IModBehaviour mod)
|
||||
{
|
||||
var platform = DetailBuilder.Make(go, sector, _remoteCameraPlatformPrefab, new DetailInfo(info));
|
||||
platform.SetActive(false);
|
||||
@ -236,7 +239,7 @@ namespace NewHorizons.Builder.Props
|
||||
platform.SetActive(true);
|
||||
}
|
||||
|
||||
public static void MakeStone(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.StoneInfo info, IModBehaviour mod)
|
||||
public static void MakeStone(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, StoneInfo info, IModBehaviour mod)
|
||||
{
|
||||
var shareStone = GeneralPropBuilder.MakeFromPrefab(_shareStonePrefab, "ShareStone_" + id.ToString(), go, sector, info);
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using NewHorizons.External.Configs;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.Geometry;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
@ -19,7 +20,7 @@ namespace NewHorizons.Builder.Props
|
||||
MakeScatter(go, config.Props.scatter, config.Base.surfaceSize, sector, mod, config);
|
||||
}
|
||||
|
||||
private static void MakeScatter(GameObject go, PropModule.ScatterInfo[] scatterInfo, float radius, Sector sector, IModBehaviour mod, PlanetConfig config)
|
||||
private static void MakeScatter(GameObject go, ScatterInfo[] scatterInfo, float radius, Sector sector, IModBehaviour mod, PlanetConfig config)
|
||||
{
|
||||
var heightMap = config.HeightMap;
|
||||
|
||||
@ -71,7 +72,7 @@ namespace NewHorizons.Builder.Props
|
||||
else prefab = SearchUtilities.Find(propInfo.path);
|
||||
|
||||
// Run all the make detail stuff on it early and just copy it over and over instead
|
||||
var detailInfo = new PropModule.DetailInfo()
|
||||
var detailInfo = new DetailInfo()
|
||||
{
|
||||
scale = propInfo.scale,
|
||||
stretch = propInfo.stretch,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
@ -74,7 +75,7 @@ namespace NewHorizons.Builder.Props
|
||||
if (_soundPrefab == null) _soundPrefab = SearchUtilities.Find("GiantsDeep_Body/Sector_GD/Sector_GDInterior/Tornadoes_GDInterior/SouthernTornadoes/DownTornado_Pivot/DownTornado/AudioRail").InstantiateInactive().Rename("AudioRail_Prefab").DontDestroyOnLoad();
|
||||
}
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, bool hasClouds)
|
||||
public static void Make(GameObject planetGO, Sector sector, TornadoInfo info, bool hasClouds)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -93,11 +94,11 @@ namespace NewHorizons.Builder.Props
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.type == PropModule.TornadoInfo.TornadoType.Hurricane) MakeHurricane(planetGO, sector, info, position, hasClouds);
|
||||
else MakeTornado(planetGO, sector, info, position, info.type == PropModule.TornadoInfo.TornadoType.Downwards);
|
||||
if (info.type == TornadoInfo.TornadoType.Hurricane) MakeHurricane(planetGO, sector, info, position, hasClouds);
|
||||
else MakeTornado(planetGO, sector, info, position, info.type == TornadoInfo.TornadoType.Downwards);
|
||||
}
|
||||
|
||||
private static void MakeTornado(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, Vector3 position, bool downwards)
|
||||
private static void MakeTornado(GameObject planetGO, Sector sector, TornadoInfo info, Vector3 position, bool downwards)
|
||||
{
|
||||
var prefab = downwards ? _downPrefab.InstantiateInactive() : _upPrefab.InstantiateInactive();
|
||||
var tornadoGO = GeneralPropBuilder.MakeFromPrefab(prefab, downwards ? "Tornado_Down" : "Tornado_Up", planetGO, sector, info, defaultPosition: position);
|
||||
@ -173,7 +174,7 @@ namespace NewHorizons.Builder.Props
|
||||
tornadoGO.SetActive(true);
|
||||
}
|
||||
|
||||
private static void MakeHurricane(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, Vector3 position, bool hasClouds)
|
||||
private static void MakeHurricane(GameObject planetGO, Sector sector, TornadoInfo info, Vector3 position, bool hasClouds)
|
||||
{
|
||||
var hurricaneGO = _hurricanePrefab.InstantiateInactive();
|
||||
hurricaneGO.name = "Hurricane";
|
||||
@ -261,7 +262,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyWanderer(GameObject go, GameObject planetGO, PropModule.TornadoInfo info)
|
||||
private static void ApplyWanderer(GameObject go, GameObject planetGO, TornadoInfo info)
|
||||
{
|
||||
var wanderer = go.AddComponent<NHTornadoWanderController>();
|
||||
wanderer.wanderRate = info.wanderRate;
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using HarmonyLib;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.TranslatorText;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.Geometry;
|
||||
@ -31,16 +33,16 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
private static GameObject _preCrashRecorderPrefab;
|
||||
private static GameObject _trailmarkerPrefab;
|
||||
|
||||
private static Dictionary<PropModule.NomaiTextArcInfo, GameObject> arcInfoToCorrespondingSpawnedGameObject = new Dictionary<PropModule.NomaiTextArcInfo, GameObject>();
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(PropModule.NomaiTextArcInfo arc)
|
||||
private static Dictionary<NomaiTextArcInfo, GameObject> arcInfoToCorrespondingSpawnedGameObject = new Dictionary<NomaiTextArcInfo, GameObject>();
|
||||
public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(NomaiTextArcInfo arc)
|
||||
{
|
||||
if (!arcInfoToCorrespondingSpawnedGameObject.ContainsKey(arc)) return null;
|
||||
return arcInfoToCorrespondingSpawnedGameObject[arc];
|
||||
}
|
||||
|
||||
private static Dictionary<PropModule.TranslatorTextInfo, GameObject> conversationInfoToCorrespondingSpawnedGameObject = new Dictionary<PropModule.TranslatorTextInfo, GameObject>();
|
||||
private static Dictionary<TranslatorTextInfo, GameObject> conversationInfoToCorrespondingSpawnedGameObject = new Dictionary<TranslatorTextInfo, GameObject>();
|
||||
|
||||
public static GameObject GetSpawnedGameObjectByTranslatorTextInfo(PropModule.TranslatorTextInfo convo)
|
||||
public static GameObject GetSpawnedGameObjectByTranslatorTextInfo(TranslatorTextInfo convo)
|
||||
{
|
||||
Logger.LogVerbose("Retrieving wall text obj for " + convo);
|
||||
if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null;
|
||||
@ -117,13 +119,13 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
}
|
||||
}
|
||||
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, PropModule.TranslatorTextInfo info, NewHorizonsBody nhBody)
|
||||
public static GameObject Make(GameObject planetGO, Sector sector, TranslatorTextInfo info, NewHorizonsBody nhBody)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
var xmlContent = !string.IsNullOrEmpty(info.xmlFile) ? File.ReadAllText(Path.Combine(nhBody.Mod.ModHelper.Manifest.ModFolderPath, info.xmlFile)) : null;
|
||||
|
||||
if (xmlContent == null && info.type != PropModule.NomaiTextType.Whiteboard)
|
||||
if (xmlContent == null && info.type != NomaiTextType.Whiteboard)
|
||||
{
|
||||
Logger.LogError($"Failed to create translator text because {nameof(info.xmlFile)} was not set to a valid text .xml file path");
|
||||
return null;
|
||||
@ -131,7 +133,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
switch (info.type)
|
||||
{
|
||||
case PropModule.NomaiTextType.Wall:
|
||||
case NomaiTextType.Wall:
|
||||
{
|
||||
var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlContent, nhBody).gameObject;
|
||||
nomaiWallTextObj = GeneralPropBuilder.MakeFromExisting(nomaiWallTextObj, planetGO, sector, info);
|
||||
@ -155,7 +157,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return nomaiWallTextObj;
|
||||
}
|
||||
case PropModule.NomaiTextType.Scroll:
|
||||
case NomaiTextType.Scroll:
|
||||
{
|
||||
var customScroll = GeneralPropBuilder.MakeFromPrefab(_scrollPrefab, _scrollPrefab.name, planetGO, sector, info);
|
||||
|
||||
@ -207,7 +209,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return customScroll;
|
||||
}
|
||||
case PropModule.NomaiTextType.Computer:
|
||||
case NomaiTextType.Computer:
|
||||
{
|
||||
var computerObject = GeneralPropBuilder.MakeFromPrefab(ComputerPrefab, ComputerPrefab.name, planetGO, sector, info);
|
||||
|
||||
@ -228,9 +230,9 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return computerObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.PreCrashComputer:
|
||||
case NomaiTextType.PreCrashComputer:
|
||||
{
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, _preCrashComputerPrefab, new PropModule.DetailInfo(info));
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, _preCrashComputerPrefab, new DetailInfo(info));
|
||||
computerObject.SetActive(false);
|
||||
|
||||
var computer = computerObject.GetComponent<NomaiVesselComputer>();
|
||||
@ -267,10 +269,10 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return computerObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.Cairn:
|
||||
case PropModule.NomaiTextType.CairnVariant:
|
||||
case NomaiTextType.Cairn:
|
||||
case NomaiTextType.CairnVariant:
|
||||
{
|
||||
var cairnPrefab = info.type == PropModule.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab;
|
||||
var cairnPrefab = info.type == NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab;
|
||||
var cairnObject = GeneralPropBuilder.MakeFromPrefab(cairnPrefab, _cairnPrefab.name, planetGO, sector, info);
|
||||
|
||||
// Idk do we have to set it active before finding things?
|
||||
@ -306,11 +308,11 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return cairnObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.PreCrashRecorder:
|
||||
case PropModule.NomaiTextType.Recorder:
|
||||
case NomaiTextType.PreCrashRecorder:
|
||||
case NomaiTextType.Recorder:
|
||||
{
|
||||
var prefab = (info.type == PropModule.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab);
|
||||
var recorderObject = DetailBuilder.Make(planetGO, sector, prefab, new PropModule.DetailInfo(info));
|
||||
var prefab = (info.type == NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab);
|
||||
var recorderObject = DetailBuilder.Make(planetGO, sector, prefab, new DetailInfo(info));
|
||||
recorderObject.SetActive(false);
|
||||
|
||||
var nomaiText = recorderObject.GetComponentInChildren<NomaiText>();
|
||||
@ -328,7 +330,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject;
|
||||
return recorderObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.Trailmarker:
|
||||
case NomaiTextType.Trailmarker:
|
||||
{
|
||||
var trailmarkerObject = GeneralPropBuilder.MakeFromPrefab(_trailmarkerPrefab, _trailmarkerPrefab.name, planetGO, sector, info);
|
||||
|
||||
@ -353,9 +355,9 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
|
||||
return trailmarkerObject;
|
||||
}
|
||||
case PropModule.NomaiTextType.Whiteboard:
|
||||
case NomaiTextType.Whiteboard:
|
||||
{
|
||||
var whiteboardInfo = new PropModule.DetailInfo(info)
|
||||
var whiteboardInfo = new DetailInfo(info)
|
||||
{
|
||||
path = "BrittleHollow_Body/Sector_BH/Sector_NorthHemisphere/Sector_NorthPole/Sector_HangingCity/Sector_HangingCity_District2/Interactables_HangingCity_District2/VisibleFrom_HangingCity/Props_NOM_Whiteboard (1)",
|
||||
rename = info.rename ?? "Props_NOM_Whiteboard",
|
||||
@ -367,9 +369,9 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
{
|
||||
var scrollSocket = whiteboardObject.GetComponentInChildren<ScrollSocket>();
|
||||
|
||||
var scrollInfo = new PropModule.TranslatorTextInfo()
|
||||
var scrollInfo = new TranslatorTextInfo()
|
||||
{
|
||||
type = PropModule.NomaiTextType.Scroll,
|
||||
type = NomaiTextType.Scroll,
|
||||
arcInfo = info.arcInfo,
|
||||
seed = info.seed,
|
||||
xmlFile = info.xmlFile,
|
||||
@ -392,7 +394,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
}
|
||||
}
|
||||
|
||||
private static NomaiWallText MakeWallText(GameObject go, Sector sector, PropModule.TranslatorTextInfo info, string xmlPath, NewHorizonsBody nhBody)
|
||||
private static NomaiWallText MakeWallText(GameObject go, Sector sector, TranslatorTextInfo info, string xmlPath, NewHorizonsBody nhBody)
|
||||
{
|
||||
GameObject nomaiWallTextObj = new GameObject("NomaiWallText");
|
||||
nomaiWallTextObj.SetActive(false);
|
||||
@ -421,7 +423,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
nomaiWallText.SetTextAsset(text);
|
||||
|
||||
// #433 fuzzy stranger text
|
||||
if (info.arcInfo != null && info.arcInfo.Any(x => x.type == PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger))
|
||||
if (info.arcInfo != null && info.arcInfo.Any(x => x.type == NomaiTextArcInfo.NomaiTextArcType.Stranger))
|
||||
{
|
||||
StreamingHandler.SetUpStreaming(AstroObject.Name.RingWorld, sector);
|
||||
}
|
||||
@ -429,7 +431,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
return nomaiWallText;
|
||||
}
|
||||
|
||||
internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.TranslatorTextInfo info, NewHorizonsBody nhBody)
|
||||
internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, TranslatorTextInfo info, NewHorizonsBody nhBody)
|
||||
{
|
||||
var dict = MakeNomaiTextDict(xml);
|
||||
|
||||
@ -449,7 +451,7 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
public bool mirrored;
|
||||
}
|
||||
|
||||
internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.TranslatorTextInfo info, NewHorizonsBody nhBody, string cacheKey)
|
||||
internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, TranslatorTextInfo info, NewHorizonsBody nhBody, string cacheKey)
|
||||
{
|
||||
var dict = nomaiWallText._dictNomaiTextData;
|
||||
Random.InitState(info.seed == 0 ? info.xmlFile.GetHashCode() : info.seed);
|
||||
@ -549,27 +551,27 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
}
|
||||
}
|
||||
|
||||
internal static GameObject MakeArc(PropModule.NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID, GameObject prebuiltArc = null)
|
||||
internal static GameObject MakeArc(NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID, GameObject prebuiltArc = null)
|
||||
{
|
||||
GameObject arc;
|
||||
var type = arcInfo != null ? arcInfo.type : PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult;
|
||||
var type = arcInfo != null ? arcInfo.type : NomaiTextArcInfo.NomaiTextArcType.Adult;
|
||||
NomaiTextArcBuilder.SpiralProfile profile;
|
||||
Material mat;
|
||||
Mesh overrideMesh = null;
|
||||
Color? overrideColor = null;
|
||||
switch (type)
|
||||
{
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Child:
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Child:
|
||||
profile = NomaiTextArcBuilder.childSpiralProfile;
|
||||
mat = _childArcMaterial;
|
||||
break;
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcMaterial != null:
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcMaterial != null:
|
||||
profile = NomaiTextArcBuilder.strangerSpiralProfile;
|
||||
mat = _ghostArcMaterial;
|
||||
overrideMesh = MeshUtilities.RectangleMeshFromCorners(new Vector3[]{ new Vector3(-0.9f, 0.0f, 0.0f), new Vector3(0.9f, 0.0f, 0.0f), new Vector3(-0.9f, 2.0f, 0.0f), new Vector3(0.9f, 2.0f, 0.0f) });
|
||||
overrideColor = new Color(0.0158f, 1.0f, 0.5601f, 1f);
|
||||
break;
|
||||
case PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult:
|
||||
case NomaiTextArcInfo.NomaiTextArcType.Adult:
|
||||
default:
|
||||
profile = NomaiTextArcBuilder.adultSpiralProfile;
|
||||
mat = _adultArcMaterial;
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Props
|
||||
{
|
||||
@ -42,7 +41,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, PropModule.VolcanoInfo info)
|
||||
public static void Make(GameObject planetGO, Sector sector, VolcanoInfo info)
|
||||
{
|
||||
InitPrefab();
|
||||
|
||||
@ -73,7 +72,7 @@ namespace NewHorizons.Builder.Props
|
||||
});
|
||||
}
|
||||
|
||||
private static void FixMeteor(MeteorController meteor, PropModule.VolcanoInfo info)
|
||||
private static void FixMeteor(MeteorController meteor, VolcanoInfo info)
|
||||
{
|
||||
meteor.transform.localScale = Vector3.one * info.scale;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using NewHorizons.Builder.Props.TranslatorText;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.WarpPad;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWMLUtilities;
|
||||
@ -85,7 +85,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, NomaiWarpReceiverInfo info)
|
||||
{
|
||||
var detailInfo = new PropModule.DetailInfo(info);
|
||||
var detailInfo = new DetailInfo(info);
|
||||
var receiverObject = DetailBuilder.Make(planetGO, sector, info.detailed ? _detailedReceiverPrefab : _receiverPrefab, detailInfo);
|
||||
|
||||
Logger.Log($"Position is {detailInfo.position} was {info.position}");
|
||||
@ -106,7 +106,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, NomaiWarpTransmitterInfo info)
|
||||
{
|
||||
var transmitterObject = DetailBuilder.Make(planetGO, sector, _transmitterPrefab, new PropModule.DetailInfo(info));
|
||||
var transmitterObject = DetailBuilder.Make(planetGO, sector, _transmitterPrefab, new DetailInfo(info));
|
||||
|
||||
var transmitter = transmitterObject.GetComponentInChildren<NomaiWarpTransmitter>();
|
||||
transmitter._frequency = GetFrequency(info.frequency);
|
||||
@ -122,7 +122,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
private static void CreateComputer(GameObject planetGO, Sector sector, NomaiWarpComputerLoggerInfo computerInfo, NomaiWarpReceiver receiver)
|
||||
{
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, TranslatorTextBuilder.ComputerPrefab, new PropModule.DetailInfo(computerInfo));
|
||||
var computerObject = DetailBuilder.Make(planetGO, sector, TranslatorTextBuilder.ComputerPrefab, new DetailInfo(computerInfo));
|
||||
|
||||
var computer = computerObject.GetComponentInChildren<NomaiComputer>();
|
||||
computer.SetSector(sector);
|
||||
|
||||
@ -1,16 +1,15 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using OWML.Common;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.ShipLog
|
||||
{
|
||||
public static class EntryLocationBuilder
|
||||
{
|
||||
private static readonly List<ShipLogEntryLocation> _locationsToInitialize = new List<ShipLogEntryLocation>();
|
||||
public static void Make(GameObject go, Sector sector, PropModule.EntryLocationInfo info, IModBehaviour mod)
|
||||
public static void Make(GameObject go, Sector sector, EntryLocationInfo info, IModBehaviour mod)
|
||||
{
|
||||
GameObject entryLocationGameObject = GeneralPropBuilder.MakeNew("Entry Location (" + info.id + ")", go, sector, info);
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.Components.Achievement;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using OWML.Common;
|
||||
using UnityEngine;
|
||||
@ -9,18 +9,18 @@ namespace NewHorizons.Builder.ShipLog
|
||||
{
|
||||
public static class RevealBuilder
|
||||
{
|
||||
public static void Make(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod)
|
||||
public static void Make(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var newRevealGO = GeneralPropBuilder.MakeNew("Reveal Volume (" + info.revealOn + ")", go, sector, info);
|
||||
switch (info.revealOn)
|
||||
{
|
||||
case VolumesModule.RevealVolumeInfo.RevealVolumeType.Enter:
|
||||
case RevealVolumeInfo.RevealVolumeType.Enter:
|
||||
MakeTrigger(newRevealGO, sector, info, mod);
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.RevealVolumeType.Observe:
|
||||
case RevealVolumeInfo.RevealVolumeType.Observe:
|
||||
MakeObservable(newRevealGO, sector, info, mod);
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.RevealVolumeType.Snapshot:
|
||||
case RevealVolumeInfo.RevealVolumeType.Snapshot:
|
||||
MakeSnapshot(newRevealGO, sector, info, mod);
|
||||
break;
|
||||
default:
|
||||
@ -30,7 +30,7 @@ namespace NewHorizons.Builder.ShipLog
|
||||
newRevealGO.SetActive(true);
|
||||
}
|
||||
|
||||
private static SphereShape MakeShape(GameObject go, VolumesModule.RevealVolumeInfo info, Shape.CollisionMode collisionMode)
|
||||
private static SphereShape MakeShape(GameObject go, RevealVolumeInfo info, Shape.CollisionMode collisionMode)
|
||||
{
|
||||
SphereShape newShape = go.AddComponent<SphereShape>();
|
||||
newShape.radius = info.radius;
|
||||
@ -38,7 +38,7 @@ namespace NewHorizons.Builder.ShipLog
|
||||
return newShape;
|
||||
}
|
||||
|
||||
private static void MakeTrigger(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod)
|
||||
private static void MakeTrigger(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var shape = MakeShape(go, info, Shape.CollisionMode.Volume);
|
||||
|
||||
@ -51,15 +51,15 @@ namespace NewHorizons.Builder.ShipLog
|
||||
factRevealVolume._factIDs = info.reveals;
|
||||
switch (info.revealFor)
|
||||
{
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Player:
|
||||
case RevealVolumeInfo.EnterType.Player:
|
||||
factRevealVolume._player = true;
|
||||
factRevealVolume._probe = false;
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Probe:
|
||||
case RevealVolumeInfo.EnterType.Probe:
|
||||
factRevealVolume._player = false;
|
||||
factRevealVolume._probe = true;
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Both:
|
||||
case RevealVolumeInfo.EnterType.Both:
|
||||
default:
|
||||
// if you want both player and probe to able to trigger the thing you have to set both player and probe to false. setting both to true will make nothing trigger it
|
||||
factRevealVolume._player = false;
|
||||
@ -74,15 +74,15 @@ namespace NewHorizons.Builder.ShipLog
|
||||
achievementVolume.achievementID = info.achievementID;
|
||||
switch (info.revealFor)
|
||||
{
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Player:
|
||||
case RevealVolumeInfo.EnterType.Player:
|
||||
achievementVolume.player = true;
|
||||
achievementVolume.probe = false;
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Probe:
|
||||
case RevealVolumeInfo.EnterType.Probe:
|
||||
achievementVolume.player = false;
|
||||
achievementVolume.probe = true;
|
||||
break;
|
||||
case VolumesModule.RevealVolumeInfo.EnterType.Both:
|
||||
case RevealVolumeInfo.EnterType.Both:
|
||||
default:
|
||||
achievementVolume.player = true;
|
||||
achievementVolume.probe = true;
|
||||
@ -91,7 +91,7 @@ namespace NewHorizons.Builder.ShipLog
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeObservable(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod)
|
||||
private static void MakeObservable(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
go.layer = Layer.Interactible;
|
||||
|
||||
@ -122,7 +122,7 @@ namespace NewHorizons.Builder.ShipLog
|
||||
}
|
||||
}
|
||||
|
||||
private static void MakeSnapshot(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod)
|
||||
private static void MakeSnapshot(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var shape = MakeShape(go, info, Shape.CollisionMode.Manual);
|
||||
|
||||
|
||||
@ -1,22 +1,16 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using OWML.Common;
|
||||
using OWML.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class AudioVolumeBuilder
|
||||
{
|
||||
public static AudioVolume Make(GameObject planetGO, Sector sector, VolumesModule.AudioVolumeInfo info, IModBehaviour mod)
|
||||
public static AudioVolume Make(GameObject planetGO, Sector sector, AudioVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var go = GeneralPropBuilder.MakeNew("AudioVolume", planetGO, sector, info);
|
||||
go.layer = Layer.AdvancedEffectVolume;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
using NewHorizons.Components.Volumes;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
internal static class ChangeStarSystemVolumeBuilder
|
||||
{
|
||||
public static WarpVolume Make(GameObject planetGO, Sector sector, VolumesModule.ChangeStarSystemVolumeInfo info)
|
||||
public static WarpVolume Make(GameObject planetGO, Sector sector, ChangeStarSystemVolumeInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<WarpVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using NewHorizons.Components.Volumes;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using OWML.Utils;
|
||||
using UnityEngine;
|
||||
|
||||
@ -7,7 +7,7 @@ namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
internal static class CreditsVolumeBuilder
|
||||
{
|
||||
public static LoadCreditsVolume Make(GameObject planetGO, Sector sector, VolumesModule.LoadCreditsVolumeInfo info)
|
||||
public static LoadCreditsVolume Make(GameObject planetGO, Sector sector, LoadCreditsVolumeInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<LoadCreditsVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using OWML.Utils;
|
||||
using UnityEngine;
|
||||
|
||||
@ -6,7 +6,7 @@ namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class DestructionVolumeBuilder
|
||||
{
|
||||
public static DestructionVolume Make(GameObject planetGO, Sector sector, VolumesModule.DestructionVolumeInfo info)
|
||||
public static DestructionVolume Make(GameObject planetGO, Sector sector, DestructionVolumeInfo info)
|
||||
{
|
||||
var volume = VanishVolumeBuilder.Make<DestructionVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
using NewHorizons.Components.Volumes;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using OWML.Utils;
|
||||
using UnityEngine;
|
||||
|
||||
@ -7,9 +7,9 @@ namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class FluidVolumeBuilder
|
||||
{
|
||||
public static FluidVolume Make(GameObject planetGO, Sector sector, VolumesModule.FluidVolumeInfo info)
|
||||
public static FluidVolume Make(GameObject planetGO, Sector sector, FluidVolumeInfo info)
|
||||
{
|
||||
var type = EnumUtils.Parse<FluidVolume.Type>(info.type.ToString(), FluidVolume.Type.NONE);
|
||||
var type = EnumUtils.Parse(info.type.ToString(), FluidVolume.Type.NONE);
|
||||
FluidVolume volume = null;
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@ -1,19 +1,16 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using OWML.Common;
|
||||
using OWML.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class HazardVolumeBuilder
|
||||
{
|
||||
public static HazardVolume Make(GameObject planetGO, Sector sector, OWRigidbody owrb, VolumesModule.HazardVolumeInfo info, IModBehaviour mod)
|
||||
public static HazardVolume Make(GameObject planetGO, Sector sector, OWRigidbody owrb, HazardVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var go = GeneralPropBuilder.MakeNew("HazardVolume", planetGO, sector, info);
|
||||
go.layer = Layer.BasicEffectVolume;
|
||||
@ -25,15 +22,15 @@ namespace NewHorizons.Builder.Volumes
|
||||
owTriggerVolume._shape = shape;
|
||||
|
||||
HazardVolume hazardVolume = null;
|
||||
if (info.type == VolumesModule.HazardVolumeInfo.HazardType.RIVERHEAT)
|
||||
if (info.type == HazardVolumeInfo.HazardType.RIVERHEAT)
|
||||
{
|
||||
hazardVolume = go.AddComponent<RiverHeatHazardVolume>();
|
||||
}
|
||||
else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.HEAT)
|
||||
else if (info.type == HazardVolumeInfo.HazardType.HEAT)
|
||||
{
|
||||
hazardVolume = go.AddComponent<HeatHazardVolume>();
|
||||
}
|
||||
else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.DARKMATTER)
|
||||
else if (info.type == HazardVolumeInfo.HazardType.DARKMATTER)
|
||||
{
|
||||
hazardVolume = go.AddComponent<DarkMatterVolume>();
|
||||
var visorFrostEffectVolume = go.AddComponent<VisorFrostEffectVolume>();
|
||||
@ -61,7 +58,7 @@ namespace NewHorizons.Builder.Volumes
|
||||
submerge._fluidDetector = detector;
|
||||
}
|
||||
}
|
||||
else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.ELECTRICITY)
|
||||
else if (info.type == HazardVolumeInfo.HazardType.ELECTRICITY)
|
||||
{
|
||||
var electricityVolume = go.AddComponent<ElectricityVolume>();
|
||||
electricityVolume._shockAudioPool = new OWAudioSource[0];
|
||||
|
||||
@ -1,22 +1,15 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.Utility;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using NHNotificationVolume = NewHorizons.Components.Volumes.NotificationVolume;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class NotificationVolumeBuilder
|
||||
{
|
||||
public static NHNotificationVolume Make(GameObject planetGO, Sector sector, VolumesModule.NotificationVolumeInfo info, IModBehaviour mod)
|
||||
public static NHNotificationVolume Make(GameObject planetGO, Sector sector, NotificationVolumeInfo info, IModBehaviour mod)
|
||||
{
|
||||
var go = GeneralPropBuilder.MakeNew("NotificationVolume", planetGO, sector, info);
|
||||
go.layer = Layer.BasicEffectVolume;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class OxygenVolumeBuilder
|
||||
{
|
||||
public static OxygenVolume Make(GameObject planetGO, Sector sector, VolumesModule.OxygenVolumeInfo info)
|
||||
public static OxygenVolume Make(GameObject planetGO, Sector sector, OxygenVolumeInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<OxygenVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class PriorityVolumeBuilder
|
||||
{
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info) where TVolume : PriorityVolume
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, PriorityVolumeInfo info) where TVolume : PriorityVolume
|
||||
{
|
||||
var volume = VolumeBuilder.Make<TVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes.Rulesets
|
||||
{
|
||||
public static class PlayerImpactRulesetBuilder
|
||||
{
|
||||
public static PlayerImpactRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.PlayerImpactRulesetInfo info)
|
||||
public static PlayerImpactRuleset Make(GameObject planetGO, Sector sector, RulesetModule.PlayerImpactRulesetInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<PlayerImpactRuleset>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes.Rulesets
|
||||
{
|
||||
public static class ProbeRulesetBuilder
|
||||
{
|
||||
public static ProbeRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.ProbeRulesetInfo info)
|
||||
public static ProbeRuleset Make(GameObject planetGO, Sector sector, RulesetModule.ProbeRulesetInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<ProbeRuleset>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes.Rulesets
|
||||
{
|
||||
public static class ThrustRulesetBuilder
|
||||
{
|
||||
public static ThrustRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.ThrustRulesetInfo info)
|
||||
public static ThrustRuleset Make(GameObject planetGO, Sector sector, RulesetModule.ThrustRulesetInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<ThrustRuleset>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class SpeedTrapVolumeBuilder
|
||||
{
|
||||
public static SpeedTrapVolume Make(GameObject planetGO, Sector sector, VolumesModule.SpeedTrapVolumeInfo info)
|
||||
public static SpeedTrapVolume Make(GameObject planetGO, Sector sector, SpeedTrapVolumeInfo info)
|
||||
{
|
||||
var volume = VolumeBuilder.Make<SpeedTrapVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class VanishVolumeBuilder
|
||||
{
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VolumesModule.VanishVolumeInfo info) where TVolume : VanishVolume
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VanishVolumeInfo info) where TVolume : VanishVolume
|
||||
{
|
||||
var go = GeneralPropBuilder.MakeNew(typeof(TVolume).Name, planetGO, sector, info);
|
||||
go.layer = Layer.BasicEffectVolume;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes.VisorEffects
|
||||
{
|
||||
public static class VisorFrostEffectVolumeBuilder
|
||||
{
|
||||
public static VisorFrostEffectVolume Make(GameObject planetGO, Sector sector, VolumesModule.VisorEffectModule.FrostEffectVolumeInfo info)
|
||||
public static VisorFrostEffectVolume Make(GameObject planetGO, Sector sector, VisorEffectModule.FrostEffectVolumeInfo info)
|
||||
{
|
||||
var volume = PriorityVolumeBuilder.Make<VisorFrostEffectVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes.VisorEffects
|
||||
{
|
||||
public static class VisorRainEffectVolumeBuilder
|
||||
{
|
||||
public static VisorRainEffectVolume Make(GameObject planetGO, Sector sector, VolumesModule.VisorEffectModule.RainEffectVolumeInfo info)
|
||||
public static VisorRainEffectVolume Make(GameObject planetGO, Sector sector, VisorEffectModule.RainEffectVolumeInfo info)
|
||||
{
|
||||
var volume = PriorityVolumeBuilder.Make<VisorRainEffectVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.Components;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using UnityEngine;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class VolumeBuilder
|
||||
{
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VolumesModule.VolumeInfo info) where TVolume : MonoBehaviour //Could be BaseVolume but I need to create vanilla volumes too.
|
||||
public static TVolume Make<TVolume>(GameObject planetGO, Sector sector, VolumeInfo info) where TVolume : MonoBehaviour //Could be BaseVolume but I need to create vanilla volumes too.
|
||||
{
|
||||
var go = GeneralPropBuilder.MakeNew(typeof(TVolume).Name, planetGO, sector, info);
|
||||
go.layer = Layer.BasicEffectVolume;
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Builder.Volumes
|
||||
{
|
||||
public static class ZeroGVolumeBuilder
|
||||
{
|
||||
public static ZeroGVolume Make(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info)
|
||||
public static ZeroGVolume Make(GameObject planetGO, Sector sector, PriorityVolumeInfo info)
|
||||
{
|
||||
var volume = PriorityVolumeBuilder.Make<ZeroGVolume>(planetGO, sector, info);
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Handlers;
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
@ -8,7 +8,7 @@ namespace NewHorizons.Components.Volumes
|
||||
{
|
||||
internal class LoadCreditsVolume : BaseVolume
|
||||
{
|
||||
public VolumesModule.LoadCreditsVolumeInfo.CreditsType creditsType = VolumesModule.LoadCreditsVolumeInfo.CreditsType.Fast;
|
||||
public CreditsType creditsType = CreditsType.Fast;
|
||||
|
||||
public string gameOverText;
|
||||
public DeathType deathType = DeathType.Default;
|
||||
@ -69,13 +69,13 @@ namespace NewHorizons.Components.Volumes
|
||||
|
||||
switch (creditsType)
|
||||
{
|
||||
case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Fast:
|
||||
case CreditsType.Fast:
|
||||
LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack);
|
||||
break;
|
||||
case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Final:
|
||||
case CreditsType.Final:
|
||||
LoadManager.LoadScene(OWScene.Credits_Final, LoadManager.FadeType.ToBlack);
|
||||
break;
|
||||
case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Kazoo:
|
||||
case CreditsType.Kazoo:
|
||||
TimelineObliterationController.s_hasRealityEnded = true;
|
||||
LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack);
|
||||
break;
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.Handlers;
|
||||
using OWML.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NewHorizons.Components.Volumes
|
||||
@ -16,7 +14,7 @@ namespace NewHorizons.Components.Volumes
|
||||
|
||||
public void SetPinned(bool pin) => _pin = pin;
|
||||
|
||||
public void SetTarget(External.Modules.VolumesModule.NotificationVolumeInfo.NotificationTarget target) => SetTarget(EnumUtils.Parse(target.ToString(), NotificationTarget.All));
|
||||
public void SetTarget(NotificationVolumeInfo.NotificationTarget target) => SetTarget(EnumUtils.Parse(target.ToString(), NotificationTarget.All));
|
||||
|
||||
public void SetTarget(NotificationTarget target) => _target = target;
|
||||
|
||||
|
||||
31
NewHorizons/External/Configs/PlanetConfig.cs
vendored
31
NewHorizons/External/Configs/PlanetConfig.cs
vendored
@ -1,6 +1,9 @@
|
||||
using Epic.OnlineServices.Presence;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.Props.Dialogue;
|
||||
using NewHorizons.External.Modules.Props.Quantum;
|
||||
using NewHorizons.External.Modules.VariableSize;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -213,21 +216,21 @@ namespace NewHorizons.External.Configs
|
||||
// if detail.quantumGroupID != null, there exists a quantum group with that id
|
||||
if (Props?.quantumGroups != null && Props?.details != null)
|
||||
{
|
||||
Dictionary<string, PropModule.QuantumGroupInfo> existingGroups = new Dictionary<string, PropModule.QuantumGroupInfo>();
|
||||
Dictionary<string, QuantumGroupInfo> existingGroups = new Dictionary<string, QuantumGroupInfo>();
|
||||
foreach (var quantumGroup in Props.quantumGroups)
|
||||
{
|
||||
if (existingGroups.ContainsKey(quantumGroup.id)) { Logger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; }
|
||||
if (existingGroups.ContainsKey(quantumGroup.id)) { Logger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = QuantumGroupType.FailedValidation; }
|
||||
|
||||
existingGroups[quantumGroup.id] = quantumGroup;
|
||||
if (quantumGroup.type == PropModule.QuantumGroupType.Sockets)
|
||||
if (quantumGroup.type == QuantumGroupType.Sockets)
|
||||
{
|
||||
if (quantumGroup.sockets?.Length == 0) { Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; }
|
||||
if (quantumGroup.sockets?.Length == 0) { Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = QuantumGroupType.FailedValidation; }
|
||||
else
|
||||
{
|
||||
foreach (var socket in quantumGroup.sockets)
|
||||
{
|
||||
if (socket.rotation == null) socket.rotation = UnityEngine.Vector3.zero;
|
||||
if (socket.position == null) { Logger.LogError($"quantumGroup {quantumGroup.id} has a socket without a position."); quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; }
|
||||
if (socket.position == null) { Logger.LogError($"quantumGroup {quantumGroup.id} has a socket without a position."); quantumGroup.type = QuantumGroupType.FailedValidation; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -243,10 +246,10 @@ namespace NewHorizons.External.Configs
|
||||
|
||||
foreach (var quantumGroup in Props.quantumGroups)
|
||||
{
|
||||
if (quantumGroup.type == PropModule.QuantumGroupType.Sockets && existingGroupsPropCounts.GetValueOrDefault(quantumGroup.id) >= quantumGroup.sockets?.Length)
|
||||
if (quantumGroup.type == QuantumGroupType.Sockets && existingGroupsPropCounts.GetValueOrDefault(quantumGroup.id) >= quantumGroup.sockets?.Length)
|
||||
{
|
||||
Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" and has more props than sockets.");
|
||||
quantumGroup.type = PropModule.QuantumGroupType.FailedValidation;
|
||||
quantumGroup.type = QuantumGroupType.FailedValidation;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -329,19 +332,19 @@ namespace NewHorizons.External.Configs
|
||||
if (Props?.tornados != null)
|
||||
foreach (var tornado in Props.tornados)
|
||||
if (tornado.downwards)
|
||||
tornado.type = PropModule.TornadoInfo.TornadoType.Downwards;
|
||||
tornado.type = TornadoInfo.TornadoType.Downwards;
|
||||
|
||||
if (Props?.audioVolumes != null)
|
||||
{
|
||||
if (Volumes == null) Volumes = new VolumesModule();
|
||||
if (Volumes.audioVolumes == null) Volumes.audioVolumes = new VolumesModule.AudioVolumeInfo[0];
|
||||
if (Volumes.audioVolumes == null) Volumes.audioVolumes = new AudioVolumeInfo[0];
|
||||
Volumes.audioVolumes = Volumes.audioVolumes.Concat(Props.audioVolumes).ToArray();
|
||||
}
|
||||
|
||||
if (Props?.reveal != null)
|
||||
{
|
||||
if (Volumes == null) Volumes = new VolumesModule();
|
||||
if (Volumes.revealVolumes == null) Volumes.revealVolumes = new VolumesModule.RevealVolumeInfo[0];
|
||||
if (Volumes.revealVolumes == null) Volumes.revealVolumes = new RevealVolumeInfo[0];
|
||||
Volumes.revealVolumes = Volumes.revealVolumes.Concat(Props.reveal).ToArray();
|
||||
}
|
||||
|
||||
@ -450,9 +453,9 @@ namespace NewHorizons.External.Configs
|
||||
if (Base.zeroGravityRadius != 0f)
|
||||
{
|
||||
Volumes ??= new VolumesModule();
|
||||
Volumes.zeroGravityVolumes ??= new VolumesModule.PriorityVolumeInfo[0];
|
||||
Volumes.zeroGravityVolumes ??= new PriorityVolumeInfo[0];
|
||||
|
||||
Volumes.zeroGravityVolumes = Volumes.zeroGravityVolumes.Append(new VolumesModule.PriorityVolumeInfo()
|
||||
Volumes.zeroGravityVolumes = Volumes.zeroGravityVolumes.Append(new PriorityVolumeInfo()
|
||||
{
|
||||
priority = 1,
|
||||
rename = "ZeroGVolume",
|
||||
@ -493,7 +496,7 @@ namespace NewHorizons.External.Configs
|
||||
{
|
||||
if (dialogue.remoteTrigger == null && (dialogue.remoteTriggerPosition != null || dialogue.remoteTriggerRadius != 0))
|
||||
{
|
||||
dialogue.remoteTrigger = new PropModule.DialogueInfo.RemoteTriggerInfo
|
||||
dialogue.remoteTrigger = new RemoteTriggerInfo
|
||||
{
|
||||
position = dialogue.remoteTriggerPosition,
|
||||
radius = dialogue.remoteTriggerRadius,
|
||||
|
||||
27
NewHorizons/External/Modules/Audio/AudioMixerTrackName.cs
vendored
Normal file
27
NewHorizons/External/Modules/Audio/AudioMixerTrackName.cs
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Audio
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum AudioMixerTrackName
|
||||
{
|
||||
[EnumMember(Value = @"undefined")] Undefined = 0,
|
||||
[EnumMember(Value = @"menu")] Menu = 1,
|
||||
[EnumMember(Value = @"music")] Music = 2,
|
||||
[EnumMember(Value = @"environment")] Environment = 4,
|
||||
[EnumMember(Value = @"environmentUnfiltered")] Environment_Unfiltered = 5,
|
||||
[EnumMember(Value = @"endTimesSfx")] EndTimes_SFX = 8,
|
||||
[EnumMember(Value = @"signal")] Signal = 16,
|
||||
[EnumMember(Value = @"death")] Death = 32,
|
||||
[EnumMember(Value = @"player")] Player = 64,
|
||||
[EnumMember(Value = @"playerExternal")] Player_External = 65,
|
||||
[EnumMember(Value = @"ship")] Ship = 128,
|
||||
[EnumMember(Value = @"map")] Map = 256,
|
||||
[EnumMember(Value = @"endTimesMusic")] EndTimes_Music = 512,
|
||||
[EnumMember(Value = @"muffleWhileRafting")] MuffleWhileRafting = 1024,
|
||||
[EnumMember(Value = @"muffleIndoors")] MuffleIndoors = 2048,
|
||||
[EnumMember(Value = @"slideReelMusic")] SlideReelMusic = 4096,
|
||||
}
|
||||
}
|
||||
14
NewHorizons/External/Modules/Audio/ClipSelectionType.cs
vendored
Normal file
14
NewHorizons/External/Modules/Audio/ClipSelectionType.cs
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Audio
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ClipSelectionType
|
||||
{
|
||||
[EnumMember(Value = @"random")] RANDOM,
|
||||
[EnumMember(Value = @"sequential")] SEQUENTIAL,
|
||||
[EnumMember(Value = @"manual")] MANUAL
|
||||
}
|
||||
}
|
||||
822
NewHorizons/External/Modules/PropModule.cs
vendored
822
NewHorizons/External/Modules/PropModule.cs
vendored
@ -1,13 +1,14 @@
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.External.Modules.Props.Dialogue;
|
||||
using NewHorizons.External.Modules.Props.EchoesOfTheEye;
|
||||
using NewHorizons.External.Modules.Props.Quantum;
|
||||
using NewHorizons.External.Modules.Props.Remote;
|
||||
using NewHorizons.External.Modules.TranslatorText;
|
||||
using NewHorizons.External.Modules.VariableSize;
|
||||
using NewHorizons.External.Modules.Volumes;
|
||||
using NewHorizons.External.Modules.WarpPad;
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules
|
||||
{
|
||||
@ -105,813 +106,8 @@ namespace NewHorizons.External.Modules
|
||||
/// </summary>
|
||||
public NomaiWarpTransmitterInfo[] warpTransmitters;
|
||||
|
||||
[Obsolete("reveal is deprecated. Use Volumes->revealVolumes instead.")] public VolumesModule.RevealVolumeInfo[] reveal;
|
||||
[Obsolete("reveal is deprecated. Use Volumes->revealVolumes instead.")] public RevealVolumeInfo[] reveal;
|
||||
|
||||
[Obsolete("audioVolumes is deprecated. Use Volumes->audioVolumes instead.")] public VolumesModule.AudioVolumeInfo[] audioVolumes;
|
||||
|
||||
[JsonObject]
|
||||
public class ScatterInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Relative filepath to an asset-bundle
|
||||
/// </summary>
|
||||
public string assetBundle;
|
||||
|
||||
/// <summary>
|
||||
/// Number of props to scatter
|
||||
/// </summary>
|
||||
public int count;
|
||||
|
||||
/// <summary>
|
||||
/// Offset this prop once it is placed
|
||||
/// </summary>
|
||||
public MVector3 offset;
|
||||
|
||||
/// <summary>
|
||||
/// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle
|
||||
/// </summary>
|
||||
public string path;
|
||||
|
||||
/// <summary>
|
||||
/// Rotate this prop once it is placed
|
||||
/// </summary>
|
||||
public MVector3 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Scale this prop once it is placed
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float scale = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale each axis of the prop. Overrides `scale`.
|
||||
/// </summary>
|
||||
public MVector3 stretch;
|
||||
|
||||
/// <summary>
|
||||
/// The number used as entropy for scattering the props
|
||||
/// </summary>
|
||||
public int seed;
|
||||
|
||||
/// <summary>
|
||||
/// The lowest height that these object will be placed at (only relevant if there's a heightmap)
|
||||
/// </summary>
|
||||
public float? minHeight;
|
||||
|
||||
/// <summary>
|
||||
/// The highest height that these objects will be placed at (only relevant if there's a heightmap)
|
||||
/// </summary>
|
||||
public float? maxHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Should we try to prevent overlap between the scattered details? True by default. If it's affecting load times turn it off.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool preventOverlap = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should this detail stay loaded even if you're outside the sector (good for very large props)
|
||||
/// </summary>
|
||||
public bool keepLoaded;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DetailInfo : GeneralPropInfo
|
||||
{
|
||||
public DetailInfo() { }
|
||||
|
||||
public DetailInfo(GeneralPointPropInfo info)
|
||||
{
|
||||
JsonConvert.PopulateObject(JsonConvert.SerializeObject(info), this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relative filepath to an asset-bundle to load the prefab defined in `path` from
|
||||
/// </summary>
|
||||
public string assetBundle;
|
||||
|
||||
/// <summary>
|
||||
/// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle
|
||||
/// </summary>
|
||||
public string path;
|
||||
|
||||
/// <summary>
|
||||
/// A list of children to remove from this detail
|
||||
/// </summary>
|
||||
public string[] removeChildren;
|
||||
|
||||
/// <summary>
|
||||
/// Do we reset all the components on this object? Useful for certain props that have dialogue components attached to
|
||||
/// them.
|
||||
/// </summary>
|
||||
public bool removeComponents;
|
||||
|
||||
/// <summary>
|
||||
/// Scale the prop
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float scale = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale each axis of the prop. Overrides `scale`.
|
||||
/// </summary>
|
||||
public MVector3 stretch;
|
||||
|
||||
/// <summary>
|
||||
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
|
||||
/// </summary>
|
||||
public string quantumGroupID;
|
||||
|
||||
/// <summary>
|
||||
/// Should this detail stay loaded even if you're outside the sector (good for very large props)
|
||||
/// </summary>
|
||||
public bool keepLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// Should this object dynamically move around?
|
||||
/// This tries to make all mesh colliders convex, as well as adding a sphere collider in case the detail has no others.
|
||||
/// </summary>
|
||||
public bool hasPhysics;
|
||||
|
||||
/// <summary>
|
||||
/// The mass of the physics object.
|
||||
/// Most pushable props use the default value, which matches the player mass.
|
||||
/// </summary>
|
||||
[DefaultValue(0.001f)] public float physicsMass = 0.001f;
|
||||
|
||||
/// <summary>
|
||||
/// The radius that the added sphere collider will use for physics collision.
|
||||
/// If there's already good colliders on the detail, you can make this 0.
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float physicsRadius = 1f;
|
||||
|
||||
[Obsolete("alignToNormal is deprecated. Use alignRadial instead")] public bool alignToNormal;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RaftInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Acceleration of the raft. Default acceleration is 5.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)] public float acceleration = 5f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class GeyserInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Vertical offset of the geyser. From 0, the bubbles start at a height of 10, the shaft at 67, and the spout at 97.5.
|
||||
/// </summary>
|
||||
[DefaultValue(-97.5f)] public float offset = -97.5f;
|
||||
|
||||
/// <summary>
|
||||
/// Force of the geyser on objects
|
||||
/// </summary>
|
||||
[DefaultValue(55f)] public float force = 55f;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds eruptions last for
|
||||
/// </summary>
|
||||
[DefaultValue(10f)] public float activeDuration = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds between eruptions
|
||||
/// </summary>
|
||||
[DefaultValue(19f)] public float inactiveDuration = 19f;
|
||||
|
||||
/// <summary>
|
||||
/// Color of the geyser. Alpha sets the particle density.
|
||||
/// </summary>
|
||||
public MColor tint;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the individual particle systems of the geyser
|
||||
/// </summary>
|
||||
public bool disableBubbles, disableShaft, disableSpout;
|
||||
|
||||
/// <summary>
|
||||
/// Loudness of the geyser
|
||||
/// </summary>
|
||||
[DefaultValue(0.7f)] public float volume = 0.7f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class TornadoInfo : GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum TornadoType
|
||||
{
|
||||
[EnumMember(Value = @"upwards")] Upwards = 0,
|
||||
|
||||
[EnumMember(Value = @"downwards")] Downwards = 1,
|
||||
|
||||
[EnumMember(Value = @"hurricane")] Hurricane = 2
|
||||
}
|
||||
|
||||
[Obsolete("Downwards is deprecated. Use Type instead.")] public bool downwards;
|
||||
|
||||
/// <summary>
|
||||
/// Alternative to setting the position. Will choose a random place at this elevation.
|
||||
/// </summary>
|
||||
public float elevation;
|
||||
|
||||
/// <summary>
|
||||
/// The height of this tornado.
|
||||
/// </summary>
|
||||
[DefaultValue(30f)] public float height = 30f;
|
||||
|
||||
/// <summary>
|
||||
/// The colour of the tornado.
|
||||
/// </summary>
|
||||
public MColor tint;
|
||||
|
||||
/// <summary>
|
||||
/// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction.
|
||||
/// </summary>
|
||||
[DefaultValue("upwards")] public TornadoType type = TornadoType.Upwards;
|
||||
|
||||
/// <summary>
|
||||
/// Angular distance from the starting position that it will wander, in terms of the angle around the x-axis.
|
||||
/// </summary>
|
||||
[DefaultValue(45f)] public float wanderDegreesX = 45f;
|
||||
|
||||
/// <summary>
|
||||
/// Angular distance from the starting position that it will wander, in terms of the angle around the z-axis.
|
||||
/// </summary>
|
||||
[DefaultValue(45f)] public float wanderDegreesZ = 45f;
|
||||
|
||||
/// <summary>
|
||||
/// The rate at which the tornado will wander around the planet. Set to 0 for it to be stationary. Should be around
|
||||
/// 0.1.
|
||||
/// </summary>
|
||||
public float wanderRate;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum distance at which you'll hear the sounds of the cyclone. If not set it will scale relative to the size of the cyclone.
|
||||
/// </summary>
|
||||
public float audioDistance;
|
||||
|
||||
/// <summary>
|
||||
/// Fluid type for sounds/effects when colliding with this tornado.
|
||||
/// </summary>
|
||||
[DefaultValue("cloud")] public FluidType fluidType = FluidType.Cloud;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VolcanoInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The colour of the meteor's lava.
|
||||
/// </summary>
|
||||
public MColor lavaTint;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time between meteor launches.
|
||||
/// </summary>
|
||||
[DefaultValue(20f)]
|
||||
public float maxInterval = 20f;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum random speed at which meteors are launched.
|
||||
/// </summary>
|
||||
[DefaultValue(150f)]
|
||||
public float maxLaunchSpeed = 150f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum time between meteor launches.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)]
|
||||
public float minInterval = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum random speed at which meteors are launched.
|
||||
/// </summary>
|
||||
[DefaultValue(50f)]
|
||||
public float minLaunchSpeed = 50f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale of the meteors.
|
||||
/// </summary>
|
||||
public float scale = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The colour of the meteor's stone.
|
||||
/// </summary>
|
||||
public MColor stoneTint;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DialogueInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Prevents the dialogue from being created after a specific persistent condition is set. Useful for remote dialogue
|
||||
/// triggers that you want to have happen only once.
|
||||
/// </summary>
|
||||
public string blockAfterPersistentCondition;
|
||||
|
||||
/// <summary>
|
||||
/// If a pathToAnimController is supplied, if you are within this distance the character will look at you. If it is set
|
||||
/// to 0, they will only look at you when spoken to.
|
||||
/// </summary>
|
||||
public float lookAtRadius;
|
||||
|
||||
/// <summary>
|
||||
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
||||
/// CharacterAnimController, TravelerController, TravelerEyeController (eye of the universe), FacePlayerWhenTalking, or SolanumAnimController.
|
||||
///
|
||||
/// If none of those components are present it will add a FacePlayerWhenTalking component.
|
||||
/// </summary>
|
||||
public string pathToAnimController;
|
||||
|
||||
/// <summary>
|
||||
/// Radius of the spherical collision volume where you get the "talk to" prompt when looking at. If you use a
|
||||
/// remoteTrigger, you can set this to 0 to make the dialogue only trigger remotely.
|
||||
/// </summary>
|
||||
public float radius = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Distance from radius the prompt appears
|
||||
/// </summary>
|
||||
[DefaultValue(2f)] public float range = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to trigger dialogue from a distance when you walk into an area.
|
||||
/// </summary>
|
||||
public RemoteTriggerInfo remoteTrigger;
|
||||
|
||||
[Obsolete("remoteTriggerPosition is deprecated. Use remoteTrigger.position instead")] public MVector3 remoteTriggerPosition;
|
||||
[Obsolete("remoteTriggerRadius is deprecated. Use remoteTrigger.radius instead")] public float remoteTriggerRadius;
|
||||
[Obsolete("remoteTriggerPrereqCondition is deprecated. Use remoteTrigger.prereqCondition instead")] public string remoteTriggerPrereqCondition;
|
||||
|
||||
/// <summary>
|
||||
/// Relative path to the xml file defining the dialogue.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
|
||||
/// <summary>
|
||||
/// What type of flashlight toggle to do when dialogue is interacted with
|
||||
/// </summary>
|
||||
[DefaultValue("none")] public FlashlightToggle flashlightToggle = FlashlightToggle.None;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum FlashlightToggle
|
||||
{
|
||||
[EnumMember(Value = @"none")] None = -1,
|
||||
[EnumMember(Value = @"turnOff")] TurnOff = 0,
|
||||
[EnumMember(Value = @"turnOffThenOn")] TurnOffThenOn = 1,
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RemoteTriggerInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The radius of the remote trigger volume.
|
||||
/// </summary>
|
||||
public float radius;
|
||||
/// <summary>
|
||||
/// This condition must be met for the remote trigger volume to trigger.
|
||||
/// </summary>
|
||||
public string prereqCondition;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class EntryLocationInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this location is cloaked
|
||||
/// </summary>
|
||||
public bool cloaked;
|
||||
|
||||
/// <summary>
|
||||
/// ID of the entry this location relates to
|
||||
/// </summary>
|
||||
public string id;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class TranslatorTextInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed;
|
||||
|
||||
/// <summary>
|
||||
/// Only for wall text. Aligns wall text to face towards the given direction, with 'up' oriented relative to its current rotation or alignment.
|
||||
/// </summary>
|
||||
public MVector3 normal;
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall;
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextType
|
||||
{
|
||||
[EnumMember(Value = @"wall")] Wall = 0,
|
||||
|
||||
[EnumMember(Value = @"scroll")] Scroll = 1,
|
||||
|
||||
[EnumMember(Value = @"computer")] Computer = 2,
|
||||
|
||||
[EnumMember(Value = @"cairn")] Cairn = 3,
|
||||
|
||||
[EnumMember(Value = @"recorder")] Recorder = 4,
|
||||
|
||||
[EnumMember(Value = @"preCrashRecorder")] PreCrashRecorder = 5,
|
||||
|
||||
[EnumMember(Value = @"preCrashComputer")] PreCrashComputer = 6,
|
||||
|
||||
[EnumMember(Value = @"trailmarker")] Trailmarker = 7,
|
||||
|
||||
[EnumMember(Value = @"cairnVariant")] CairnVariant = 8,
|
||||
|
||||
[EnumMember(Value = @"whiteboard")] Whiteboard = 9,
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextLocation
|
||||
{
|
||||
[EnumMember(Value = @"unspecified")] UNSPECIFIED = 0,
|
||||
|
||||
[EnumMember(Value = @"a")] A = 1,
|
||||
|
||||
[EnumMember(Value = @"b")] B = 2
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class NomaiTextInfo : GeneralPointPropInfo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The normal vector for this object. Used for writing on walls and positioning computers.
|
||||
/// </summary>
|
||||
public MVector3 normal;
|
||||
|
||||
/// <summary>
|
||||
/// The euler angle rotation of this object. Not required if setting the normal. Computers and cairns will orient
|
||||
/// themselves to the surface of the planet automatically.
|
||||
/// </summary>
|
||||
public MVector3 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed; // For randomizing arcs
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall;
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class NomaiTextArcInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextArcType
|
||||
{
|
||||
[EnumMember(Value = @"adult")] Adult = 0,
|
||||
|
||||
[EnumMember(Value = @"child")] Child = 1,
|
||||
|
||||
[EnumMember(Value = @"stranger")] Stranger = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type of text to display.
|
||||
/// </summary>
|
||||
[DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult;
|
||||
|
||||
/// <summary>
|
||||
/// The local position of this object on the wall. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public MVector2 position;
|
||||
|
||||
/// <summary>
|
||||
/// The z euler angle for this arc. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
[Range(0f, 360f)] public float? zRotation;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to flip the spiral from left-curling to right-curling or vice versa. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public bool? mirror;
|
||||
|
||||
/// <summary>
|
||||
/// Which variation of the chosen type to place. If not specified, a random variation will be selected based on the seed provided in the parent module.
|
||||
/// </summary>
|
||||
[Obsolete("only used in old nomai text")]
|
||||
[DefaultValue(-1)] public int variation = -1;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProjectionInfo : GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum SlideShowType
|
||||
{
|
||||
[EnumMember(Value = @"slideReel")] SlideReel = 0,
|
||||
|
||||
[EnumMember(Value = @"autoProjector")] AutoProjector = 1,
|
||||
|
||||
[EnumMember(Value = @"visionTorchTarget")] VisionTorchTarget = 2,
|
||||
|
||||
[EnumMember(Value = @"standingVisionTorch")] StandingVisionTorch = 3,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ship log facts revealed after finishing this slide reel.
|
||||
/// </summary>
|
||||
public string[] reveals;
|
||||
|
||||
/// <summary>
|
||||
/// The ship log facts that make the reel play when they are displayed in the computer (by selecting entries or arrows).
|
||||
/// You should probably include facts from `reveals` here.
|
||||
/// If you only specify a rumor fact, then it would only play in its ship log entry if this has revealed only
|
||||
/// rumor facts because an entry with revealed explore facts doesn't display rumor facts.
|
||||
/// </summary>
|
||||
public string[] playWithShipLogFacts;
|
||||
|
||||
/// <summary>
|
||||
/// The list of slides for this object.
|
||||
/// </summary>
|
||||
public SlideInfo[] slides;
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("slideReel")] public SlideShowType type = SlideShowType.SlideReel;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class SlideInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Ambient light colour when viewing this slide.
|
||||
/// </summary>
|
||||
public MColor ambientLightColor;
|
||||
|
||||
|
||||
// SlideAmbientLightModule
|
||||
|
||||
/// <summary>
|
||||
/// Ambient light intensity when viewing this slide.
|
||||
/// </summary>
|
||||
public float ambientLightIntensity;
|
||||
|
||||
/// <summary>
|
||||
/// Ambient light range when viewing this slide.
|
||||
/// </summary>
|
||||
public float ambientLightRange;
|
||||
|
||||
// SlideBackdropAudioModule
|
||||
|
||||
/// <summary>
|
||||
/// The name of the AudioClip that will continuously play while watching these slides
|
||||
/// </summary>
|
||||
public string backdropAudio;
|
||||
|
||||
/// <summary>
|
||||
/// The time to fade into the backdrop audio
|
||||
/// </summary>
|
||||
public float backdropFadeTime;
|
||||
|
||||
// SlideBeatAudioModule
|
||||
|
||||
/// <summary>
|
||||
/// The name of the AudioClip for a one-shot sound when opening the slide.
|
||||
/// </summary>
|
||||
public string beatAudio;
|
||||
|
||||
/// <summary>
|
||||
/// The time delay until the one-shot audio
|
||||
/// </summary>
|
||||
public float beatDelay;
|
||||
|
||||
|
||||
// SlideBlackFrameModule
|
||||
|
||||
/// <summary>
|
||||
/// Before viewing this slide, there will be a black frame for this many seconds.
|
||||
/// </summary>
|
||||
public float blackFrameDuration;
|
||||
|
||||
/// <summary>
|
||||
/// The path to the image file for this slide.
|
||||
/// </summary>
|
||||
public string imagePath;
|
||||
|
||||
|
||||
// SlidePlayTimeModule
|
||||
|
||||
/// <summary>
|
||||
/// Play-time duration for auto-projector slides.
|
||||
/// </summary>
|
||||
public float playTimeDuration;
|
||||
|
||||
|
||||
// SlideShipLogEntryModule
|
||||
|
||||
/// <summary>
|
||||
/// Ship log fact revealed when viewing this slide
|
||||
/// </summary>
|
||||
public string reveal;
|
||||
|
||||
/// <summary>
|
||||
/// Spotlight intensity modifier when viewing this slide.
|
||||
/// </summary>
|
||||
public float spotIntensityMod;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum QuantumGroupType
|
||||
{
|
||||
[EnumMember(Value = @"sockets")] Sockets = 0,
|
||||
|
||||
[EnumMember(Value = @"states")] States = 1,
|
||||
|
||||
FailedValidation = 10
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class QuantumGroupInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// What type of group this is: does it define a list of states a single quantum object could take or a list of sockets one or more quantum objects could share?
|
||||
/// </summary>
|
||||
public QuantumGroupType type;
|
||||
|
||||
/// <summary>
|
||||
/// A unique string used by props (that are marked as quantum) use to refer back to this group
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Only required if type is `sockets`. This lists all the possible locations for any props assigned to this group.
|
||||
/// </summary>
|
||||
public QuantumSocketInfo[] sockets;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states`. If this is true, then the first prop made part of this group will be used to construct a visibility box for an empty game object, which will be considered one of the states.
|
||||
/// </summary>
|
||||
public bool hasEmptyState;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states`. If this is true, then the states will be presented in order, rather than in a random order
|
||||
/// </summary>
|
||||
public bool sequential;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states` and `sequential` is true. If this is false, then after the last state has appeared, the object will no longer change state
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool loop = true;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class QuantumSocketInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The probability any props that are part of this group will occupy this socket
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float probability = 1f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RemoteInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The unique remote id
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Icon that the will show on the stone, pedastal of the whiteboard, and pedastal of the platform.
|
||||
/// </summary>
|
||||
public string decalPath;
|
||||
|
||||
/// <summary>
|
||||
/// Whiteboard that the stones can put text onto
|
||||
/// </summary>
|
||||
public WhiteboardInfo whiteboard;
|
||||
|
||||
/// <summary>
|
||||
/// Camera platform that the stones can project to and from
|
||||
/// </summary>
|
||||
public PlatformInfo platform;
|
||||
|
||||
/// <summary>
|
||||
/// Projection stones
|
||||
/// </summary>
|
||||
public StoneInfo[] stones;
|
||||
|
||||
[JsonObject]
|
||||
public class WhiteboardInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The text for each stone
|
||||
/// </summary>
|
||||
public SharedNomaiTextInfo[] nomaiText;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the wall, leaving only the pedestal and text.
|
||||
/// </summary>
|
||||
public bool disableWall;
|
||||
|
||||
[JsonObject]
|
||||
public class SharedNomaiTextInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The id of the stone this text will appear for
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed; // For randomizing arcs
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
|
||||
/// <summary>
|
||||
/// An optional rename of this object
|
||||
/// </summary>
|
||||
public string rename;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class PlatformInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// A ship log fact to reveal when the platform is connected to.
|
||||
/// </summary>
|
||||
[DefaultValue("")] public string reveals = "";
|
||||
|
||||
/// <summary>
|
||||
/// Disable the structure, leaving only the pedestal.
|
||||
/// </summary>
|
||||
public bool disableStructure;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the pool that rises when you place a stone.
|
||||
/// </summary>
|
||||
public bool disablePool;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class StoneInfo : GeneralPropInfo
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
[Obsolete("audioVolumes is deprecated. Use Volumes->audioVolumes instead.")] public AudioVolumeInfo[] audioVolumes;
|
||||
}
|
||||
}
|
||||
|
||||
85
NewHorizons/External/Modules/Props/DetailInfo.cs
vendored
Normal file
85
NewHorizons/External/Modules/Props/DetailInfo.cs
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
[JsonObject]
|
||||
public class DetailInfo : GeneralPropInfo
|
||||
{
|
||||
public DetailInfo() { }
|
||||
|
||||
public DetailInfo(GeneralPointPropInfo info)
|
||||
{
|
||||
JsonConvert.PopulateObject(JsonConvert.SerializeObject(info), this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Relative filepath to an asset-bundle to load the prefab defined in `path` from
|
||||
/// </summary>
|
||||
public string assetBundle;
|
||||
|
||||
/// <summary>
|
||||
/// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle
|
||||
/// </summary>
|
||||
public string path;
|
||||
|
||||
/// <summary>
|
||||
/// A list of children to remove from this detail
|
||||
/// </summary>
|
||||
public string[] removeChildren;
|
||||
|
||||
/// <summary>
|
||||
/// Do we reset all the components on this object? Useful for certain props that have dialogue components attached to
|
||||
/// them.
|
||||
/// </summary>
|
||||
public bool removeComponents;
|
||||
|
||||
/// <summary>
|
||||
/// Scale the prop
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float scale = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale each axis of the prop. Overrides `scale`.
|
||||
/// </summary>
|
||||
public MVector3 stretch;
|
||||
|
||||
/// <summary>
|
||||
/// If this value is not null, this prop will be quantum. Assign this field to the id of the quantum group it should be a part of. The group it is assigned to determines what kind of quantum object it is
|
||||
/// </summary>
|
||||
public string quantumGroupID;
|
||||
|
||||
/// <summary>
|
||||
/// Should this detail stay loaded even if you're outside the sector (good for very large props)
|
||||
/// </summary>
|
||||
public bool keepLoaded;
|
||||
|
||||
/// <summary>
|
||||
/// Should this object dynamically move around?
|
||||
/// This tries to make all mesh colliders convex, as well as adding a sphere collider in case the detail has no others.
|
||||
/// </summary>
|
||||
public bool hasPhysics;
|
||||
|
||||
/// <summary>
|
||||
/// The mass of the physics object.
|
||||
/// Most pushable props use the default value, which matches the player mass.
|
||||
/// </summary>
|
||||
[DefaultValue(0.001f)] public float physicsMass = 0.001f;
|
||||
|
||||
/// <summary>
|
||||
/// The radius that the added sphere collider will use for physics collision.
|
||||
/// If there's already good colliders on the detail, you can make this 0.
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float physicsRadius = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Set to true if this object's lighting should ignore the effects of sunlight
|
||||
/// </summary>
|
||||
public bool ignoreSun;
|
||||
|
||||
[Obsolete("alignToNormal is deprecated. Use alignRadial instead")] public bool alignToNormal;
|
||||
}
|
||||
|
||||
}
|
||||
61
NewHorizons/External/Modules/Props/Dialogue/DialogueInfo.cs
vendored
Normal file
61
NewHorizons/External/Modules/Props/Dialogue/DialogueInfo.cs
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Dialogue
|
||||
{
|
||||
[JsonObject]
|
||||
public class DialogueInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Prevents the dialogue from being created after a specific persistent condition is set. Useful for remote dialogue
|
||||
/// triggers that you want to have happen only once.
|
||||
/// </summary>
|
||||
public string blockAfterPersistentCondition;
|
||||
|
||||
/// <summary>
|
||||
/// If a pathToAnimController is supplied, if you are within this distance the character will look at you. If it is set
|
||||
/// to 0, they will only look at you when spoken to.
|
||||
/// </summary>
|
||||
public float lookAtRadius;
|
||||
|
||||
/// <summary>
|
||||
/// If this dialogue is meant for a character, this is the relative path from the planet to that character's
|
||||
/// CharacterAnimController, TravelerController, TravelerEyeController (eye of the universe), FacePlayerWhenTalking, or SolanumAnimController.
|
||||
///
|
||||
/// If none of those components are present it will add a FacePlayerWhenTalking component.
|
||||
/// </summary>
|
||||
public string pathToAnimController;
|
||||
|
||||
/// <summary>
|
||||
/// Radius of the spherical collision volume where you get the "talk to" prompt when looking at. If you use a
|
||||
/// remoteTrigger, you can set this to 0 to make the dialogue only trigger remotely.
|
||||
/// </summary>
|
||||
public float radius = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Distance from radius the prompt appears
|
||||
/// </summary>
|
||||
[DefaultValue(2f)] public float range = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to trigger dialogue from a distance when you walk into an area.
|
||||
/// </summary>
|
||||
public RemoteTriggerInfo remoteTrigger;
|
||||
|
||||
[Obsolete("remoteTriggerPosition is deprecated. Use remoteTrigger.position instead")] public MVector3 remoteTriggerPosition;
|
||||
[Obsolete("remoteTriggerRadius is deprecated. Use remoteTrigger.radius instead")] public float remoteTriggerRadius;
|
||||
[Obsolete("remoteTriggerPrereqCondition is deprecated. Use remoteTrigger.prereqCondition instead")] public string remoteTriggerPrereqCondition;
|
||||
|
||||
/// <summary>
|
||||
/// Relative path to the xml file defining the dialogue.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
|
||||
/// <summary>
|
||||
/// What type of flashlight toggle to do when dialogue is interacted with
|
||||
/// </summary>
|
||||
[DefaultValue("none")] public FlashlightToggle flashlightToggle = FlashlightToggle.None;
|
||||
}
|
||||
}
|
||||
14
NewHorizons/External/Modules/Props/Dialogue/FlashlightToggle.cs
vendored
Normal file
14
NewHorizons/External/Modules/Props/Dialogue/FlashlightToggle.cs
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Dialogue
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum FlashlightToggle
|
||||
{
|
||||
[EnumMember(Value = @"none")] None = -1,
|
||||
[EnumMember(Value = @"turnOff")] TurnOff = 0,
|
||||
[EnumMember(Value = @"turnOffThenOn")] TurnOffThenOn = 1,
|
||||
}
|
||||
}
|
||||
17
NewHorizons/External/Modules/Props/Dialogue/RemoteTriggerInfo.cs
vendored
Normal file
17
NewHorizons/External/Modules/Props/Dialogue/RemoteTriggerInfo.cs
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Dialogue
|
||||
{
|
||||
[JsonObject]
|
||||
public class RemoteTriggerInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The radius of the remote trigger volume.
|
||||
/// </summary>
|
||||
public float radius;
|
||||
/// <summary>
|
||||
/// This condition must be met for the remote trigger volume to trigger.
|
||||
/// </summary>
|
||||
public string prereqCondition;
|
||||
}
|
||||
}
|
||||
49
NewHorizons/External/Modules/Props/EchoesOfTheEye/ProjectionInfo.cs
vendored
Normal file
49
NewHorizons/External/Modules/Props/EchoesOfTheEye/ProjectionInfo.cs
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
using static NewHorizons.External.Modules.PropModule;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.EchoesOfTheEye
|
||||
{
|
||||
[JsonObject]
|
||||
public class ProjectionInfo : GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum SlideShowType
|
||||
{
|
||||
[EnumMember(Value = @"slideReel")] SlideReel = 0,
|
||||
|
||||
[EnumMember(Value = @"autoProjector")] AutoProjector = 1,
|
||||
|
||||
[EnumMember(Value = @"visionTorchTarget")] VisionTorchTarget = 2,
|
||||
|
||||
[EnumMember(Value = @"standingVisionTorch")] StandingVisionTorch = 3,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The ship log facts revealed after finishing this slide reel.
|
||||
/// </summary>
|
||||
public string[] reveals;
|
||||
|
||||
/// <summary>
|
||||
/// The ship log facts that make the reel play when they are displayed in the computer (by selecting entries or arrows).
|
||||
/// You should probably include facts from `reveals` here.
|
||||
/// If you only specify a rumor fact, then it would only play in its ship log entry if this has revealed only
|
||||
/// rumor facts because an entry with revealed explore facts doesn't display rumor facts.
|
||||
/// </summary>
|
||||
public string[] playWithShipLogFacts;
|
||||
|
||||
/// <summary>
|
||||
/// The list of slides for this object.
|
||||
/// </summary>
|
||||
public SlideInfo[] slides;
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("slideReel")] public SlideShowType type = SlideShowType.SlideReel;
|
||||
}
|
||||
|
||||
}
|
||||
15
NewHorizons/External/Modules/Props/EchoesOfTheEye/RaftInfo.cs
vendored
Normal file
15
NewHorizons/External/Modules/Props/EchoesOfTheEye/RaftInfo.cs
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.EchoesOfTheEye
|
||||
{
|
||||
[JsonObject]
|
||||
public class RaftInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Acceleration of the raft. Default acceleration is 5.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)] public float acceleration = 5f;
|
||||
}
|
||||
|
||||
}
|
||||
86
NewHorizons/External/Modules/Props/EchoesOfTheEye/SlideInfo.cs
vendored
Normal file
86
NewHorizons/External/Modules/Props/EchoesOfTheEye/SlideInfo.cs
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.EchoesOfTheEye
|
||||
{
|
||||
[JsonObject]
|
||||
public class SlideInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Ambient light colour when viewing this slide.
|
||||
/// </summary>
|
||||
public MColor ambientLightColor;
|
||||
|
||||
|
||||
// SlideAmbientLightModule
|
||||
|
||||
/// <summary>
|
||||
/// Ambient light intensity when viewing this slide.
|
||||
/// </summary>
|
||||
public float ambientLightIntensity;
|
||||
|
||||
/// <summary>
|
||||
/// Ambient light range when viewing this slide.
|
||||
/// </summary>
|
||||
public float ambientLightRange;
|
||||
|
||||
// SlideBackdropAudioModule
|
||||
|
||||
/// <summary>
|
||||
/// The name of the AudioClip that will continuously play while watching these slides
|
||||
/// </summary>
|
||||
public string backdropAudio;
|
||||
|
||||
/// <summary>
|
||||
/// The time to fade into the backdrop audio
|
||||
/// </summary>
|
||||
public float backdropFadeTime;
|
||||
|
||||
// SlideBeatAudioModule
|
||||
|
||||
/// <summary>
|
||||
/// The name of the AudioClip for a one-shot sound when opening the slide.
|
||||
/// </summary>
|
||||
public string beatAudio;
|
||||
|
||||
/// <summary>
|
||||
/// The time delay until the one-shot audio
|
||||
/// </summary>
|
||||
public float beatDelay;
|
||||
|
||||
|
||||
// SlideBlackFrameModule
|
||||
|
||||
/// <summary>
|
||||
/// Before viewing this slide, there will be a black frame for this many seconds.
|
||||
/// </summary>
|
||||
public float blackFrameDuration;
|
||||
|
||||
/// <summary>
|
||||
/// The path to the image file for this slide.
|
||||
/// </summary>
|
||||
public string imagePath;
|
||||
|
||||
|
||||
// SlidePlayTimeModule
|
||||
|
||||
/// <summary>
|
||||
/// Play-time duration for auto-projector slides.
|
||||
/// </summary>
|
||||
public float playTimeDuration;
|
||||
|
||||
|
||||
// SlideShipLogEntryModule
|
||||
|
||||
/// <summary>
|
||||
/// Ship log fact revealed when viewing this slide
|
||||
/// </summary>
|
||||
public string reveal;
|
||||
|
||||
/// <summary>
|
||||
/// Spotlight intensity modifier when viewing this slide.
|
||||
/// </summary>
|
||||
public float spotIntensityMod;
|
||||
}
|
||||
|
||||
}
|
||||
18
NewHorizons/External/Modules/Props/EntryLocationInfo.cs
vendored
Normal file
18
NewHorizons/External/Modules/Props/EntryLocationInfo.cs
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
[JsonObject]
|
||||
public class EntryLocationInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this location is cloaked
|
||||
/// </summary>
|
||||
public bool cloaked;
|
||||
|
||||
/// <summary>
|
||||
/// ID of the entry this location relates to
|
||||
/// </summary>
|
||||
public string id;
|
||||
}
|
||||
}
|
||||
45
NewHorizons/External/Modules/Props/GeyserInfo.cs
vendored
Normal file
45
NewHorizons/External/Modules/Props/GeyserInfo.cs
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
[JsonObject]
|
||||
public class GeyserInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Vertical offset of the geyser. From 0, the bubbles start at a height of 10, the shaft at 67, and the spout at 97.5.
|
||||
/// </summary>
|
||||
[DefaultValue(-97.5f)] public float offset = -97.5f;
|
||||
|
||||
/// <summary>
|
||||
/// Force of the geyser on objects
|
||||
/// </summary>
|
||||
[DefaultValue(55f)] public float force = 55f;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds eruptions last for
|
||||
/// </summary>
|
||||
[DefaultValue(10f)] public float activeDuration = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// Time in seconds between eruptions
|
||||
/// </summary>
|
||||
[DefaultValue(19f)] public float inactiveDuration = 19f;
|
||||
|
||||
/// <summary>
|
||||
/// Color of the geyser. Alpha sets the particle density.
|
||||
/// </summary>
|
||||
public MColor tint;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the individual particle systems of the geyser
|
||||
/// </summary>
|
||||
public bool disableBubbles, disableShaft, disableSpout;
|
||||
|
||||
/// <summary>
|
||||
/// Loudness of the geyser
|
||||
/// </summary>
|
||||
[DefaultValue(0.7f)] public float volume = 0.7f;
|
||||
}
|
||||
}
|
||||
40
NewHorizons/External/Modules/Props/Quantum/QuantumGroupInfo.cs
vendored
Normal file
40
NewHorizons/External/Modules/Props/Quantum/QuantumGroupInfo.cs
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using static NewHorizons.External.Modules.PropModule;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Quantum
|
||||
{
|
||||
[JsonObject]
|
||||
public class QuantumGroupInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// What type of group this is: does it define a list of states a single quantum object could take or a list of sockets one or more quantum objects could share?
|
||||
/// </summary>
|
||||
public QuantumGroupType type;
|
||||
|
||||
/// <summary>
|
||||
/// A unique string used by props (that are marked as quantum) use to refer back to this group
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Only required if type is `sockets`. This lists all the possible locations for any props assigned to this group.
|
||||
/// </summary>
|
||||
public QuantumSocketInfo[] sockets;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states`. If this is true, then the first prop made part of this group will be used to construct a visibility box for an empty game object, which will be considered one of the states.
|
||||
/// </summary>
|
||||
public bool hasEmptyState;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states`. If this is true, then the states will be presented in order, rather than in a random order
|
||||
/// </summary>
|
||||
public bool sequential;
|
||||
|
||||
/// <summary>
|
||||
/// Optional. Only used if type is `states` and `sequential` is true. If this is false, then after the last state has appeared, the object will no longer change state
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool loop = true;
|
||||
}
|
||||
}
|
||||
16
NewHorizons/External/Modules/Props/Quantum/QuantumGroupType.cs
vendored
Normal file
16
NewHorizons/External/Modules/Props/Quantum/QuantumGroupType.cs
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Quantum
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum QuantumGroupType
|
||||
{
|
||||
[EnumMember(Value = @"sockets")] Sockets = 0,
|
||||
|
||||
[EnumMember(Value = @"states")] States = 1,
|
||||
|
||||
FailedValidation = 10
|
||||
}
|
||||
}
|
||||
14
NewHorizons/External/Modules/Props/Quantum/QuantumSocketInfo.cs
vendored
Normal file
14
NewHorizons/External/Modules/Props/Quantum/QuantumSocketInfo.cs
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Quantum
|
||||
{
|
||||
[JsonObject]
|
||||
public class QuantumSocketInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The probability any props that are part of this group will occupy this socket
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float probability = 1f;
|
||||
}
|
||||
}
|
||||
24
NewHorizons/External/Modules/Props/Remote/PlatformInfo.cs
vendored
Normal file
24
NewHorizons/External/Modules/Props/Remote/PlatformInfo.cs
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Remote
|
||||
{
|
||||
[JsonObject]
|
||||
public class PlatformInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// A ship log fact to reveal when the platform is connected to.
|
||||
/// </summary>
|
||||
[DefaultValue("")] public string reveals = "";
|
||||
|
||||
/// <summary>
|
||||
/// Disable the structure, leaving only the pedestal.
|
||||
/// </summary>
|
||||
public bool disableStructure;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the pool that rises when you place a stone.
|
||||
/// </summary>
|
||||
public bool disablePool;
|
||||
}
|
||||
}
|
||||
33
NewHorizons/External/Modules/Props/Remote/RemoteInfo.cs
vendored
Normal file
33
NewHorizons/External/Modules/Props/Remote/RemoteInfo.cs
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Remote
|
||||
{
|
||||
[JsonObject]
|
||||
public class RemoteInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The unique remote id
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Icon that the will show on the stone, pedastal of the whiteboard, and pedastal of the platform.
|
||||
/// </summary>
|
||||
public string decalPath;
|
||||
|
||||
/// <summary>
|
||||
/// Whiteboard that the stones can put text onto
|
||||
/// </summary>
|
||||
public RemoteWhiteboardInfo whiteboard;
|
||||
|
||||
/// <summary>
|
||||
/// Camera platform that the stones can project to and from
|
||||
/// </summary>
|
||||
public PlatformInfo platform;
|
||||
|
||||
/// <summary>
|
||||
/// Projection stones
|
||||
/// </summary>
|
||||
public StoneInfo[] stones;
|
||||
}
|
||||
}
|
||||
40
NewHorizons/External/Modules/Props/Remote/SharedNomaiTextInfo.cs
vendored
Normal file
40
NewHorizons/External/Modules/Props/Remote/SharedNomaiTextInfo.cs
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
using NewHorizons.External.Modules.TranslatorText;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Remote
|
||||
{
|
||||
[JsonObject]
|
||||
public class SharedNomaiTextInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The id of the stone this text will appear for
|
||||
/// </summary>
|
||||
public string id;
|
||||
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed; // For randomizing arcs
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
|
||||
/// <summary>
|
||||
/// An optional rename of this object
|
||||
/// </summary>
|
||||
public string rename;
|
||||
}
|
||||
}
|
||||
10
NewHorizons/External/Modules/Props/Remote/StoneInfo.cs
vendored
Normal file
10
NewHorizons/External/Modules/Props/Remote/StoneInfo.cs
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Remote
|
||||
{
|
||||
[JsonObject]
|
||||
public class StoneInfo : GeneralPropInfo
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
18
NewHorizons/External/Modules/Props/Remote/WhiteboardInfo.cs
vendored
Normal file
18
NewHorizons/External/Modules/Props/Remote/WhiteboardInfo.cs
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props.Remote
|
||||
{
|
||||
[JsonObject]
|
||||
public class RemoteWhiteboardInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The text for each stone
|
||||
/// </summary>
|
||||
public SharedNomaiTextInfo[] nomaiText;
|
||||
|
||||
/// <summary>
|
||||
/// Disable the wall, leaving only the pedestal and text.
|
||||
/// </summary>
|
||||
public bool disableWall;
|
||||
}
|
||||
}
|
||||
70
NewHorizons/External/Modules/Props/ScatterInfo.cs
vendored
Normal file
70
NewHorizons/External/Modules/Props/ScatterInfo.cs
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
[JsonObject]
|
||||
public class ScatterInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Relative filepath to an asset-bundle
|
||||
/// </summary>
|
||||
public string assetBundle;
|
||||
|
||||
/// <summary>
|
||||
/// Number of props to scatter
|
||||
/// </summary>
|
||||
public int count;
|
||||
|
||||
/// <summary>
|
||||
/// Offset this prop once it is placed
|
||||
/// </summary>
|
||||
public MVector3 offset;
|
||||
|
||||
/// <summary>
|
||||
/// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle
|
||||
/// </summary>
|
||||
public string path;
|
||||
|
||||
/// <summary>
|
||||
/// Rotate this prop once it is placed
|
||||
/// </summary>
|
||||
public MVector3 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// Scale this prop once it is placed
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float scale = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale each axis of the prop. Overrides `scale`.
|
||||
/// </summary>
|
||||
public MVector3 stretch;
|
||||
|
||||
/// <summary>
|
||||
/// The number used as entropy for scattering the props
|
||||
/// </summary>
|
||||
public int seed;
|
||||
|
||||
/// <summary>
|
||||
/// The lowest height that these object will be placed at (only relevant if there's a heightmap)
|
||||
/// </summary>
|
||||
public float? minHeight;
|
||||
|
||||
/// <summary>
|
||||
/// The highest height that these objects will be placed at (only relevant if there's a heightmap)
|
||||
/// </summary>
|
||||
public float? maxHeight;
|
||||
|
||||
/// <summary>
|
||||
/// Should we try to prevent overlap between the scattered details? True by default. If it's affecting load times turn it off.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool preventOverlap = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should this detail stay loaded even if you're outside the sector (good for very large props)
|
||||
/// </summary>
|
||||
public bool keepLoaded;
|
||||
}
|
||||
}
|
||||
73
NewHorizons/External/Modules/Props/TornadoInfo.cs
vendored
Normal file
73
NewHorizons/External/Modules/Props/TornadoInfo.cs
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
|
||||
[JsonObject]
|
||||
public class TornadoInfo : GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum TornadoType
|
||||
{
|
||||
[EnumMember(Value = @"upwards")] Upwards = 0,
|
||||
|
||||
[EnumMember(Value = @"downwards")] Downwards = 1,
|
||||
|
||||
[EnumMember(Value = @"hurricane")] Hurricane = 2
|
||||
}
|
||||
|
||||
[Obsolete("Downwards is deprecated. Use Type instead.")] public bool downwards;
|
||||
|
||||
/// <summary>
|
||||
/// Alternative to setting the position. Will choose a random place at this elevation.
|
||||
/// </summary>
|
||||
public float elevation;
|
||||
|
||||
/// <summary>
|
||||
/// The height of this tornado.
|
||||
/// </summary>
|
||||
[DefaultValue(30f)] public float height = 30f;
|
||||
|
||||
/// <summary>
|
||||
/// The colour of the tornado.
|
||||
/// </summary>
|
||||
public MColor tint;
|
||||
|
||||
/// <summary>
|
||||
/// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction.
|
||||
/// </summary>
|
||||
[DefaultValue("upwards")] public TornadoType type = TornadoType.Upwards;
|
||||
|
||||
/// <summary>
|
||||
/// Angular distance from the starting position that it will wander, in terms of the angle around the x-axis.
|
||||
/// </summary>
|
||||
[DefaultValue(45f)] public float wanderDegreesX = 45f;
|
||||
|
||||
/// <summary>
|
||||
/// Angular distance from the starting position that it will wander, in terms of the angle around the z-axis.
|
||||
/// </summary>
|
||||
[DefaultValue(45f)] public float wanderDegreesZ = 45f;
|
||||
|
||||
/// <summary>
|
||||
/// The rate at which the tornado will wander around the planet. Set to 0 for it to be stationary. Should be around
|
||||
/// 0.1.
|
||||
/// </summary>
|
||||
public float wanderRate;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum distance at which you'll hear the sounds of the cyclone. If not set it will scale relative to the size of the cyclone.
|
||||
/// </summary>
|
||||
public float audioDistance;
|
||||
|
||||
/// <summary>
|
||||
/// Fluid type for sounds/effects when colliding with this tornado.
|
||||
/// </summary>
|
||||
[DefaultValue("cloud")] public FluidType fluidType = FluidType.Cloud;
|
||||
}
|
||||
|
||||
}
|
||||
52
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs
vendored
Normal file
52
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextArcInfo.cs
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.TranslatorText
|
||||
{
|
||||
|
||||
[JsonObject]
|
||||
public class NomaiTextArcInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextArcType
|
||||
{
|
||||
[EnumMember(Value = @"adult")] Adult = 0,
|
||||
|
||||
[EnumMember(Value = @"child")] Child = 1,
|
||||
|
||||
[EnumMember(Value = @"stranger")] Stranger = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The type of text to display.
|
||||
/// </summary>
|
||||
[DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult;
|
||||
|
||||
/// <summary>
|
||||
/// The local position of this object on the wall. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public MVector2 position;
|
||||
|
||||
/// <summary>
|
||||
/// The z euler angle for this arc. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
[Range(0f, 360f)] public float? zRotation;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to flip the spiral from left-curling to right-curling or vice versa. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public bool? mirror;
|
||||
|
||||
/// <summary>
|
||||
/// Which variation of the chosen type to place. If not specified, a random variation will be selected based on the seed provided in the parent module.
|
||||
/// </summary>
|
||||
[Obsolete("only used in old nomai text")]
|
||||
[DefaultValue(-1)] public int variation = -1;
|
||||
}
|
||||
|
||||
}
|
||||
50
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextInfo.cs
vendored
Normal file
50
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextInfo.cs
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using static NewHorizons.External.Modules.PropModule;
|
||||
|
||||
namespace NewHorizons.External.Modules.TranslatorText
|
||||
{
|
||||
|
||||
[JsonObject]
|
||||
public class NomaiTextInfo : GeneralPointPropInfo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The normal vector for this object. Used for writing on walls and positioning computers.
|
||||
/// </summary>
|
||||
public MVector3 normal;
|
||||
|
||||
/// <summary>
|
||||
/// The euler angle rotation of this object. Not required if setting the normal. Computers and cairns will orient
|
||||
/// themselves to the surface of the planet automatically.
|
||||
/// </summary>
|
||||
public MVector3 rotation;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed; // For randomizing arcs
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall;
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
}
|
||||
|
||||
}
|
||||
16
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextLocation.cs
vendored
Normal file
16
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextLocation.cs
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.TranslatorText
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextLocation
|
||||
{
|
||||
[EnumMember(Value = @"unspecified")] UNSPECIFIED = 0,
|
||||
|
||||
[EnumMember(Value = @"a")] A = 1,
|
||||
|
||||
[EnumMember(Value = @"b")] B = 2
|
||||
}
|
||||
}
|
||||
30
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextType.cs
vendored
Normal file
30
NewHorizons/External/Modules/Props/TranslatorText/NomaiTextType.cs
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.TranslatorText
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextType
|
||||
{
|
||||
[EnumMember(Value = @"wall")] Wall = 0,
|
||||
|
||||
[EnumMember(Value = @"scroll")] Scroll = 1,
|
||||
|
||||
[EnumMember(Value = @"computer")] Computer = 2,
|
||||
|
||||
[EnumMember(Value = @"cairn")] Cairn = 3,
|
||||
|
||||
[EnumMember(Value = @"recorder")] Recorder = 4,
|
||||
|
||||
[EnumMember(Value = @"preCrashRecorder")] PreCrashRecorder = 5,
|
||||
|
||||
[EnumMember(Value = @"preCrashComputer")] PreCrashComputer = 6,
|
||||
|
||||
[EnumMember(Value = @"trailmarker")] Trailmarker = 7,
|
||||
|
||||
[EnumMember(Value = @"cairnVariant")] CairnVariant = 8,
|
||||
|
||||
[EnumMember(Value = @"whiteboard")] Whiteboard = 9,
|
||||
}
|
||||
}
|
||||
42
NewHorizons/External/Modules/Props/TranslatorText/TranslatorTextInfo.cs
vendored
Normal file
42
NewHorizons/External/Modules/Props/TranslatorText/TranslatorTextInfo.cs
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
using static NewHorizons.External.Modules.PropModule;
|
||||
|
||||
namespace NewHorizons.External.Modules.TranslatorText
|
||||
{
|
||||
[JsonObject]
|
||||
public class TranslatorTextInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Additional information about each arc in the text
|
||||
/// </summary>
|
||||
public NomaiTextArcInfo[] arcInfo;
|
||||
|
||||
/// <summary>
|
||||
/// The random seed used to pick what the text arcs will look like.
|
||||
/// </summary>
|
||||
public int seed;
|
||||
|
||||
/// <summary>
|
||||
/// Only for wall text. Aligns wall text to face towards the given direction, with 'up' oriented relative to its current rotation or alignment.
|
||||
/// </summary>
|
||||
public MVector3 normal;
|
||||
|
||||
/// <summary>
|
||||
/// The type of object this is.
|
||||
/// </summary>
|
||||
[DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall;
|
||||
|
||||
/// <summary>
|
||||
/// The location of this object. Arcs will be blue if their locations match the wall, else orange.
|
||||
/// </summary>
|
||||
[DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path to the xml file for this object.
|
||||
/// </summary>
|
||||
public string xmlFile;
|
||||
}
|
||||
|
||||
}
|
||||
49
NewHorizons/External/Modules/Props/VolcanoInfo.cs
vendored
Normal file
49
NewHorizons/External/Modules/Props/VolcanoInfo.cs
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Props
|
||||
{
|
||||
[JsonObject]
|
||||
public class VolcanoInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The colour of the meteor's lava.
|
||||
/// </summary>
|
||||
public MColor lavaTint;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum time between meteor launches.
|
||||
/// </summary>
|
||||
[DefaultValue(20f)]
|
||||
public float maxInterval = 20f;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum random speed at which meteors are launched.
|
||||
/// </summary>
|
||||
[DefaultValue(150f)]
|
||||
public float maxLaunchSpeed = 150f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum time between meteor launches.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)]
|
||||
public float minInterval = 5f;
|
||||
|
||||
/// <summary>
|
||||
/// Minimum random speed at which meteors are launched.
|
||||
/// </summary>
|
||||
[DefaultValue(50f)]
|
||||
public float minLaunchSpeed = 50f;
|
||||
|
||||
/// <summary>
|
||||
/// Scale of the meteors.
|
||||
/// </summary>
|
||||
public float scale = 1;
|
||||
|
||||
/// <summary>
|
||||
/// The colour of the meteor's stone.
|
||||
/// </summary>
|
||||
public MColor stoneTint;
|
||||
}
|
||||
}
|
||||
14
NewHorizons/External/Modules/Volumes/ChangeStarSystemVolumeInfo.cs
vendored
Normal file
14
NewHorizons/External/Modules/Volumes/ChangeStarSystemVolumeInfo.cs
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class ChangeStarSystemVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The star system that entering this volume will send you to.
|
||||
/// </summary>
|
||||
[DefaultValue("SolarSystem")] public string targetStarSystem;
|
||||
}
|
||||
}
|
||||
16
NewHorizons/External/Modules/Volumes/CreditsType.cs
vendored
Normal file
16
NewHorizons/External/Modules/Volumes/CreditsType.cs
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum CreditsType
|
||||
{
|
||||
[EnumMember(Value = @"fast")] Fast = 0,
|
||||
|
||||
[EnumMember(Value = @"final")] Final = 1,
|
||||
|
||||
[EnumMember(Value = @"kazoo")] Kazoo = 2
|
||||
}
|
||||
}
|
||||
26
NewHorizons/External/Modules/Volumes/DeathType.cs
vendored
Normal file
26
NewHorizons/External/Modules/Volumes/DeathType.cs
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum DeathType
|
||||
{
|
||||
[EnumMember(Value = @"default")] Default,
|
||||
[EnumMember(Value = @"impact")] Impact,
|
||||
[EnumMember(Value = @"asphyxiation")] Asphyxiation,
|
||||
[EnumMember(Value = @"energy")] Energy,
|
||||
[EnumMember(Value = @"supernova")] Supernova,
|
||||
[EnumMember(Value = @"digestion")] Digestion,
|
||||
[EnumMember(Value = @"bigBang")] BigBang,
|
||||
[EnumMember(Value = @"crushed")] Crushed,
|
||||
[EnumMember(Value = @"meditation")] Meditation,
|
||||
[EnumMember(Value = @"timeLoop")] TimeLoop,
|
||||
[EnumMember(Value = @"lava")] Lava,
|
||||
[EnumMember(Value = @"blackHole")] BlackHole,
|
||||
[EnumMember(Value = @"dream")] Dream,
|
||||
[EnumMember(Value = @"dreamExplosion")] DreamExplosion,
|
||||
[EnumMember(Value = @"crushedByElevator")] CrushedByElevator
|
||||
}
|
||||
}
|
||||
21
NewHorizons/External/Modules/Volumes/LoadCreditsVolumeInfo.cs
vendored
Normal file
21
NewHorizons/External/Modules/Volumes/LoadCreditsVolumeInfo.cs
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class LoadCreditsVolumeInfo : VolumeInfo
|
||||
{
|
||||
[DefaultValue("fast")] public CreditsType creditsType = CreditsType.Fast;
|
||||
|
||||
/// <summary>
|
||||
/// Text displayed in orange on game over. For localization, put translations under UI.
|
||||
/// </summary>
|
||||
public string gameOverText;
|
||||
|
||||
/// <summary>
|
||||
/// The type of death the player will have if they enter this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("default")] public DeathType deathType = DeathType.Default;
|
||||
}
|
||||
}
|
||||
20
NewHorizons/External/Modules/Volumes/PriorityVolumeInfo.cs
vendored
Normal file
20
NewHorizons/External/Modules/Volumes/PriorityVolumeInfo.cs
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class PriorityVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The layer of this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(0)] public int layer = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The priority for this volume's effects to be applied.
|
||||
/// Ex, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.
|
||||
/// </summary>
|
||||
[DefaultValue(1)] public int priority = 1;
|
||||
}
|
||||
}
|
||||
63
NewHorizons/External/Modules/Volumes/RevealVolumeInfo.cs
vendored
Normal file
63
NewHorizons/External/Modules/Volumes/RevealVolumeInfo.cs
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class RevealVolumeInfo : VolumeInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum RevealVolumeType
|
||||
{
|
||||
[EnumMember(Value = @"enter")] Enter = 0,
|
||||
|
||||
[EnumMember(Value = @"observe")] Observe = 1,
|
||||
|
||||
[EnumMember(Value = @"snapshot")] Snapshot = 2
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnterType
|
||||
{
|
||||
[EnumMember(Value = @"both")] Both = 0,
|
||||
|
||||
[EnumMember(Value = @"player")] Player = 1,
|
||||
|
||||
[EnumMember(Value = @"probe")] Probe = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only)
|
||||
/// </summary>
|
||||
[DefaultValue(180f)]
|
||||
public float maxAngle = 180f; // Observe Only
|
||||
|
||||
/// <summary>
|
||||
/// The max distance the user can be away from the volume to reveal the fact (`snapshot` and `observe` only)
|
||||
/// </summary>
|
||||
[DefaultValue(-1f)]
|
||||
public float maxDistance = -1f; // Snapshot & Observe Only
|
||||
|
||||
/// <summary>
|
||||
/// What needs to be done to the volume to unlock the facts
|
||||
/// </summary>
|
||||
[DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter;
|
||||
|
||||
/// <summary>
|
||||
/// What can enter the volume to unlock the facts (`enter` only)
|
||||
/// </summary>
|
||||
[DefaultValue("both")] public EnterType revealFor = EnterType.Both;
|
||||
|
||||
/// <summary>
|
||||
/// A list of facts to reveal
|
||||
/// </summary>
|
||||
public string[] reveals;
|
||||
|
||||
/// <summary>
|
||||
/// An achievement to unlock. Optional.
|
||||
/// </summary>
|
||||
public string achievementID;
|
||||
}
|
||||
}
|
||||
393
NewHorizons/External/Modules/Volumes/VolumeInfo.cs
vendored
Normal file
393
NewHorizons/External/Modules/Volumes/VolumeInfo.cs
vendored
Normal file
@ -0,0 +1,393 @@
|
||||
using NewHorizons.External.Modules.Audio;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class VolumeInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The radius of this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(1f)] public float radius = 1f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class AudioVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
|
||||
/// </summary>
|
||||
public string audio;
|
||||
|
||||
[DefaultValue("random")] public ClipSelectionType clipSelection = ClipSelectionType.RANDOM;
|
||||
|
||||
/// <summary>
|
||||
/// The audio track of this audio volume
|
||||
/// </summary>
|
||||
[DefaultValue("environment")] public AudioMixerTrackName track = AudioMixerTrackName.Environment;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to loop this audio while in this audio volume or just play it once
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool loop = true;
|
||||
|
||||
/// <summary>
|
||||
/// The loudness of the audio
|
||||
/// </summary>
|
||||
[Range(0f, 1f)]
|
||||
[DefaultValue(1f)]
|
||||
public float volume = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// How long it will take to fade this sound in and out when entering/exiting this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(2f)]
|
||||
public float fadeSeconds = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Play the sound instantly without any fading.
|
||||
/// </summary>
|
||||
public bool noFadeFromBeginning;
|
||||
|
||||
/// <summary>
|
||||
/// Randomize what time the audio starts at.
|
||||
/// </summary>
|
||||
public bool randomizePlayhead;
|
||||
|
||||
/// <summary>
|
||||
/// Pause the music when exiting the volume.
|
||||
/// </summary>
|
||||
public bool pauseOnFadeOut;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class NotificationVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// What the notification will show for.
|
||||
/// </summary>
|
||||
[DefaultValue("all")] public NotificationTarget target = NotificationTarget.All;
|
||||
|
||||
/// <summary>
|
||||
/// The notification that will play when you enter this volume.
|
||||
/// </summary>
|
||||
public NotificationInfo entryNotification;
|
||||
|
||||
/// <summary>
|
||||
/// The notification that will play when you exit this volume.
|
||||
/// </summary>
|
||||
public NotificationInfo exitNotification;
|
||||
|
||||
|
||||
[JsonObject]
|
||||
public class NotificationInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The message that will be displayed.
|
||||
/// </summary>
|
||||
public string displayMessage;
|
||||
|
||||
/// <summary>
|
||||
/// The duration this notification will be displayed.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)] public float duration = 5f;
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NotificationTarget
|
||||
{
|
||||
[EnumMember(Value = @"all")] All = 0,
|
||||
[EnumMember(Value = @"ship")] Ship = 1,
|
||||
[EnumMember(Value = @"player")] Player = 2,
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class HazardVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of hazard for this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("general")] public HazardType type = HazardType.GENERAL;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of damage you will take per second while inside this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(10f)] public float damagePerSecond = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// The type of damage you will take when you first touch this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("impact")] public InstantDamageType firstContactDamageType = InstantDamageType.Impact;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of damage you will take when you first touch this volume.
|
||||
/// </summary>
|
||||
public float firstContactDamage;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum HazardType
|
||||
{
|
||||
[EnumMember(Value = @"none")] NONE = 0,
|
||||
[EnumMember(Value = @"general")] GENERAL = 1,
|
||||
[EnumMember(Value = @"ghostMatter")] DARKMATTER = 2,
|
||||
[EnumMember(Value = @"heat")] HEAT = 4,
|
||||
[EnumMember(Value = @"fire")] FIRE = 8,
|
||||
[EnumMember(Value = @"sandfall")] SANDFALL = 16,
|
||||
[EnumMember(Value = @"electricity")] ELECTRICITY = 32,
|
||||
[EnumMember(Value = @"rapids")] RAPIDS = 64,
|
||||
[EnumMember(Value = @"riverHeat")] RIVERHEAT = 128,
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum InstantDamageType
|
||||
{
|
||||
[EnumMember(Value = @"impact")] Impact,
|
||||
[EnumMember(Value = @"puncture")] Puncture,
|
||||
[EnumMember(Value = @"electrical")] Electrical
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VanishVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the bodies will shrink when they enter this volume or just disappear instantly.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool shrinkBodies = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this volume only affects the player and ship.
|
||||
/// </summary>
|
||||
public bool onlyAffectsPlayerAndShip;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DestructionVolumeInfo : VanishVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of death the player will have if they enter this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("default")] public DeathType deathType = DeathType.Default;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class OxygenVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Does this volume contain trees? This will change the notification from "Oxygen tank refilled" to "Trees detected, oxygen tank refilled".
|
||||
/// </summary>
|
||||
public bool treeVolume;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to play the oxygen tank refill sound or just fill quietly.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool playRefillAudio = true;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class FluidVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Density of the fluid. The higher the density, the harder it is to go through this fluid.
|
||||
/// </summary>
|
||||
[DefaultValue(1.2f)] public float density = 1.2f;
|
||||
|
||||
/// <summary>
|
||||
/// The type of fluid for this volume.
|
||||
/// </summary>
|
||||
public FluidType type;
|
||||
|
||||
/// <summary>
|
||||
/// Should the player and rafts align to this fluid.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool alignmentFluid = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should the ship align to the fluid by rolling.
|
||||
/// </summary>
|
||||
public bool allowShipAutoroll;
|
||||
|
||||
/// <summary>
|
||||
/// Disable this fluid volume immediately?
|
||||
/// </summary>
|
||||
public bool disableOnStart;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum FluidType
|
||||
{
|
||||
[EnumMember(Value = @"none")] NONE = 0,
|
||||
[EnumMember(Value = @"air")] AIR,
|
||||
[EnumMember(Value = @"water")] WATER,
|
||||
[EnumMember(Value = @"cloud")] CLOUD,
|
||||
[EnumMember(Value = @"sand")] SAND,
|
||||
[EnumMember(Value = @"plasma")] PLASMA,
|
||||
[EnumMember(Value = @"fog")] FOG
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProbeModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add probe destruction volumes to this planet. These will delete your probe.
|
||||
/// </summary>
|
||||
public VolumeInfo[] destructionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working.
|
||||
/// </summary>
|
||||
public VolumeInfo[] safetyVolumes;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VisorEffectModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add visor frost effect volumes to this planet. This is the ghost matter effect.
|
||||
/// </summary>
|
||||
public FrostEffectVolumeInfo[] frostEffectVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add visor rain effect volumes to this planet. You can see this on Giant's Deep.
|
||||
/// </summary>
|
||||
public RainEffectVolumeInfo[] rainEffectVolumes;
|
||||
|
||||
[JsonObject]
|
||||
public class FrostEffectVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The rate at which the frost effect will get stronger
|
||||
/// </summary>
|
||||
[DefaultValue(0.5f)]
|
||||
public float frostRate = 0.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum strength of frost this volume can give
|
||||
/// </summary>
|
||||
[Range(0f, 1f)]
|
||||
[DefaultValue(0.91f)]
|
||||
public float maxFrost = 0.91f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RainEffectVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The rate at which the rain droplet effect will happen
|
||||
/// </summary>
|
||||
[DefaultValue(0.1f)]
|
||||
public float dropletRate = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// The rate at which the rain streak effect will happen
|
||||
/// </summary>
|
||||
[DefaultValue(1f)]
|
||||
public float streakRate = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RulesetModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add anti travel music rulesets to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] antiTravelMusicRulesets;
|
||||
/// <summary>
|
||||
/// Add player impact rulesets to this planet.
|
||||
/// </summary>
|
||||
public PlayerImpactRulesetInfo[] playerImpactRulesets;
|
||||
/// <summary>
|
||||
/// Add probe rulesets to this planet.
|
||||
/// </summary>
|
||||
public ProbeRulesetInfo[] probeRulesets;
|
||||
/// <summary>
|
||||
/// Add thrust rulesets to this planet.
|
||||
/// </summary>
|
||||
public ThrustRulesetInfo[] thrustRulesets;
|
||||
|
||||
[JsonObject]
|
||||
public class PlayerImpactRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimum player impact speed. Player will take the minimum amount of damage if they impact something at this speed.
|
||||
/// </summary>
|
||||
[DefaultValue(20f)] public float minImpactSpeed = 20f;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum player impact speed. Players will die if they impact something at this speed.
|
||||
/// </summary>
|
||||
[DefaultValue(40f)] public float maxImpactSpeed = 40f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProbeRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Should this ruleset override the probe's speed?
|
||||
/// </summary>
|
||||
public bool overrideProbeSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// The speed of the probe while in this ruleset volume.
|
||||
/// </summary>
|
||||
public float probeSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// Should this ruleset override the range of probe's light?
|
||||
/// </summary>
|
||||
public bool overrideLanternRange;
|
||||
|
||||
/// <summary>
|
||||
/// The range of probe's light while in this ruleset volume.
|
||||
/// </summary>
|
||||
public float lanternRange;
|
||||
|
||||
/// <summary>
|
||||
/// Stop the probe from attaching to anything while in this ruleset volume.
|
||||
/// </summary>
|
||||
public bool ignoreAnchor;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ThrustRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Limit how fast you can fly with your ship while in this ruleset volume.
|
||||
/// </summary>
|
||||
[DefaultValue(float.PositiveInfinity)] public float thrustLimit = float.PositiveInfinity;
|
||||
|
||||
/// <summary>
|
||||
/// Nerf the jetpack booster.
|
||||
/// </summary>
|
||||
public bool nerfJetpackBooster;
|
||||
|
||||
/// <summary>
|
||||
/// How long the jetpack booster will be nerfed.
|
||||
/// </summary>
|
||||
[DefaultValue(0.5f)] public float nerfDuration = 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class SpeedTrapVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The speed the volume will slow you down to when you enter it.
|
||||
/// </summary>
|
||||
[DefaultValue(10f)]
|
||||
public float speedLimit = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// How fast it will slow down the player to the speed limit.
|
||||
/// </summary>
|
||||
[DefaultValue(3f)]
|
||||
public float acceleration = 3f;
|
||||
}
|
||||
}
|
||||
120
NewHorizons/External/Modules/Volumes/VolumesModule.cs
vendored
Normal file
120
NewHorizons/External/Modules/Volumes/VolumesModule.cs
vendored
Normal file
@ -0,0 +1,120 @@
|
||||
using NewHorizons.External.Modules.Audio;
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NewHorizons.External.Modules.Volumes
|
||||
{
|
||||
[JsonObject]
|
||||
public class VolumesModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add audio volumes to this planet.
|
||||
/// </summary>
|
||||
public AudioVolumeInfo[] audioVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add destruction volumes to this planet.
|
||||
/// </summary>
|
||||
public DestructionVolumeInfo[] destructionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add fluid volumes to this planet.
|
||||
/// </summary>
|
||||
public FluidVolumeInfo[] fluidVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add hazard volumes to this planet.
|
||||
/// </summary>
|
||||
public HazardVolumeInfo[] hazardVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add interference volumes to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] interferenceVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add insulating volumes to this planet. These will stop electricty hazard volumes from affecting you (just like the jellyfish).
|
||||
/// </summary>
|
||||
public VolumeInfo[] insulatingVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add light source volumes to this planet. These will activate rafts and other light detectors.
|
||||
/// </summary>
|
||||
public VolumeInfo[] lightSourceVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add map restriction volumes to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] mapRestrictionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add notification volumes to this planet.
|
||||
/// </summary>
|
||||
public NotificationVolumeInfo[] notificationVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add oxygen volumes to this planet.
|
||||
/// </summary>
|
||||
public OxygenVolumeInfo[] oxygenVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add probe-specific volumes to this planet.
|
||||
/// </summary>
|
||||
public ProbeModule probe;
|
||||
|
||||
/// <summary>
|
||||
/// Add reference frame blocker volumes to this planet. These will stop the player from seeing/targeting any reference frames.
|
||||
/// </summary>
|
||||
public VolumeInfo[] referenceFrameBlockerVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add triggers that reveal parts of the ship log on this planet.
|
||||
/// </summary>
|
||||
public RevealVolumeInfo[] revealVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add reverb volumes to this planet. Great for echoes in caves.
|
||||
/// </summary>
|
||||
public VolumeInfo[] reverbVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add ruleset volumes to this planet.
|
||||
/// </summary>
|
||||
public RulesetModule rulesets;
|
||||
|
||||
/// <summary>
|
||||
/// Add speed trap volumes to this planet. Slows down the player when they enter this volume.
|
||||
/// </summary>
|
||||
public SpeedTrapVolumeInfo[] speedTrapVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add visor effect volumes to this planet.
|
||||
/// </summary>
|
||||
public VisorEffectModule visorEffects;
|
||||
|
||||
/// <summary>
|
||||
/// Add zero-gravity volumes to this planet.
|
||||
/// Good for surrounding planets which are using a static position to stop the player being pulled away.
|
||||
/// </summary>
|
||||
public PriorityVolumeInfo[] zeroGravityVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Entering this volume will load a new solar system.
|
||||
/// </summary>
|
||||
public ChangeStarSystemVolumeInfo[] solarSystemVolume;
|
||||
|
||||
/// <summary>
|
||||
/// Enter this volume to be sent to the end credits scene
|
||||
/// </summary>
|
||||
public LoadCreditsVolumeInfo[] creditsVolume;
|
||||
}
|
||||
}
|
||||
663
NewHorizons/External/Modules/VolumesModule.cs
vendored
663
NewHorizons/External/Modules/VolumesModule.cs
vendored
@ -1,663 +0,0 @@
|
||||
using NewHorizons.Utility;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NewHorizons.External.Modules
|
||||
{
|
||||
[JsonObject]
|
||||
public class VolumesModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add audio volumes to this planet.
|
||||
/// </summary>
|
||||
public AudioVolumeInfo[] audioVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add destruction volumes to this planet.
|
||||
/// </summary>
|
||||
public DestructionVolumeInfo[] destructionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add fluid volumes to this planet.
|
||||
/// </summary>
|
||||
public FluidVolumeInfo[] fluidVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add hazard volumes to this planet.
|
||||
/// </summary>
|
||||
public HazardVolumeInfo[] hazardVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add interference volumes to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] interferenceVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add insulating volumes to this planet. These will stop electricty hazard volumes from affecting you (just like the jellyfish).
|
||||
/// </summary>
|
||||
public VolumeInfo[] insulatingVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add light source volumes to this planet. These will activate rafts and other light detectors.
|
||||
/// </summary>
|
||||
public VolumeInfo[] lightSourceVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add map restriction volumes to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] mapRestrictionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add notification volumes to this planet.
|
||||
/// </summary>
|
||||
public NotificationVolumeInfo[] notificationVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add oxygen volumes to this planet.
|
||||
/// </summary>
|
||||
public OxygenVolumeInfo[] oxygenVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add probe-specific volumes to this planet.
|
||||
/// </summary>
|
||||
public ProbeModule probe;
|
||||
|
||||
/// <summary>
|
||||
/// Add reference frame blocker volumes to this planet. These will stop the player from seeing/targeting any reference frames.
|
||||
/// </summary>
|
||||
public VolumeInfo[] referenceFrameBlockerVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add triggers that reveal parts of the ship log on this planet.
|
||||
/// </summary>
|
||||
public RevealVolumeInfo[] revealVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add reverb volumes to this planet. Great for echoes in caves.
|
||||
/// </summary>
|
||||
public VolumeInfo[] reverbVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add ruleset volumes to this planet.
|
||||
/// </summary>
|
||||
public RulesetModule rulesets;
|
||||
|
||||
/// <summary>
|
||||
/// Add speed trap volumes to this planet. Slows down the player when they enter this volume.
|
||||
/// </summary>
|
||||
public SpeedTrapVolumeInfo[] speedTrapVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add visor effect volumes to this planet.
|
||||
/// </summary>
|
||||
public VisorEffectModule visorEffects;
|
||||
|
||||
/// <summary>
|
||||
/// Add zero-gravity volumes to this planet.
|
||||
/// Good for surrounding planets which are using a static position to stop the player being pulled away.
|
||||
/// </summary>
|
||||
public PriorityVolumeInfo[] zeroGravityVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Entering this volume will load a new solar system.
|
||||
/// </summary>
|
||||
public ChangeStarSystemVolumeInfo[] solarSystemVolume;
|
||||
|
||||
/// <summary>
|
||||
/// Enter this volume to be sent to the end credits scene
|
||||
/// </summary>
|
||||
public LoadCreditsVolumeInfo[] creditsVolume;
|
||||
|
||||
[JsonObject]
|
||||
public class VolumeInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The radius of this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(1f)]
|
||||
public float radius = 1f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ChangeStarSystemVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The star system that entering this volume will send you to.
|
||||
/// </summary>
|
||||
[DefaultValue("SolarSystem")]
|
||||
public string targetStarSystem;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class LoadCreditsVolumeInfo : VolumeInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum CreditsType
|
||||
{
|
||||
[EnumMember(Value = @"fast")] Fast = 0,
|
||||
|
||||
[EnumMember(Value = @"final")] Final = 1,
|
||||
|
||||
[EnumMember(Value = @"kazoo")] Kazoo = 2
|
||||
}
|
||||
|
||||
[DefaultValue("fast")]
|
||||
public CreditsType creditsType = CreditsType.Fast;
|
||||
|
||||
/// <summary>
|
||||
/// Text displayed in orange on game over. For localization, put translations under UI.
|
||||
/// </summary>
|
||||
public string gameOverText;
|
||||
|
||||
/// <summary>
|
||||
/// The type of death the player will have if they enter this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("default")] public DestructionVolumeInfo.DeathType deathType = DestructionVolumeInfo.DeathType.Default;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class PriorityVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The layer of this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(0)]
|
||||
public int layer = 0;
|
||||
|
||||
/// <summary>
|
||||
/// The priority for this volume's effects to be applied.
|
||||
/// Ex, a player in a gravity volume with priority 0, and zero-gravity volume with priority 1, will feel zero gravity.
|
||||
/// </summary>
|
||||
[DefaultValue(1)]
|
||||
public int priority = 1;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RevealVolumeInfo : VolumeInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum RevealVolumeType
|
||||
{
|
||||
[EnumMember(Value = @"enter")] Enter = 0,
|
||||
|
||||
[EnumMember(Value = @"observe")] Observe = 1,
|
||||
|
||||
[EnumMember(Value = @"snapshot")] Snapshot = 2
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnterType
|
||||
{
|
||||
[EnumMember(Value = @"both")] Both = 0,
|
||||
|
||||
[EnumMember(Value = @"player")] Player = 1,
|
||||
|
||||
[EnumMember(Value = @"probe")] Probe = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only)
|
||||
/// </summary>
|
||||
[DefaultValue(180f)]
|
||||
public float maxAngle = 180f; // Observe Only
|
||||
|
||||
/// <summary>
|
||||
/// The max distance the user can be away from the volume to reveal the fact (`snapshot` and `observe` only)
|
||||
/// </summary>
|
||||
[DefaultValue(-1f)]
|
||||
public float maxDistance = -1f; // Snapshot & Observe Only
|
||||
|
||||
/// <summary>
|
||||
/// What needs to be done to the volume to unlock the facts
|
||||
/// </summary>
|
||||
[DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter;
|
||||
|
||||
/// <summary>
|
||||
/// What can enter the volume to unlock the facts (`enter` only)
|
||||
/// </summary>
|
||||
[DefaultValue("both")] public EnterType revealFor = EnterType.Both;
|
||||
|
||||
/// <summary>
|
||||
/// A list of facts to reveal
|
||||
/// </summary>
|
||||
public string[] reveals;
|
||||
|
||||
/// <summary>
|
||||
/// An achievement to unlock. Optional.
|
||||
/// </summary>
|
||||
public string achievementID;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class AudioVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
|
||||
/// </summary>
|
||||
public string audio;
|
||||
|
||||
[DefaultValue("random")] public ClipSelectionType clipSelection = ClipSelectionType.RANDOM;
|
||||
|
||||
/// <summary>
|
||||
/// The audio track of this audio volume
|
||||
/// </summary>
|
||||
[DefaultValue("environment")] public AudioMixerTrackName track = AudioMixerTrackName.Environment;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to loop this audio while in this audio volume or just play it once
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool loop = true;
|
||||
|
||||
/// <summary>
|
||||
/// The loudness of the audio
|
||||
/// </summary>
|
||||
[Range(0f, 1f)]
|
||||
[DefaultValue(1f)]
|
||||
public float volume = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// How long it will take to fade this sound in and out when entering/exiting this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(2f)]
|
||||
public float fadeSeconds = 2f;
|
||||
|
||||
/// <summary>
|
||||
/// Play the sound instantly without any fading.
|
||||
/// </summary>
|
||||
public bool noFadeFromBeginning;
|
||||
|
||||
/// <summary>
|
||||
/// Randomize what time the audio starts at.
|
||||
/// </summary>
|
||||
public bool randomizePlayhead;
|
||||
|
||||
/// <summary>
|
||||
/// Pause the music when exiting the volume.
|
||||
/// </summary>
|
||||
public bool pauseOnFadeOut;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class NotificationVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// What the notification will show for.
|
||||
/// </summary>
|
||||
[DefaultValue("all")] public NotificationTarget target = NotificationTarget.All;
|
||||
|
||||
/// <summary>
|
||||
/// The notification that will play when you enter this volume.
|
||||
/// </summary>
|
||||
public NotificationInfo entryNotification;
|
||||
|
||||
/// <summary>
|
||||
/// The notification that will play when you exit this volume.
|
||||
/// </summary>
|
||||
public NotificationInfo exitNotification;
|
||||
|
||||
|
||||
[JsonObject]
|
||||
public class NotificationInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The message that will be displayed.
|
||||
/// </summary>
|
||||
public string displayMessage;
|
||||
|
||||
/// <summary>
|
||||
/// The duration this notification will be displayed.
|
||||
/// </summary>
|
||||
[DefaultValue(5f)] public float duration = 5f;
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NotificationTarget
|
||||
{
|
||||
[EnumMember(Value = @"all")] All = 0,
|
||||
[EnumMember(Value = @"ship")] Ship = 1,
|
||||
[EnumMember(Value = @"player")] Player = 2,
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class HazardVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of hazard for this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("general")] public HazardType type = HazardType.GENERAL;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of damage you will take per second while inside this volume.
|
||||
/// </summary>
|
||||
[DefaultValue(10f)] public float damagePerSecond = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// The type of damage you will take when you first touch this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("impact")] public InstantDamageType firstContactDamageType = InstantDamageType.Impact;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of damage you will take when you first touch this volume.
|
||||
/// </summary>
|
||||
public float firstContactDamage;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum HazardType
|
||||
{
|
||||
[EnumMember(Value = @"none")] NONE = 0,
|
||||
[EnumMember(Value = @"general")] GENERAL = 1,
|
||||
[EnumMember(Value = @"ghostMatter")] DARKMATTER = 2,
|
||||
[EnumMember(Value = @"heat")] HEAT = 4,
|
||||
[EnumMember(Value = @"fire")] FIRE = 8,
|
||||
[EnumMember(Value = @"sandfall")] SANDFALL = 16,
|
||||
[EnumMember(Value = @"electricity")] ELECTRICITY = 32,
|
||||
[EnumMember(Value = @"rapids")] RAPIDS = 64,
|
||||
[EnumMember(Value = @"riverHeat")] RIVERHEAT = 128,
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum InstantDamageType
|
||||
{
|
||||
[EnumMember(Value = @"impact")] Impact,
|
||||
[EnumMember(Value = @"puncture")] Puncture,
|
||||
[EnumMember(Value = @"electrical")] Electrical
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VanishVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the bodies will shrink when they enter this volume or just disappear instantly.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool shrinkBodies = true;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this volume only affects the player and ship.
|
||||
/// </summary>
|
||||
public bool onlyAffectsPlayerAndShip;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DestructionVolumeInfo : VanishVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The type of death the player will have if they enter this volume.
|
||||
/// </summary>
|
||||
[DefaultValue("default")] public DeathType deathType = DeathType.Default;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum DeathType
|
||||
{
|
||||
[EnumMember(Value = @"default")] Default,
|
||||
[EnumMember(Value = @"impact")] Impact,
|
||||
[EnumMember(Value = @"asphyxiation")] Asphyxiation,
|
||||
[EnumMember(Value = @"energy")] Energy,
|
||||
[EnumMember(Value = @"supernova")] Supernova,
|
||||
[EnumMember(Value = @"digestion")] Digestion,
|
||||
[EnumMember(Value = @"bigBang")] BigBang,
|
||||
[EnumMember(Value = @"crushed")] Crushed,
|
||||
[EnumMember(Value = @"meditation")] Meditation,
|
||||
[EnumMember(Value = @"timeLoop")] TimeLoop,
|
||||
[EnumMember(Value = @"lava")] Lava,
|
||||
[EnumMember(Value = @"blackHole")] BlackHole,
|
||||
[EnumMember(Value = @"dream")] Dream,
|
||||
[EnumMember(Value = @"dreamExplosion")] DreamExplosion,
|
||||
[EnumMember(Value = @"crushedByElevator")] CrushedByElevator
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class OxygenVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Does this volume contain trees? This will change the notification from "Oxygen tank refilled" to "Trees detected, oxygen tank refilled".
|
||||
/// </summary>
|
||||
public bool treeVolume;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to play the oxygen tank refill sound or just fill quietly.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool playRefillAudio = true;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class FluidVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Density of the fluid. The higher the density, the harder it is to go through this fluid.
|
||||
/// </summary>
|
||||
[DefaultValue(1.2f)] public float density = 1.2f;
|
||||
|
||||
/// <summary>
|
||||
/// The type of fluid for this volume.
|
||||
/// </summary>
|
||||
public FluidType type;
|
||||
|
||||
/// <summary>
|
||||
/// Should the player and rafts align to this fluid.
|
||||
/// </summary>
|
||||
[DefaultValue(true)] public bool alignmentFluid = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should the ship align to the fluid by rolling.
|
||||
/// </summary>
|
||||
public bool allowShipAutoroll;
|
||||
|
||||
/// <summary>
|
||||
/// Disable this fluid volume immediately?
|
||||
/// </summary>
|
||||
public bool disableOnStart;
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum FluidType
|
||||
{
|
||||
[EnumMember(Value = @"none")] NONE = 0,
|
||||
[EnumMember(Value = @"air")] AIR,
|
||||
[EnumMember(Value = @"water")] WATER,
|
||||
[EnumMember(Value = @"cloud")] CLOUD,
|
||||
[EnumMember(Value = @"sand")] SAND,
|
||||
[EnumMember(Value = @"plasma")] PLASMA,
|
||||
[EnumMember(Value = @"fog")] FOG
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProbeModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add probe destruction volumes to this planet. These will delete your probe.
|
||||
/// </summary>
|
||||
public VolumeInfo[] destructionVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working.
|
||||
/// </summary>
|
||||
public VolumeInfo[] safetyVolumes;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VisorEffectModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add visor frost effect volumes to this planet. This is the ghost matter effect.
|
||||
/// </summary>
|
||||
public FrostEffectVolumeInfo[] frostEffectVolumes;
|
||||
|
||||
/// <summary>
|
||||
/// Add visor rain effect volumes to this planet. You can see this on Giant's Deep.
|
||||
/// </summary>
|
||||
public RainEffectVolumeInfo[] rainEffectVolumes;
|
||||
|
||||
[JsonObject]
|
||||
public class FrostEffectVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The rate at which the frost effect will get stronger
|
||||
/// </summary>
|
||||
[DefaultValue(0.5f)]
|
||||
public float frostRate = 0.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum strength of frost this volume can give
|
||||
/// </summary>
|
||||
[Range(0f, 1f)]
|
||||
[DefaultValue(0.91f)]
|
||||
public float maxFrost = 0.91f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RainEffectVolumeInfo : PriorityVolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The rate at which the rain droplet effect will happen
|
||||
/// </summary>
|
||||
[DefaultValue(0.1f)]
|
||||
public float dropletRate = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// The rate at which the rain streak effect will happen
|
||||
/// </summary>
|
||||
[DefaultValue(1f)]
|
||||
public float streakRate = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RulesetModule
|
||||
{
|
||||
/// <summary>
|
||||
/// Add anti travel music rulesets to this planet.
|
||||
/// </summary>
|
||||
public VolumeInfo[] antiTravelMusicRulesets;
|
||||
/// <summary>
|
||||
/// Add player impact rulesets to this planet.
|
||||
/// </summary>
|
||||
public PlayerImpactRulesetInfo[] playerImpactRulesets;
|
||||
/// <summary>
|
||||
/// Add probe rulesets to this planet.
|
||||
/// </summary>
|
||||
public ProbeRulesetInfo[] probeRulesets;
|
||||
/// <summary>
|
||||
/// Add thrust rulesets to this planet.
|
||||
/// </summary>
|
||||
public ThrustRulesetInfo[] thrustRulesets;
|
||||
|
||||
[JsonObject]
|
||||
public class PlayerImpactRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Minimum player impact speed. Player will take the minimum amount of damage if they impact something at this speed.
|
||||
/// </summary>
|
||||
[DefaultValue(20f)] public float minImpactSpeed = 20f;
|
||||
|
||||
/// <summary>
|
||||
/// Maximum player impact speed. Players will die if they impact something at this speed.
|
||||
/// </summary>
|
||||
[DefaultValue(40f)] public float maxImpactSpeed = 40f;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProbeRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Should this ruleset override the probe's speed?
|
||||
/// </summary>
|
||||
public bool overrideProbeSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// The speed of the probe while in this ruleset volume.
|
||||
/// </summary>
|
||||
public float probeSpeed;
|
||||
|
||||
/// <summary>
|
||||
/// Should this ruleset override the range of probe's light?
|
||||
/// </summary>
|
||||
public bool overrideLanternRange;
|
||||
|
||||
/// <summary>
|
||||
/// The range of probe's light while in this ruleset volume.
|
||||
/// </summary>
|
||||
public float lanternRange;
|
||||
|
||||
/// <summary>
|
||||
/// Stop the probe from attaching to anything while in this ruleset volume.
|
||||
/// </summary>
|
||||
public bool ignoreAnchor;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ThrustRulesetInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Limit how fast you can fly with your ship while in this ruleset volume.
|
||||
/// </summary>
|
||||
[DefaultValue(float.PositiveInfinity)] public float thrustLimit = float.PositiveInfinity;
|
||||
|
||||
/// <summary>
|
||||
/// Nerf the jetpack booster.
|
||||
/// </summary>
|
||||
public bool nerfJetpackBooster;
|
||||
|
||||
/// <summary>
|
||||
/// How long the jetpack booster will be nerfed.
|
||||
/// </summary>
|
||||
[DefaultValue(0.5f)] public float nerfDuration = 0.5f;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class SpeedTrapVolumeInfo : VolumeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The speed the volume will slow you down to when you enter it.
|
||||
/// </summary>
|
||||
[DefaultValue(10f)]
|
||||
public float speedLimit = 10f;
|
||||
|
||||
/// <summary>
|
||||
/// How fast it will slow down the player to the speed limit.
|
||||
/// </summary>
|
||||
[DefaultValue(3f)]
|
||||
public float acceleration = 3f;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ClipSelectionType
|
||||
{
|
||||
[EnumMember(Value = @"random")] RANDOM,
|
||||
[EnumMember(Value = @"sequential")] SEQUENTIAL,
|
||||
[EnumMember(Value = @"manual")] MANUAL
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum AudioMixerTrackName
|
||||
{
|
||||
[EnumMember(Value = @"undefined")] Undefined = 0,
|
||||
[EnumMember(Value = @"menu")] Menu = 1,
|
||||
[EnumMember(Value = @"music")] Music = 2,
|
||||
[EnumMember(Value = @"environment")] Environment = 4,
|
||||
[EnumMember(Value = @"environmentUnfiltered")] Environment_Unfiltered = 5,
|
||||
[EnumMember(Value = @"endTimesSfx")] EndTimes_SFX = 8,
|
||||
[EnumMember(Value = @"signal")] Signal = 16,
|
||||
[EnumMember(Value = @"death")] Death = 32,
|
||||
[EnumMember(Value = @"player")] Player = 64,
|
||||
[EnumMember(Value = @"playerExternal")] Player_External = 65,
|
||||
[EnumMember(Value = @"ship")] Ship = 128,
|
||||
[EnumMember(Value = @"map")] Map = 256,
|
||||
[EnumMember(Value = @"endTimesMusic")] EndTimes_Music = 512,
|
||||
[EnumMember(Value = @"muffleWhileRafting")] MuffleWhileRafting = 1024,
|
||||
[EnumMember(Value = @"muffleIndoors")] MuffleIndoors = 2048,
|
||||
[EnumMember(Value = @"slideReelMusic")] SlideReelMusic = 4096,
|
||||
}
|
||||
}
|
||||
@ -3,9 +3,9 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using NewHorizons.Utility;
|
||||
using OWML.Common;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using NewHorizons.Utility;
|
||||
|
||||
namespace NewHorizons.Handlers
|
||||
{
|
||||
|
||||
@ -12,6 +12,8 @@ using Newtonsoft.Json.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using Logger = NewHorizons.Utility.Logger;
|
||||
using NewHorizons.External.Modules.Props.Dialogue;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
|
||||
namespace NewHorizons
|
||||
{
|
||||
@ -158,7 +160,7 @@ namespace NewHorizons
|
||||
float scale, bool alignRadial)
|
||||
{
|
||||
var prefab = SearchUtilities.Find(propToCopyPath);
|
||||
var detailInfo = new PropModule.DetailInfo() {
|
||||
var detailInfo = new DetailInfo() {
|
||||
position = position,
|
||||
rotation = eulerAngles,
|
||||
scale = scale,
|
||||
@ -192,7 +194,7 @@ namespace NewHorizons
|
||||
float range = 1f, string blockAfterPersistentCondition = null, float lookAtRadius = 1f, string pathToAnimController = null,
|
||||
float remoteTriggerRadius = 0f)
|
||||
{
|
||||
var info = new PropModule.DialogueInfo()
|
||||
var info = new DialogueInfo()
|
||||
{
|
||||
blockAfterPersistentCondition = blockAfterPersistentCondition,
|
||||
lookAtRadius = lookAtRadius,
|
||||
@ -201,7 +203,7 @@ namespace NewHorizons
|
||||
radius = radius,
|
||||
range = range,
|
||||
xmlFile = xmlFile,
|
||||
remoteTrigger = new PropModule.DialogueInfo.RemoteTriggerInfo()
|
||||
remoteTrigger = new RemoteTriggerInfo()
|
||||
{
|
||||
position = null,
|
||||
radius = remoteTriggerRadius,
|
||||
|
||||
@ -35,7 +35,7 @@ namespace NewHorizons.Utility
|
||||
}
|
||||
}
|
||||
|
||||
if (EnumUtils.TryParse<AudioType>(audio, out AudioType type))
|
||||
if (EnumUtils.TryParse(audio, out AudioType type))
|
||||
{
|
||||
source._audioLibraryClip = type;
|
||||
}
|
||||
@ -62,7 +62,7 @@ namespace NewHorizons.Utility
|
||||
_loadedAudioClips.Add(path, task.Result);
|
||||
return task.Result;
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Couldn't load Audio at {path} : {ex}");
|
||||
return null;
|
||||
@ -89,13 +89,13 @@ namespace NewHorizons.Utility
|
||||
|
||||
switch (extension)
|
||||
{
|
||||
case (".wav"):
|
||||
case ".wav":
|
||||
audioType = UnityEngine.AudioType.WAV;
|
||||
break;
|
||||
case (".ogg"):
|
||||
case ".ogg":
|
||||
audioType = UnityEngine.AudioType.OGGVORBIS;
|
||||
break;
|
||||
case (".mp3"):
|
||||
case ".mp3":
|
||||
audioType = UnityEngine.AudioType.MPEG;
|
||||
break;
|
||||
default:
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
using NewHorizons.Builder.Props;
|
||||
using NewHorizons.External.Configs;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Props;
|
||||
using NewHorizons.Handlers;
|
||||
using NewHorizons.Utility.OWUtilities;
|
||||
using System.Collections.Generic;
|
||||
@ -23,7 +24,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
public AstroObject body;
|
||||
public string system;
|
||||
public GameObject gameObject;
|
||||
public PropModule.DetailInfo detailInfo;
|
||||
public DetailInfo detailInfo;
|
||||
}
|
||||
|
||||
// VASE
|
||||
@ -150,7 +151,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
|
||||
var sector = planetGO.GetComponentInChildren<Sector>();
|
||||
var prefab = SearchUtilities.Find(currentObject);
|
||||
var detailInfo = new PropModule.DetailInfo()
|
||||
var detailInfo = new DetailInfo()
|
||||
{
|
||||
position = data.pos,
|
||||
rotation = data.rot.eulerAngles,
|
||||
@ -215,7 +216,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
RegisterProp_WithReturn(body, prop);
|
||||
}
|
||||
|
||||
private PropPlacementData RegisterProp_WithReturn(AstroObject body, GameObject prop, string propPath = null, PropModule.DetailInfo detailInfo = null)
|
||||
private PropPlacementData RegisterProp_WithReturn(AstroObject body, GameObject prop, string propPath = null, DetailInfo detailInfo = null)
|
||||
{
|
||||
if (Main.Debug)
|
||||
{
|
||||
@ -227,7 +228,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
Logger.LogVerbose($"Adding prop to {Main.Instance.CurrentStarSystem}::{body.name}");
|
||||
|
||||
|
||||
detailInfo = detailInfo == null ? new PropModule.DetailInfo() : detailInfo;
|
||||
detailInfo = detailInfo == null ? new DetailInfo() : detailInfo;
|
||||
detailInfo.path = propPath == null ? currentObject : propPath;
|
||||
|
||||
PropPlacementData data = new PropPlacementData
|
||||
@ -242,14 +243,14 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
return data;
|
||||
}
|
||||
|
||||
public Dictionary<AstroObject, PropModule.DetailInfo[]> GetPropsConfigByBody()
|
||||
public Dictionary<AstroObject, DetailInfo[]> GetPropsConfigByBody()
|
||||
{
|
||||
var groupedProps = props
|
||||
.GroupBy(p => p.system + "." + p.body)
|
||||
.Select(grp => grp.ToList())
|
||||
.ToList();
|
||||
|
||||
Dictionary<AstroObject, PropModule.DetailInfo[]> propConfigs = new Dictionary<AstroObject, PropModule.DetailInfo[]>();
|
||||
Dictionary<AstroObject, DetailInfo[]> propConfigs = new();
|
||||
|
||||
foreach (List<PropPlacementData> bodyProps in groupedProps)
|
||||
{
|
||||
@ -259,7 +260,7 @@ namespace NewHorizons.Utility.DebugUtilities
|
||||
Logger.LogVerbose("getting prop group for body " + body.name);
|
||||
//string bodyName = GetAstroObjectName(bodyProps[0].body);
|
||||
|
||||
PropModule.DetailInfo[] infoArray = new PropModule.DetailInfo[bodyProps.Count];
|
||||
DetailInfo[] infoArray = new DetailInfo[bodyProps.Count];
|
||||
propConfigs[body] = infoArray;
|
||||
|
||||
for (int i = 0; i < bodyProps.Count; i++)
|
||||
|
||||
@ -131,7 +131,7 @@ namespace NewHorizons.Utility
|
||||
{
|
||||
var size = 256;
|
||||
|
||||
var texture = (new Texture2D(size * 4, size * 4, TextureFormat.ARGB32, false));
|
||||
var texture = new Texture2D(size * 4, size * 4, TextureFormat.ARGB32, false);
|
||||
texture.name = "SlideReelAtlas";
|
||||
|
||||
var fillPixels = new Color[size * size * 4 * 4];
|
||||
@ -161,9 +161,9 @@ namespace NewHorizons.Utility
|
||||
var x = xIndex * size + i;
|
||||
// Want it to start from the first row from the bottom then go down then modulo around idk
|
||||
// 5 because no pos mod idk
|
||||
var y = ((5 - yIndex) % 4) * size + j;
|
||||
var y = (5 - yIndex) % 4 * size + j;
|
||||
|
||||
var pixelIndex = x + y * (size * 4);
|
||||
var pixelIndex = x + y * size * 4;
|
||||
|
||||
if (pixelIndex < fillPixels.Length && pixelIndex >= 0) fillPixels[pixelIndex] = colour;
|
||||
}
|
||||
@ -230,7 +230,7 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static Texture2D TintImage(Texture2D image, Color tint)
|
||||
{
|
||||
if(image == null)
|
||||
if (image == null)
|
||||
{
|
||||
Logger.LogError($"Tried to tint null image");
|
||||
return null;
|
||||
@ -280,7 +280,7 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static Texture2D ClearTexture(int width, int height, bool wrap = false)
|
||||
{
|
||||
var tex = (new Texture2D(1, 1, TextureFormat.ARGB32, false));
|
||||
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
|
||||
tex.name = "Clear";
|
||||
var fillColor = Color.clear;
|
||||
var fillPixels = new Color[tex.width * tex.height];
|
||||
@ -300,7 +300,7 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static Texture2D CanvasScaled(Texture2D src, int width, int height)
|
||||
{
|
||||
var tex = (new Texture2D(width, height, src.format, src.mipmapCount != 1));
|
||||
var tex = new Texture2D(width, height, src.format, src.mipmapCount != 1);
|
||||
tex.name = src.name + "CanvasScaled";
|
||||
var fillPixels = new Color[tex.width * tex.height];
|
||||
for (int i = 0; i < tex.width; i++)
|
||||
@ -345,9 +345,9 @@ namespace NewHorizons.Utility
|
||||
}
|
||||
public static Texture2D MakeSolidColorTexture(int width, int height, Color color)
|
||||
{
|
||||
var pixels = new Color[width*height];
|
||||
var pixels = new Color[width * height];
|
||||
|
||||
for(int i = 0; i < pixels.Length; i++)
|
||||
for (int i = 0; i < pixels.Length; i++)
|
||||
{
|
||||
pixels[i] = color;
|
||||
}
|
||||
@ -370,10 +370,10 @@ namespace NewHorizons.Utility
|
||||
// Modified from https://stackoverflow.com/a/69141085/9643841
|
||||
public class AsyncImageLoader : MonoBehaviour
|
||||
{
|
||||
public List<(int index, string path)> PathsToLoad { get; private set; } = new ();
|
||||
public List<(int index, string path)> PathsToLoad { get; private set; } = new();
|
||||
|
||||
public class ImageLoadedEvent : UnityEvent<Texture2D, int> { }
|
||||
public ImageLoadedEvent imageLoadedEvent = new ();
|
||||
public ImageLoadedEvent imageLoadedEvent = new();
|
||||
|
||||
private readonly object _lockObj = new();
|
||||
|
||||
@ -409,7 +409,7 @@ namespace NewHorizons.Utility
|
||||
|
||||
IEnumerator DownloadTexture(string url, int index)
|
||||
{
|
||||
lock(_loadedTextures)
|
||||
lock (_loadedTextures)
|
||||
{
|
||||
if (_loadedTextures.ContainsKey(url))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user