Crush Damage - NeisesMike/VehicleFramework GitHub Wiki
Crush Damage is dealt to vehicles that have gone deeper than is safe for them to go.
Overview
ModVehicle has the fields:
public virtual int BaseCrushDepth => 250;
public virtual int CrushDepthUpgrade1 => 300;
public virtual int CrushDepthUpgrade2 => 300;
public virtual int CrushDepthUpgrade3 => 300;
public virtual int CrushDamage => MaxHealth / 15;
public virtual int CrushPeriod => 1;
BaseCrushDepth defines the initial depth limit for your vehicle. Without upgrades, your vehicle will take damage below this depth.
The CrushDepthUpgrades define the added depth bonus your vehicle gets when a Depth Module is added. In this case, with the level 3 depth module added, the vehicle will have 900 bonus depth. So that's 1150 meters.
CrushDamage is how much damage your vehicle will take every CrushPeriod. In this example, the vehicle will take about 7% of its max health as crush damage every second. The Crush Damage sound will play every CrushPeriod.