This commit is contained in:
Nick 2022-07-14 23:36:07 -04:00
commit 230540d246
7 changed files with 74 additions and 8 deletions

View File

@ -22,7 +22,7 @@ on:
jobs: jobs:
Build: Build:
if: ${{ github.ref == 'refs/heads/main' || (github.event.pull_request.draft == 'false' && contains(github.event.pull_request.labels.*.name, 'update-pr')) }} if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'update-pr') }}
uses: ./.github/workflows/build.yaml uses: ./.github/workflows/build.yaml
with: with:
build_type: Release build_type: Release
@ -43,7 +43,7 @@ jobs:
Update_Release: Update_Release:
name: 'Create/Update Release Asset' name: 'Create/Update Release Asset'
needs: Build needs: Build
if: ${{ github.ref != 'refs/heads/main' && github.event.pull_request.draft == 'false' && contains(github.event.pull_request.labels.*.name, 'update-pr') }} if: ${{ github.ref != 'refs/heads/main' && contains(github.event.pull_request.labels.*.name, 'update-pr') }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download Asset - name: Download Asset

View File

@ -11,7 +11,7 @@ on:
jobs: jobs:
Update_Release: Update_Release:
name: Create/Update Release name: Create/Update Release
if: ${{ github.event.pull_request.draft == 'false' && contains(github.event.pull_request.labels.*.name, 'update-pr') }} if: contains(github.event.pull_request.labels.*.name, 'update-pr')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Create/Update Release - name: Create/Update Release

View File

@ -27,12 +27,22 @@ namespace NewHorizons.Builder.Atmosphere
ShockLayerRuleset shockLayerRuleset = planetGO.GetComponentInChildren<PlanetoidRuleset>().gameObject.AddComponent<ShockLayerRuleset>(); ShockLayerRuleset shockLayerRuleset = planetGO.GetComponentInChildren<PlanetoidRuleset>().gameObject.AddComponent<ShockLayerRuleset>();
shockLayerRuleset._type = ShockLayerRuleset.ShockType.Atmospheric; shockLayerRuleset._type = ShockLayerRuleset.ShockType.Atmospheric;
shockLayerRuleset._radialCenter = airGO.transform; shockLayerRuleset._radialCenter = airGO.transform;
shockLayerRuleset._minShockSpeed = config.Atmosphere.minShockSpeed;
shockLayerRuleset._maxShockSpeed = config.Atmosphere.maxShockSpeed;
var bottom = config.Base.surfaceSize; if (config.Atmosphere.clouds != null)
var top = config.Atmosphere.size; {
shockLayerRuleset._innerRadius = config.Atmosphere.clouds.innerCloudRadius;
shockLayerRuleset._outerRadius = config.Atmosphere.clouds.outerCloudRadius;
}
else
{
var bottom = config.Base.surfaceSize;
var top = config.Atmosphere.size;
shockLayerRuleset._innerRadius = (bottom + top) / 2f; shockLayerRuleset._innerRadius = (bottom + top) / 2f;
shockLayerRuleset._outerRadius = top; shockLayerRuleset._outerRadius = top;
}
if (config.Atmosphere.hasOxygen) if (config.Atmosphere.hasOxygen)
{ {

View File

@ -235,6 +235,9 @@ namespace NewHorizons.Builder.Body
fog._fogRadius *= scale; fog._fogRadius *= scale;
fog._fogDensity *= scale; fog._fogDensity *= scale;
var volumesShape = volumes.FindChild("ZeroG_Fluid_Audio_Volume");
volumesShape.GetComponent<SphereShape>().radius *= scale;
// Change fog color // Change fog color
if (body.Config.Bramble.dimension.fogTint != null) if (body.Config.Bramble.dimension.fogTint != null)
{ {

View File

@ -86,6 +86,16 @@ namespace NewHorizons.External.Modules
/// </summary> /// </summary>
public bool useAtmosphereShader; public bool useAtmosphereShader;
/// <summary>
/// Minimum speed that your ship can go in the atmosphere where flames will appear.
/// </summary>
[DefaultValue(100f)] public float minShockSpeed = 100f;
/// <summary>
/// Maximum speed that your ship can go in the atmosphere where flames will appear at their brightest.
/// </summary>
[DefaultValue(300f)] public float maxShockSpeed = 300f;
[JsonObject] [JsonObject]
public class CloudInfo public class CloudInfo
{ {

View File

@ -0,0 +1,31 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NewHorizons.Patches
{
[HarmonyPatch]
public class BramblePatches
{
[HarmonyPrefix]
[HarmonyPatch(typeof(SphericalFogWarpVolume), nameof(SphericalFogWarpVolume.IsProbeOnly))]
public static bool SphericalFogWarpVolume_IsProbeOnly(SphericalFogWarpVolume __instance, ref bool __result)
{
__result = false;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(FogWarpVolume), nameof(FogWarpVolume.GetFogThickness))]
public static bool FogWarpVolume_GetFogThickness(FogWarpVolume __instance, ref float __result)
{
if (__instance is InnerFogWarpVolume sph) __result = sph._exitRadius;
else __result = 50; // 50f is hardcoded as the return value in the base game
return false;
}
}
}

View File

@ -286,6 +286,18 @@
"useAtmosphereShader": { "useAtmosphereShader": {
"type": "boolean", "type": "boolean",
"description": "Whether we use an atmospheric shader on the planet. Doesn't affect clouds, fog, rain, snow, oxygen, etc. Purely\nvisual." "description": "Whether we use an atmospheric shader on the planet. Doesn't affect clouds, fog, rain, snow, oxygen, etc. Purely\nvisual."
},
"minShockSpeed": {
"type": "number",
"description": "Minimum speed that your ship can go in the atmosphere where flames will appear.",
"format": "float",
"default": 100.0
},
"maxShockSpeed": {
"type": "number",
"description": "Maximum speed that your ship can go in the atmosphere where flames will appear at their brightest.",
"format": "float",
"default": 300.0
} }
} }
}, },