Add allowShipAutoroll to Atmosphere and Water modules #935

This commit is contained in:
xen-42 2024-10-02 23:54:18 -04:00
parent 72b7a86294
commit 51ea50ac68
5 changed files with 15 additions and 3 deletions

View File

@ -22,7 +22,7 @@ namespace NewHorizons.Builder.Atmosphere
sfv._priority = 0;
sfv._density = 1.2f;
sfv._fluidType = FluidVolume.Type.AIR;
sfv._allowShipAutoroll = true;
sfv._allowShipAutoroll = config.Atmosphere.allowShipAutoroll;
sfv._disableOnStart = false;
if (config.Atmosphere.hasShockLayer)

View File

@ -147,7 +147,7 @@ namespace NewHorizons.Builder.Atmosphere
fluidCLFV._priority = 1;
fluidCLFV._density = 1.2f;
fluidCLFV._fluidType = atmo.clouds.fluidType.ConvertToOW(FluidVolume.Type.CLOUD);
fluidCLFV._allowShipAutoroll = true;
fluidCLFV._allowShipAutoroll = atmo.allowShipAutoroll;
fluidCLFV._disableOnStart = false;
// Fix the rotations once the rest is done

View File

@ -129,7 +129,7 @@ namespace NewHorizons.Builder.Body
fluidVolume._density = module.density;
fluidVolume._layer = 5;
fluidVolume._priority = 3;
fluidVolume._allowShipAutoroll = true;
fluidVolume._allowShipAutoroll = module.allowShipAutoroll;
fluidVolume._disableOnStart = false;
var fogGO = Object.Instantiate(_oceanFog, waterGO.transform);

View File

@ -107,6 +107,12 @@ namespace NewHorizons.External.Modules
/// </summary>
[DefaultValue(300f)] public float maxShockSpeed = 300f;
/// <summary>
/// Will the ship automatically try to orient itself to face upwards while in this volume?
/// </summary>
[DefaultValue(true)]
public bool allowShipAutoroll = true;
[JsonObject]
public class CloudInfo
{

View File

@ -26,5 +26,11 @@ namespace NewHorizons.External.Modules.VariableSize
/// Tint of the water
/// </summary>
public MColor tint;
/// <summary>
/// Will the ship automatically try to orient itself to face upwards while in this volume?
/// </summary>
[DefaultValue(true)]
public bool allowShipAutoroll = true;
}
}