mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Hotfixes (#297)
Fixed some bugs, was gonna merge this into main but with 1.5.0 happening now I guess we don't have to
This commit is contained in:
commit
7545b39a37
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Ricardo Lopes
|
||||
Copyright (c) 2022 New Horizons Team
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@ -7,16 +7,16 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
{
|
||||
public static void Make(GameObject planetGO, Sector sector, PlanetConfig config)
|
||||
{
|
||||
GameObject airGO = new GameObject("Air");
|
||||
var airGO = new GameObject("Air");
|
||||
airGO.SetActive(false);
|
||||
airGO.layer = 17;
|
||||
airGO.transform.parent = sector?.transform ? sector.transform : planetGO.transform;
|
||||
|
||||
SphereCollider sc = airGO.AddComponent<SphereCollider>();
|
||||
var sc = airGO.AddComponent<SphereCollider>();
|
||||
sc.isTrigger = true;
|
||||
sc.radius = config.Atmosphere.size;
|
||||
|
||||
SimpleFluidVolume sfv = airGO.AddComponent<SimpleFluidVolume>();
|
||||
var sfv = airGO.AddComponent<SimpleFluidVolume>();
|
||||
sfv._layer = 5;
|
||||
sfv._priority = 1;
|
||||
sfv._density = 1.2f;
|
||||
@ -24,7 +24,11 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
sfv._allowShipAutoroll = true;
|
||||
sfv._disableOnStart = false;
|
||||
|
||||
ShockLayerRuleset shockLayerRuleset = planetGO.GetComponentInChildren<PlanetoidRuleset>().gameObject.AddComponent<ShockLayerRuleset>();
|
||||
// Try to parent it to the same as other rulesets to match vanilla but if its null put it on the root object
|
||||
var ruleSetGO = planetGO.GetComponentInChildren<PlanetoidRuleset>()?.gameObject;
|
||||
if (ruleSetGO == null) ruleSetGO = planetGO;
|
||||
|
||||
var shockLayerRuleset = ruleSetGO.AddComponent<ShockLayerRuleset>();
|
||||
shockLayerRuleset._type = ShockLayerRuleset.ShockType.Atmospheric;
|
||||
shockLayerRuleset._radialCenter = airGO.transform;
|
||||
shockLayerRuleset._minShockSpeed = config.Atmosphere.minShockSpeed;
|
||||
@ -56,7 +60,7 @@ namespace NewHorizons.Builder.Atmosphere
|
||||
vref._layer = 0;
|
||||
vref._priority = 0;
|
||||
|
||||
AudioSource AS = airGO.AddComponent<AudioSource>();
|
||||
var AS = airGO.AddComponent<AudioSource>();
|
||||
AS.mute = false;
|
||||
AS.bypassEffects = false;
|
||||
AS.bypassListenerEffects = false;
|
||||
|
||||
@ -25,6 +25,8 @@ namespace NewHorizons.Builder.Props
|
||||
public static List<SignalName> QMSignals { get; private set; }
|
||||
public static List<SignalName> CloakedSignals { get; private set; }
|
||||
|
||||
public static bool Initialized;
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
Logger.LogVerbose($"Initializing SignalBuilder");
|
||||
@ -77,6 +79,8 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
QMSignals = new List<SignalName>() { SignalName.Quantum_QM };
|
||||
CloakedSignals = new List<SignalName>();
|
||||
|
||||
Initialized = true;
|
||||
}
|
||||
|
||||
public static SignalFrequency AddFrequency(string str)
|
||||
|
||||
@ -548,7 +548,8 @@ namespace NewHorizons.Handlers
|
||||
{
|
||||
var surfaceSize = body.Config.Base.surfaceSize;
|
||||
|
||||
AirBuilder.Make(go, sector, body.Config);
|
||||
if (body.Config.Atmosphere.size != 0)
|
||||
AirBuilder.Make(go, sector, body.Config);
|
||||
|
||||
if (!string.IsNullOrEmpty(body.Config.Atmosphere?.clouds?.texturePath))
|
||||
{
|
||||
|
||||
@ -117,6 +117,8 @@ namespace NewHorizons.Patches
|
||||
[HarmonyPatch(typeof(AudioSignal), nameof(AudioSignal.UpdateSignalStrength))]
|
||||
public static bool AudioSignal_UpdateSignalStrength(AudioSignal __instance, Signalscope scope, float distToClosestScopeObstruction)
|
||||
{
|
||||
if (!SignalBuilder.Initialized) return true;
|
||||
|
||||
if (!SignalBuilder.CloakedSignals.Contains(__instance._name) && !SignalBuilder.QMSignals.Contains(__instance._name)) return true;
|
||||
|
||||
__instance._canBePickedUpByScope = false;
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
"author": "xen, Bwc9876, clay, MegaPiggy, John, Book",
|
||||
"name": "New Horizons",
|
||||
"uniqueName": "xen.NewHorizons",
|
||||
"version": "1.4.3",
|
||||
"owmlVersion": "2.5.2",
|
||||
"version": "1.4.4",
|
||||
"owmlVersion": "2.6.0",
|
||||
"conflicts": [ "Raicuparta.QuantumSpaceBuddies", "PacificEngine.OW_Randomizer" ],
|
||||
"pathsToPreserve": [ "planets", "systems", "translations" ]
|
||||
}
|
||||
|
||||
10
docs/content/pages/404.md
Normal file
10
docs/content/pages/404.md
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
Title: Page not Found
|
||||
Hide_In_Nav: True
|
||||
Render_TOC: False
|
||||
---
|
||||
|
||||
# Page Not Found
|
||||
|
||||
The page you requested could not be found.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user