* Added localization of groups and types: damage, metabolism (displayed in the guide book). The text for the health analyzer, weapon damage inspection is now taken from damage prototypes
* fix damage tests
* fix damage test yml
* fix damage test prototypes
* Update Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs
* Update Content.Shared/Damage/Prototypes/DamageTypePrototype.cs
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Add test for two chemistry issues
1. rounding issue with reaction processing when making chloral hydrate
2. reliable assert trip due to the ValidateSolution() heat capacity issue.
* Fix FixedPoint2 arithmetic
Fix internal floating point arithmetic in places where it could be avoided.
Fix incorrect rounding mode used in other places (it should always floor, like regular int arithmetic).
I had to add an explicit epsilon value for float -> FixedPoint2 because something like 1.05 is actually like 1.04999 and that'd cause it to be rounded down to 1.04.
This fixes reaction reagent processing in cases where the reagent inputs can't cleanly divide. Previously, when making 30u chloral hydrate by adding the chlorine in 10u increments you'd end up with 0.04 chlorine left over. This was caused by division in the reaction code rounding up in some cases. Changing division here to always round down fixes it.
* Attempt to fix heat capacity precision assert issues.
Fixes#22126
First, we just increase the tolerance of the assert. It was way too low.
Second, actually put a cap on float drift from one-off _heatCapacity changes.
* Fix float -> FixedPoint2 epsilon for negative number, fix tests.
* Fix DamageableTest
* Oh yeah I need to call CleanReturnAsync
* ECS and damage Data
* Comments and newlines
* Added Comments
* Make TryChangeDamageEvent immutable
* Remove SetAllDamage event
Use public SetAllDamage function instead
* Undo destructible mistakes
That was some shit code.
* Rename DamageData to DamageSpecifier
And misc small edits
misc
* Cache trigger prototypes.
* Renaming destructible classes & functions
* Revert "Cache trigger prototypes."
This reverts commit 86bae15ba6616884dba75f552dfdfbe2d1fb6586.
* Replace prototypes with prototype IDs.
* Split damage.yml into individual files
* move get/handle component state to system
* Update HealthChange doc
* Make godmode call Dirty() on damageable component
* Add Initialize() to fix damage test
* Make non-static
* uncache resistance set prototype and trim DamageableComponentState
* Remove unnecessary Dirty() calls during initialization
* RemoveTryChangeDamageEvent
* revert Dirty()
* Fix MobState relying on DamageableComponent.Dirty()
* Fix DisposalUnit Tests.
These were previously failing, but because the async was not await-ed, this never raised the exception.
After I fixed MobState component, this exception stopped happening and instead the assertions started being tested & failing
* Disposal test 2: electric boogaloo
* Fix typos/mistakes
also add comments and fix spacing.
* Use Uids instead of IEntity
* fix merge
* Comments, a merge issue, and making some damage ignore resistances
* Extend DamageSpecifier and use it for DamageableComponent
* fix master merge
* Fix Disposal unit test. Again.
Snapgrids were removed in master
* Execute Exectute