]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Move logic from EvenHealthChangeEntityEffectSystem to the damage system API (#41684)
authorSamuka <47865393+Samuka-C@users.noreply.github.com>
Sun, 14 Dec 2025 22:31:15 +0000 (19:31 -0300)
committerGitHub <noreply@github.com>
Sun, 14 Dec 2025 22:31:15 +0000 (22:31 +0000)
commit12b9e3735b9ecb70744daaba0773f5edb3956c19
treeb99661aa12c841897eaa388ce19ebea115b17573
parent5650e6be0fd39da9888f29c64452650c4e9e70f9
Move logic from EvenHealthChangeEntityEffectSystem to the damage system API (#41684)

* add two methods

* move stuff to damage system api

* use TryIndex

* simplify

* minor fix

* add helper functions

* fix

* remove random new line

* simplify

* remove unnecessary lines

* rename to GetDamage

* Got it working

* make more clear

* why backwards

* value should be the amount to heal

* fix

* fix all dumb fixedpoint2 edge cases I hope

* One more thing

* fix

* make it more simple

* ops it was backwards

* valueHeal can't be more than remaining

* add all keys beforehand and no need to check and add them inside the loop

* break for loop in case remaining is zero

* comment was wrong

* optimized, works

* remove random spaces

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Content.Server/Body/Systems/RespiratorSystem.cs
Content.Shared/Damage/Systems/DamageableSystem.API.cs
Content.Shared/EntityEffects/Effects/Damage/DistributedHealthChangeEntityEffectSystem.cs [new file with mode: 0644]
Content.Shared/EntityEffects/Effects/Damage/EvenHealthChangeEntityEffectSystem.cs [moved from Content.Shared/EntityEffects/Effects/EvenHealthChangeEntityEffectSystem.cs with 69% similarity]
Content.Shared/EntityEffects/Effects/Damage/HealthChangeEntityEffectSystem.cs [moved from Content.Shared/EntityEffects/Effects/HealthChangeEntityEffectSystem.cs with 88% similarity]