Delta-v/Content.Shared/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 Moving FlammableComponent to Shared (#39870) 2025-11-23 15:22:31 -06:00
Consoles Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
EntitySystems Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
Monitor Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
Piping Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
Portable/Components Add space heaters (#25250) 2024-03-07 01:05:02 +01:00
Prototypes Cleanup: Remove redundant prototype name specifications (#35793) 2025-03-23 15:57:26 +00:00
Reactions Move GasMixture to shared (#27480) 2024-05-07 04:00:15 +02:00
Rotting Hivelord mob (#31322) 2024-09-14 14:23:33 +01:00
Visuals Change atmos plaques to yaml (#37318) 2025-05-18 17:07:41 +01:00
AtmosCommandUtils.cs Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
AtmosDirection.cs Replace NavMap dictionaries with int[] (#27602) 2024-05-07 04:18:25 +02:00
Atmospherics.cs Bring back low pressure damage to its unnerfed value (#38196) 2025-08-07 02:09:13 +02:00
FireEvents.cs upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00
FireVisuals.cs Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
GasArraySerializer.cs Improve Gas Yaml Serialization (#40070) 2025-12-29 11:39:00 -06:00
GasMixture.cs Improve Gas Yaml Serialization (#40070) 2025-12-29 11:39:00 -06:00
GasMixtureStringRepresentation.cs Move GasMixture to shared (#27480) 2024-05-07 04:00:15 +02:00
GasOverlayChunk.cs Fix exception with gas overlay rendering (#24001) 2024-01-26 22:34:21 +01:00
GetFireProtectionEvent.cs Fire damage system fixes (#37241) 2025-05-18 16:55:01 +01:00
IGasMixtureHolder.cs Predicted internals (#33800) 2025-05-18 16:21:09 +01:00
PipeDirection.cs Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00