fish-station/Content.Shared/Atmos
Pieter-Jan Briers 0c97520276
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-09-09 18:17:56 +02:00
..
Components Moving FlammableComponent to Shared (#39870) 2025-08-24 13:46:23 -07:00
Consoles Properly dispose of stale pipedata chunks for the atmos monitor (#38974) 2025-07-23 17:18:19 +02:00
EntitySystems Fix usages of TryIndex() (#39124) 2025-09-09 18:17:56 +02:00
Monitor Optimizations from server profile (#38290) 2025-07-26 11:44:34 +02:00
Piping fix: auto-update mailing unit + gas canister UIs on state (#39289) 2025-08-04 18:26:52 +02:00
Portable/Components Add space heaters (#25250) 2024-02-28 10:27:29 -08:00
Prototypes Cleanup: Remove redundant prototype name specifications (#35793) 2025-03-19 19:30:31 +01:00
Reactions Move GasMixture to shared (#27480) 2024-04-30 14:31:05 -07:00
Rotting Hivelord mob (#31322) 2024-09-11 09:52:27 -04:00
Visuals Change atmos plaques to yaml (#37318) 2025-05-10 02:24:07 +02: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-02 12:51:21 +10:00
Atmospherics.cs Bring back low pressure damage to its unnerfed value (#38196) 2025-06-09 17:05:48 -07:00
FireEvents.cs Fire extinguishers can now extinguish items, including when held/worn (#36267) 2025-04-14 19:00:47 +10:00
FireVisuals.cs Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
GasArraySerializer.cs Improve Gas Yaml Serialization (#40070) 2025-09-04 20:48:46 +02:00
GasMixture.cs Improve Gas Yaml Serialization (#40070) 2025-09-04 20:48:46 +02:00
GasMixtureStringRepresentation.cs Move GasMixture to shared (#27480) 2024-04-30 14:31:05 -07:00
GasOverlayChunk.cs Fix exception with gas overlay rendering (#24001) 2024-01-13 00:22:10 +01:00
GetFireProtectionEvent.cs Fire damage system fixes (#37241) 2025-05-06 22:03:05 -04:00
IGasMixtureHolder.cs Predicted internals (#33800) 2025-05-02 18:22:29 +10:00
PipeDirection.cs Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00