Порт атмоса с ЕЕ + пара фиксво (#491)

* fix a lot of spaces in shuttle call reason

* fix tts fatal without api url

* Physics Based Air Throws (#342)

I've made it so that when a room is explosively depressurized(or when a
body of high pressure air flows into one of lower pressure air), that
entities inside are launched by the air pressure with effects according
to their mass. An entity's mass is now used as an innate resistance to
forced movement by airflow, and more massive entities are both less
likely to be launched, and will launch less far than others. While
lighter entities are launched far more easily, and will shoot off into
space quite quickly! Spacing departments has never been so exciting!
This can be made extraordinarily fun if more objects are given the
ability to injure people when colliding with them at high speeds.

As a note, Humans are very unlikely to be sucked into space at a typical
force generated from a 101kpa room venting into 0kpa, unless they
happened to be standing right next to the opening to space when it was
created. The same cannot be said for "Lighter-Than-Human" species such
as Felinids and Harpies. I guess that's just the price to pay for being
cute. :)

On a plus side, because the math behind this is simplified even further
than it was before, this actually runs more efficiently than the
previous system.

Nothing, this is basically done. I've spent a good 6 hours straight
finely tuning the system until I was satisfied that it reflects
something close to reality.

**Before the Space Wind Rework:**

https://github.com/Simple-Station/Einstein-Engines/assets/16548818/0bf56c50-58e6-4aef-97f8-027fbe62331e

**With this Rework:**

https://github.com/Simple-Station/Einstein-Engines/assets/16548818/6be507a9-e9de-4bb8-9d46-8b7c83ed5f1d

🆑 VMSolidus
- add: Atmospheric "Throws" are now calculated using object mass, and
behave accordingly. Tiny objects will shoot out of rooms quite fast!

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>

* fixes

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
This commit is contained in:
ThereDrD0
2024-07-24 22:40:38 +03:00
committed by GitHub
parent c4ed22638b
commit f56e97b122
11 changed files with 262 additions and 87 deletions

View File

@@ -1054,7 +1054,7 @@ namespace Content.Shared.CCVar
/// Useful to prevent clipping through objects.
/// </summary>
public static readonly CVarDef<float> SpaceWindMaxVelocity =
CVarDef.Create("atmos.space_wind_max_velocity", 30f, CVar.SERVERONLY);
CVarDef.Create("atmos.space_wind_max_velocity", 15f, CVar.SERVERONLY);
/// <summary>
/// The maximum force that may be applied to an object by pushing (i.e. not throwing) atmospheric pressure differences.
@@ -1063,6 +1063,24 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<float> SpaceWindMaxPushForce =
CVarDef.Create("atmos.space_wind_max_push_force", 20f, CVar.SERVERONLY);
/// <summary>
/// If an object's mass is below this number, then this number is used in place of mass to determine whether air pressure can throw an object.
/// This has nothing to do with throwing force, only acting as a way of reducing the odds of tiny 5 gram objects from being yeeted by people's breath
/// </summary>
/// <remarks>
/// If you are reading this because you want to change it, consider looking into why almost every item in the game weighs only 5 grams
/// And maybe do your part to fix that? :)
/// </remarks>
public static readonly CVarDef<float> SpaceWindMinimumCalculatedMass =
CVarDef.Create("atmos.space_wind_minimum_calculated_mass", 10f, CVar.SERVERONLY);
/// <summary>
/// Calculated as 1/Mass, where Mass is the physics.Mass of the desired threshold.
/// If an object's inverse mass is lower than this, it is capped at this. Basically, an upper limit to how heavy an object can be before it stops resisting space wind more.
/// </summary>
public static readonly CVarDef<float> SpaceWindMaximumCalculatedInverseMass =
CVarDef.Create("atmos.space_wind_maximum_calculated_inverse_mass", 0.04f, CVar.SERVERONLY);
/// <summary>
/// Whether monstermos tile equalization is enabled.
/// </summary>
@@ -1084,7 +1102,21 @@ namespace Content.Shared.CCVar
/// Also looks weird on slow spacing for unrelated reasons. If you do want to enable this, you should probably turn on instaspacing.
/// </summary>
public static readonly CVarDef<bool> MonstermosRipTiles =
CVarDef.Create("atmos.monstermos_rip_tiles", false, CVar.SERVERONLY);
CVarDef.Create("atmos.monstermos_rip_tiles", true, CVar.SERVERONLY);
/// <summary>
/// Taken as the cube of a tile's mass, this acts as a minimum threshold of mass for which air pressure calculates whether or not to rip a tile from the floor
/// This should be set by default to the cube of the game's lowest mass tile as defined in their prototypes, but can be increased for server performance reasons
/// </summary>
public static readonly CVarDef<float> MonstermosRipTilesMinimumPressure =
CVarDef.Create("atmos.monstermos_rip_tiles_min_pressure", 7500f, CVar.SERVERONLY);
/// <summary>
/// Taken after the minimum pressure is checked, the effective pressure is multiplied by this amount.
/// This allows server hosts to finely tune how likely floor tiles are to be ripped apart by air pressure
/// </summary>
public static readonly CVarDef<float> MonstermosRipTilesPressureOffset =
CVarDef.Create("atmos.monstermos_rip_tiles_pressure_offset", 0.44f, CVar.SERVERONLY);
/// <summary>
/// Whether explosive depressurization will cause the grid to gain an impulse.
@@ -1115,6 +1147,13 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<float> AtmosSpacingMaxWind =
CVarDef.Create("atmos.mmos_max_wind", 500f, CVar.SERVERONLY);
/// <summary>
/// Increases default airflow calculations to O(n^2) complexity, for use with heavy space wind optimizations. Potato servers BEWARE
/// This solves the problem of objects being trapped in an infinite loop of slamming into a wall repeatedly.
/// </summary>
public static readonly CVarDef<bool> MonstermosUseExpensiveAirflow =
CVarDef.Create("atmos.mmos_expensive_airflow", true, CVar.SERVERONLY);
/// <summary>
/// Whether atmos superconduction is enabled.
/// </summary>
@@ -1171,6 +1210,13 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<float> AtmosHeatScale =
CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY);
/// <summary>
/// A multiplier on the amount of force applied to Humanoid entities, as tracked by HumanoidAppearanceComponent
/// This multiplier is added after all other checks are made, and applies to both throwing force, and how easy it is for an entity to be thrown.
/// </summary>
public static readonly CVarDef<float> AtmosHumanoidThrowMultiplier =
CVarDef.Create("atmos.humanoid_throw_multiplier", 2f, CVar.SERVERONLY);
/*
* MIDI instruments
*/