shuttle impacts port (#37422)
* initial * adjust densities and thruster hp * Fix evil hack * Last stuff * review, cleanup * admin RW * minor cleanup --------- Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -194,4 +194,92 @@ public sealed partial class CCVars
|
||||
/// </summary>
|
||||
public static readonly CVarDef<float> GridImpulseMultiplier =
|
||||
CVarDef.Create("shuttle.grid_impulse_multiplier", 0.01f, CVar.SERVERONLY);
|
||||
|
||||
#region impacts
|
||||
|
||||
/// <summary>
|
||||
/// Whether shuttle impacts should do anything beyond produce a sound.
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<bool> ImpactEnabled =
|
||||
CVarDef.Create("shuttle.impact.enabled", true, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Minimum impact inertia to trigger special shuttle impact behaviors when impacting slower than MinimumImpactVelocity.
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> MinimumImpactInertia =
|
||||
CVarDef.Create("shuttle.impact.minimum_inertia", 5f * 50f, CVar.SERVERONLY); // 100tile grid (cargo shuttle) going at 5 m/s
|
||||
|
||||
/// <summary>
|
||||
/// Minimum velocity difference between 2 bodies for a shuttle impact to be guaranteed to trigger any special behaviors like damage.
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> MinimumImpactVelocity =
|
||||
CVarDef.Create("shuttle.impact.minimum_velocity", 15f, CVar.SERVERONLY); // needed so that random space debris can be rammed
|
||||
|
||||
/// <summary>
|
||||
/// Multiplier of Kinetic energy required to dismantle a single tile in relation to its mass
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> TileBreakEnergyMultiplier =
|
||||
CVarDef.Create("shuttle.impact.tile_break_energy", 3000f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Multiplier of damage done to entities on colliding areas
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactDamageMultiplier =
|
||||
CVarDef.Create("shuttle.impact.damage_multiplier", 0.00005f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Multiplier of additional structural damage to do
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactStructuralDamage =
|
||||
CVarDef.Create("shuttle.impact.structural_damage", 5f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Kinetic energy required to spawn sparks
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> SparkEnergy =
|
||||
CVarDef.Create("shuttle.impact.spark_energy", 2000000f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Area to consider for impact calculations
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactRadius =
|
||||
CVarDef.Create("shuttle.impact.radius", 4f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Affects slowdown on impact
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactSlowdown =
|
||||
CVarDef.Create("shuttle.impact.slowdown", 0.8f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// Minimum velocity change from impact for special throw effects (e.g. stuns, beakers breaking) to occur
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactMinThrowVelocity =
|
||||
CVarDef.Create("shuttle.impact.min_throw_velocity", 1f, CVar.SERVERONLY); // due to how it works this is about 16 m/s for cargo shuttle
|
||||
|
||||
/// <summary>
|
||||
/// Affects how much damage reduction to give to grids with higher mass
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactMassBias =
|
||||
CVarDef.Create("shuttle.impact.mass_bias", 0.65f, CVar.SERVERONLY);
|
||||
|
||||
/// <summary>
|
||||
/// How much should total grid inertia affect our collision damage
|
||||
/// </summary>
|
||||
[CVarControl(AdminFlags.VarEdit)]
|
||||
public static readonly CVarDef<float> ImpactInertiaScaling =
|
||||
CVarDef.Create("shuttle.impact.inertia_scaling", 0.5f, CVar.SERVERONLY);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -47,6 +47,12 @@ namespace Content.Shared.Maps
|
||||
[DataField]
|
||||
public PrototypeFlags<ToolQualityPrototype> DeconstructTools { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Effective mass of this tile for grid impacts.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public float Mass = 800f;
|
||||
|
||||
/// <remarks>
|
||||
/// Legacy AF but nice to have.
|
||||
/// </remarks>
|
||||
|
||||
Reference in New Issue
Block a user