Commit Graph

32 Commits

Author SHA1 Message Date
Hannah Giovanna Dawson bd98b9212b Update DamageableSystem to modern standards (#39417)
* Update DamageableSystem to modern standards

* DamageContainerId -> DamageContainerID with lint flag

* Replace strings with protoids

* Make CVar subscription declarations all consistently whitespaced

* ChangeDamage -> TryChangeDamage, cope with C# jank

* Revert event signature changes

* Restore a comment

* Re-add two queries

* Init the queries

* Use appearanceQuery in DamageChanged

* Use damageableQuery in TryChangeDamage

* Use damageableQuery in SetDamageModifierSetId

* Final cleanup, fix sandboxing

* Rectify ExplosionSystem:::ProcessEntity's call to TryChangeDamage

* Re-organize DamageableSystem

* first big fuck you breaking change.

* THATS A LOT OF DAMAGE!!!

* Fix test fails

* test fixes 2

* push it

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-12-29 11:39:33 -06:00
William Lemon f563f2c566
Ports Devils from Goobstation (#4639)
* or your debil

* Woop

* Whoops, Missed this

* Whoops, Suicide System

* Hush... Extended tests... Hush

* AAAAAA

* No-longer jaunt whilst dead

* :)

* Update Content.Shared/_Lavaland/Chasm/PreventChasmFallingSystem.cs

Co-authored-by: Tobias Berger <toby@tobot.dev>
Signed-off-by: William Lemon <William.Lemon2@gmail.com>

* Update Content.Server/_Goobstation/Possession/PossessionSystem.cs

Co-authored-by: Tobias Berger <toby@tobot.dev>
Signed-off-by: William Lemon <William.Lemon2@gmail.com>

* Please tobysenpai forgive me

---------

Signed-off-by: William Lemon <William.Lemon2@gmail.com>
Co-authored-by: Tobias Berger <toby@tobot.dev>
2025-11-20 10:11:07 +01:00
deltanedas 7840ad75b7 spacing does 1/5 damage to limbs 2025-01-06 02:59:38 +00:00
gluesniffler da885d8854 Shitmed (#869)
* full fucking send

* ope forgot to remove the EE scripts

* fix test

* fix shitcode fail
2024-12-27 16:47:20 +00:00
Nemanja 9adf1ed402
Remove AlertType and AlertCategory (#27933) 2024-06-01 16:55:49 +02:00
Pieter-Jan Briers 45c8c4f0b5
Fix barotrauma pressure protection (#26236)
Oops

In #26217 I re-organized the logic for the calculation. Part of that was moving the logic for GetFeltLowPressure and GetFeltHighPressure to be done before we actually check the hazard thresholds. What I didn't realize is that, with how our pressure protection is set up, these functions can return values so extreme they rebound into the other category.

For example, according to the math, when you're wearing a hardsuit in a low-pressure environment you have "felt" pressure of 1000 kPa. Yeah that's not right.

Now these functions clamp their result to OneAtmosphere, in the appropriate direction (101.3 kPa).

Fixes #26234

(cherry picked from commit db81438d30f83a542abe6c81c2ce4a5040aa3ddb)
2024-03-23 23:58:12 +01:00
Pieter-Jan Briers 00beb141ca
Fix barotrauma calculations
The math for our pressure damage (barotrauma) system is directly taken from TG. The constants are the same and the math is almost the same. However there are two errors.

1. Pressure damage started being applied within the WARNING bounds, rather than the HAZARD bounds. This means you started taking low pressure damage at 50 kPa instead of the intended 20 kPa, and also the HUD icon didn't show "danger" like it should even if you were already taking damage.

2. The calculations for high pressure damage were wrong. These are supposed to be linearly scaled, but the function was wrong so the scaling didn't actually work properly (especially when considering the fixed bounds above). This appears to be the case because the function was taken from an incorrect comment in the original source, rather than the real math.

Both of these issues are now fixed to match the TG behavior. Note that this somewhat nerfs pressure damage in non-extreme circumstances. e.g. a room at 40 kPa now gives NO pressure damage, whereas previously it would do full space damage.

The description of the pressure alerts is wrong for "low" severity, but I can't be arsed to fix that right now. Alerts don't have a way to change the description depending on severity...

(cherry picked from commit b5138b245e1782cc062b9bdf165600b7974e9ed7)
2024-03-23 23:51:54 +01:00
Nemanja c3f420815f
Add events for TemperatureProtection and PressureProtection (#25165)
(cherry picked from commit 8ed32a1e42d768322ccb6dc6f5311bd58fd0dea3)
2024-02-18 23:11:15 +01:00
Menshin 76903dd145
Cached barotrauma resistance and immunity values instead of computing them each Update() (#15055) 2023-05-01 03:58:26 +10:00
Leon Friedrich 7f524f6751
Fix high pressure protection (#14968) 2023-03-29 16:45:56 -07:00
Vera Aguilera Puerto aa9281d667
Refactors the AtmosphereSystem public-facing API to allow for multiple atmos backends. (#8134)
* Refactors the entirety of the AtmosphereSystem public-facing API to allow for multiple atmos backends.

* actually compiles

* Remove commented out code

* funny bracket

* Move archived moles, temperature from GasMixture to TileAtmosphere.

* WIP customizable map default mixture
still VERY buggy

* broken mess
aaaaaaaaaaaaa

* Fix lattice, etc not being considered space

* visualization for "IsSpace"

* help

* Update Content.Client/Atmos/Overlays/AtmosDebugOverlay.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Holy SHIT it compiles AGAIN

* Fix AtmosDeviceSystem crash at shutdown

* Fix immutable tiles on map blueprints not being fixed by fixgridatmos/revalidate.

* Use space instead of gasmixture immutable for heat capacity calculations

* Remove all LINDA-specific code from GasMixture, move it to TileAtmosphere/AtmosphereSystem instead.

* Fix roundstart tiles not processing

* Update Content.Server/Atmos/Commands/SetTemperatureCommand.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Update Content.Server/Atmos/EntitySystems/AtmosphereSystem.API.cs

Changed Files tab is so large I can't commit both suggestions at once mfw

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-07-04 09:51:34 -05:00
wrexbe 1e0babbd50
Make AdminLogsSystem an IoC manager (#8492)
* Make log not entity system

* Fixes
2022-05-28 23:41:17 -07:00
Julian Giebel 1d0bf979fb
Adds the pressure medipen and adds the emergency suit to emergency lockers (#7880)
* Implement pressure medipen
Add the emergency suit to emergency lockers
Increase leporazine temperature change

* Fix typo in translation file

* Fix ignored component name

* Address reviews

* Revert changes to submodule commit
2022-05-06 14:44:29 -07:00
Leon Friedrich 6dc51589f4
Rejig pressure protection (#7560) 2022-04-15 15:41:47 -07:00
mirrorcult ec4d4688c7
Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Acruid 5b1cd2dd96
ECSatize AlertsSystem (#5559) 2022-01-05 19:19:23 +11:00
Leon Friedrich 7f81f0b8b8
Add more pretty strings to logs (#5768) 2021-12-13 12:22:58 +01:00
Vera Aguilera Puerto c8b65be747 Replace IEntityManager resolves in systems for cached EntityManager 2021-12-08 13:00:43 +01:00
DrSmugleaf 2a3b7d809d Fix 3000 errors 2021-12-05 18:09:01 +01:00
Vera Aguilera Puerto 5cd42c9ad6 Inline UID 2021-12-03 15:53:09 +01:00
Vera Aguilera Puerto 2654775bf0 Inline GetComponentOrNull 2021-12-03 15:32:05 +01:00
Pieter-Jan Briers 64861ff034
Add Content.Shared.Database (#5588) 2021-11-28 14:56:53 +01:00
Leon Friedrich 0de4b7bc9f
Modify damage logging. (#5579) 2021-11-28 14:34:44 +01:00
20kdc 1e061094ca
Direct pressure and asphyxiation damage do not interrupt DoAfters anymore (#5459) 2021-11-22 17:34:56 -07:00
mirrorcult 07024f7c77
Severely nerf fires and severely buff fire protection (#5396)
* Make fires do less damage

* Severely nerf fires and severely buff temperature protection

* fuck it, i'll nerf it so hard and we can buff it later if we decide

* new scaling func

* fix

* unused

* reviews + balance metabolism heat + reduce atmos air temp transfer efficiency

* little more balance

* just a wee bit more

* slight adjustment
2021-11-18 23:08:30 -07:00
Vera Aguilera Puerto e6e15b3728 Replace all ITransformComponent by TransformComponent 2021-11-08 12:37:32 +01:00
Kara D 4abda4f7cf
Fix mobs taking damage on paused maps 2021-11-06 15:18:27 -07:00
mirrorcult 3ab4a30a0f
Generalize ReagentUnit into FixedPoint2 and use it for damage calculations (#5151)
* Damage units

* sum ext method
2021-11-03 16:48:03 -07:00
ShadowCommander e7f352d6c2
Fix barotrauma damage total failing when damageable doesn't have the value 2021-10-23 12:16:08 -07:00
ShadowCommander 6c1ba187e3
Add maximum to barotrauma damage (#4989) 2021-10-23 11:45:57 -07:00
Vera Aguilera Puerto 0be5ff829b
Gets rid of all ComponentManager usages. (#4707) 2021-09-28 13:35:29 +02:00
Vera Aguilera Puerto 246fda53c5
Refactor Barotrauma to be ECS. (#4674)
- Refactor IPressureProtection to be two different ECS events.
2021-09-22 21:02:25 +10:00