mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add submerge controller to dark matter
This commit is contained in:
parent
086ca65f9d
commit
d7c3e06e3a
@ -39,7 +39,7 @@ namespace NewHorizons.Builder.Body
|
||||
if (_oceanAmbientLight == null) _oceanAmbientLight = SearchUtilities.Find("Ocean_GD").GetComponent<OceanLODController>()._ambientLight.gameObject.InstantiateInactive().Rename("OceanAmbientLight").DontDestroyOnLoad();
|
||||
}
|
||||
|
||||
public static void Make(GameObject planetGO, Sector sector, OWRigidbody rb, WaterModule module)
|
||||
public static RadialFluidVolume Make(GameObject planetGO, Sector sector, OWRigidbody rb, WaterModule module)
|
||||
{
|
||||
InitPrefabs();
|
||||
|
||||
@ -148,6 +148,8 @@ namespace NewHorizons.Builder.Body
|
||||
|
||||
waterGO.transform.position = planetGO.transform.position;
|
||||
waterGO.SetActive(true);
|
||||
|
||||
return fluidVolume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,6 +62,20 @@ namespace NewHorizons.Builder.Volumes
|
||||
var visorFrostEffectVolume = go.AddComponent<VisorFrostEffectVolume>();
|
||||
visorFrostEffectVolume._frostRate = 0.5f;
|
||||
visorFrostEffectVolume._maxFrost = 0.91f;
|
||||
|
||||
var water = planetGO.GetComponentInChildren<RadialFluidVolume>();
|
||||
if (water != null)
|
||||
{
|
||||
var submerge = go.AddComponent<DarkMatterSubmergeController>();
|
||||
submerge._activeWhenSubmerged = false;
|
||||
submerge._effectVolumes = new EffectVolume[] { visorFrostEffectVolume };
|
||||
// THERE ARE NO RENDERERS??? RUH ROH!!!
|
||||
|
||||
var detector = go.AddComponent<ConstantFluidDetector>();
|
||||
detector.AddVolume(water);
|
||||
|
||||
submerge._fluidDetector = detector;
|
||||
}
|
||||
}
|
||||
else if (info.type == VolumesModule.HazardVolumeInfo.HazardType.ELECTRICITY)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user