CatStation/Content.Server/Shuttles/Systems
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
..
ArrivalsSystem.cs Move some Station methods into shared (#38976) 2025-08-08 11:22:34 -04:00
DockingSignalControlSystem.cs Dock device link port (#27646) 2024-05-06 13:59:01 +10:00
DockingSystem.cs Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00
DockingSystem.Shuttle.cs Fix shuttle arrival visualizer (#35772) 2025-04-15 00:34:18 +10:00
EmergencyShuttleSystem.Console.cs Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814) 2025-07-07 21:57:05 +02:00
EmergencyShuttleSystem.cs fix: don't do emergency shuttle stuff in lobby (#38732) 2025-08-19 23:52:52 -07:00
RadarConsoleSystem.cs fix and buff the handheld mass scanner (#31284) 2024-08-21 12:33:01 -06:00
ShuttleConsoleSystem.cs Fix dock radar colours (#38942) 2025-08-12 13:09:00 -07:00
ShuttleConsoleSystem.Drone.cs Fix replayghost spawning location (#30252) 2024-07-22 20:32:30 +01:00
ShuttleConsoleSystem.FTL.cs Two additional checks to prevent FTLing stations (#32558) 2024-10-04 12:55:36 +10:00
ShuttleSystem.cs Revert biome rework (#38724) 2025-07-03 20:48:04 +02:00
ShuttleSystem.FasterThanLight.cs Stunnable New Status and Cleanup (#38618) 2025-07-21 19:22:11 +02:00
ShuttleSystem.GridFill.cs Fix usages of TryIndex() (#39124) 2025-09-09 18:17:56 +02:00
ShuttleSystem.IFF.cs Fix VGRoid grid spam (#29946) 2024-07-27 11:54:38 +10:00
ShuttleSystem.Impact.cs Crawling Fixes 1: Dragons and Borgs can't do the worm. (#39084) 2025-08-10 10:49:29 -07:00
SpaceGarbageSystem.cs Cargo Mail System (#35429) 2025-03-07 14:51:08 +01:00
StationAnchorSystem.cs Station Anchor (#26098) 2024-08-31 10:40:28 -04:00
ThrusterSystem.cs Clean up all missing EntitySystem proxy method uses (#38353) 2025-06-26 16:50:49 -07:00