Delta-v/Content.Client/Administration/UI
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
..
AdminCamera Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
AdminRemarks upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
BanList Power stuff (#31314) 2024-08-27 01:00:42 +01:00
BanPanel Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
Bwoink upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00
CustomControls Admin Log Browser Improvements (#39130) 2025-11-23 15:22:30 -06:00
Logs Admin Log Browser Improvements (#39130) 2025-11-23 15:22:30 -06:00
ManageSolutions Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
Notes upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00
PlayerPanel Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
SetOutfit Fix Set Outfit command/verb (#29672) 2024-09-22 02:45:06 +01:00
SpawnExplosion MapManager warning cleanup client edition (#36766) 2025-05-18 17:40:26 +01:00
Tabs Fix admin objects tab (#39832) 2025-11-23 15:22:30 -06: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-28 04:31:23 +00:00
AdminMenuWindow.xaml.cs Remove baby jail (#34443) 2025-01-28 04:31:23 +00: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-28 04:31:22 +00:00