fish-station/Content.Client/Administration/UI
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
..
AdminCamera Admin Tool: Observe entities in an extra viewport (#36969) 2025-07-25 18:53:01 +02:00
AdminRemarks Remove calls to FormattedMessage obsolete methods (#31706) 2024-09-01 13:00:53 +02:00
BanList Power stuff (#31314) 2024-08-25 22:18:42 +10:00
BanPanel Fix usages of TryIndex() (#39124) 2025-09-09 18:17:56 +02:00
Bwoink Cleanup various admin buttons (#36312) 2025-04-17 03:02:41 +02:00
CustomControls Revert "Admin Log Browser Improvements (#39130)" 2025-08-31 17:50:37 +02:00
Logs Revert "Admin Log Browser Improvements (#39130)" 2025-08-31 17:50:37 +02:00
ManageSolutions Add VV button to the solution editor (#38889) 2025-07-09 23:31:39 -07:00
Notes Cleanup various admin buttons (#36312) 2025-04-17 03:02:41 +02:00
PlayerPanel Admin Tool: Observe entities in an extra viewport (#36969) 2025-07-25 18:53:01 +02:00
SetOutfit Fix Set Outfit command/verb (#29672) 2024-09-19 18:02:37 +10:00
SpawnExplosion MapManager warning cleanup client edition (#36766) 2025-05-15 01:38:51 +02:00
Tabs Revert "Admin Log Browser Improvements (#39130)" 2025-08-31 17:50:37 +02:00
AdminAnnounceWindow.xaml Multiline edit everywhere (#15216) 2023-04-14 12:57:47 -07:00
AdminAnnounceWindow.xaml.cs Multiline edit everywhere (#15216) 2023-04-14 12:57:47 -07:00
AdminMenuWindow.xaml Remove baby jail (#34443) 2025-01-15 22:08:15 +01:00
AdminMenuWindow.xaml.cs Remove baby jail (#34443) 2025-01-15 22:08:15 +01:00
AdminMenuWindowEui.cs Ensure EUIs close themselves (#15860) 2023-04-29 13:16:24 +10:00
PermissionsEui.cs Persist deadmin to database, add admin suspension system (#34048) 2025-01-15 00:46:45 +01:00