Delta-v/Content.Client/Atmos
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
..
Components Cleanup some Client atmos systems (#33634) 2024-12-07 21:53:06 +00:00
Consoles Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
EntitySystems Revert "Fix bug with pipe color" (#39135) 2025-11-23 15:22:15 -06:00
Monitor localization support to air alarms, wire panels and more (#39307) 2025-11-23 15:22:16 -06:00
Overlays Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
Piping Predict gas valves (#33836) 2025-05-18 17:39:12 +01:00
Rotting Move rotting stages and examine to shared (#24183) 2024-01-26 23:01:03 +01:00
UI Use a fixed amount of decimal points in gas analyzer window (#40081) 2025-11-23 15:22:34 -06:00
Visualizers Cleanup redundant `SpriteSystem` dependencies in `VisualizerSystem`s (#37758) 2025-08-05 16:16:25 +02:00
AlignAtmosPipeLayers.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00