From 77fc15f18ed5aa7b066a17271fe37cadfa0537f2 Mon Sep 17 00:00:00 2001 From: Joshua Thome Date: Sat, 18 Mar 2023 12:35:15 -0500 Subject: [PATCH] Revert "Moved prop info and volume info classes to their own files" This reverts commit 550c96d1678a0969edaa40c7266d9459ccd4c2f8. --- .../Builder/Body/BrambleDimensionBuilder.cs | 3 +- NewHorizons/Builder/Body/ProxyBuilder.cs | 4 +- .../Builder/Body/SingularityBuilder.cs | 8 +- .../Builder/Props/BrambleNodeBuilder.cs | 1 - NewHorizons/Builder/Props/DetailBuilder.cs | 11 +- NewHorizons/Builder/Props/DialogueBuilder.cs | 15 +- .../Builder/Props/GeneralPropBuilder.cs | 11 +- NewHorizons/Builder/Props/GeyserBuilder.cs | 3 +- NewHorizons/Builder/Props/NomaiTextBuilder.cs | 55 +- .../Builder/Props/ProjectionBuilder.cs | 25 +- NewHorizons/Builder/Props/QuantumBuilder.cs | 15 +- NewHorizons/Builder/Props/RaftBuilder.cs | 3 +- NewHorizons/Builder/Props/RemoteBuilder.cs | 17 +- NewHorizons/Builder/Props/ScatterBuilder.cs | 5 +- NewHorizons/Builder/Props/SignalBuilder.cs | 3 +- NewHorizons/Builder/Props/TornadoBuilder.cs | 13 +- .../TranslatorText/TranslatorTextBuilder.cs | 55 +- NewHorizons/Builder/Props/VolcanoBuilder.cs | 5 +- .../Builder/ShipLog/EntryLocationBuilder.cs | 3 +- NewHorizons/Builder/ShipLog/MapModeBuilder.cs | 6 +- NewHorizons/Builder/ShipLog/RevealBuilder.cs | 29 +- .../Builder/Volumes/AudioVolumeBuilder.cs | 3 +- .../Volumes/ChangeStarSystemVolumeBuilder.cs | 3 +- .../Builder/Volumes/CreditsVolumeBuilder.cs | 3 +- .../Volumes/DestructionVolumeBuilder.cs | 3 +- .../Builder/Volumes/FluidVolumeBuilder.cs | 3 +- .../Builder/Volumes/HazardVolumeBuilder.cs | 11 +- .../Volumes/NotificationVolumeBuilder.cs | 3 +- .../Builder/Volumes/OxygenVolumeBuilder.cs | 3 +- .../Builder/Volumes/PriorityVolumeBuilder.cs | 3 +- .../Rulesets/PlayerImpactRulesetBuilder.cs | 2 +- .../Volumes/Rulesets/ProbeRulesetBuilder.cs | 2 +- .../Volumes/Rulesets/ThrustRulesetBuilder.cs | 2 +- .../Builder/Volumes/SpeedTrapVolumeBuilder.cs | 3 +- .../Builder/Volumes/VanishVolumeBuilder.cs | 3 +- .../VisorFrostEffectVolumeBuilder.cs | 2 +- .../VisorRainEffectVolumeBuilder.cs | 2 +- NewHorizons/Builder/Volumes/VolumeBuilder.cs | 3 +- .../Builder/Volumes/ZeroGVolumeBuilder.cs | 3 +- .../Components/Volumes/LoadCreditsVolume.cs | 9 +- .../Components/Volumes/NotificationVolume.cs | 3 +- NewHorizons/External/Configs/PlanetConfig.cs | 42 +- .../External/Configs/StarSystemConfig.cs | 5 +- NewHorizons/External/Modules/BrambleModule.cs | 62 +- NewHorizons/External/Modules/ProbeModule.cs | 20 - NewHorizons/External/Modules/PropModule.cs | 828 +++++++++++++++++- NewHorizons/External/Modules/RulesetModule.cs | 90 -- NewHorizons/External/Modules/SignalModule.cs | 59 +- NewHorizons/External/Modules/SpawnModule.cs | 5 +- .../VariableSize/SingularityModule.cs} | 6 +- .../External/Modules/VisorEffectModule.cs | 55 -- NewHorizons/External/Modules/VolumesModule.cs | 536 +++++++++++- NewHorizons/External/Props/BrambleNodeInfo.cs | 73 -- NewHorizons/External/Props/DetailInfo.cs | 76 -- NewHorizons/External/Props/DialogueInfo.cs | 85 -- .../External/Props/EntryLocationInfo.cs | 18 - .../External/Props/GeneralPointPropInfo.cs | 29 - NewHorizons/External/Props/GeneralPropInfo.cs | 14 - .../Props/GeneralSolarSystemPropInfo.cs | 13 - NewHorizons/External/Props/GeyserInfo.cs | 46 - .../External/Props/NomaiTextArcInfo.cs | 54 -- NewHorizons/External/Props/NomaiTextInfo.cs | 81 -- NewHorizons/External/Props/ProjectionInfo.cs | 47 - .../External/Props/QuantumGroupInfo.cs | 51 -- .../External/Props/QuantumSocketInfo.cs | 14 - NewHorizons/External/Props/RaftInfo.cs | 14 - NewHorizons/External/Props/RemoteInfo.cs | 107 --- NewHorizons/External/Props/ScatterInfo.cs | 71 -- NewHorizons/External/Props/SignalInfo.cs | 71 -- NewHorizons/External/Props/SlideInfo.cs | 85 -- NewHorizons/External/Props/TornadoInfo.cs | 73 -- NewHorizons/External/Props/VolcanoInfo.cs | 50 -- .../External/Volumes/AudioVolumeInfo.cs | 88 -- .../Volumes/ChangeStarSystemVolumeInfo.cs | 16 - .../External/Volumes/DestructionVolumeInfo.cs | 37 - .../External/Volumes/FluidVolumeInfo.cs | 49 -- .../External/Volumes/HazardVolumeInfo.cs | 54 -- .../External/Volumes/LoadCreditsVolumeInfo.cs | 25 - .../Volumes/NotificationVolumeInfo.cs | 50 -- .../External/Volumes/OxygenVolumeInfo.cs | 20 - .../External/Volumes/PriorityVolumeInfo.cs | 23 - .../External/Volumes/RevealVolumeInfo.cs | 64 -- .../External/Volumes/SpeedTrapVolumeInfo.cs | 22 - .../External/Volumes/VanishVolumeInfo.cs | 20 - NewHorizons/External/Volumes/VolumeInfo.cs | 121 --- NewHorizons/NewHorizonsApi.cs | 9 +- .../Utility/DebugUtilities/DebugPropPlacer.cs | 15 +- 87 files changed, 1676 insertions(+), 2076 deletions(-) delete mode 100644 NewHorizons/External/Modules/ProbeModule.cs delete mode 100644 NewHorizons/External/Modules/RulesetModule.cs rename NewHorizons/External/{Props/SingularityInfo.cs => Modules/VariableSize/SingularityModule.cs} (92%) delete mode 100644 NewHorizons/External/Modules/VisorEffectModule.cs delete mode 100644 NewHorizons/External/Props/BrambleNodeInfo.cs delete mode 100644 NewHorizons/External/Props/DetailInfo.cs delete mode 100644 NewHorizons/External/Props/DialogueInfo.cs delete mode 100644 NewHorizons/External/Props/EntryLocationInfo.cs delete mode 100644 NewHorizons/External/Props/GeneralPointPropInfo.cs delete mode 100644 NewHorizons/External/Props/GeneralPropInfo.cs delete mode 100644 NewHorizons/External/Props/GeneralSolarSystemPropInfo.cs delete mode 100644 NewHorizons/External/Props/GeyserInfo.cs delete mode 100644 NewHorizons/External/Props/NomaiTextArcInfo.cs delete mode 100644 NewHorizons/External/Props/NomaiTextInfo.cs delete mode 100644 NewHorizons/External/Props/ProjectionInfo.cs delete mode 100644 NewHorizons/External/Props/QuantumGroupInfo.cs delete mode 100644 NewHorizons/External/Props/QuantumSocketInfo.cs delete mode 100644 NewHorizons/External/Props/RaftInfo.cs delete mode 100644 NewHorizons/External/Props/RemoteInfo.cs delete mode 100644 NewHorizons/External/Props/ScatterInfo.cs delete mode 100644 NewHorizons/External/Props/SignalInfo.cs delete mode 100644 NewHorizons/External/Props/SlideInfo.cs delete mode 100644 NewHorizons/External/Props/TornadoInfo.cs delete mode 100644 NewHorizons/External/Props/VolcanoInfo.cs delete mode 100644 NewHorizons/External/Volumes/AudioVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/ChangeStarSystemVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/DestructionVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/FluidVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/HazardVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/LoadCreditsVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/NotificationVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/OxygenVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/PriorityVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/RevealVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/SpeedTrapVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/VanishVolumeInfo.cs delete mode 100644 NewHorizons/External/Volumes/VolumeInfo.cs diff --git a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs index 4501dce3..02f32731 100644 --- a/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs +++ b/NewHorizons/Builder/Body/BrambleDimensionBuilder.cs @@ -10,7 +10,6 @@ using System.Linq; using UnityEngine; using Logger = NewHorizons.Utility.Logger; using static NewHorizons.Main; -using NewHorizons.External.Props; namespace NewHorizons.Builder.Body { @@ -104,7 +103,7 @@ namespace NewHorizons.Builder.Body default: geometryPrefab = _hubGeometry; break; } - var detailInfo = new DetailInfo(); + var detailInfo = new PropModule.DetailInfo(); var geometry = DetailBuilder.Make(go, sector, geometryPrefab, detailInfo); var exitWarps = _exitWarps.InstantiateInactive(); diff --git a/NewHorizons/Builder/Body/ProxyBuilder.cs b/NewHorizons/Builder/Body/ProxyBuilder.cs index 6b085aff..f2a76bce 100644 --- a/NewHorizons/Builder/Body/ProxyBuilder.cs +++ b/NewHorizons/Builder/Body/ProxyBuilder.cs @@ -2,7 +2,7 @@ using NewHorizons.Builder.Atmosphere; using NewHorizons.Builder.Props; using NewHorizons.Components; using NewHorizons.Components.SizeControllers; -using NewHorizons.External.Props; +using NewHorizons.External.Modules.VariableSize; using NewHorizons.Handlers; using NewHorizons.Utility; using System; @@ -187,7 +187,7 @@ namespace NewHorizons.Builder.Body { foreach (var singularity in body.Config.Props.singularities) { - var polarity = singularity.type == SingularityInfo.SingularityType.BlackHole; + var polarity = singularity.type == SingularityModule.SingularityType.BlackHole; SingularityBuilder.MakeSingularityProxy(proxy, singularity.position, polarity, singularity.horizonRadius, singularity.distortRadius, singularity.curve, singularity.renderQueueOverride); if (realSize < singularity.distortRadius) realSize = singularity.distortRadius; } diff --git a/NewHorizons/Builder/Body/SingularityBuilder.cs b/NewHorizons/Builder/Body/SingularityBuilder.cs index 0c2e4df2..97c53010 100644 --- a/NewHorizons/Builder/Body/SingularityBuilder.cs +++ b/NewHorizons/Builder/Body/SingularityBuilder.cs @@ -1,6 +1,7 @@ using NewHorizons.External.Configs; using NewHorizons.Utility; using System; +using NewHorizons.External.Modules.VariableSize; using UnityEngine; using Logger = NewHorizons.Utility.Logger; using System.Collections.Generic; @@ -10,7 +11,6 @@ using System.Drawing; using Color = UnityEngine.Color; using NewHorizons.Components.Volumes; using NewHorizons.Builder.Props; -using NewHorizons.External.Props; namespace NewHorizons.Builder.Body { @@ -70,7 +70,7 @@ namespace NewHorizons.Builder.Body if (_whiteHoleVolume == null) _whiteHoleVolume = SearchUtilities.Find("WhiteHole_Body/WhiteHoleVolume").InstantiateInactive().Rename("WhiteHoleVolume").DontDestroyOnLoad(); } - public static void Make(GameObject go, Sector sector, OWRigidbody OWRB, PlanetConfig config, SingularityInfo singularity) + public static void Make(GameObject go, Sector sector, OWRigidbody OWRB, PlanetConfig config, SingularityModule singularity) { InitPrefabs(); @@ -81,7 +81,7 @@ namespace NewHorizons.Builder.Body var distortRadius = singularity.distortRadius != 0f ? singularity.distortRadius : horizonRadius * 2.5f; var pairedSingularity = singularity.pairedSingularity; - bool polarity = singularity.type == SingularityInfo.SingularityType.BlackHole; + bool polarity = singularity.type == SingularityModule.SingularityType.BlackHole; bool isWormHole = singularity?.targetStarSystem != null; bool hasHazardVolume = !isWormHole && (pairedSingularity == null); @@ -140,7 +140,7 @@ namespace NewHorizons.Builder.Body // polarity true = black, false = white - var info = new SingularityInfo + var info = new SingularityModule { position = position, rotation = rotation, diff --git a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs index 8996604e..4a836fb4 100644 --- a/NewHorizons/Builder/Props/BrambleNodeBuilder.cs +++ b/NewHorizons/Builder/Props/BrambleNodeBuilder.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.Body; using NewHorizons.Components; using NewHorizons.External.Configs; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; diff --git a/NewHorizons/Builder/Props/DetailBuilder.cs b/NewHorizons/Builder/Props/DetailBuilder.cs index 00d7888a..88aa7db5 100644 --- a/NewHorizons/Builder/Props/DetailBuilder.cs +++ b/NewHorizons/Builder/Props/DetailBuilder.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.General; using NewHorizons.Components; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; @@ -16,7 +15,7 @@ namespace NewHorizons.Builder.Props { public static class DetailBuilder { - private static readonly Dictionary _detailInfoToCorrespondingSpawnedGameObject = new(); + private static readonly Dictionary _detailInfoToCorrespondingSpawnedGameObject = new(); private static readonly Dictionary<(Sector, string), (GameObject prefab, bool isItem)> _fixedPrefabCache = new(); static DetailBuilder() @@ -34,7 +33,7 @@ namespace NewHorizons.Builder.Props _detailInfoToCorrespondingSpawnedGameObject.Clear(); } - public static GameObject GetSpawnedGameObjectByDetailInfo(DetailInfo detail) + public static GameObject GetSpawnedGameObjectByDetailInfo(PropModule.DetailInfo detail) { if (!_detailInfoToCorrespondingSpawnedGameObject.ContainsKey(detail)) { @@ -49,7 +48,7 @@ namespace NewHorizons.Builder.Props /// /// Create a detail using an asset bundle or a path in the scene hierarchy of the item to copy. /// - public static GameObject Make(GameObject go, Sector sector, IModBehaviour mod, DetailInfo detail) + public static GameObject Make(GameObject go, Sector sector, IModBehaviour mod, PropModule.DetailInfo detail) { if (detail.assetBundle != null) { @@ -65,7 +64,7 @@ namespace NewHorizons.Builder.Props /// /// Create a detail using a path in the scene hierarchy of the item to copy. /// - public static GameObject Make(GameObject planetGO, Sector sector, DetailInfo info) + public static GameObject Make(GameObject planetGO, Sector sector, PropModule.DetailInfo info) { var prefab = SearchUtilities.Find(info.path); if (prefab == null) @@ -80,7 +79,7 @@ namespace NewHorizons.Builder.Props /// /// Create a detail using a prefab. /// - public static GameObject Make(GameObject go, Sector sector, GameObject prefab, DetailInfo detail) + public static GameObject Make(GameObject go, Sector sector, GameObject prefab, PropModule.DetailInfo detail) { if (prefab == null) return null; diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index 028cbc9d..f81d8ac2 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -7,14 +7,13 @@ using UnityEngine; using NewHorizons.Utility; using Logger = NewHorizons.Utility.Logger; using NewHorizons.Components; -using NewHorizons.External.Props; 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, DialogueInfo info, IModBehaviour mod) + public static (CharacterDialogueTree, RemoteDialogueTrigger) Make(GameObject go, Sector sector, PropModule.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 +38,7 @@ namespace NewHorizons.Builder.Props return (dialogue, remoteTrigger); } - private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, DialogueInfo info, CharacterDialogueTree dialogue) + private static RemoteDialogueTrigger MakeRemoteDialogueTrigger(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, CharacterDialogueTree dialogue) { var conversationTrigger = GeneralPropBuilder.MakeNew("ConversationTrigger", sector?.transform ?? planetGO.transform, info.remoteTrigger, defaultPosition: info.position, defaultParentPath: info.pathToAnimController); @@ -70,7 +69,7 @@ namespace NewHorizons.Builder.Props return remoteDialogueTrigger; } - private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, DialogueInfo info, IModHelper mod) + private static CharacterDialogueTree MakeConversationZone(GameObject planetGO, Sector sector, PropModule.DialogueInfo info, IModHelper mod) { var conversationZone = GeneralPropBuilder.MakeNew("ConversationZone", sector?.transform ?? planetGO.transform, info, defaultParentPath: info.pathToAnimController); @@ -106,15 +105,15 @@ namespace NewHorizons.Builder.Props switch (info.flashlightToggle) { - case DialogueInfo.FlashlightToggle.TurnOff: + case PropModule.DialogueInfo.FlashlightToggle.TurnOff: dialogueTree._turnOffFlashlight = true; dialogueTree._turnOnFlashlight = false; break; - case DialogueInfo.FlashlightToggle.TurnOffThenOn: + case PropModule.DialogueInfo.FlashlightToggle.TurnOffThenOn: dialogueTree._turnOffFlashlight = true; dialogueTree._turnOnFlashlight = true; break; - case DialogueInfo.FlashlightToggle.None: + case PropModule.DialogueInfo.FlashlightToggle.None: default: dialogueTree._turnOffFlashlight = false; dialogueTree._turnOnFlashlight = false; @@ -126,7 +125,7 @@ namespace NewHorizons.Builder.Props return dialogueTree; } - private static void MakePlayerTrackingZone(GameObject go, CharacterDialogueTree dialogue, DialogueInfo info) + private static void MakePlayerTrackingZone(GameObject go, CharacterDialogueTree dialogue, PropModule.DialogueInfo info) { var character = go.transform.Find(info.pathToAnimController); diff --git a/NewHorizons/Builder/Props/GeneralPropBuilder.cs b/NewHorizons/Builder/Props/GeneralPropBuilder.cs index 5b822842..691f1083 100644 --- a/NewHorizons/Builder/Props/GeneralPropBuilder.cs +++ b/NewHorizons/Builder/Props/GeneralPropBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using System; using System.Collections.Generic; @@ -13,11 +12,11 @@ namespace NewHorizons.Builder.Props { public static class GeneralPropBuilder { - public static GameObject MakeFromExisting(GameObject go, Transform parent, GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) + public static GameObject MakeFromExisting(GameObject go, Transform parent, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) { if (info == null) return go; - if (info is GeneralSolarSystemPropInfo solarSystemInfo && !string.IsNullOrEmpty(solarSystemInfo.parentBody)) + if (info is PropModule.GeneralSolarSystemPropInfo solarSystemInfo && !string.IsNullOrEmpty(solarSystemInfo.parentBody)) { var targetPlanet = AstroObjectLocator.GetAstroObject(solarSystemInfo.parentBody); if (targetPlanet != null) @@ -53,7 +52,7 @@ namespace NewHorizons.Builder.Props var pos = (Vector3)(info.position ?? defaultPosition ?? Vector3.zero); var rot = Quaternion.identity; - if (info is GeneralPropInfo rotInfo) + if (info is PropModule.GeneralPropInfo rotInfo) { rot = rotInfo.rotation != null ? Quaternion.Euler(rotInfo.rotation) : Quaternion.identity; } @@ -80,14 +79,14 @@ namespace NewHorizons.Builder.Props return go; } - public static GameObject MakeNew(string defaultName, Transform parent, GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) + public static GameObject MakeNew(string defaultName, Transform parent, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) { var go = new GameObject(defaultName); go.SetActive(false); return MakeFromExisting(go, parent, info, alignToBody, normal, defaultPosition, defaultParentPath); } - public static GameObject MakeFromPrefab(GameObject prefab, string defaultName, Transform parent, GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) + public static GameObject MakeFromPrefab(GameObject prefab, string defaultName, Transform parent, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null) { var go = prefab.InstantiateInactive(); go.name = defaultName; diff --git a/NewHorizons/Builder/Props/GeyserBuilder.cs b/NewHorizons/Builder/Props/GeyserBuilder.cs index eb1f1c99..2b4819fd 100644 --- a/NewHorizons/Builder/Props/GeyserBuilder.cs +++ b/NewHorizons/Builder/Props/GeyserBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using UnityEngine; using Logger = NewHorizons.Utility.Logger; @@ -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, GeyserInfo info) + public static void Make(GameObject planetGO, Sector sector, PropModule.GeyserInfo info) { InitPrefab(); diff --git a/NewHorizons/Builder/Props/NomaiTextBuilder.cs b/NewHorizons/Builder/Props/NomaiTextBuilder.cs index 571e58ac..5e630fec 100644 --- a/NewHorizons/Builder/Props/NomaiTextBuilder.cs +++ b/NewHorizons/Builder/Props/NomaiTextBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; @@ -33,16 +32,16 @@ namespace NewHorizons.Builder.Props private static GameObject _preCrashRecorderPrefab; private static GameObject _trailmarkerPrefab; - private static Dictionary arcInfoToCorrespondingSpawnedGameObject = new Dictionary(); - public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(NomaiTextArcInfo arc) + private static Dictionary arcInfoToCorrespondingSpawnedGameObject = new Dictionary(); + public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(PropModule.NomaiTextArcInfo arc) { if (!arcInfoToCorrespondingSpawnedGameObject.ContainsKey(arc)) return null; return arcInfoToCorrespondingSpawnedGameObject[arc]; } - private static Dictionary conversationInfoToCorrespondingSpawnedGameObject = new Dictionary(); + private static Dictionary conversationInfoToCorrespondingSpawnedGameObject = new Dictionary(); - public static GameObject GetSpawnedGameObjectByNomaiTextInfo(NomaiTextInfo convo) + public static GameObject GetSpawnedGameObjectByNomaiTextInfo(PropModule.NomaiTextInfo convo) { Logger.LogVerbose("Retrieving wall text obj for " + convo); if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null; @@ -143,7 +142,7 @@ namespace NewHorizons.Builder.Props } } - public static GameObject Make(GameObject planetGO, Sector sector, NomaiTextInfo info, IModBehaviour mod) + public static GameObject Make(GameObject planetGO, Sector sector, PropModule.NomaiTextInfo info, IModBehaviour mod) { InitPrefabs(); @@ -151,7 +150,7 @@ namespace NewHorizons.Builder.Props switch (info.type) { - case NomaiTextInfo.NomaiTextType.Wall: + case PropModule.NomaiTextInfo.NomaiTextType.Wall: { var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath).gameObject; @@ -216,7 +215,7 @@ namespace NewHorizons.Builder.Props return nomaiWallTextObj; } - case NomaiTextInfo.NomaiTextType.Scroll: + case PropModule.NomaiTextInfo.NomaiTextType.Scroll: { var customScroll = _scrollPrefab.InstantiateInactive(); @@ -305,7 +304,7 @@ namespace NewHorizons.Builder.Props return customScroll; } - case NomaiTextInfo.NomaiTextType.Computer: + case PropModule.NomaiTextInfo.NomaiTextType.Computer: { var computerObject = _computerPrefab.InstantiateInactive(); @@ -358,9 +357,9 @@ namespace NewHorizons.Builder.Props return computerObject; } - case NomaiTextInfo.NomaiTextType.PreCrashComputer: + case PropModule.NomaiTextInfo.NomaiTextType.PreCrashComputer: { - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, parentPath = info.parentPath, @@ -408,10 +407,10 @@ namespace NewHorizons.Builder.Props return computerObject; } - case NomaiTextInfo.NomaiTextType.Cairn: - case NomaiTextInfo.NomaiTextType.CairnVariant: + case PropModule.NomaiTextInfo.NomaiTextType.Cairn: + case PropModule.NomaiTextInfo.NomaiTextType.CairnVariant: { - var cairnObject = (info.type == NomaiTextInfo.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab).InstantiateInactive(); + var cairnObject = (info.type == PropModule.NomaiTextInfo.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab).InstantiateInactive(); if (!string.IsNullOrEmpty(info.rename)) { @@ -483,11 +482,11 @@ namespace NewHorizons.Builder.Props return cairnObject; } - case NomaiTextInfo.NomaiTextType.PreCrashRecorder: - case NomaiTextInfo.NomaiTextType.Recorder: + case PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder: + case PropModule.NomaiTextInfo.NomaiTextType.Recorder: { - var prefab = (info.type == NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab); - var detailInfo = new DetailInfo { + var prefab = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab); + var detailInfo = new PropModule.DetailInfo { parentPath = info.parentPath, rotation = info.rotation, position = info.position, @@ -518,7 +517,7 @@ namespace NewHorizons.Builder.Props conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject; return recorderObject; } - case NomaiTextInfo.NomaiTextType.Trailmarker: + case PropModule.NomaiTextInfo.NomaiTextType.Trailmarker: { var trailmarkerObject = _trailmarkerPrefab.InstantiateInactive(); @@ -590,7 +589,7 @@ namespace NewHorizons.Builder.Props } } - private static NomaiWallText MakeWallText(GameObject go, Sector sector, NomaiTextInfo info, string xmlPath) + private static NomaiWallText MakeWallText(GameObject go, Sector sector, PropModule.NomaiTextInfo info, string xmlPath) { GameObject nomaiWallTextObj = new GameObject("NomaiWallText"); nomaiWallTextObj.SetActive(false); @@ -619,7 +618,7 @@ namespace NewHorizons.Builder.Props nomaiWallText.SetTextAsset(text); // #433 fuzzy stranger text - if (info.arcInfo != null && info.arcInfo.Any(x => x.type == NomaiTextArcInfo.NomaiTextArcType.Stranger)) + if (info.arcInfo != null && info.arcInfo.Any(x => x.type == PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger)) { StreamingHandler.SetUpStreaming(AstroObject.Name.RingWorld, sector); } @@ -627,7 +626,7 @@ namespace NewHorizons.Builder.Props return nomaiWallText; } - internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info) + internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info) { var dict = MakeNomaiTextDict(xml); @@ -636,7 +635,7 @@ namespace NewHorizons.Builder.Props RefreshArcs(nomaiWallText, conversationZone, info); } - internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info) + internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info) { var dict = nomaiWallText._dictNomaiTextData; Random.InitState(info.seed); @@ -667,26 +666,26 @@ namespace NewHorizons.Builder.Props } } - internal static GameObject MakeArc(NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID) + internal static GameObject MakeArc(PropModule.NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID) { GameObject arc; - var type = arcInfo != null ? arcInfo.type : NomaiTextArcInfo.NomaiTextArcType.Adult; + var type = arcInfo != null ? arcInfo.type : PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult; var variation = arcInfo != null ? arcInfo.variation : -1; switch (type) { - case NomaiTextArcInfo.NomaiTextArcType.Child: + case PropModule.NomaiTextArcInfo.NomaiTextArcType.Child: variation = variation < 0 ? Random.Range(0, _childArcPrefabs.Count()) : (variation % _childArcPrefabs.Count()); arc = _childArcPrefabs[variation].InstantiateInactive(); break; - case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcPrefabs.Any(): + case PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcPrefabs.Any(): variation = variation < 0 ? Random.Range(0, _ghostArcPrefabs.Count()) : (variation % _ghostArcPrefabs.Count()); arc = _ghostArcPrefabs[variation].InstantiateInactive(); break; - case NomaiTextArcInfo.NomaiTextArcType.Adult: + case PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult: default: variation = variation < 0 ? Random.Range(0, _arcPrefabs.Count()) diff --git a/NewHorizons/Builder/Props/ProjectionBuilder.cs b/NewHorizons/Builder/Props/ProjectionBuilder.cs index 73738729..d7fd2668 100644 --- a/NewHorizons/Builder/Props/ProjectionBuilder.cs +++ b/NewHorizons/Builder/Props/ProjectionBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; @@ -66,20 +65,20 @@ namespace NewHorizons.Builder.Props } } - public static void Make(GameObject go, Sector sector, ProjectionInfo info, IModBehaviour mod) + public static void Make(GameObject go, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod) { switch (info.type) { - case ProjectionInfo.SlideShowType.AutoProjector: + case PropModule.ProjectionInfo.SlideShowType.AutoProjector: MakeAutoProjector(go, sector, info, mod); break; - case ProjectionInfo.SlideShowType.SlideReel: + case PropModule.ProjectionInfo.SlideShowType.SlideReel: MakeSlideReel(go, sector, info, mod); break; - case ProjectionInfo.SlideShowType.VisionTorchTarget: + case PropModule.ProjectionInfo.SlideShowType.VisionTorchTarget: MakeMindSlidesTarget(go, sector, info, mod); break; - case ProjectionInfo.SlideShowType.StandingVisionTorch: + case PropModule.ProjectionInfo.SlideShowType.StandingVisionTorch: MakeStandingVisionTorch(go, sector, info, mod); break; default: @@ -88,7 +87,7 @@ namespace NewHorizons.Builder.Props } } - private static GameObject MakeSlideReel(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod) + private static GameObject MakeSlideReel(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod) { InitPrefabs(); @@ -161,7 +160,7 @@ namespace NewHorizons.Builder.Props return slideReelObj; } - public static GameObject MakeAutoProjector(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod) + public static GameObject MakeAutoProjector(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod) { InitPrefabs(); @@ -196,14 +195,14 @@ namespace NewHorizons.Builder.Props } // Makes a target for a vision torch to scan - public static GameObject MakeMindSlidesTarget(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod) + public static GameObject MakeMindSlidesTarget(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod) { InitPrefabs(); if (_visionTorchDetectorPrefab == null) return null; // spawn a trigger for the vision torch - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, rotation = info.rotation, @@ -242,14 +241,14 @@ namespace NewHorizons.Builder.Props return g; } - public static GameObject MakeStandingVisionTorch(GameObject planetGO, Sector sector, ProjectionInfo info, IModBehaviour mod) + public static GameObject MakeStandingVisionTorch(GameObject planetGO, Sector sector, PropModule.ProjectionInfo info, IModBehaviour mod) { InitPrefabs(); if (_standingVisionTorchPrefab == null) return null; // Spawn the torch itself - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, rotation = info.rotation, @@ -345,7 +344,7 @@ namespace NewHorizons.Builder.Props return imageLoader; } - private static void AddModules(SlideInfo slideInfo, ref Slide slide, IModBehaviour mod) + private static void AddModules(PropModule.SlideInfo slideInfo, ref Slide slide, IModBehaviour mod) { var modules = new List(); if (!String.IsNullOrEmpty(slideInfo.beatAudio)) diff --git a/NewHorizons/Builder/Props/QuantumBuilder.cs b/NewHorizons/Builder/Props/QuantumBuilder.cs index 8db6f2fd..0697c5a0 100644 --- a/NewHorizons/Builder/Props/QuantumBuilder.cs +++ b/NewHorizons/Builder/Props/QuantumBuilder.cs @@ -2,7 +2,6 @@ using HarmonyLib; using NewHorizons.Components.Quantum; using NewHorizons.External.Configs; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using OWML.Common; using System; @@ -29,17 +28,17 @@ namespace NewHorizons.Builder.Props public static class QuantumBuilder { - public static void Make(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) + public static void Make(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) { switch(quantumGroup.type) { - case QuantumGroupType.Sockets: MakeSocketGroup (go, sector, config, mod, quantumGroup, propsInGroup); return; - case QuantumGroupType.States: MakeStateGroup (go, sector, config, mod, quantumGroup, propsInGroup); return; - // case QuantumGroupType.Shuffle: MakeShuffleGroup(go, sector, config, mod, quantumGroup, propsInGroup); return; + 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 PropModule.QuantumGroupType.Shuffle: MakeShuffleGroup(go, sector, config, mod, quantumGroup, propsInGroup); return; } } - public static void MakeSocketGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) + public static void MakeSocketGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) { var groupRoot = new GameObject("Quantum Sockets - " + quantumGroup.id); groupRoot.transform.parent = sector?.transform ?? go.transform; @@ -73,7 +72,7 @@ namespace NewHorizons.Builder.Props } } - public static void MakeStateGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) + public static void MakeStateGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) { var groupRoot = new GameObject("Quantum States - " + quantumGroup.id); groupRoot.transform.parent = sector?.transform ?? go.transform; @@ -120,7 +119,7 @@ namespace NewHorizons.Builder.Props groupRoot.SetActive(true); } - public static void MakeShuffleGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, QuantumGroupInfo quantumGroup, GameObject[] propsInGroup) + public static void MakeShuffleGroup(GameObject go, Sector sector, PlanetConfig config, IModBehaviour mod, PropModule.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); diff --git a/NewHorizons/Builder/Props/RaftBuilder.cs b/NewHorizons/Builder/Props/RaftBuilder.cs index 587ab464..663fa27e 100644 --- a/NewHorizons/Builder/Props/RaftBuilder.cs +++ b/NewHorizons/Builder/Props/RaftBuilder.cs @@ -2,7 +2,6 @@ using NewHorizons.Components; using NewHorizons.Components.Achievement; using NewHorizons.Components.Volumes; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using UnityEngine; @@ -47,7 +46,7 @@ namespace NewHorizons.Builder.Props } } - public static GameObject Make(GameObject planetGO, Sector sector, RaftInfo info, OWRigidbody planetBody) + public static GameObject Make(GameObject planetGO, Sector sector, PropModule.RaftInfo info, OWRigidbody planetBody) { InitPrefab(); diff --git a/NewHorizons/Builder/Props/RemoteBuilder.cs b/NewHorizons/Builder/Props/RemoteBuilder.cs index e0c3801b..75e27374 100644 --- a/NewHorizons/Builder/Props/RemoteBuilder.cs +++ b/NewHorizons/Builder/Props/RemoteBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using OWML.Common; @@ -117,7 +116,7 @@ namespace NewHorizons.Builder.Props } } - public static void Make(GameObject go, Sector sector, RemoteInfo info, NewHorizonsBody nhBody) + public static void Make(GameObject go, Sector sector, PropModule.RemoteInfo info, NewHorizonsBody nhBody) { InitPrefabs(); @@ -168,9 +167,9 @@ namespace NewHorizons.Builder.Props } } - public static void MakeWhiteboard(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, RemoteInfo.WhiteboardInfo info, NewHorizonsBody nhBody) + public static void MakeWhiteboard(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.WhiteboardInfo info, NewHorizonsBody nhBody) { - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, rotation = info.rotation, @@ -195,7 +194,7 @@ namespace NewHorizons.Builder.Props { var textInfo = info.nomaiText[i]; component._remoteIDs[i] = RemoteHandler.GetPlatformID(textInfo.id); - var wallText = TranslatorTextBuilder.Make(whiteboard, sector, new NomaiTextInfo + var wallText = TranslatorTextBuilder.Make(whiteboard, sector, new PropModule.NomaiTextInfo { arcInfo = textInfo.arcInfo, location = textInfo.location, @@ -204,7 +203,7 @@ namespace NewHorizons.Builder.Props rename = textInfo.rename, rotation = Vector3.zero, seed = textInfo.seed, - type = NomaiTextInfo.NomaiTextType.Wall, + type = PropModule.NomaiTextInfo.NomaiTextType.Wall, xmlFile = textInfo.xmlFile }, nhBody).GetComponent(); wallText._showTextOnStart = false; @@ -216,9 +215,9 @@ namespace NewHorizons.Builder.Props whiteboard.SetActive(true); } - public static void MakePlatform(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, RemoteInfo.PlatformInfo info, IModBehaviour mod) + public static void MakePlatform(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.PlatformInfo info, IModBehaviour mod) { - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, rotation = info.rotation, @@ -250,7 +249,7 @@ namespace NewHorizons.Builder.Props platform.SetActive(true); } - public static void MakeStone(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, RemoteInfo.StoneInfo info, IModBehaviour mod) + public static void MakeStone(GameObject go, Sector sector, NomaiRemoteCameraPlatform.ID id, Texture2D decal, PropModule.RemoteInfo.StoneInfo info, IModBehaviour mod) { var shareStone = GeneralPropBuilder.MakeFromPrefab(_shareStonePrefab, "ShareStone_" + id.ToString(), sector?.transform ?? go.transform, info); diff --git a/NewHorizons/Builder/Props/ScatterBuilder.cs b/NewHorizons/Builder/Props/ScatterBuilder.cs index be162319..f6583c4d 100644 --- a/NewHorizons/Builder/Props/ScatterBuilder.cs +++ b/NewHorizons/Builder/Props/ScatterBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.External.Configs; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using OWML.Common; using System; @@ -18,7 +17,7 @@ namespace NewHorizons.Builder.Props MakeScatter(go, config.Props.scatter, config.Base.surfaceSize, sector, mod, config); } - private static void MakeScatter(GameObject go, ScatterInfo[] scatterInfo, float radius, Sector sector, IModBehaviour mod, PlanetConfig config) + private static void MakeScatter(GameObject go, PropModule.ScatterInfo[] scatterInfo, float radius, Sector sector, IModBehaviour mod, PlanetConfig config) { var heightMap = config.HeightMap; @@ -70,7 +69,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 DetailInfo() + var detailInfo = new PropModule.DetailInfo() { scale = propInfo.scale, stretch = propInfo.stretch, diff --git a/NewHorizons/Builder/Props/SignalBuilder.cs b/NewHorizons/Builder/Props/SignalBuilder.cs index f51bfce0..1665c33c 100644 --- a/NewHorizons/Builder/Props/SignalBuilder.cs +++ b/NewHorizons/Builder/Props/SignalBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using OWML.Common; using OWML.Utils; @@ -108,7 +107,7 @@ namespace NewHorizons.Builder.Props return name; } - public static GameObject Make(GameObject planetGO, Sector sector, SignalInfo info, IModBehaviour mod) + public static GameObject Make(GameObject planetGO, Sector sector, SignalModule.SignalInfo info, IModBehaviour mod) { var signalGO = GeneralPropBuilder.MakeNew($"Signal_{info.name}", sector?.transform ?? planetGO.transform, info); signalGO.layer = LayerMask.NameToLayer("AdvancedEffectVolume"); diff --git a/NewHorizons/Builder/Props/TornadoBuilder.cs b/NewHorizons/Builder/Props/TornadoBuilder.cs index 5a6fae48..1aad9a6e 100644 --- a/NewHorizons/Builder/Props/TornadoBuilder.cs +++ b/NewHorizons/Builder/Props/TornadoBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Components; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using NewHorizons.Utility; using System; @@ -74,7 +73,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, TornadoInfo info, bool hasClouds) + public static void Make(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, bool hasClouds) { InitPrefabs(); @@ -93,11 +92,11 @@ namespace NewHorizons.Builder.Props return; } - if (info.type == TornadoInfo.TornadoType.Hurricane) MakeHurricane(planetGO, sector, info, position, hasClouds); - else MakeTornado(planetGO, sector, info, position, info.type == TornadoInfo.TornadoType.Downwards); + 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); } - private static void MakeTornado(GameObject planetGO, Sector sector, TornadoInfo info, Vector3 position, bool downwards) + private static void MakeTornado(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, Vector3 position, bool downwards) { var prefab = downwards ? _downPrefab.InstantiateInactive() : _upPrefab.InstantiateInactive(); var tornadoGO = GeneralPropBuilder.MakeFromPrefab(prefab, downwards ? "Tornado_Down" : "Tornado_Up", sector?.transform ?? planetGO.transform, info, true, defaultPosition: position); @@ -173,7 +172,7 @@ namespace NewHorizons.Builder.Props tornadoGO.SetActive(true); } - private static void MakeHurricane(GameObject planetGO, Sector sector, TornadoInfo info, Vector3 position, bool hasClouds) + private static void MakeHurricane(GameObject planetGO, Sector sector, PropModule.TornadoInfo info, Vector3 position, bool hasClouds) { var hurricaneGO = _hurricanePrefab.InstantiateInactive(); hurricaneGO.name = "Hurricane"; @@ -261,7 +260,7 @@ namespace NewHorizons.Builder.Props } } - private static void ApplyWanderer(GameObject go, GameObject planetGO, TornadoInfo info) + private static void ApplyWanderer(GameObject go, GameObject planetGO, PropModule.TornadoInfo info) { var wanderer = go.AddComponent(); wanderer.wanderRate = info.wanderRate; diff --git a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs index 9dff7d38..1d4a29fc 100644 --- a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs +++ b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs @@ -13,7 +13,6 @@ using Random = UnityEngine.Random; using OWML.Utils; using Newtonsoft.Json; using System; -using NewHorizons.External.Props; namespace NewHorizons.Builder.Props { @@ -31,16 +30,16 @@ namespace NewHorizons.Builder.Props private static GameObject _preCrashRecorderPrefab; private static GameObject _trailmarkerPrefab; - private static Dictionary arcInfoToCorrespondingSpawnedGameObject = new Dictionary(); - public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(NomaiTextArcInfo arc) + private static Dictionary arcInfoToCorrespondingSpawnedGameObject = new Dictionary(); + public static GameObject GetSpawnedGameObjectByNomaiTextArcInfo(PropModule.NomaiTextArcInfo arc) { if (!arcInfoToCorrespondingSpawnedGameObject.ContainsKey(arc)) return null; return arcInfoToCorrespondingSpawnedGameObject[arc]; } - private static Dictionary conversationInfoToCorrespondingSpawnedGameObject = new Dictionary(); + private static Dictionary conversationInfoToCorrespondingSpawnedGameObject = new Dictionary(); - public static GameObject GetSpawnedGameObjectByNomaiTextInfo(NomaiTextInfo convo) + public static GameObject GetSpawnedGameObjectByNomaiTextInfo(PropModule.NomaiTextInfo convo) { Logger.LogVerbose("Retrieving wall text obj for " + convo); if (!conversationInfoToCorrespondingSpawnedGameObject.ContainsKey(convo)) return null; @@ -121,7 +120,7 @@ namespace NewHorizons.Builder.Props } } - public static GameObject Make(GameObject planetGO, Sector sector, NomaiTextInfo info, NewHorizonsBody nhBody) + public static GameObject Make(GameObject planetGO, Sector sector, PropModule.NomaiTextInfo info, NewHorizonsBody nhBody) { InitPrefabs(); @@ -129,7 +128,7 @@ namespace NewHorizons.Builder.Props switch (info.type) { - case NomaiTextInfo.NomaiTextType.Wall: + case PropModule.NomaiTextInfo.NomaiTextType.Wall: { var nomaiWallTextObj = MakeWallText(planetGO, sector, info, xmlPath, nhBody).gameObject; @@ -160,7 +159,7 @@ namespace NewHorizons.Builder.Props return nomaiWallTextObj; } - case NomaiTextInfo.NomaiTextType.Scroll: + case PropModule.NomaiTextInfo.NomaiTextType.Scroll: { var customScroll = GeneralPropBuilder.MakeFromPrefab(_scrollPrefab, _scrollPrefab.name, sector?.transform ?? planetGO.transform, info); @@ -212,7 +211,7 @@ namespace NewHorizons.Builder.Props return customScroll; } - case NomaiTextInfo.NomaiTextType.Computer: + case PropModule.NomaiTextInfo.NomaiTextType.Computer: { var computerObject = GeneralPropBuilder.MakeFromPrefab(_computerPrefab, _computerPrefab.name, sector?.transform ?? planetGO.transform, info, true, info.normal); @@ -233,9 +232,9 @@ namespace NewHorizons.Builder.Props return computerObject; } - case NomaiTextInfo.NomaiTextType.PreCrashComputer: + case PropModule.NomaiTextInfo.NomaiTextType.PreCrashComputer: { - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = info.position, parentPath = info.parentPath, @@ -283,10 +282,10 @@ namespace NewHorizons.Builder.Props return computerObject; } - case NomaiTextInfo.NomaiTextType.Cairn: - case NomaiTextInfo.NomaiTextType.CairnVariant: + case PropModule.NomaiTextInfo.NomaiTextType.Cairn: + case PropModule.NomaiTextInfo.NomaiTextType.CairnVariant: { - var cairnPrefab = info.type == NomaiTextInfo.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab; + var cairnPrefab = info.type == PropModule.NomaiTextInfo.NomaiTextType.CairnVariant ? _cairnVariantPrefab : _cairnPrefab; var cairnObject = GeneralPropBuilder.MakeFromPrefab(cairnPrefab, _cairnPrefab.name, sector?.transform ?? planetGO.transform, info, info.rotation == null); // Idk do we have to set it active before finding things? @@ -318,11 +317,11 @@ namespace NewHorizons.Builder.Props return cairnObject; } - case NomaiTextInfo.NomaiTextType.PreCrashRecorder: - case NomaiTextInfo.NomaiTextType.Recorder: + case PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder: + case PropModule.NomaiTextInfo.NomaiTextType.Recorder: { - var prefab = (info.type == NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab); - var detailInfo = new DetailInfo { + var prefab = (info.type == PropModule.NomaiTextInfo.NomaiTextType.PreCrashRecorder ? _preCrashRecorderPrefab : _recorderPrefab); + var detailInfo = new PropModule.DetailInfo { parentPath = info.parentPath, rotation = info.rotation, position = info.position, @@ -348,7 +347,7 @@ namespace NewHorizons.Builder.Props conversationInfoToCorrespondingSpawnedGameObject[info] = recorderObject; return recorderObject; } - case NomaiTextInfo.NomaiTextType.Trailmarker: + case PropModule.NomaiTextInfo.NomaiTextType.Trailmarker: { var trailmarkerObject = GeneralPropBuilder.MakeFromPrefab(_trailmarkerPrefab, _trailmarkerPrefab.name, sector?.transform ?? planetGO.transform, info, info.rotation == null); @@ -379,7 +378,7 @@ namespace NewHorizons.Builder.Props } } - private static NomaiWallText MakeWallText(GameObject go, Sector sector, NomaiTextInfo info, string xmlPath, NewHorizonsBody nhBody) + private static NomaiWallText MakeWallText(GameObject go, Sector sector, PropModule.NomaiTextInfo info, string xmlPath, NewHorizonsBody nhBody) { GameObject nomaiWallTextObj = GeneralPropBuilder.MakeNew("NomaiWallText", sector?.transform ?? go.transform, info); @@ -407,7 +406,7 @@ namespace NewHorizons.Builder.Props nomaiWallText.SetTextAsset(text); // #433 fuzzy stranger text - if (info.arcInfo != null && info.arcInfo.Any(x => x.type == NomaiTextArcInfo.NomaiTextArcType.Stranger)) + if (info.arcInfo != null && info.arcInfo.Any(x => x.type == PropModule.NomaiTextArcInfo.NomaiTextArcType.Stranger)) { StreamingHandler.SetUpStreaming(AstroObject.Name.RingWorld, sector); } @@ -415,7 +414,7 @@ namespace NewHorizons.Builder.Props return nomaiWallText; } - internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info, NewHorizonsBody nhBody) + internal static void BuildArcs(string xml, NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info, NewHorizonsBody nhBody) { var dict = MakeNomaiTextDict(xml); @@ -435,7 +434,7 @@ namespace NewHorizons.Builder.Props public bool mirrored; } - internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, NomaiTextInfo info, NewHorizonsBody nhBody, string cacheKey) + internal static void RefreshArcs(NomaiWallText nomaiWallText, GameObject conversationZone, PropModule.NomaiTextInfo info, NewHorizonsBody nhBody, string cacheKey) { var dict = nomaiWallText._dictNomaiTextData; Random.InitState(info.seed == 0 ? info.xmlFile.GetHashCode() : info.seed); @@ -537,27 +536,27 @@ namespace NewHorizons.Builder.Props } } - internal static GameObject MakeArc(NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID, GameObject prebuiltArc = null) + internal static GameObject MakeArc(PropModule.NomaiTextArcInfo arcInfo, GameObject conversationZone, GameObject parent, int textEntryID, GameObject prebuiltArc = null) { GameObject arc; - var type = arcInfo != null ? arcInfo.type : NomaiTextArcInfo.NomaiTextArcType.Adult; + var type = arcInfo != null ? arcInfo.type : PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult; NomaiTextArcBuilder.SpiralProfile profile; Material mat; Mesh overrideMesh = null; Color? overrideColor = null; switch (type) { - case NomaiTextArcInfo.NomaiTextArcType.Child: + case PropModule.NomaiTextArcInfo.NomaiTextArcType.Child: profile = NomaiTextArcBuilder.childSpiralProfile; mat = _childArcMaterial; break; - case NomaiTextArcInfo.NomaiTextArcType.Stranger when _ghostArcMaterial != null: + case PropModule.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 NomaiTextArcInfo.NomaiTextArcType.Adult: + case PropModule.NomaiTextArcInfo.NomaiTextArcType.Adult: default: profile = NomaiTextArcBuilder.adultSpiralProfile; mat = _adultArcMaterial; diff --git a/NewHorizons/Builder/Props/VolcanoBuilder.cs b/NewHorizons/Builder/Props/VolcanoBuilder.cs index 770ef488..ced0ad9c 100644 --- a/NewHorizons/Builder/Props/VolcanoBuilder.cs +++ b/NewHorizons/Builder/Props/VolcanoBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using UnityEngine; using Logger = NewHorizons.Utility.Logger; @@ -42,7 +41,7 @@ namespace NewHorizons.Builder.Props } } - public static void Make(GameObject planetGO, Sector sector, VolcanoInfo info) + public static void Make(GameObject planetGO, Sector sector, PropModule.VolcanoInfo info) { InitPrefab(); @@ -73,7 +72,7 @@ namespace NewHorizons.Builder.Props }); } - private static void FixMeteor(MeteorController meteor, VolcanoInfo info) + private static void FixMeteor(MeteorController meteor, PropModule.VolcanoInfo info) { meteor.transform.localScale = Vector3.one * info.scale; diff --git a/NewHorizons/Builder/ShipLog/EntryLocationBuilder.cs b/NewHorizons/Builder/ShipLog/EntryLocationBuilder.cs index 29181df0..7f6d591f 100644 --- a/NewHorizons/Builder/ShipLog/EntryLocationBuilder.cs +++ b/NewHorizons/Builder/ShipLog/EntryLocationBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Builder.Props; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using OWML.Common; using System.Collections.Generic; using UnityEngine; @@ -11,7 +10,7 @@ namespace NewHorizons.Builder.ShipLog public static class EntryLocationBuilder { private static readonly List _locationsToInitialize = new List(); - public static void Make(GameObject go, Sector sector, EntryLocationInfo info, IModBehaviour mod) + public static void Make(GameObject go, Sector sector, PropModule.EntryLocationInfo info, IModBehaviour mod) { GameObject entryLocationGameObject = GeneralPropBuilder.MakeNew("Entry Location (" + info.id + ")", sector?.transform ?? go.transform, info); diff --git a/NewHorizons/Builder/ShipLog/MapModeBuilder.cs b/NewHorizons/Builder/ShipLog/MapModeBuilder.cs index 5731a6ac..0eaf91aa 100644 --- a/NewHorizons/Builder/ShipLog/MapModeBuilder.cs +++ b/NewHorizons/Builder/ShipLog/MapModeBuilder.cs @@ -4,11 +4,11 @@ using NewHorizons.Utility; using System; using System.Collections.Generic; using System.Linq; +using NewHorizons.External.Modules.VariableSize; using UnityEngine; using UnityEngine.UI; using Logger = NewHorizons.Utility.Logger; using NewHorizons.Components.ShipLog; -using NewHorizons.External.Props; namespace NewHorizons.Builder.ShipLog { @@ -552,9 +552,9 @@ namespace NewHorizons.Builder.ShipLog switch (body.Config?.Props?.singularities?.FirstOrDefault()?.type) { - case SingularityInfo.SingularityType.BlackHole: + case SingularityModule.SingularityType.BlackHole: return Color.black; - case SingularityInfo.SingularityType.WhiteHole: + case SingularityModule.SingularityType.WhiteHole: return Color.white; } } diff --git a/NewHorizons/Builder/ShipLog/RevealBuilder.cs b/NewHorizons/Builder/ShipLog/RevealBuilder.cs index 66ab3837..349c3649 100644 --- a/NewHorizons/Builder/ShipLog/RevealBuilder.cs +++ b/NewHorizons/Builder/ShipLog/RevealBuilder.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.Props; using NewHorizons.Components.Achievement; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using OWML.Common; using UnityEngine; using Logger = NewHorizons.Utility.Logger; @@ -9,18 +8,18 @@ namespace NewHorizons.Builder.ShipLog { public static class RevealBuilder { - public static void Make(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod) + public static void Make(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod) { var newRevealGO = GeneralPropBuilder.MakeNew("Reveal Volume (" + info.revealOn + ")", sector?.transform ?? go.transform, info); switch (info.revealOn) { - case RevealVolumeInfo.RevealVolumeType.Enter: + case VolumesModule.RevealVolumeInfo.RevealVolumeType.Enter: MakeTrigger(newRevealGO, sector, info, mod); break; - case RevealVolumeInfo.RevealVolumeType.Observe: + case VolumesModule.RevealVolumeInfo.RevealVolumeType.Observe: MakeObservable(newRevealGO, sector, info, mod); break; - case RevealVolumeInfo.RevealVolumeType.Snapshot: + case VolumesModule.RevealVolumeInfo.RevealVolumeType.Snapshot: MakeSnapshot(newRevealGO, sector, info, mod); break; default: @@ -30,7 +29,7 @@ namespace NewHorizons.Builder.ShipLog newRevealGO.SetActive(true); } - private static SphereShape MakeShape(GameObject go, RevealVolumeInfo info, Shape.CollisionMode collisionMode) + private static SphereShape MakeShape(GameObject go, VolumesModule.RevealVolumeInfo info, Shape.CollisionMode collisionMode) { SphereShape newShape = go.AddComponent(); newShape.radius = info.radius; @@ -38,7 +37,7 @@ namespace NewHorizons.Builder.ShipLog return newShape; } - private static void MakeTrigger(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod) + private static void MakeTrigger(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod) { var shape = MakeShape(go, info, Shape.CollisionMode.Volume); @@ -51,15 +50,15 @@ namespace NewHorizons.Builder.ShipLog factRevealVolume._factIDs = info.reveals; switch (info.revealFor) { - case RevealVolumeInfo.EnterType.Player: + case VolumesModule.RevealVolumeInfo.EnterType.Player: factRevealVolume._player = true; factRevealVolume._probe = false; break; - case RevealVolumeInfo.EnterType.Probe: + case VolumesModule.RevealVolumeInfo.EnterType.Probe: factRevealVolume._player = false; factRevealVolume._probe = true; break; - case RevealVolumeInfo.EnterType.Both: + case VolumesModule.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 +73,15 @@ namespace NewHorizons.Builder.ShipLog achievementVolume.achievementID = info.achievementID; switch (info.revealFor) { - case RevealVolumeInfo.EnterType.Player: + case VolumesModule.RevealVolumeInfo.EnterType.Player: achievementVolume.player = true; achievementVolume.probe = false; break; - case RevealVolumeInfo.EnterType.Probe: + case VolumesModule.RevealVolumeInfo.EnterType.Probe: achievementVolume.player = false; achievementVolume.probe = true; break; - case RevealVolumeInfo.EnterType.Both: + case VolumesModule.RevealVolumeInfo.EnterType.Both: default: achievementVolume.player = true; achievementVolume.probe = true; @@ -91,7 +90,7 @@ namespace NewHorizons.Builder.ShipLog } } - private static void MakeObservable(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod) + private static void MakeObservable(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod) { go.layer = LayerMask.NameToLayer("Interactible"); @@ -122,7 +121,7 @@ namespace NewHorizons.Builder.ShipLog } } - private static void MakeSnapshot(GameObject go, Sector sector, RevealVolumeInfo info, IModBehaviour mod) + private static void MakeSnapshot(GameObject go, Sector sector, VolumesModule.RevealVolumeInfo info, IModBehaviour mod) { var shape = MakeShape(go, info, Shape.CollisionMode.Manual); diff --git a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs index 8303d3fa..34269fe6 100644 --- a/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/AudioVolumeBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Builder.Props; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using NewHorizons.Utility; using OWML.Common; using OWML.Utils; @@ -16,7 +15,7 @@ namespace NewHorizons.Builder.Volumes { public static class AudioVolumeBuilder { - public static AudioVolume Make(GameObject planetGO, Sector sector, AudioVolumeInfo info, IModBehaviour mod) + public static AudioVolume Make(GameObject planetGO, Sector sector, VolumesModule.AudioVolumeInfo info, IModBehaviour mod) { var go = GeneralPropBuilder.MakeNew("AudioVolume", sector?.transform ?? planetGO.transform, info); go.layer = LayerMask.NameToLayer("AdvancedEffectVolume"); diff --git a/NewHorizons/Builder/Volumes/ChangeStarSystemVolumeBuilder.cs b/NewHorizons/Builder/Volumes/ChangeStarSystemVolumeBuilder.cs index c66742fc..2d97bbd3 100644 --- a/NewHorizons/Builder/Volumes/ChangeStarSystemVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/ChangeStarSystemVolumeBuilder.cs @@ -1,13 +1,12 @@ using NewHorizons.Components.Volumes; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { internal static class ChangeStarSystemVolumeBuilder { - public static WarpVolume Make(GameObject planetGO, Sector sector, ChangeStarSystemVolumeInfo info) + public static WarpVolume Make(GameObject planetGO, Sector sector, VolumesModule.ChangeStarSystemVolumeInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/CreditsVolumeBuilder.cs b/NewHorizons/Builder/Volumes/CreditsVolumeBuilder.cs index 1fa4f985..c34745c1 100644 --- a/NewHorizons/Builder/Volumes/CreditsVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/CreditsVolumeBuilder.cs @@ -1,13 +1,12 @@ using NewHorizons.Components.Volumes; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { internal static class CreditsVolumeBuilder { - public static LoadCreditsVolume Make(GameObject planetGO, Sector sector, LoadCreditsVolumeInfo info) + public static LoadCreditsVolume Make(GameObject planetGO, Sector sector, VolumesModule.LoadCreditsVolumeInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/DestructionVolumeBuilder.cs b/NewHorizons/Builder/Volumes/DestructionVolumeBuilder.cs index 9305af6f..b657cce0 100644 --- a/NewHorizons/Builder/Volumes/DestructionVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/DestructionVolumeBuilder.cs @@ -1,5 +1,4 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using OWML.Utils; using UnityEngine; @@ -7,7 +6,7 @@ namespace NewHorizons.Builder.Volumes { public static class DestructionVolumeBuilder { - public static DestructionVolume Make(GameObject planetGO, Sector sector, DestructionVolumeInfo info) + public static DestructionVolume Make(GameObject planetGO, Sector sector, VolumesModule.DestructionVolumeInfo info) { var volume = VanishVolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/FluidVolumeBuilder.cs b/NewHorizons/Builder/Volumes/FluidVolumeBuilder.cs index 83ea1fa9..623a561a 100644 --- a/NewHorizons/Builder/Volumes/FluidVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/FluidVolumeBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Components.Volumes; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using OWML.Utils; using UnityEngine; @@ -8,7 +7,7 @@ namespace NewHorizons.Builder.Volumes { public static class FluidVolumeBuilder { - public static FluidVolume Make(GameObject planetGO, Sector sector, FluidVolumeInfo info) + public static FluidVolume Make(GameObject planetGO, Sector sector, VolumesModule.FluidVolumeInfo info) { var type = EnumUtils.Parse(info.type.ToString(), FluidVolume.Type.NONE); FluidVolume volume = null; diff --git a/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs b/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs index 2485613a..bb82013c 100644 --- a/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/HazardVolumeBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Builder.Props; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using OWML.Common; using OWML.Utils; using System; @@ -13,7 +12,7 @@ namespace NewHorizons.Builder.Volumes { public static class HazardVolumeBuilder { - public static HazardVolume Make(GameObject planetGO, Sector sector, OWRigidbody owrb, HazardVolumeInfo info, IModBehaviour mod) + public static HazardVolume Make(GameObject planetGO, Sector sector, OWRigidbody owrb, VolumesModule.HazardVolumeInfo info, IModBehaviour mod) { var go = GeneralPropBuilder.MakeNew("HazardVolume", sector?.transform ?? planetGO.transform, info); go.layer = LayerMask.NameToLayer("BasicEffectVolume"); @@ -25,15 +24,15 @@ namespace NewHorizons.Builder.Volumes owTriggerVolume._shape = shape; HazardVolume hazardVolume = null; - if (info.type == HazardVolumeInfo.HazardType.RIVERHEAT) + if (info.type == VolumesModule.HazardVolumeInfo.HazardType.RIVERHEAT) { hazardVolume = go.AddComponent(); } - else if (info.type == HazardVolumeInfo.HazardType.HEAT) + else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.HEAT) { hazardVolume = go.AddComponent(); } - else if (info.type == HazardVolumeInfo.HazardType.DARKMATTER) + else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.DARKMATTER) { hazardVolume = go.AddComponent(); var visorFrostEffectVolume = go.AddComponent(); @@ -61,7 +60,7 @@ namespace NewHorizons.Builder.Volumes submerge._fluidDetector = detector; } } - else if (info.type == HazardVolumeInfo.HazardType.ELECTRICITY) + else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.ELECTRICITY) { var electricityVolume = go.AddComponent(); electricityVolume._shockAudioPool = new OWAudioSource[0]; diff --git a/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs b/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs index 7cf56bcc..574aa6da 100644 --- a/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/NotificationVolumeBuilder.cs @@ -1,6 +1,5 @@ using NewHorizons.Builder.Props; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using NewHorizons.Utility; using OWML.Common; using System; @@ -16,7 +15,7 @@ namespace NewHorizons.Builder.Volumes { public static class NotificationVolumeBuilder { - public static NHNotificationVolume Make(GameObject planetGO, Sector sector, NotificationVolumeInfo info, IModBehaviour mod) + public static NHNotificationVolume Make(GameObject planetGO, Sector sector, VolumesModule.NotificationVolumeInfo info, IModBehaviour mod) { var go = GeneralPropBuilder.MakeNew("NotificationVolume", sector?.transform ?? planetGO.transform, info); go.layer = LayerMask.NameToLayer("BasicEffectVolume"); diff --git a/NewHorizons/Builder/Volumes/OxygenVolumeBuilder.cs b/NewHorizons/Builder/Volumes/OxygenVolumeBuilder.cs index bcf1f406..0722fbaf 100644 --- a/NewHorizons/Builder/Volumes/OxygenVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/OxygenVolumeBuilder.cs @@ -1,12 +1,11 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { public static class OxygenVolumeBuilder { - public static OxygenVolume Make(GameObject planetGO, Sector sector, OxygenVolumeInfo info) + public static OxygenVolume Make(GameObject planetGO, Sector sector, VolumesModule.OxygenVolumeInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs b/NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs index b38c966e..994b1c91 100644 --- a/NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/PriorityVolumeBuilder.cs @@ -1,12 +1,11 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { public static class PriorityVolumeBuilder { - public static TVolume Make(GameObject planetGO, Sector sector, PriorityVolumeInfo info) where TVolume : PriorityVolume + public static TVolume Make(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info) where TVolume : PriorityVolume { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/Rulesets/PlayerImpactRulesetBuilder.cs b/NewHorizons/Builder/Volumes/Rulesets/PlayerImpactRulesetBuilder.cs index db1c8e3a..9ef330de 100644 --- a/NewHorizons/Builder/Volumes/Rulesets/PlayerImpactRulesetBuilder.cs +++ b/NewHorizons/Builder/Volumes/Rulesets/PlayerImpactRulesetBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.Volumes { public static class PlayerImpactRulesetBuilder { - public static PlayerImpactRuleset Make(GameObject planetGO, Sector sector, RulesetModule.PlayerImpactRulesetInfo info) + public static PlayerImpactRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.PlayerImpactRulesetInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/Rulesets/ProbeRulesetBuilder.cs b/NewHorizons/Builder/Volumes/Rulesets/ProbeRulesetBuilder.cs index 1b17d62f..b8293d94 100644 --- a/NewHorizons/Builder/Volumes/Rulesets/ProbeRulesetBuilder.cs +++ b/NewHorizons/Builder/Volumes/Rulesets/ProbeRulesetBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.Volumes { public static class ProbeRulesetBuilder { - public static ProbeRuleset Make(GameObject planetGO, Sector sector, RulesetModule.ProbeRulesetInfo info) + public static ProbeRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.ProbeRulesetInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/Rulesets/ThrustRulesetBuilder.cs b/NewHorizons/Builder/Volumes/Rulesets/ThrustRulesetBuilder.cs index 9543fad9..8541f516 100644 --- a/NewHorizons/Builder/Volumes/Rulesets/ThrustRulesetBuilder.cs +++ b/NewHorizons/Builder/Volumes/Rulesets/ThrustRulesetBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.Volumes { public static class ThrustRulesetBuilder { - public static ThrustRuleset Make(GameObject planetGO, Sector sector, RulesetModule.ThrustRulesetInfo info) + public static ThrustRuleset Make(GameObject planetGO, Sector sector, VolumesModule.RulesetModule.ThrustRulesetInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/SpeedTrapVolumeBuilder.cs b/NewHorizons/Builder/Volumes/SpeedTrapVolumeBuilder.cs index d9ae1893..3e264604 100644 --- a/NewHorizons/Builder/Volumes/SpeedTrapVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/SpeedTrapVolumeBuilder.cs @@ -1,12 +1,11 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { public static class SpeedTrapVolumeBuilder { - public static SpeedTrapVolume Make(GameObject planetGO, Sector sector, SpeedTrapVolumeInfo info) + public static SpeedTrapVolume Make(GameObject planetGO, Sector sector, VolumesModule.SpeedTrapVolumeInfo info) { var volume = VolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs index 8cda0d15..23628b12 100644 --- a/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VanishVolumeBuilder.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.Props; using NewHorizons.Components; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; using Logger = NewHorizons.Utility.Logger; @@ -9,7 +8,7 @@ namespace NewHorizons.Builder.Volumes { public static class VanishVolumeBuilder { - public static TVolume Make(GameObject planetGO, Sector sector, VanishVolumeInfo info) where TVolume : VanishVolume + public static TVolume Make(GameObject planetGO, Sector sector, VolumesModule.VanishVolumeInfo info) where TVolume : VanishVolume { var go = GeneralPropBuilder.MakeNew(typeof(TVolume).Name, sector?.transform ?? planetGO.transform, info); go.layer = LayerMask.NameToLayer("BasicEffectVolume"); diff --git a/NewHorizons/Builder/Volumes/VisorEffects/VisorFrostEffectVolumeBuilder.cs b/NewHorizons/Builder/Volumes/VisorEffects/VisorFrostEffectVolumeBuilder.cs index c38e0a80..139e09f9 100644 --- a/NewHorizons/Builder/Volumes/VisorEffects/VisorFrostEffectVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VisorEffects/VisorFrostEffectVolumeBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.Volumes { public static class VisorFrostEffectVolumeBuilder { - public static VisorFrostEffectVolume Make(GameObject planetGO, Sector sector, VisorEffectModule.FrostEffectVolumeInfo info) + public static VisorFrostEffectVolume Make(GameObject planetGO, Sector sector, VolumesModule.VisorEffectModule.FrostEffectVolumeInfo info) { var volume = PriorityVolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/VisorEffects/VisorRainEffectVolumeBuilder.cs b/NewHorizons/Builder/Volumes/VisorEffects/VisorRainEffectVolumeBuilder.cs index cf7d66e9..bf268c8e 100644 --- a/NewHorizons/Builder/Volumes/VisorEffects/VisorRainEffectVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VisorEffects/VisorRainEffectVolumeBuilder.cs @@ -5,7 +5,7 @@ namespace NewHorizons.Builder.Volumes { public static class VisorRainEffectVolumeBuilder { - public static VisorRainEffectVolume Make(GameObject planetGO, Sector sector, VisorEffectModule.RainEffectVolumeInfo info) + public static VisorRainEffectVolume Make(GameObject planetGO, Sector sector, VolumesModule.VisorEffectModule.RainEffectVolumeInfo info) { var volume = PriorityVolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Builder/Volumes/VolumeBuilder.cs b/NewHorizons/Builder/Volumes/VolumeBuilder.cs index ca273c99..8d29c9a9 100644 --- a/NewHorizons/Builder/Volumes/VolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/VolumeBuilder.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.Props; using NewHorizons.Components; using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; using Logger = NewHorizons.Utility.Logger; @@ -9,7 +8,7 @@ namespace NewHorizons.Builder.Volumes { public static class VolumeBuilder { - public static TVolume Make(GameObject planetGO, Sector sector, VolumeInfo info) where TVolume : MonoBehaviour //Could be BaseVolume but I need to create vanilla volumes too. + public static TVolume Make(GameObject planetGO, Sector sector, VolumesModule.VolumeInfo info) where TVolume : MonoBehaviour //Could be BaseVolume but I need to create vanilla volumes too. { var go = GeneralPropBuilder.MakeNew(typeof(TVolume).Name, sector?.transform ?? planetGO.transform, info); go.layer = LayerMask.NameToLayer("BasicEffectVolume"); diff --git a/NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs b/NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs index da50d8c9..931d1608 100644 --- a/NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs +++ b/NewHorizons/Builder/Volumes/ZeroGVolumeBuilder.cs @@ -1,12 +1,11 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Builder.Volumes { public static class ZeroGVolumeBuilder { - public static ZeroGVolume Make(GameObject planetGO, Sector sector, PriorityVolumeInfo info) + public static ZeroGVolume Make(GameObject planetGO, Sector sector, VolumesModule.PriorityVolumeInfo info) { var volume = PriorityVolumeBuilder.Make(planetGO, sector, info); diff --git a/NewHorizons/Components/Volumes/LoadCreditsVolume.cs b/NewHorizons/Components/Volumes/LoadCreditsVolume.cs index f852917f..11990840 100644 --- a/NewHorizons/Components/Volumes/LoadCreditsVolume.cs +++ b/NewHorizons/Components/Volumes/LoadCreditsVolume.cs @@ -1,12 +1,11 @@ using NewHorizons.External.Modules; -using NewHorizons.External.Volumes; using UnityEngine; namespace NewHorizons.Components.Volumes { internal class LoadCreditsVolume : BaseVolume { - public LoadCreditsVolumeInfo.CreditsType creditsType = LoadCreditsVolumeInfo.CreditsType.Fast; + public VolumesModule.LoadCreditsVolumeInfo.CreditsType creditsType = VolumesModule.LoadCreditsVolumeInfo.CreditsType.Fast; public override void OnTriggerVolumeEntry(GameObject hitObj) { @@ -14,13 +13,13 @@ namespace NewHorizons.Components.Volumes { switch(creditsType) { - case LoadCreditsVolumeInfo.CreditsType.Fast: + case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Fast: LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack); break; - case LoadCreditsVolumeInfo.CreditsType.Final: + case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Final: LoadManager.LoadScene(OWScene.Credits_Final, LoadManager.FadeType.ToBlack); break; - case LoadCreditsVolumeInfo.CreditsType.Kazoo: + case VolumesModule.LoadCreditsVolumeInfo.CreditsType.Kazoo: TimelineObliterationController.s_hasRealityEnded = true; LoadManager.LoadScene(OWScene.Credits_Fast, LoadManager.FadeType.ToBlack); break; diff --git a/NewHorizons/Components/Volumes/NotificationVolume.cs b/NewHorizons/Components/Volumes/NotificationVolume.cs index 9aa4f3f8..70543449 100644 --- a/NewHorizons/Components/Volumes/NotificationVolume.cs +++ b/NewHorizons/Components/Volumes/NotificationVolume.cs @@ -1,4 +1,3 @@ -using NewHorizons.External.Volumes; using NewHorizons.Handlers; using OWML.Utils; using System; @@ -17,7 +16,7 @@ namespace NewHorizons.Components.Volumes public void SetPinned(bool pin) => _pin = pin; - public void SetTarget(NotificationVolumeInfo.NotificationTarget target) => SetTarget(EnumUtils.Parse(target.ToString(), NotificationTarget.All)); + public void SetTarget(External.Modules.VolumesModule.NotificationVolumeInfo.NotificationTarget target) => SetTarget(EnumUtils.Parse(target.ToString(), NotificationTarget.All)); public void SetTarget(NotificationTarget target) => _target = target; diff --git a/NewHorizons/External/Configs/PlanetConfig.cs b/NewHorizons/External/Configs/PlanetConfig.cs index 6de974db..3330a4ad 100644 --- a/NewHorizons/External/Configs/PlanetConfig.cs +++ b/NewHorizons/External/Configs/PlanetConfig.cs @@ -1,8 +1,6 @@ using Epic.OnlineServices.Presence; using NewHorizons.External.Modules; using NewHorizons.External.Modules.VariableSize; -using NewHorizons.External.Props; -using NewHorizons.External.Volumes; using Newtonsoft.Json; using System; using System.Collections.Generic; @@ -66,7 +64,7 @@ namespace NewHorizons.External.Configs public string[] childrenToDestroy; [Obsolete("Singularity is deprecated, please use Props->singularities")] - public SingularityInfo Singularity; + public SingularityModule Singularity; [Obsolete("Signal is deprecated, please use Props->signals")] public SignalModule Signal; @@ -215,21 +213,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 existingGroups = new Dictionary(); + Dictionary existingGroups = new Dictionary(); foreach (var quantumGroup in Props.quantumGroups) { - if (existingGroups.ContainsKey(quantumGroup.id)) { Logger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = QuantumGroupType.FailedValidation; } + if (existingGroups.ContainsKey(quantumGroup.id)) { Logger.LogWarning($"Duplicate quantumGroup id found: {quantumGroup.id}"); quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; } existingGroups[quantumGroup.id] = quantumGroup; - if (quantumGroup.type == QuantumGroupType.Sockets) + if (quantumGroup.type == PropModule.QuantumGroupType.Sockets) { - if (quantumGroup.sockets?.Length == 0) { Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = QuantumGroupType.FailedValidation; } + if (quantumGroup.sockets?.Length == 0) { Logger.LogError($"quantumGroup {quantumGroup.id} is of type \"sockets\" but has no defined sockets."); quantumGroup.type = PropModule.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 = QuantumGroupType.FailedValidation; } + if (socket.position == null) { Logger.LogError($"quantumGroup {quantumGroup.id} has a socket without a position."); quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; } } } } @@ -245,10 +243,10 @@ namespace NewHorizons.External.Configs foreach (var quantumGroup in Props.quantumGroups) { - if (quantumGroup.type == QuantumGroupType.Sockets && existingGroupsPropCounts.GetValueOrDefault(quantumGroup.id) >= quantumGroup.sockets?.Length) + if (quantumGroup.type == PropModule.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 = QuantumGroupType.FailedValidation; + quantumGroup.type = PropModule.QuantumGroupType.FailedValidation; } } } @@ -276,9 +274,9 @@ namespace NewHorizons.External.Configs }; if (Base.blackHoleSize != 0) - Singularity = new SingularityInfo + Singularity = new SingularityModule { - type = SingularityInfo.SingularityType.BlackHole, + type = SingularityModule.SingularityType.BlackHole, size = Base.blackHoleSize }; @@ -331,19 +329,19 @@ namespace NewHorizons.External.Configs if (Props?.tornados != null) foreach (var tornado in Props.tornados) if (tornado.downwards) - tornado.type = TornadoInfo.TornadoType.Downwards; + tornado.type = PropModule.TornadoInfo.TornadoType.Downwards; if (Props?.audioVolumes != null) { if (Volumes == null) Volumes = new VolumesModule(); - if (Volumes.audioVolumes == null) Volumes.audioVolumes = new AudioVolumeInfo[0]; + if (Volumes.audioVolumes == null) Volumes.audioVolumes = new VolumesModule.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 RevealVolumeInfo[0]; + if (Volumes.revealVolumes == null) Volumes.revealVolumes = new VolumesModule.RevealVolumeInfo[0]; Volumes.revealVolumes = Volumes.revealVolumes.Concat(Props.reveal).ToArray(); } @@ -377,7 +375,7 @@ namespace NewHorizons.External.Configs if (Singularity != null) { if (Props == null) Props = new PropModule(); - if (Props.singularities == null) Props.singularities = new SingularityInfo[0]; + if (Props.singularities == null) Props.singularities = new SingularityModule[0]; Props.singularities = Props.singularities.Append(Singularity).ToArray(); } @@ -391,10 +389,10 @@ namespace NewHorizons.External.Configs singularity.horizonRadius = singularity.size * 0.4f; switch (singularity.type) { - case SingularityInfo.SingularityType.BlackHole: + case SingularityModule.SingularityType.BlackHole: singularity.distortRadius = singularity.size * 0.95f; break; - case SingularityInfo.SingularityType.WhiteHole: + case SingularityModule.SingularityType.WhiteHole: singularity.distortRadius = singularity.size * 2.8f; break; } @@ -406,7 +404,7 @@ namespace NewHorizons.External.Configs if (Signal?.signals != null) { if (Props == null) Props = new PropModule(); - if (Props.signals == null) Props.signals = new SignalInfo[0]; + if (Props.signals == null) Props.signals = new SignalModule.SignalInfo[0]; Props.signals = Props.signals.Concat(Signal.signals).ToArray(); } @@ -452,9 +450,9 @@ namespace NewHorizons.External.Configs if (Base.zeroGravityRadius != 0f) { Volumes ??= new VolumesModule(); - Volumes.zeroGravityVolumes ??= new PriorityVolumeInfo[0]; + Volumes.zeroGravityVolumes ??= new VolumesModule.PriorityVolumeInfo[0]; - Volumes.zeroGravityVolumes = Volumes.zeroGravityVolumes.Append(new PriorityVolumeInfo() + Volumes.zeroGravityVolumes = Volumes.zeroGravityVolumes.Append(new VolumesModule.PriorityVolumeInfo() { priority = 1, rename = "ZeroGVolume", @@ -495,7 +493,7 @@ namespace NewHorizons.External.Configs { if (dialogue.remoteTrigger == null && (dialogue.remoteTriggerPosition != null || dialogue.remoteTriggerRadius != 0)) { - dialogue.remoteTrigger = new DialogueInfo.RemoteTriggerInfo + dialogue.remoteTrigger = new PropModule.DialogueInfo.RemoteTriggerInfo { position = dialogue.remoteTriggerPosition, radius = dialogue.remoteTriggerRadius, diff --git a/NewHorizons/External/Configs/StarSystemConfig.cs b/NewHorizons/External/Configs/StarSystemConfig.cs index a3e5d298..12a97277 100644 --- a/NewHorizons/External/Configs/StarSystemConfig.cs +++ b/NewHorizons/External/Configs/StarSystemConfig.cs @@ -3,7 +3,6 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Utility; using Newtonsoft.Json; using static NewHorizons.External.Modules.ShipLogModule; @@ -212,12 +211,12 @@ namespace NewHorizons.External.Configs [Obsolete("warpExitRotation is deprecated, use vesselSpawn.rotation instead")] public MVector3 warpExitRotation; [JsonObject] - public class VesselInfo : GeneralSolarSystemPropInfo + public class VesselInfo : PropModule.GeneralSolarSystemPropInfo { } [JsonObject] - public class WarpExitInfo : GeneralSolarSystemPropInfo + public class WarpExitInfo : PropModule.GeneralSolarSystemPropInfo { /// /// If set, keeps the warp exit attached to the vessel. Overrides `parentPath`. diff --git a/NewHorizons/External/Modules/BrambleModule.cs b/NewHorizons/External/Modules/BrambleModule.cs index 64207cbc..7fec298b 100644 --- a/NewHorizons/External/Modules/BrambleModule.cs +++ b/NewHorizons/External/Modules/BrambleModule.cs @@ -8,7 +8,6 @@ using System.Runtime.Serialization; using System.Linq; using System.Text; using System.Threading.Tasks; -using NewHorizons.External.Props; namespace NewHorizons.External.Modules { @@ -77,5 +76,66 @@ namespace NewHorizons.External.Modules public int[] allowedEntrances; } + + [JsonObject] + public class BrambleNodeInfo : PropModule.GeneralPropInfo + { + /// + /// The physical scale of the node, as a multiplier of the original size. + /// Nodes are 150m across, seeds are 10m across. + /// + [DefaultValue(1f)] public float scale = 1f; + + /// + /// The name of the planet that hosts the dimension this node links to + /// + public string linksTo; + + /// + /// The name of this node. Only required if this node should serve as an exit. + /// + public string name; + + /// + /// Set this to true to make this node a seed instead of a node the player can enter + /// + [DefaultValue(false)] public bool isSeed = false; + + /// + /// The color of the fog inside the node. + /// Leave blank for the default yellowish white color: (255, 245, 217, 255) + /// + public MColor fogTint; + + /// + /// The color of the light from the node. Alpha controls brightness. + /// Leave blank for the default white color. + /// + public MColor lightTint; + + /// + /// Should this node have a point of light from afar? + /// By default, nodes will have a foglight, while seeds won't, and neither will if not in a dimension. + /// + public bool? hasFogLight; + + /// + /// An array of integers from 0-5. By default, all exits are allowed. To force this node to warp players out from only one hole set this value to [3], [5], or similar. Values of 0-5 only. + /// + public int[] possibleExits; + + /// + /// If your game hard crashes upon entering bramble, it's most likely because you have indirectly recursive dimensions, i.e. one leads to another that leads back to the first one. + /// Set this to true for one of the nodes in the recursion to fix this, at the cost of it no longer showing markers for the scout, ship, etc. + /// + [DefaultValue(false)] public bool preventRecursionCrash = false; + + #region Obsolete + + [Obsolete("farFogTint is deprecated, please use fogTint instead")] + public MColor farFogTint; + + #endregion Obsolete + } } } diff --git a/NewHorizons/External/Modules/ProbeModule.cs b/NewHorizons/External/Modules/ProbeModule.cs deleted file mode 100644 index 79384968..00000000 --- a/NewHorizons/External/Modules/ProbeModule.cs +++ /dev/null @@ -1,20 +0,0 @@ -using NewHorizons.External.Volumes; -using Newtonsoft.Json; - -namespace NewHorizons.External.Modules -{ - [JsonObject] - public class ProbeModule - { - /// - /// Add probe destruction volumes to this planet. These will delete your probe. - /// - public VolumeInfo[] destructionVolumes; - - /// - /// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working. - /// - public VolumeInfo[] safetyVolumes; - } - } - diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index 301c88f7..9c21b454 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -1,7 +1,12 @@ + +using NewHorizons.Utility; +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; using Newtonsoft.Json; +using Newtonsoft.Json.Converters; using System; -using NewHorizons.External.Props; -using NewHorizons.External.Volumes; +using NewHorizons.External.Modules.VariableSize; namespace NewHorizons.External.Modules { @@ -77,20 +82,831 @@ namespace NewHorizons.External.Modules /// /// Add black/white-holes to this planet /// - public SingularityInfo[] singularities; + public SingularityModule[] singularities; /// /// Add signalscope signals to this planet /// - public SignalInfo[] signals; + public SignalModule.SignalInfo[] signals; /// /// Add projection pools/platforms, whiteboards, and stones to this planet /// public RemoteInfo[] remotes; - [Obsolete("reveal is deprecated. Use Volumes->revealVolumes instead.")] public RevealVolumeInfo[] reveal; + [Obsolete("reveal is deprecated. Use Volumes->revealVolumes instead.")] public VolumesModule.RevealVolumeInfo[] reveal; - [Obsolete("audioVolumes is deprecated. Use Volumes->audioVolumes instead.")] public AudioVolumeInfo[] audioVolumes; + [Obsolete("audioVolumes is deprecated. Use Volumes->audioVolumes instead.")] public VolumesModule.AudioVolumeInfo[] audioVolumes; + + [JsonObject] + public abstract class GeneralPointPropInfo + { + /// + /// Position of the object + /// + public MVector3 position; + + /// + /// The relative path from the planet to the parent of this object. Optional (will default to the root sector). + /// + public string parentPath; + + /// + /// Whether the positional and rotational coordinates are relative to parent instead of the root planet object. + /// + public bool isRelativeToParent; + + /// + /// An optional rename of this object + /// + public string rename; + } + + [JsonObject] + public abstract class GeneralPropInfo : GeneralPointPropInfo + { + /// + /// Rotation of the object + /// + public MVector3 rotation; + } + + [JsonObject] + public abstract class GeneralSolarSystemPropInfo : GeneralPropInfo + { + /// + /// The name of the planet that will be used with `parentPath`. Must be set if `parentPath` is set. + /// + public string parentBody; + } + + [JsonObject] + public class ScatterInfo + { + /// + /// Relative filepath to an asset-bundle + /// + public string assetBundle; + + /// + /// Number of props to scatter + /// + public int count; + + /// + /// Offset this prop once it is placed + /// + public MVector3 offset; + + /// + /// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle + /// + public string path; + + /// + /// Rotate this prop once it is placed + /// + public MVector3 rotation; + + /// + /// Scale this prop once it is placed + /// + [DefaultValue(1f)] public float scale = 1f; + + /// + /// Scale each axis of the prop. Overrides `scale`. + /// + public MVector3 stretch; + + /// + /// The number used as entropy for scattering the props + /// + public int seed; + + /// + /// The lowest height that these object will be placed at (only relevant if there's a heightmap) + /// + public float? minHeight; + + /// + /// The highest height that these objects will be placed at (only relevant if there's a heightmap) + /// + public float? maxHeight; + + /// + /// Should we try to prevent overlap between the scattered details? True by default. If it's affecting load times turn it off. + /// + [DefaultValue(true)] public bool preventOverlap = true; + + /// + /// Should this detail stay loaded even if you're outside the sector (good for very large props) + /// + public bool keepLoaded; + } + + [JsonObject] + public class DetailInfo : GeneralPropInfo + { + + /// + /// Do we override rotation and try to automatically align this object to stand upright on the body's surface? + /// + public bool alignToNormal; + + /// + /// Relative filepath to an asset-bundle to load the prefab defined in `path` from + /// + public string assetBundle; + + /// + /// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle + /// + public string path; + + /// + /// A list of children to remove from this detail + /// + public string[] removeChildren; + + /// + /// Do we reset all the components on this object? Useful for certain props that have dialogue components attached to + /// them. + /// + public bool removeComponents; + + /// + /// Scale the prop + /// + [DefaultValue(1f)] public float scale = 1f; + + /// + /// Scale each axis of the prop. Overrides `scale`. + /// + public MVector3 stretch; + + /// + /// 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 + /// + public string quantumGroupID; + + /// + /// Should this detail stay loaded even if you're outside the sector (good for very large props) + /// + public bool keepLoaded; + + /// + /// 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. + /// + public bool hasPhysics; + + /// + /// The mass of the physics object. + /// Most pushable props use the default value, which matches the player mass. + /// + [DefaultValue(0.001f)] public float physicsMass = 0.001f; + + /// + /// 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. + /// + [DefaultValue(1f)] public float physicsRadius = 1f; + } + + [JsonObject] + public class RaftInfo : GeneralPointPropInfo + { + /// + /// Acceleration of the raft. Default acceleration is 5. + /// + [DefaultValue(5f)] public float acceleration = 5f; + } + + [JsonObject] + public class GeyserInfo : GeneralPointPropInfo + { + /// + /// 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. + /// + [DefaultValue(-97.5f)] public float offset = -97.5f; + + /// + /// Force of the geyser on objects + /// + [DefaultValue(55f)] public float force = 55f; + + /// + /// Time in seconds eruptions last for + /// + [DefaultValue(10f)] public float activeDuration = 10f; + + /// + /// Time in seconds between eruptions + /// + [DefaultValue(19f)] public float inactiveDuration = 19f; + + /// + /// Color of the geyser. Alpha sets the particle density. + /// + public MColor tint; + + /// + /// Disable the individual particle systems of the geyser + /// + public bool disableBubbles, disableShaft, disableSpout; + + /// + /// Loudness of the geyser + /// + [DefaultValue(0.7f)] public float volume = 0.7f; + } + + [JsonObject] + public class TornadoInfo : GeneralPointPropInfo + { + [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; + + /// + /// Alternative to setting the position. Will choose a random place at this elevation. + /// + public float elevation; + + /// + /// The height of this tornado. + /// + [DefaultValue(30f)] public float height = 30f; + + /// + /// The colour of the tornado. + /// + public MColor tint; + + /// + /// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction. + /// + [DefaultValue("upwards")] public TornadoType type = TornadoType.Upwards; + + /// + /// Angular distance from the starting position that it will wander, in terms of the angle around the x-axis. + /// + [DefaultValue(45f)] public float wanderDegreesX = 45f; + + /// + /// Angular distance from the starting position that it will wander, in terms of the angle around the z-axis. + /// + [DefaultValue(45f)] public float wanderDegreesZ = 45f; + + /// + /// The rate at which the tornado will wander around the planet. Set to 0 for it to be stationary. Should be around + /// 0.1. + /// + public float wanderRate; + + /// + /// 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. + /// + public float audioDistance; + + /// + /// Fluid type for sounds/effects when colliding with this tornado. + /// + [DefaultValue("cloud")] public FluidType fluidType = FluidType.Cloud; + } + + [JsonObject] + public class VolcanoInfo : GeneralPointPropInfo + { + /// + /// The colour of the meteor's lava. + /// + public MColor lavaTint; + + /// + /// Maximum time between meteor launches. + /// + [DefaultValue(20f)] + public float maxInterval = 20f; + + /// + /// Maximum random speed at which meteors are launched. + /// + [DefaultValue(150f)] + public float maxLaunchSpeed = 150f; + + /// + /// Minimum time between meteor launches. + /// + [DefaultValue(5f)] + public float minInterval = 5f; + + /// + /// Minimum random speed at which meteors are launched. + /// + [DefaultValue(50f)] + public float minLaunchSpeed = 50f; + + /// + /// Scale of the meteors. + /// + public float scale = 1; + + /// + /// The colour of the meteor's stone. + /// + public MColor stoneTint; + } + + [JsonObject] + public class DialogueInfo : GeneralPointPropInfo + { + /// + /// 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. + /// + public string blockAfterPersistentCondition; + + /// + /// 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. + /// + public float lookAtRadius; + + /// + /// 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. + /// + public string pathToAnimController; + + /// + /// 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. + /// + public float radius = 1f; + + /// + /// Distance from radius the prompt appears + /// + [DefaultValue(2f)] public float range = 2f; + + /// + /// Allows you to trigger dialogue from a distance when you walk into an area. + /// + 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; + + /// + /// Relative path to the xml file defining the dialogue. + /// + public string xmlFile; + + /// + /// What type of flashlight toggle to do when dialogue is interacted with + /// + [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 + { + /// + /// The radius of the remote trigger volume. + /// + public float radius; + /// + /// This condition must be met for the remote trigger volume to trigger. + /// + public string prereqCondition; + } + } + + [JsonObject] + public class EntryLocationInfo : GeneralPointPropInfo + { + /// + /// Whether this location is cloaked + /// + public bool cloaked; + + /// + /// ID of the entry this location relates to + /// + public string id; + } + + [JsonObject] + public class NomaiTextInfo : GeneralPointPropInfo + { + [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, + } + + [JsonConverter(typeof(StringEnumConverter))] + public enum NomaiTextLocation + { + [EnumMember(Value = @"unspecified")] UNSPECIFIED = 0, + + [EnumMember(Value = @"a")] A = 1, + + [EnumMember(Value = @"b")] B = 2 + } + + /// + /// Additional information about each arc in the text + /// + public NomaiTextArcInfo[] arcInfo; + + /// + /// The normal vector for this object. Used for writing on walls and positioning computers. + /// + public MVector3 normal; + + /// + /// 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. + /// + public MVector3 rotation; + + /// + /// The random seed used to pick what the text arcs will look like. + /// + public int seed; // For randomizing arcs + + /// + /// The type of object this is. + /// + [DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall; + + /// + /// The location of this object. + /// + [DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED; + + /// + /// The relative path to the xml file for this object. + /// + 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 + } + + /// + /// Whether to skip modifying this spiral's placement, and instead keep the automatically determined placement. + /// + public bool keepAutoPlacement; + + /// + /// Whether to flip the spiral from left-curling to right-curling or vice versa. + /// + public bool mirror; + + /// + /// The local position of this object on the wall. + /// + public MVector2 position; + + /// + /// The type of text to display. + /// + [DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult; + + /// + /// 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. + /// + [DefaultValue(-1)] public int variation = -1; + + /// + /// The z euler angle for this arc. + /// + [Range(0f, 360f)] public float zRotation; + } + + [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, + + } + + /// + /// The ship log facts revealed after finishing this slide reel. + /// + public string[] reveals; + + /// + /// 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. + /// + public string[] playWithShipLogFacts; + + /// + /// The list of slides for this object. + /// + public SlideInfo[] slides; + + /// + /// The type of object this is. + /// + [DefaultValue("slideReel")] public SlideShowType type = SlideShowType.SlideReel; + } + + [JsonObject] + public class SlideInfo + { + /// + /// Ambient light colour when viewing this slide. + /// + public MColor ambientLightColor; + + + // SlideAmbientLightModule + + /// + /// Ambient light intensity when viewing this slide. + /// + public float ambientLightIntensity; + + /// + /// Ambient light range when viewing this slide. + /// + public float ambientLightRange; + + // SlideBackdropAudioModule + + /// + /// The name of the AudioClip that will continuously play while watching these slides + /// + public string backdropAudio; + + /// + /// The time to fade into the backdrop audio + /// + public float backdropFadeTime; + + // SlideBeatAudioModule + + /// + /// The name of the AudioClip for a one-shot sound when opening the slide. + /// + public string beatAudio; + + /// + /// The time delay until the one-shot audio + /// + public float beatDelay; + + + // SlideBlackFrameModule + + /// + /// Before viewing this slide, there will be a black frame for this many seconds. + /// + public float blackFrameDuration; + + /// + /// The path to the image file for this slide. + /// + public string imagePath; + + + // SlidePlayTimeModule + + /// + /// Play-time duration for auto-projector slides. + /// + public float playTimeDuration; + + + // SlideShipLogEntryModule + + /// + /// Ship log fact revealed when viewing this slide + /// + public string reveal; + + /// + /// Spotlight intensity modifier when viewing this slide. + /// + 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 + { + /// + /// 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? + /// + public QuantumGroupType type; + + /// + /// A unique string used by props (that are marked as quantum) use to refer back to this group + /// + public string id; + + /// + /// Only required if type is `sockets`. This lists all the possible locations for any props assigned to this group. + /// + public QuantumSocketInfo[] sockets; + + /// + /// 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. + /// + public bool hasEmptyState; + + /// + /// 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 + /// + public bool sequential; + + /// + /// 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 + /// + [DefaultValue(true)] public bool loop = true; + } + + [JsonObject] + public class QuantumSocketInfo : GeneralPropInfo + { + /// + /// The probability any props that are part of this group will occupy this socket + /// + [DefaultValue(1f)] public float probability = 1f; + } + + [JsonObject] + public class RemoteInfo + { + /// + /// The unique remote id + /// + public string id; + + /// + /// Icon that the will show on the stone, pedastal of the whiteboard, and pedastal of the platform. + /// + public string decalPath; + + /// + /// Whiteboard that the stones can put text onto + /// + public WhiteboardInfo whiteboard; + + /// + /// Camera platform that the stones can project to and from + /// + public PlatformInfo platform; + + /// + /// Projection stones + /// + public StoneInfo[] stones; + + [JsonObject] + public class WhiteboardInfo : GeneralPropInfo + { + /// + /// The text for each stone + /// + public SharedNomaiTextInfo[] nomaiText; + + /// + /// Disable the wall, leaving only the pedestal and text. + /// + public bool disableWall; + + [JsonObject] + public class SharedNomaiTextInfo + { + /// + /// The id of the stone this text will appear for + /// + public string id; + + /// + /// Additional information about each arc in the text + /// + public NomaiTextArcInfo[] arcInfo; + + /// + /// The random seed used to pick what the text arcs will look like. + /// + public int seed; // For randomizing arcs + + /// + /// The location of this object. + /// + [DefaultValue("unspecified")] public NomaiTextInfo.NomaiTextLocation location = NomaiTextInfo.NomaiTextLocation.UNSPECIFIED; + + /// + /// The relative path to the xml file for this object. + /// + public string xmlFile; + + /// + /// An optional rename of this object + /// + public string rename; + } + } + + [JsonObject] + public class PlatformInfo : GeneralPropInfo + { + /// + /// A ship log fact to reveal when the platform is connected to. + /// + [DefaultValue("")] public string reveals = ""; + + /// + /// Disable the structure, leaving only the pedestal. + /// + public bool disableStructure; + + /// + /// Disable the pool that rises when you place a stone. + /// + public bool disablePool; + } + + [JsonObject] + public class StoneInfo : GeneralPropInfo + { + + } + } } } diff --git a/NewHorizons/External/Modules/RulesetModule.cs b/NewHorizons/External/Modules/RulesetModule.cs deleted file mode 100644 index 4b35e44f..00000000 --- a/NewHorizons/External/Modules/RulesetModule.cs +++ /dev/null @@ -1,90 +0,0 @@ -using NewHorizons.External.Volumes; -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Modules -{ - [JsonObject] - public class RulesetModule - { - /// - /// Add anti travel music rulesets to this planet. - /// - public VolumeInfo[] antiTravelMusicRulesets; - /// - /// Add player impact rulesets to this planet. - /// - public PlayerImpactRulesetInfo[] playerImpactRulesets; - /// - /// Add probe rulesets to this planet. - /// - public ProbeRulesetInfo[] probeRulesets; - /// - /// Add thrust rulesets to this planet. - /// - public ThrustRulesetInfo[] thrustRulesets; - - [JsonObject] - public class PlayerImpactRulesetInfo : VolumeInfo - { - /// - /// Minimum player impact speed. Player will take the minimum amount of damage if they impact something at this speed. - /// - [DefaultValue(20f)] public float minImpactSpeed = 20f; - - /// - /// Maximum player impact speed. Players will die if they impact something at this speed. - /// - [DefaultValue(40f)] public float maxImpactSpeed = 40f; - } - - [JsonObject] - public class ProbeRulesetInfo : VolumeInfo - { - /// - /// Should this ruleset override the probe's speed? - /// - public bool overrideProbeSpeed; - - /// - /// The speed of the probe while in this ruleset volume. - /// - public float probeSpeed; - - /// - /// Should this ruleset override the range of probe's light? - /// - public bool overrideLanternRange; - - /// - /// The range of probe's light while in this ruleset volume. - /// - public float lanternRange; - - /// - /// Stop the probe from attaching to anything while in this ruleset volume. - /// - public bool ignoreAnchor; - } - - [JsonObject] - public class ThrustRulesetInfo : VolumeInfo - { - /// - /// Limit how fast you can fly with your ship while in this ruleset volume. - /// - [DefaultValue(float.PositiveInfinity)] public float thrustLimit = float.PositiveInfinity; - - /// - /// Nerf the jetpack booster. - /// - public bool nerfJetpackBooster; - - /// - /// How long the jetpack booster will be nerfed. - /// - [DefaultValue(0.5f)] public float nerfDuration = 0.5f; - } - } - } - diff --git a/NewHorizons/External/Modules/SignalModule.cs b/NewHorizons/External/Modules/SignalModule.cs index 337258cb..cfa66a16 100644 --- a/NewHorizons/External/Modules/SignalModule.cs +++ b/NewHorizons/External/Modules/SignalModule.cs @@ -1,7 +1,6 @@ using System; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using NewHorizons.External.Props; using NewHorizons.Utility; using Newtonsoft.Json; @@ -14,5 +13,63 @@ namespace NewHorizons.External.Modules /// List of signals to add (Why did xen do it like this) /// public SignalInfo[] signals; + + [JsonObject] + public class SignalInfo : PropModule.GeneralPointPropInfo + { + [Obsolete("audioClip is deprecated, please use audio instead")] + public string audioClip; + + [Obsolete("audioFilePath is deprecated, please use audio instead")] + public string audioFilePath; + + /// + /// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. + /// + public string audio; + + /// + /// How close the player must get to the signal to detect it. This is when you get the "Unknown Signal Detected" + /// notification. + /// + [Range(0f, double.MaxValue)] public float detectionRadius; + + /// + /// The frequency ID of the signal. The built-in game values are `Default`, `Traveler`, `Quantum`, `EscapePod`, + /// `Statue`, `WarpCore`, `HideAndSeek`, and `Radio`. You can also put a custom value. + /// + public string frequency; + + /// + /// How close the player must get to the signal to identify it. This is when you learn its name. + /// + [DefaultValue(10f)] [Range(0f, double.MaxValue)] + public float identificationRadius = 10f; + + /// + /// Only set to `true` if you are putting this signal inside a cloaking field. + /// + public bool insideCloak; + + /// + /// The unique ID of the signal. + /// + public string name; + + /// + /// `false` if the player can hear the signal without equipping the signal-scope. + /// + [DefaultValue(true)] public bool onlyAudibleToScope = true; + + /// + /// A ship log fact to reveal when the signal is identified. + /// + [DefaultValue("")] public string reveals = ""; + + /// + /// Radius of the sphere giving off the signal. + /// + [DefaultValue(1f)] public float sourceRadius = 1f; + } } } \ No newline at end of file diff --git a/NewHorizons/External/Modules/SpawnModule.cs b/NewHorizons/External/Modules/SpawnModule.cs index 5ab6bf71..ea8067c1 100644 --- a/NewHorizons/External/Modules/SpawnModule.cs +++ b/NewHorizons/External/Modules/SpawnModule.cs @@ -1,4 +1,3 @@ -using NewHorizons.External.Props; using NewHorizons.Utility; using Newtonsoft.Json; using System; @@ -25,7 +24,7 @@ namespace NewHorizons.External.Modules [Obsolete("startWithSuit is deprecated. Use playerSpawn.startWithSuit instead")] public bool startWithSuit; [JsonObject] - public class PlayerSpawnPoint : GeneralPropInfo { + public class PlayerSpawnPoint : PropModule.GeneralPropInfo { /// /// If you spawn on a planet with no oxygen, you probably want to set this to true ;;) /// @@ -33,7 +32,7 @@ namespace NewHorizons.External.Modules } [JsonObject] - public class ShipSpawnPoint : GeneralPropInfo { + public class ShipSpawnPoint : PropModule.GeneralPropInfo { } } diff --git a/NewHorizons/External/Props/SingularityInfo.cs b/NewHorizons/External/Modules/VariableSize/SingularityModule.cs similarity index 92% rename from NewHorizons/External/Props/SingularityInfo.cs rename to NewHorizons/External/Modules/VariableSize/SingularityModule.cs index 6b617588..58b35b9a 100644 --- a/NewHorizons/External/Props/SingularityInfo.cs +++ b/NewHorizons/External/Modules/VariableSize/SingularityModule.cs @@ -6,10 +6,10 @@ using NewHorizons.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Converters; -namespace NewHorizons.External.Props +namespace NewHorizons.External.Modules.VariableSize { [JsonObject] - public class SingularityInfo : GeneralPropInfo + public class SingularityModule : PropModule.GeneralPropInfo { [JsonConverter(typeof(StringEnumConverter))] public enum SingularityType @@ -39,7 +39,7 @@ namespace NewHorizons.External.Props /// Radius of the singularity. Note that this isn't the same as the event horizon, but includes the entire volume that /// has warped effects in it. /// - [Obsolete("size is deprecated, please use horizonRadius and distortRadius instead")][Range(0f, double.MaxValue)] public float size; + [Obsolete("size is deprecated, please use horizonRadius and distortRadius instead")] [Range(0f, double.MaxValue)] public float size; /// /// Radius of the event horizon (solid part) diff --git a/NewHorizons/External/Modules/VisorEffectModule.cs b/NewHorizons/External/Modules/VisorEffectModule.cs deleted file mode 100644 index fa1fd6ce..00000000 --- a/NewHorizons/External/Modules/VisorEffectModule.cs +++ /dev/null @@ -1,55 +0,0 @@ -using NewHorizons.External.Volumes; -using Newtonsoft.Json; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; - -namespace NewHorizons.External.Modules -{ - [JsonObject] - public class VisorEffectModule - { - /// - /// Add visor frost effect volumes to this planet. This is the ghost matter effect. - /// - public FrostEffectVolumeInfo[] frostEffectVolumes; - - /// - /// Add visor rain effect volumes to this planet. You can see this on Giant's Deep. - /// - public RainEffectVolumeInfo[] rainEffectVolumes; - - [JsonObject] - public class FrostEffectVolumeInfo : PriorityVolumeInfo - { - /// - /// The rate at which the frost effect will get stronger - /// - [DefaultValue(0.5f)] - public float frostRate = 0.5f; - - /// - /// The maximum strength of frost this volume can give - /// - [Range(0f, 1f)] - [DefaultValue(0.91f)] - public float maxFrost = 0.91f; - } - - [JsonObject] - public class RainEffectVolumeInfo : PriorityVolumeInfo - { - /// - /// The rate at which the rain droplet effect will happen - /// - [DefaultValue(0.1f)] - public float dropletRate = 10f; - - /// - /// The rate at which the rain streak effect will happen - /// - [DefaultValue(1f)] - public float streakRate = 1f; - } - } - } - diff --git a/NewHorizons/External/Modules/VolumesModule.cs b/NewHorizons/External/Modules/VolumesModule.cs index 5118db0c..8b60df6e 100644 --- a/NewHorizons/External/Modules/VolumesModule.cs +++ b/NewHorizons/External/Modules/VolumesModule.cs @@ -1,5 +1,3 @@ -using NewHorizons.External.Props; -using NewHorizons.External.Volumes; using NewHorizons.Utility; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -117,5 +115,539 @@ namespace NewHorizons.External.Modules /// Enter this volume to be sent to the end credits scene /// public LoadCreditsVolumeInfo[] creditsVolume; + + [JsonObject] + public class VolumeInfo : PropModule.GeneralPointPropInfo + { + /// + /// The radius of this volume. + /// + [DefaultValue(1f)] + public float radius = 1f; + } + + [JsonObject] + public class ChangeStarSystemVolumeInfo : VolumeInfo + { + /// + /// The star system that entering this volume will send you to. + /// + [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; + } + + [JsonObject] + public class PriorityVolumeInfo : VolumeInfo + { + /// + /// The layer of this volume. + /// + [DefaultValue(0)] + public int layer = 0; + + /// + /// 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. + /// + [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 + } + + /// + /// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only) + /// + [DefaultValue(180f)] + public float maxAngle = 180f; // Observe Only + + /// + /// The max distance the user can be away from the volume to reveal the fact (`snapshot` and `observe` only) + /// + [DefaultValue(-1f)] + public float maxDistance = -1f; // Snapshot & Observe Only + + /// + /// What needs to be done to the volume to unlock the facts + /// + [DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter; + + /// + /// What can enter the volume to unlock the facts (`enter` only) + /// + [DefaultValue("both")] public EnterType revealFor = EnterType.Both; + + /// + /// A list of facts to reveal + /// + public string[] reveals; + + /// + /// An achievement to unlock. Optional. + /// + public string achievementID; + } + + [JsonObject] + public class AudioVolumeInfo : PriorityVolumeInfo + { + /// + /// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. + /// + public string audio; + + [DefaultValue("random")] public ClipSelectionType clipSelection = ClipSelectionType.RANDOM; + + /// + /// The audio track of this audio volume + /// + [DefaultValue("environment")] public AudioMixerTrackName track = AudioMixerTrackName.Environment; + + /// + /// Whether to loop this audio while in this audio volume or just play it once + /// + [DefaultValue(true)] public bool loop = true; + + /// + /// The loudness of the audio + /// + [Range(0f, 1f)] + [DefaultValue(1f)] + public float volume = 1f; + + /// + /// How long it will take to fade this sound in and out when entering/exiting this volume. + /// + [DefaultValue(2f)] + public float fadeSeconds = 2f; + + /// + /// Play the sound instantly without any fading. + /// + public bool noFadeFromBeginning; + + /// + /// Randomize what time the audio starts at. + /// + public bool randomizePlayhead; + + /// + /// Pause the music when exiting the volume. + /// + public bool pauseOnFadeOut; + } + + [JsonObject] + public class NotificationVolumeInfo : VolumeInfo + { + /// + /// What the notification will show for. + /// + [DefaultValue("all")] public NotificationTarget target = NotificationTarget.All; + + /// + /// The notification that will play when you enter this volume. + /// + public NotificationInfo entryNotification; + + /// + /// The notification that will play when you exit this volume. + /// + public NotificationInfo exitNotification; + + + [JsonObject] + public class NotificationInfo + { + /// + /// The message that will be displayed. + /// + public string displayMessage; + + /// + /// The duration this notification will be displayed. + /// + [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 + { + /// + /// The type of hazard for this volume. + /// + [DefaultValue("general")] public HazardType type = HazardType.GENERAL; + + /// + /// The amount of damage you will take per second while inside this volume. + /// + [DefaultValue(10f)] public float damagePerSecond = 10f; + + /// + /// The type of damage you will take when you first touch this volume. + /// + [DefaultValue("impact")] public InstantDamageType firstContactDamageType = InstantDamageType.Impact; + + /// + /// The amount of damage you will take when you first touch this volume. + /// + 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 + { + /// + /// Whether the bodies will shrink when they enter this volume or just disappear instantly. + /// + [DefaultValue(true)] public bool shrinkBodies = true; + + /// + /// Whether this volume only affects the player and ship. + /// + public bool onlyAffectsPlayerAndShip; + } + + [JsonObject] + public class DestructionVolumeInfo : VanishVolumeInfo + { + /// + /// The type of death the player will have if they enter this volume. + /// + [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 + { + /// + /// Does this volume contain trees? This will change the notification from "Oxygen tank refilled" to "Trees detected, oxygen tank refilled". + /// + public bool treeVolume; + + /// + /// Whether to play the oxygen tank refill sound or just fill quietly. + /// + [DefaultValue(true)] public bool playRefillAudio = true; + } + + [JsonObject] + public class FluidVolumeInfo : PriorityVolumeInfo + { + /// + /// Density of the fluid. The higher the density, the harder it is to go through this fluid. + /// + [DefaultValue(1.2f)] public float density = 1.2f; + + /// + /// The type of fluid for this volume. + /// + public FluidType type; + + /// + /// Should the player and rafts align to this fluid. + /// + [DefaultValue(true)] public bool alignmentFluid = true; + + /// + /// Should the ship align to the fluid by rolling. + /// + public bool allowShipAutoroll; + + /// + /// Disable this fluid volume immediately? + /// + 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 + { + /// + /// Add probe destruction volumes to this planet. These will delete your probe. + /// + public VolumeInfo[] destructionVolumes; + + /// + /// Add probe safety volumes to this planet. These will stop the probe destruction volumes from working. + /// + public VolumeInfo[] safetyVolumes; + } + + [JsonObject] + public class VisorEffectModule + { + /// + /// Add visor frost effect volumes to this planet. This is the ghost matter effect. + /// + public FrostEffectVolumeInfo[] frostEffectVolumes; + + /// + /// Add visor rain effect volumes to this planet. You can see this on Giant's Deep. + /// + public RainEffectVolumeInfo[] rainEffectVolumes; + + [JsonObject] + public class FrostEffectVolumeInfo : PriorityVolumeInfo + { + /// + /// The rate at which the frost effect will get stronger + /// + [DefaultValue(0.5f)] + public float frostRate = 0.5f; + + /// + /// The maximum strength of frost this volume can give + /// + [Range(0f, 1f)] + [DefaultValue(0.91f)] + public float maxFrost = 0.91f; + } + + [JsonObject] + public class RainEffectVolumeInfo : PriorityVolumeInfo + { + /// + /// The rate at which the rain droplet effect will happen + /// + [DefaultValue(0.1f)] + public float dropletRate = 10f; + + /// + /// The rate at which the rain streak effect will happen + /// + [DefaultValue(1f)] + public float streakRate = 1f; + } + } + + [JsonObject] + public class RulesetModule + { + /// + /// Add anti travel music rulesets to this planet. + /// + public VolumeInfo[] antiTravelMusicRulesets; + /// + /// Add player impact rulesets to this planet. + /// + public PlayerImpactRulesetInfo[] playerImpactRulesets; + /// + /// Add probe rulesets to this planet. + /// + public ProbeRulesetInfo[] probeRulesets; + /// + /// Add thrust rulesets to this planet. + /// + public ThrustRulesetInfo[] thrustRulesets; + + [JsonObject] + public class PlayerImpactRulesetInfo : VolumeInfo + { + /// + /// Minimum player impact speed. Player will take the minimum amount of damage if they impact something at this speed. + /// + [DefaultValue(20f)] public float minImpactSpeed = 20f; + + /// + /// Maximum player impact speed. Players will die if they impact something at this speed. + /// + [DefaultValue(40f)] public float maxImpactSpeed = 40f; + } + + [JsonObject] + public class ProbeRulesetInfo : VolumeInfo + { + /// + /// Should this ruleset override the probe's speed? + /// + public bool overrideProbeSpeed; + + /// + /// The speed of the probe while in this ruleset volume. + /// + public float probeSpeed; + + /// + /// Should this ruleset override the range of probe's light? + /// + public bool overrideLanternRange; + + /// + /// The range of probe's light while in this ruleset volume. + /// + public float lanternRange; + + /// + /// Stop the probe from attaching to anything while in this ruleset volume. + /// + public bool ignoreAnchor; + } + + [JsonObject] + public class ThrustRulesetInfo : VolumeInfo + { + /// + /// Limit how fast you can fly with your ship while in this ruleset volume. + /// + [DefaultValue(float.PositiveInfinity)] public float thrustLimit = float.PositiveInfinity; + + /// + /// Nerf the jetpack booster. + /// + public bool nerfJetpackBooster; + + /// + /// How long the jetpack booster will be nerfed. + /// + [DefaultValue(0.5f)] public float nerfDuration = 0.5f; + } + } + + [JsonObject] + public class SpeedTrapVolumeInfo : VolumeInfo + { + /// + /// The speed the volume will slow you down to when you enter it. + /// + [DefaultValue(10f)] + public float speedLimit = 10f; + + /// + /// How fast it will slow down the player to the speed limit. + /// + [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, } } diff --git a/NewHorizons/External/Props/BrambleNodeInfo.cs b/NewHorizons/External/Props/BrambleNodeInfo.cs deleted file mode 100644 index 18d9f298..00000000 --- a/NewHorizons/External/Props/BrambleNodeInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using NewHorizons.Utility; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NewHorizons.External.Props -{ - - [JsonObject] - public class BrambleNodeInfo : GeneralPropInfo - { - /// - /// The physical scale of the node, as a multiplier of the original size. - /// Nodes are 150m across, seeds are 10m across. - /// - [DefaultValue(1f)] public float scale = 1f; - - /// - /// The name of the planet that hosts the dimension this node links to - /// - public string linksTo; - - /// - /// The name of this node. Only required if this node should serve as an exit. - /// - public string name; - - /// - /// Set this to true to make this node a seed instead of a node the player can enter - /// - [DefaultValue(false)] public bool isSeed = false; - - /// - /// The color of the fog inside the node. - /// Leave blank for the default yellowish white color: (255, 245, 217, 255) - /// - public MColor fogTint; - - /// - /// The color of the light from the node. Alpha controls brightness. - /// Leave blank for the default white color. - /// - public MColor lightTint; - - /// - /// Should this node have a point of light from afar? - /// By default, nodes will have a foglight, while seeds won't, and neither will if not in a dimension. - /// - public bool? hasFogLight; - - /// - /// An array of integers from 0-5. By default, all exits are allowed. To force this node to warp players out from only one hole set this value to [3], [5], or similar. Values of 0-5 only. - /// - public int[] possibleExits; - - /// - /// If your game hard crashes upon entering bramble, it's most likely because you have indirectly recursive dimensions, i.e. one leads to another that leads back to the first one. - /// Set this to true for one of the nodes in the recursion to fix this, at the cost of it no longer showing markers for the scout, ship, etc. - /// - [DefaultValue(false)] public bool preventRecursionCrash = false; - - #region Obsolete - - [Obsolete("farFogTint is deprecated, please use fogTint instead")] - public MColor farFogTint; - - #endregion Obsolete - } -} diff --git a/NewHorizons/External/Props/DetailInfo.cs b/NewHorizons/External/Props/DetailInfo.cs deleted file mode 100644 index f68977b9..00000000 --- a/NewHorizons/External/Props/DetailInfo.cs +++ /dev/null @@ -1,76 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class DetailInfo : GeneralPropInfo - { - - /// - /// Do we override rotation and try to automatically align this object to stand upright on the body's surface? - /// - public bool alignToNormal; - - /// - /// Relative filepath to an asset-bundle to load the prefab defined in `path` from - /// - public string assetBundle; - - /// - /// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle - /// - public string path; - - /// - /// A list of children to remove from this detail - /// - public string[] removeChildren; - - /// - /// Do we reset all the components on this object? Useful for certain props that have dialogue components attached to - /// them. - /// - public bool removeComponents; - - /// - /// Scale the prop - /// - [DefaultValue(1f)] public float scale = 1f; - - /// - /// Scale each axis of the prop. Overrides `scale`. - /// - public MVector3 stretch; - - /// - /// 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 - /// - public string quantumGroupID; - - /// - /// Should this detail stay loaded even if you're outside the sector (good for very large props) - /// - public bool keepLoaded; - - /// - /// 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. - /// - public bool hasPhysics; - - /// - /// The mass of the physics object. - /// Most pushable props use the default value, which matches the player mass. - /// - [DefaultValue(0.001f)] public float physicsMass = 0.001f; - - /// - /// 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. - /// - [DefaultValue(1f)] public float physicsRadius = 1f; - } -} diff --git a/NewHorizons/External/Props/DialogueInfo.cs b/NewHorizons/External/Props/DialogueInfo.cs deleted file mode 100644 index e3e7dc1f..00000000 --- a/NewHorizons/External/Props/DialogueInfo.cs +++ /dev/null @@ -1,85 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class DialogueInfo : GeneralPointPropInfo - { - /// - /// 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. - /// - public string blockAfterPersistentCondition; - - /// - /// 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. - /// - public float lookAtRadius; - - /// - /// 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. - /// - public string pathToAnimController; - - /// - /// 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. - /// - public float radius = 1f; - - /// - /// Distance from radius the prompt appears - /// - [DefaultValue(2f)] public float range = 2f; - - /// - /// Allows you to trigger dialogue from a distance when you walk into an area. - /// - 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; - - /// - /// Relative path to the xml file defining the dialogue. - /// - public string xmlFile; - - /// - /// What type of flashlight toggle to do when dialogue is interacted with - /// - [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 - { - /// - /// The radius of the remote trigger volume. - /// - public float radius; - /// - /// This condition must be met for the remote trigger volume to trigger. - /// - public string prereqCondition; - } - } -} diff --git a/NewHorizons/External/Props/EntryLocationInfo.cs b/NewHorizons/External/Props/EntryLocationInfo.cs deleted file mode 100644 index f0791b74..00000000 --- a/NewHorizons/External/Props/EntryLocationInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class EntryLocationInfo : GeneralPointPropInfo - { - /// - /// Whether this location is cloaked - /// - public bool cloaked; - - /// - /// ID of the entry this location relates to - /// - public string id; - } -} diff --git a/NewHorizons/External/Props/GeneralPointPropInfo.cs b/NewHorizons/External/Props/GeneralPointPropInfo.cs deleted file mode 100644 index ddb428e2..00000000 --- a/NewHorizons/External/Props/GeneralPointPropInfo.cs +++ /dev/null @@ -1,29 +0,0 @@ -using NewHorizons.Utility; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public abstract class GeneralPointPropInfo - { - /// - /// Position of the object - /// - public MVector3 position; - - /// - /// The relative path from the planet to the parent of this object. Optional (will default to the root sector). - /// - public string parentPath; - - /// - /// Whether the positional and rotational coordinates are relative to parent instead of the root planet object. - /// - public bool isRelativeToParent; - - /// - /// An optional rename of this object - /// - public string rename; - } -} diff --git a/NewHorizons/External/Props/GeneralPropInfo.cs b/NewHorizons/External/Props/GeneralPropInfo.cs deleted file mode 100644 index 7f339711..00000000 --- a/NewHorizons/External/Props/GeneralPropInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NewHorizons.Utility; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public abstract class GeneralPropInfo : GeneralPointPropInfo - { - /// - /// Rotation of the object - /// - public MVector3 rotation; - } -} diff --git a/NewHorizons/External/Props/GeneralSolarSystemPropInfo.cs b/NewHorizons/External/Props/GeneralSolarSystemPropInfo.cs deleted file mode 100644 index bd435611..00000000 --- a/NewHorizons/External/Props/GeneralSolarSystemPropInfo.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public abstract class GeneralSolarSystemPropInfo : GeneralPropInfo - { - /// - /// The name of the planet that will be used with `parentPath`. Must be set if `parentPath` is set. - /// - public string parentBody; - } -} diff --git a/NewHorizons/External/Props/GeyserInfo.cs b/NewHorizons/External/Props/GeyserInfo.cs deleted file mode 100644 index eb64d207..00000000 --- a/NewHorizons/External/Props/GeyserInfo.cs +++ /dev/null @@ -1,46 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class GeyserInfo : GeneralPointPropInfo - { - /// - /// 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. - /// - [DefaultValue(-97.5f)] public float offset = -97.5f; - - /// - /// Force of the geyser on objects - /// - [DefaultValue(55f)] public float force = 55f; - - /// - /// Time in seconds eruptions last for - /// - [DefaultValue(10f)] public float activeDuration = 10f; - - /// - /// Time in seconds between eruptions - /// - [DefaultValue(19f)] public float inactiveDuration = 19f; - - /// - /// Color of the geyser. Alpha sets the particle density. - /// - public MColor tint; - - /// - /// Disable the individual particle systems of the geyser - /// - public bool disableBubbles, disableShaft, disableSpout; - - /// - /// Loudness of the geyser - /// - [DefaultValue(0.7f)] public float volume = 0.7f; - } -} diff --git a/NewHorizons/External/Props/NomaiTextArcInfo.cs b/NewHorizons/External/Props/NomaiTextArcInfo.cs deleted file mode 100644 index b11a38df..00000000 --- a/NewHorizons/External/Props/NomaiTextArcInfo.cs +++ /dev/null @@ -1,54 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace NewHorizons.External.Props -{ - [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 - } - - /// - /// Whether to skip modifying this spiral's placement, and instead keep the automatically determined placement. - /// - public bool keepAutoPlacement; - - /// - /// Whether to flip the spiral from left-curling to right-curling or vice versa. - /// - public bool mirror; - - /// - /// The local position of this object on the wall. - /// - public MVector2 position; - - /// - /// The type of text to display. - /// - [DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult; - - /// - /// 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. - /// - [DefaultValue(-1)] public int variation = -1; - - /// - /// The z euler angle for this arc. - /// - [Range(0f, 360f)] public float zRotation; - } -} diff --git a/NewHorizons/External/Props/NomaiTextInfo.cs b/NewHorizons/External/Props/NomaiTextInfo.cs deleted file mode 100644 index 9819edb3..00000000 --- a/NewHorizons/External/Props/NomaiTextInfo.cs +++ /dev/null @@ -1,81 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class NomaiTextInfo : GeneralPointPropInfo - { - [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, - } - - [JsonConverter(typeof(StringEnumConverter))] - public enum NomaiTextLocation - { - [EnumMember(Value = @"unspecified")] UNSPECIFIED = 0, - - [EnumMember(Value = @"a")] A = 1, - - [EnumMember(Value = @"b")] B = 2 - } - - /// - /// Additional information about each arc in the text - /// - public NomaiTextArcInfo[] arcInfo; - - /// - /// The normal vector for this object. Used for writing on walls and positioning computers. - /// - public MVector3 normal; - - /// - /// 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. - /// - public MVector3 rotation; - - /// - /// The random seed used to pick what the text arcs will look like. - /// - public int seed; // For randomizing arcs - - /// - /// The type of object this is. - /// - [DefaultValue("wall")] public NomaiTextType type = NomaiTextType.Wall; - - /// - /// The location of this object. - /// - [DefaultValue("unspecified")] public NomaiTextLocation location = NomaiTextLocation.UNSPECIFIED; - - /// - /// The relative path to the xml file for this object. - /// - public string xmlFile; - } -} diff --git a/NewHorizons/External/Props/ProjectionInfo.cs b/NewHorizons/External/Props/ProjectionInfo.cs deleted file mode 100644 index c05950eb..00000000 --- a/NewHorizons/External/Props/ProjectionInfo.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace NewHorizons.External.Props -{ - [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, - - } - - /// - /// The ship log facts revealed after finishing this slide reel. - /// - public string[] reveals; - - /// - /// 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. - /// - public string[] playWithShipLogFacts; - - /// - /// The list of slides for this object. - /// - public SlideInfo[] slides; - - /// - /// The type of object this is. - /// - [DefaultValue("slideReel")] public SlideShowType type = SlideShowType.SlideReel; - } -} diff --git a/NewHorizons/External/Props/QuantumGroupInfo.cs b/NewHorizons/External/Props/QuantumGroupInfo.cs deleted file mode 100644 index 21e40449..00000000 --- a/NewHorizons/External/Props/QuantumGroupInfo.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class QuantumGroupInfo - { - /// - /// 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? - /// - public QuantumGroupType type; - - /// - /// A unique string used by props (that are marked as quantum) use to refer back to this group - /// - public string id; - - /// - /// Only required if type is `sockets`. This lists all the possible locations for any props assigned to this group. - /// - public QuantumSocketInfo[] sockets; - - /// - /// 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. - /// - public bool hasEmptyState; - - /// - /// 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 - /// - public bool sequential; - - /// - /// 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 - /// - [DefaultValue(true)] public bool loop = true; - } - - [JsonConverter(typeof(StringEnumConverter))] - public enum QuantumGroupType - { - [EnumMember(Value = @"sockets")] Sockets = 0, - - [EnumMember(Value = @"states")] States = 1, - - FailedValidation = 10 - } -} diff --git a/NewHorizons/External/Props/QuantumSocketInfo.cs b/NewHorizons/External/Props/QuantumSocketInfo.cs deleted file mode 100644 index 39e2431a..00000000 --- a/NewHorizons/External/Props/QuantumSocketInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class QuantumSocketInfo : GeneralPropInfo - { - /// - /// The probability any props that are part of this group will occupy this socket - /// - [DefaultValue(1f)] public float probability = 1f; - } -} diff --git a/NewHorizons/External/Props/RaftInfo.cs b/NewHorizons/External/Props/RaftInfo.cs deleted file mode 100644 index 811de16f..00000000 --- a/NewHorizons/External/Props/RaftInfo.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class RaftInfo : GeneralPointPropInfo - { - /// - /// Acceleration of the raft. Default acceleration is 5. - /// - [DefaultValue(5f)] public float acceleration = 5f; - } -} diff --git a/NewHorizons/External/Props/RemoteInfo.cs b/NewHorizons/External/Props/RemoteInfo.cs deleted file mode 100644 index 941087b4..00000000 --- a/NewHorizons/External/Props/RemoteInfo.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class RemoteInfo - { - /// - /// The unique remote id - /// - public string id; - - /// - /// Icon that the will show on the stone, pedastal of the whiteboard, and pedastal of the platform. - /// - public string decalPath; - - /// - /// Whiteboard that the stones can put text onto - /// - public WhiteboardInfo whiteboard; - - /// - /// Camera platform that the stones can project to and from - /// - public PlatformInfo platform; - - /// - /// Projection stones - /// - public StoneInfo[] stones; - - [JsonObject] - public class WhiteboardInfo : GeneralPropInfo - { - /// - /// The text for each stone - /// - public SharedNomaiTextInfo[] nomaiText; - - /// - /// Disable the wall, leaving only the pedestal and text. - /// - public bool disableWall; - - [JsonObject] - public class SharedNomaiTextInfo - { - /// - /// The id of the stone this text will appear for - /// - public string id; - - /// - /// Additional information about each arc in the text - /// - public NomaiTextArcInfo[] arcInfo; - - /// - /// The random seed used to pick what the text arcs will look like. - /// - public int seed; // For randomizing arcs - - /// - /// The location of this object. - /// - [DefaultValue("unspecified")] public NomaiTextInfo.NomaiTextLocation location = NomaiTextInfo.NomaiTextLocation.UNSPECIFIED; - - /// - /// The relative path to the xml file for this object. - /// - public string xmlFile; - - /// - /// An optional rename of this object - /// - public string rename; - } - } - - [JsonObject] - public class PlatformInfo : GeneralPropInfo - { - /// - /// A ship log fact to reveal when the platform is connected to. - /// - [DefaultValue("")] public string reveals = ""; - - /// - /// Disable the structure, leaving only the pedestal. - /// - public bool disableStructure; - - /// - /// Disable the pool that rises when you place a stone. - /// - public bool disablePool; - } - - [JsonObject] - public class StoneInfo : GeneralPropInfo - { - - } - } -} diff --git a/NewHorizons/External/Props/ScatterInfo.cs b/NewHorizons/External/Props/ScatterInfo.cs deleted file mode 100644 index 5e48db01..00000000 --- a/NewHorizons/External/Props/ScatterInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class ScatterInfo - { - /// - /// Relative filepath to an asset-bundle - /// - public string assetBundle; - - /// - /// Number of props to scatter - /// - public int count; - - /// - /// Offset this prop once it is placed - /// - public MVector3 offset; - - /// - /// Either the path in the scene hierarchy of the item to copy or the path to the object in the supplied asset bundle - /// - public string path; - - /// - /// Rotate this prop once it is placed - /// - public MVector3 rotation; - - /// - /// Scale this prop once it is placed - /// - [DefaultValue(1f)] public float scale = 1f; - - /// - /// Scale each axis of the prop. Overrides `scale`. - /// - public MVector3 stretch; - - /// - /// The number used as entropy for scattering the props - /// - public int seed; - - /// - /// The lowest height that these object will be placed at (only relevant if there's a heightmap) - /// - public float? minHeight; - - /// - /// The highest height that these objects will be placed at (only relevant if there's a heightmap) - /// - public float? maxHeight; - - /// - /// Should we try to prevent overlap between the scattered details? True by default. If it's affecting load times turn it off. - /// - [DefaultValue(true)] public bool preventOverlap = true; - - /// - /// Should this detail stay loaded even if you're outside the sector (good for very large props) - /// - public bool keepLoaded; - } -} diff --git a/NewHorizons/External/Props/SignalInfo.cs b/NewHorizons/External/Props/SignalInfo.cs deleted file mode 100644 index a9803029..00000000 --- a/NewHorizons/External/Props/SignalInfo.cs +++ /dev/null @@ -1,71 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace NewHorizons.External.Props -{ - - [JsonObject] - public class SignalInfo : GeneralPointPropInfo - { - [Obsolete("audioClip is deprecated, please use audio instead")] - public string audioClip; - - [Obsolete("audioFilePath is deprecated, please use audio instead")] - public string audioFilePath; - - /// - /// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. - /// - public string audio; - - /// - /// How close the player must get to the signal to detect it. This is when you get the "Unknown Signal Detected" - /// notification. - /// - [Range(0f, double.MaxValue)] public float detectionRadius; - - /// - /// The frequency ID of the signal. The built-in game values are `Default`, `Traveler`, `Quantum`, `EscapePod`, - /// `Statue`, `WarpCore`, `HideAndSeek`, and `Radio`. You can also put a custom value. - /// - public string frequency; - - /// - /// How close the player must get to the signal to identify it. This is when you learn its name. - /// - [DefaultValue(10f)] - [Range(0f, double.MaxValue)] - public float identificationRadius = 10f; - - /// - /// Only set to `true` if you are putting this signal inside a cloaking field. - /// - public bool insideCloak; - - /// - /// The unique ID of the signal. - /// - public string name; - - /// - /// `false` if the player can hear the signal without equipping the signal-scope. - /// - [DefaultValue(true)] public bool onlyAudibleToScope = true; - - /// - /// A ship log fact to reveal when the signal is identified. - /// - [DefaultValue("")] public string reveals = ""; - - /// - /// Radius of the sphere giving off the signal. - /// - [DefaultValue(1f)] public float sourceRadius = 1f; - } -} diff --git a/NewHorizons/External/Props/SlideInfo.cs b/NewHorizons/External/Props/SlideInfo.cs deleted file mode 100644 index 10c6fceb..00000000 --- a/NewHorizons/External/Props/SlideInfo.cs +++ /dev/null @@ -1,85 +0,0 @@ -using NewHorizons.Utility; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class SlideInfo - { - /// - /// Ambient light colour when viewing this slide. - /// - public MColor ambientLightColor; - - - // SlideAmbientLightModule - - /// - /// Ambient light intensity when viewing this slide. - /// - public float ambientLightIntensity; - - /// - /// Ambient light range when viewing this slide. - /// - public float ambientLightRange; - - // SlideBackdropAudioModule - - /// - /// The name of the AudioClip that will continuously play while watching these slides - /// - public string backdropAudio; - - /// - /// The time to fade into the backdrop audio - /// - public float backdropFadeTime; - - // SlideBeatAudioModule - - /// - /// The name of the AudioClip for a one-shot sound when opening the slide. - /// - public string beatAudio; - - /// - /// The time delay until the one-shot audio - /// - public float beatDelay; - - - // SlideBlackFrameModule - - /// - /// Before viewing this slide, there will be a black frame for this many seconds. - /// - public float blackFrameDuration; - - /// - /// The path to the image file for this slide. - /// - public string imagePath; - - - // SlidePlayTimeModule - - /// - /// Play-time duration for auto-projector slides. - /// - public float playTimeDuration; - - - // SlideShipLogEntryModule - - /// - /// Ship log fact revealed when viewing this slide - /// - public string reveal; - - /// - /// Spotlight intensity modifier when viewing this slide. - /// - public float spotIntensityMod; - } -} diff --git a/NewHorizons/External/Props/TornadoInfo.cs b/NewHorizons/External/Props/TornadoInfo.cs deleted file mode 100644 index dbf8affa..00000000 --- a/NewHorizons/External/Props/TornadoInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System; -using NewHorizons.External.Modules; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class TornadoInfo : GeneralPointPropInfo - { - [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; - - /// - /// Alternative to setting the position. Will choose a random place at this elevation. - /// - public float elevation; - - /// - /// The height of this tornado. - /// - [DefaultValue(30f)] public float height = 30f; - - /// - /// The colour of the tornado. - /// - public MColor tint; - - /// - /// What type of cyclone should this be? Upwards and downwards are both tornados and will push in that direction. - /// - [DefaultValue("upwards")] public TornadoType type = TornadoType.Upwards; - - /// - /// Angular distance from the starting position that it will wander, in terms of the angle around the x-axis. - /// - [DefaultValue(45f)] public float wanderDegreesX = 45f; - - /// - /// Angular distance from the starting position that it will wander, in terms of the angle around the z-axis. - /// - [DefaultValue(45f)] public float wanderDegreesZ = 45f; - - /// - /// The rate at which the tornado will wander around the planet. Set to 0 for it to be stationary. Should be around - /// 0.1. - /// - public float wanderRate; - - /// - /// 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. - /// - public float audioDistance; - - /// - /// Fluid type for sounds/effects when colliding with this tornado. - /// - [DefaultValue("cloud")] public FluidType fluidType = FluidType.Cloud; - } -} diff --git a/NewHorizons/External/Props/VolcanoInfo.cs b/NewHorizons/External/Props/VolcanoInfo.cs deleted file mode 100644 index 9c891aa6..00000000 --- a/NewHorizons/External/Props/VolcanoInfo.cs +++ /dev/null @@ -1,50 +0,0 @@ - -using NewHorizons.Utility; -using System.ComponentModel; -using Newtonsoft.Json; - -namespace NewHorizons.External.Props -{ - [JsonObject] - public class VolcanoInfo : GeneralPointPropInfo - { - /// - /// The colour of the meteor's lava. - /// - public MColor lavaTint; - - /// - /// Maximum time between meteor launches. - /// - [DefaultValue(20f)] - public float maxInterval = 20f; - - /// - /// Maximum random speed at which meteors are launched. - /// - [DefaultValue(150f)] - public float maxLaunchSpeed = 150f; - - /// - /// Minimum time between meteor launches. - /// - [DefaultValue(5f)] - public float minInterval = 5f; - - /// - /// Minimum random speed at which meteors are launched. - /// - [DefaultValue(50f)] - public float minLaunchSpeed = 50f; - - /// - /// Scale of the meteors. - /// - public float scale = 1; - - /// - /// The colour of the meteor's stone. - /// - public MColor stoneTint; - } -} diff --git a/NewHorizons/External/Volumes/AudioVolumeInfo.cs b/NewHorizons/External/Volumes/AudioVolumeInfo.cs deleted file mode 100644 index e5a90b88..00000000 --- a/NewHorizons/External/Volumes/AudioVolumeInfo.cs +++ /dev/null @@ -1,88 +0,0 @@ -using NewHorizons.External.Modules; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class AudioVolumeInfo : PriorityVolumeInfo - { - /// - /// The audio to use. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list. - /// - public string audio; - - [DefaultValue("random")] public ClipSelectionType clipSelection = ClipSelectionType.RANDOM; - - /// - /// The audio track of this audio volume - /// - [DefaultValue("environment")] public AudioMixerTrackName track = AudioMixerTrackName.Environment; - - /// - /// Whether to loop this audio while in this audio volume or just play it once - /// - [DefaultValue(true)] public bool loop = true; - - /// - /// The loudness of the audio - /// - [Range(0f, 1f)] - [DefaultValue(1f)] - public float volume = 1f; - - /// - /// How long it will take to fade this sound in and out when entering/exiting this volume. - /// - [DefaultValue(2f)] - public float fadeSeconds = 2f; - - /// - /// Play the sound instantly without any fading. - /// - public bool noFadeFromBeginning; - - /// - /// Randomize what time the audio starts at. - /// - public bool randomizePlayhead; - - /// - /// Pause the music when exiting the volume. - /// - public bool pauseOnFadeOut; - - - [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, - } - } -} diff --git a/NewHorizons/External/Volumes/ChangeStarSystemVolumeInfo.cs b/NewHorizons/External/Volumes/ChangeStarSystemVolumeInfo.cs deleted file mode 100644 index a6840540..00000000 --- a/NewHorizons/External/Volumes/ChangeStarSystemVolumeInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class ChangeStarSystemVolumeInfo : VolumeInfo - { - /// - /// The star system that entering this volume will send you to. - /// - [DefaultValue("SolarSystem")] - public string targetStarSystem; - } -} - diff --git a/NewHorizons/External/Volumes/DestructionVolumeInfo.cs b/NewHorizons/External/Volumes/DestructionVolumeInfo.cs deleted file mode 100644 index 27359f0f..00000000 --- a/NewHorizons/External/Volumes/DestructionVolumeInfo.cs +++ /dev/null @@ -1,37 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class DestructionVolumeInfo : VanishVolumeInfo - { - /// - /// The type of death the player will have if they enter this volume. - /// - [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 - } - } -} - diff --git a/NewHorizons/External/Volumes/FluidVolumeInfo.cs b/NewHorizons/External/Volumes/FluidVolumeInfo.cs deleted file mode 100644 index fe931541..00000000 --- a/NewHorizons/External/Volumes/FluidVolumeInfo.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class FluidVolumeInfo : PriorityVolumeInfo - { - /// - /// Density of the fluid. The higher the density, the harder it is to go through this fluid. - /// - [DefaultValue(1.2f)] public float density = 1.2f; - - /// - /// The type of fluid for this volume. - /// - public FluidType type; - - /// - /// Should the player and rafts align to this fluid. - /// - [DefaultValue(true)] public bool alignmentFluid = true; - - /// - /// Should the ship align to the fluid by rolling. - /// - public bool allowShipAutoroll; - - /// - /// Disable this fluid volume immediately? - /// - 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 - } - } -} - diff --git a/NewHorizons/External/Volumes/HazardVolumeInfo.cs b/NewHorizons/External/Volumes/HazardVolumeInfo.cs deleted file mode 100644 index 8d81a50a..00000000 --- a/NewHorizons/External/Volumes/HazardVolumeInfo.cs +++ /dev/null @@ -1,54 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class HazardVolumeInfo : VolumeInfo - { - /// - /// The type of hazard for this volume. - /// - [DefaultValue("general")] public HazardType type = HazardType.GENERAL; - - /// - /// The amount of damage you will take per second while inside this volume. - /// - [DefaultValue(10f)] public float damagePerSecond = 10f; - - /// - /// The type of damage you will take when you first touch this volume. - /// - [DefaultValue("impact")] public InstantDamageType firstContactDamageType = InstantDamageType.Impact; - - /// - /// The amount of damage you will take when you first touch this volume. - /// - 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 - } - } -} - diff --git a/NewHorizons/External/Volumes/LoadCreditsVolumeInfo.cs b/NewHorizons/External/Volumes/LoadCreditsVolumeInfo.cs deleted file mode 100644 index b69c9f2d..00000000 --- a/NewHorizons/External/Volumes/LoadCreditsVolumeInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [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; - } -} - diff --git a/NewHorizons/External/Volumes/NotificationVolumeInfo.cs b/NewHorizons/External/Volumes/NotificationVolumeInfo.cs deleted file mode 100644 index ac6439b7..00000000 --- a/NewHorizons/External/Volumes/NotificationVolumeInfo.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class NotificationVolumeInfo : VolumeInfo - { - /// - /// What the notification will show for. - /// - [DefaultValue("all")] public NotificationTarget target = NotificationTarget.All; - - /// - /// The notification that will play when you enter this volume. - /// - public NotificationInfo entryNotification; - - /// - /// The notification that will play when you exit this volume. - /// - public NotificationInfo exitNotification; - - - [JsonObject] - public class NotificationInfo - { - /// - /// The message that will be displayed. - /// - public string displayMessage; - - /// - /// The duration this notification will be displayed. - /// - [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, - } - } -} - diff --git a/NewHorizons/External/Volumes/OxygenVolumeInfo.cs b/NewHorizons/External/Volumes/OxygenVolumeInfo.cs deleted file mode 100644 index abb08782..00000000 --- a/NewHorizons/External/Volumes/OxygenVolumeInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class OxygenVolumeInfo : VolumeInfo - { - /// - /// Does this volume contain trees? This will change the notification from "Oxygen tank refilled" to "Trees detected, oxygen tank refilled". - /// - public bool treeVolume; - - /// - /// Whether to play the oxygen tank refill sound or just fill quietly. - /// - [DefaultValue(true)] public bool playRefillAudio = true; - } -} - diff --git a/NewHorizons/External/Volumes/PriorityVolumeInfo.cs b/NewHorizons/External/Volumes/PriorityVolumeInfo.cs deleted file mode 100644 index b514e817..00000000 --- a/NewHorizons/External/Volumes/PriorityVolumeInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class PriorityVolumeInfo : VolumeInfo - { - /// - /// The layer of this volume. - /// - [DefaultValue(0)] - public int layer = 0; - - /// - /// 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. - /// - [DefaultValue(1)] - public int priority = 1; - } -} - diff --git a/NewHorizons/External/Volumes/RevealVolumeInfo.cs b/NewHorizons/External/Volumes/RevealVolumeInfo.cs deleted file mode 100644 index f74be55f..00000000 --- a/NewHorizons/External/Volumes/RevealVolumeInfo.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel; -using System.Runtime.Serialization; - -namespace NewHorizons.External.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 - } - - /// - /// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only) - /// - [DefaultValue(180f)] - public float maxAngle = 180f; // Observe Only - - /// - /// The max distance the user can be away from the volume to reveal the fact (`snapshot` and `observe` only) - /// - [DefaultValue(-1f)] - public float maxDistance = -1f; // Snapshot & Observe Only - - /// - /// What needs to be done to the volume to unlock the facts - /// - [DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter; - - /// - /// What can enter the volume to unlock the facts (`enter` only) - /// - [DefaultValue("both")] public EnterType revealFor = EnterType.Both; - - /// - /// A list of facts to reveal - /// - public string[] reveals; - - /// - /// An achievement to unlock. Optional. - /// - public string achievementID; - } -} - diff --git a/NewHorizons/External/Volumes/SpeedTrapVolumeInfo.cs b/NewHorizons/External/Volumes/SpeedTrapVolumeInfo.cs deleted file mode 100644 index 3e641637..00000000 --- a/NewHorizons/External/Volumes/SpeedTrapVolumeInfo.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class SpeedTrapVolumeInfo : VolumeInfo - { - /// - /// The speed the volume will slow you down to when you enter it. - /// - [DefaultValue(10f)] - public float speedLimit = 10f; - - /// - /// How fast it will slow down the player to the speed limit. - /// - [DefaultValue(3f)] - public float acceleration = 3f; - } -} - diff --git a/NewHorizons/External/Volumes/VanishVolumeInfo.cs b/NewHorizons/External/Volumes/VanishVolumeInfo.cs deleted file mode 100644 index 6b592ce8..00000000 --- a/NewHorizons/External/Volumes/VanishVolumeInfo.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - [JsonObject] - public class VanishVolumeInfo : VolumeInfo - { - /// - /// Whether the bodies will shrink when they enter this volume or just disappear instantly. - /// - [DefaultValue(true)] public bool shrinkBodies = true; - - /// - /// Whether this volume only affects the player and ship. - /// - public bool onlyAffectsPlayerAndShip; - } -} - diff --git a/NewHorizons/External/Volumes/VolumeInfo.cs b/NewHorizons/External/Volumes/VolumeInfo.cs deleted file mode 100644 index 645bf267..00000000 --- a/NewHorizons/External/Volumes/VolumeInfo.cs +++ /dev/null @@ -1,121 +0,0 @@ -using NewHorizons.External.Props; -using Newtonsoft.Json; -using System.ComponentModel; - -namespace NewHorizons.External.Volumes -{ - /*[JsonObject] - public class VolumesModule - { - /// - /// Add audio volumes to this planet. - /// - public AudioVolumeInfo[] audioVolumes; - - /// - /// Add destruction volumes to this planet. - /// - public DestructionVolumeInfo[] destructionVolumes; - - /// - /// Add fluid volumes to this planet. - /// - public FluidVolumeInfo[] fluidVolumes; - - /// - /// Add hazard volumes to this planet. - /// - public HazardVolumeInfo[] hazardVolumes; - - /// - /// Add interference volumes to this planet. - /// - public VolumeInfo[] interferenceVolumes; - - /// - /// Add insulating volumes to this planet. These will stop electricty hazard volumes from affecting you (just like the jellyfish). - /// - public VolumeInfo[] insulatingVolumes; - - /// - /// Add light source volumes to this planet. These will activate rafts and other light detectors. - /// - public VolumeInfo[] lightSourceVolumes; - - /// - /// Add map restriction volumes to this planet. - /// - public VolumeInfo[] mapRestrictionVolumes; - - /// - /// Add notification volumes to this planet. - /// - public NotificationVolumeInfo[] notificationVolumes; - - /// - /// Add oxygen volumes to this planet. - /// - public OxygenVolumeInfo[] oxygenVolumes; - - /// - /// Add probe-specific volumes to this planet. - /// - public ProbeModule probe; - - /// - /// Add reference frame blocker volumes to this planet. These will stop the player from seeing/targeting any reference frames. - /// - public VolumeInfo[] referenceFrameBlockerVolumes; - - /// - /// Add triggers that reveal parts of the ship log on this planet. - /// - public RevealVolumeInfo[] revealVolumes; - - /// - /// Add reverb volumes to this planet. Great for echoes in caves. - /// - public VolumeInfo[] reverbVolumes; - - /// - /// Add ruleset volumes to this planet. - /// - public RulesetModule rulesets; - - /// - /// Add speed trap volumes to this planet. Slows down the player when they enter this volume. - /// - public SpeedTrapVolumeInfo[] speedTrapVolumes; - - /// - /// Add visor effect volumes to this planet. - /// - public VisorEffectModule visorEffects; - - /// - /// Add zero-gravity volumes to this planet. - /// Good for surrounding planets which are using a static position to stop the player being pulled away. - /// - public PriorityVolumeInfo[] zeroGravityVolumes; - - /// - /// Entering this volume will load a new solar system. - /// - public ChangeStarSystemVolumeInfo[] solarSystemVolume; - - /// - /// Enter this volume to be sent to the end credits scene - /// - public LoadCreditsVolumeInfo[] creditsVolume;*/ - - [JsonObject] - public class VolumeInfo : GeneralPointPropInfo - { - /// - /// The radius of this volume. - /// - [DefaultValue(1f)] - public float radius = 1f; - } -} - diff --git a/NewHorizons/NewHorizonsApi.cs b/NewHorizons/NewHorizonsApi.cs index b276bf68..ce358343 100644 --- a/NewHorizons/NewHorizonsApi.cs +++ b/NewHorizons/NewHorizonsApi.cs @@ -12,7 +12,6 @@ using Newtonsoft.Json.Linq; using UnityEngine; using UnityEngine.Events; using Logger = NewHorizons.Utility.Logger; -using NewHorizons.External.Props; namespace NewHorizons { @@ -159,7 +158,7 @@ namespace NewHorizons float scale, bool alignWithNormal) { var prefab = SearchUtilities.Find(propToCopyPath); - var detailInfo = new DetailInfo() { + var detailInfo = new PropModule.DetailInfo() { position = position, rotation = eulerAngles, scale = scale, @@ -172,7 +171,7 @@ namespace NewHorizons float sourceRadius = 1f, float detectionRadius = 20f, float identificationRadius = 10f, bool insideCloak = false, bool onlyAudibleToScope = true, string reveals = "") { - var info = new SignalInfo() + var info = new SignalModule.SignalInfo() { audio = audio, detectionRadius = detectionRadius, @@ -193,7 +192,7 @@ namespace NewHorizons float range = 1f, string blockAfterPersistentCondition = null, float lookAtRadius = 1f, string pathToAnimController = null, float remoteTriggerRadius = 0f) { - var info = new DialogueInfo() + var info = new PropModule.DialogueInfo() { blockAfterPersistentCondition = blockAfterPersistentCondition, lookAtRadius = lookAtRadius, @@ -202,7 +201,7 @@ namespace NewHorizons radius = radius, range = range, xmlFile = xmlFile, - remoteTrigger = new DialogueInfo.RemoteTriggerInfo() + remoteTrigger = new PropModule.DialogueInfo.RemoteTriggerInfo() { position = null, radius = remoteTriggerRadius, diff --git a/NewHorizons/Utility/DebugUtilities/DebugPropPlacer.cs b/NewHorizons/Utility/DebugUtilities/DebugPropPlacer.cs index affb71d7..04554fd1 100644 --- a/NewHorizons/Utility/DebugUtilities/DebugPropPlacer.cs +++ b/NewHorizons/Utility/DebugUtilities/DebugPropPlacer.cs @@ -1,7 +1,6 @@ using NewHorizons.Builder.Props; using NewHorizons.External.Configs; using NewHorizons.External.Modules; -using NewHorizons.External.Props; using NewHorizons.Handlers; using System.Collections.Generic; using System.Linq; @@ -23,7 +22,7 @@ namespace NewHorizons.Utility.DebugUtilities public AstroObject body; public string system; public GameObject gameObject; - public DetailInfo detailInfo; + public PropModule.DetailInfo detailInfo; } // VASE @@ -150,7 +149,7 @@ namespace NewHorizons.Utility.DebugUtilities var sector = planetGO.GetComponentInChildren(); var prefab = SearchUtilities.Find(currentObject); - var detailInfo = new DetailInfo() + var detailInfo = new PropModule.DetailInfo() { position = data.pos, rotation = data.rot.eulerAngles, @@ -215,7 +214,7 @@ namespace NewHorizons.Utility.DebugUtilities RegisterProp_WithReturn(body, prop); } - private PropPlacementData RegisterProp_WithReturn(AstroObject body, GameObject prop, string propPath = null, DetailInfo detailInfo = null) + private PropPlacementData RegisterProp_WithReturn(AstroObject body, GameObject prop, string propPath = null, PropModule.DetailInfo detailInfo = null) { if (Main.Debug) { @@ -227,7 +226,7 @@ namespace NewHorizons.Utility.DebugUtilities Logger.LogVerbose($"Adding prop to {Main.Instance.CurrentStarSystem}::{body.name}"); - detailInfo = detailInfo == null ? new DetailInfo() : detailInfo; + detailInfo = detailInfo == null ? new PropModule.DetailInfo() : detailInfo; detailInfo.path = propPath == null ? currentObject : propPath; PropPlacementData data = new PropPlacementData @@ -242,14 +241,14 @@ namespace NewHorizons.Utility.DebugUtilities return data; } - public Dictionary GetPropsConfigByBody() + public Dictionary GetPropsConfigByBody() { var groupedProps = props .GroupBy(p => p.system + "." + p.body) .Select(grp => grp.ToList()) .ToList(); - Dictionary propConfigs = new Dictionary(); + Dictionary propConfigs = new Dictionary(); foreach (List bodyProps in groupedProps) { @@ -259,7 +258,7 @@ namespace NewHorizons.Utility.DebugUtilities Logger.LogVerbose("getting prop group for body " + body.name); //string bodyName = GetAstroObjectName(bodyProps[0].body); - DetailInfo[] infoArray = new DetailInfo[bodyProps.Count]; + PropModule.DetailInfo[] infoArray = new PropModule.DetailInfo[bodyProps.Count]; propConfigs[body] = infoArray; for (int i = 0; i < bodyProps.Count; i++)