mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Merge branch 'dev' into customcredits-fix
This commit is contained in:
commit
19172539dc
@ -473,10 +473,14 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
// These flood toggles are to disable flooded docks on the Stranger
|
||||
// Presumably the user isn't making one of those
|
||||
foreach (var toggle in dock.GetComponents<FloodToggle>())
|
||||
foreach (var toggle in dock.GetComponents<FloodToggle>().Concat(dock.GetComponentsInChildren<FloodToggle>()))
|
||||
{
|
||||
Component.DestroyImmediate(toggle);
|
||||
}
|
||||
foreach (var floodSensor in dock.GetComponents<RingRiverFloodSensor>().Concat(dock.GetComponentsInChildren<RingRiverFloodSensor>()))
|
||||
{
|
||||
Component.DestroyImmediate(floodSensor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -43,6 +43,7 @@ namespace NewHorizons.Builder.Props
|
||||
private static GameObject _autoPrefab;
|
||||
private static GameObject _visionTorchDetectorPrefab;
|
||||
private static GameObject _standingVisionTorchPrefab;
|
||||
private static GameObject _standingVisionTorchCleanPrefab;
|
||||
private static readonly int EmissionMap = Shader.PropertyToID("_EmissionMap");
|
||||
|
||||
private static bool _isInit;
|
||||
@ -90,13 +91,28 @@ namespace NewHorizons.Builder.Props
|
||||
_visionTorchDetectorPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
|
||||
}
|
||||
|
||||
if (_standingVisionTorchCleanPrefab == null)
|
||||
{
|
||||
_standingVisionTorchCleanPrefab = SearchUtilities.Find("DreamWorld_Body/Sector_DreamWorld/Sector_DreamZone_4/Interactibles_DreamZone_4_Upper/Prefab_IP_VisionTorchProjector")?.gameObject?.InstantiateInactive()?.Rename("Prefab_DW_VisionTorchProjector")?.DontDestroyOnLoad();
|
||||
if (_standingVisionTorchCleanPrefab == null)
|
||||
NHLogger.LogWarning($"Tried to make standing vision torch prefab but couldn't. Do you have the DLC installed?");
|
||||
else
|
||||
{
|
||||
_standingVisionTorchCleanPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
|
||||
GameObject.DestroyImmediate(_standingVisionTorchCleanPrefab.FindChild("Prefab_IP_Reel_PrisonPeephole_Vision"));
|
||||
}
|
||||
}
|
||||
|
||||
if (_standingVisionTorchPrefab == null)
|
||||
{
|
||||
_standingVisionTorchPrefab = SearchUtilities.Find("RingWorld_Body/Sector_RingWorld/Sector_SecretEntrance/Interactibles_SecretEntrance/Experiment_1/VisionTorchApparatus/VisionTorchRoot/Prefab_IP_VisionTorchProjector")?.gameObject?.InstantiateInactive()?.Rename("Prefab_IP_VisionTorchProjector")?.DontDestroyOnLoad();
|
||||
if (_standingVisionTorchPrefab == null)
|
||||
NHLogger.LogWarning($"Tried to make standing vision torch prefab but couldn't. Do you have the DLC installed?");
|
||||
else
|
||||
{
|
||||
_standingVisionTorchPrefab.AddComponent<DestroyOnDLC>()._destroyOnDLCNotOwned = true;
|
||||
GameObject.Instantiate(_standingVisionTorchCleanPrefab.FindChild("Effects_IP_SIM_VisionTorch"), _standingVisionTorchPrefab.transform, false).Rename("Effects_IP_SIM_VisionTorch");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -446,10 +462,11 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
if (_standingVisionTorchPrefab == null) return null;
|
||||
if (_standingVisionTorchPrefab == null || _standingVisionTorchCleanPrefab == null) return null;
|
||||
|
||||
// Spawn the torch itself
|
||||
var standingTorch = DetailBuilder.Make(planetGO, sector, mod, _standingVisionTorchPrefab, new DetailInfo(info));
|
||||
var prefab = info.reelCondition == ProjectionInfo.SlideReelCondition.Pristine ? _standingVisionTorchCleanPrefab : _standingVisionTorchPrefab;
|
||||
var standingTorch = DetailBuilder.Make(planetGO, sector, mod, prefab, new DetailInfo(info));
|
||||
|
||||
if (standingTorch == null)
|
||||
{
|
||||
|
||||
@ -25,10 +25,11 @@ namespace NewHorizons.External.Modules
|
||||
public string condition;
|
||||
|
||||
/// <summary>
|
||||
/// Path to the audio file to use as custom music for the credits. When creditsType is set to "custom", credits will be silent unless this attribute is specified.
|
||||
/// The audio to use for the credits music. Can be a path to a .wav/.ogg/.mp3 file, or taken from the AudioClip list.
|
||||
/// Credits will be silent unless this attribute is specified.
|
||||
/// Note: only applies when creditsType is set to "custom".
|
||||
/// </summary>
|
||||
public string audio = string.Empty; // Explicitly declaring this for condition in NHGameOverManager
|
||||
public string audio;
|
||||
|
||||
/// <summary>
|
||||
/// The length of the fade in and out for the credits music.
|
||||
|
||||
@ -82,7 +82,7 @@ namespace NewHorizons.External.Modules.Props.EchoesOfTheEye
|
||||
[DefaultValue("sevenSlides")] public SlideReelType reelModel = SlideReelType.SevenSlides;
|
||||
|
||||
/// <summary>
|
||||
/// Exclusive to the slide reel type. Condition/material of the reel. Antique is the Stranger, Pristine is the Dreamworld, Rusted is a burned reel.
|
||||
/// Exclusive to the slide reel and standing vision torch type. Condition/material of the reel. Antique is the Stranger, Pristine is the Dreamworld, Rusted (exclusive to slide reels) is a burned reel.
|
||||
/// </summary>
|
||||
[DefaultValue("antique")] public SlideReelCondition reelCondition = SlideReelCondition.Antique;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"author": "xen, Bwc9876, JohnCorby, MegaPiggy, and friends",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.27.3",
|
||||
"version": "1.27.4",
|
||||
"owmlVersion": "2.12.1",
|
||||
"dependencies": [ "JohnCorby.VanillaFix", "xen.CommonCameraUtility", "dgarro.CustomShipLogModes" ],
|
||||
"conflicts": [ "PacificEngine.OW_CommonResources" ],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user