Delta-v/Content.Shared/Damage/Systems
Pieter-Jan Briers b7f297f612 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-12-29 11:39:03 -06:00
..
DamageContactsSystem.cs Damaged by contact fix (#31921) 2024-09-14 13:38:15 +01:00
DamageExamineSystem.cs Replaced some AddMarkups with AddMarkupOrThrow (#30632) 2024-08-11 14:52:54 +01:00
DamageOnAttackedSystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
DamageOnHighSpeedImpactSystem.cs Stunnable New Status and Cleanup (#38618) 2025-11-23 15:22:21 -06:00
DamageOnHoldingSystem.cs replace all uses of TryGetContainingContainer with non-obsolete overload (#30583) 2024-08-09 18:24:46 +01:00
DamageOnInteractSystem.cs Stunnable New Status and Cleanup (#38618) 2025-11-23 15:22:21 -06:00
DamagePopupSystem.cs upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00
DamageProtectionBuffSystem.cs Add haloperidol, potassium iodide (#27454) 2024-08-09 18:19:08 +01:00
DamageableSystem.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
PassiveDamageSystem.cs Random spontaneous cleanup PR (#25131) 2024-02-18 23:02:29 +01:00
RequireProjectileTargetSystem.cs Turrets and grenades can hit prone people [port] (#2910) 2025-02-06 19:57:11 +00:00
SharedGodmodeSystem.cs Debody Food and Drink Systems, Combine Food and Drink into One System. (#39031) 2025-11-23 15:22:18 -06:00
SharedStaminaSystem.Modifier.cs StaminaSystem to SharedStaminaSystem (#37199) 2025-05-18 16:51:32 +01:00
SharedStaminaSystem.Resistance.cs Fixed colossus stamina issues (#4688) 2025-11-19 11:07:21 +01:00
SharedStaminaSystem.cs Alerts Cleanup and API (#39544) 2025-12-29 11:39:01 -06:00
SlowOnDamageSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00