Delta-v/Content.Server/Chemistry/EntitySystems
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
..
ChemMasterSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
ChemistryGuideDataSystem.cs Add ability for +VVEDIT users to scale damage/healing in the game (#35255) 2025-03-01 13:35:33 +00:00
DeleteOnSolutionEmptySystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
InjectorSystem.cs Fix NF belt metadata file caused by git assuming that was the file to put it in 2025-11-23 15:22:33 -06:00
ReactionMixerSystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
ReagentDispenserSystem.cs Cleanup 2 warnings in `ReagentDispenserSystem` (#37622) 2025-08-04 14:54:11 +02:00
SolutionContainerMixerSystem.cs Power stuff (#31314) 2024-08-27 01:00:42 +01:00
SolutionHeaterSystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
SolutionInjectOnEventSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
SolutionInjectWhileEmbeddedSystem.cs Fix 38 non-obsolete warnings (#33794) 2025-03-01 12:44:03 +00:00
SolutionRandomFillSystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
TransformableContainerSystem.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
VaporSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00