Delta-v/Content.Server/Shuttles/Systems
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
..
ArrivalsSystem.cs Move some Station methods into shared (#38976) 2025-11-23 15:22:20 -06:00
DockingSignalControlSystem.cs Dock device link port (#27646) 2024-05-07 04:36:25 +02:00
DockingSystem.Shuttle.cs upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00
DockingSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
EmergencyShuttleSystem.Console.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
EmergencyShuttleSystem.cs fix: don't do emergency shuttle stuff in lobby (#38732) 2025-11-23 15:22:28 -06:00
RadarConsoleSystem.cs fix and buff the handheld mass scanner (#31284) 2024-08-27 00:30:54 +01:00
ShuttleConsoleSystem.Drone.cs Fix replayghost spawning location (#30252) 2024-08-09 17:54:45 +01:00
ShuttleConsoleSystem.FTL.cs Two additional checks to prevent FTLing stations (#32558) 2024-10-07 22:31:01 +01:00
ShuttleConsoleSystem.cs Fix dock radar colours (#38942) 2025-11-23 15:22:24 -06:00
ShuttleSystem.FasterThanLight.cs Stunnable New Status and Cleanup (#38618) 2025-11-23 15:22:21 -06:00
ShuttleSystem.GridFill.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
ShuttleSystem.IFF.cs Fix VGRoid grid spam (#29946) 2024-08-09 18:08:24 +01:00
ShuttleSystem.Impact.cs Crawling Fixes 1: Dragons and Borgs can't do the worm. (#39084) 2025-11-23 15:22:22 -06:00
ShuttleSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
SpaceGarbageSystem.cs Salvage magnet revamp (#23119) 2024-01-26 21:35:22 +01:00
StationAnchorSystem.cs Station Anchor (#26098) 2024-09-01 03:36:44 +01:00
ThrusterSystem.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00