Delta-v/Content.Client/Cargo/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
..
BountyEntry.xaml Skipping bounties (#26537) 2024-04-21 21:47:43 +02:00
BountyEntry.xaml.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
BountyHistoryEntry.xaml Add history tab to bounty console (#33932) 2025-02-14 16:09:49 +00:00
BountyHistoryEntry.xaml.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
CargoBountyMenu.xaml Bounty/history improvements (#2743) 2025-01-16 20:21:13 +00:00
CargoBountyMenu.xaml.cs Add history tab to bounty console (#33932) 2025-02-14 16:09:49 +00:00
CargoConsoleMenu.xaml Revert traitor reputation (#3823) 2025-05-22 23:59:12 +01:00
CargoConsoleMenu.xaml.cs Allow cargo request computers to send orders to the primary account (#37943) 2025-08-07 01:57:30 +02:00
CargoConsoleOrderMenu.xaml Add informations to cargo order form (#10513) 2022-09-14 13:20:38 +10:00
CargoConsoleOrderMenu.xaml.cs Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
CargoOrderRow.xaml Speedmerge make departmental orders consoles print slips (#3658) 2025-05-09 23:16:18 +01:00
CargoOrderRow.xaml.cs Allow cargo request computers to send orders to the primary account (#37943) 2025-08-07 01:57:30 +02:00
CargoPalletMenu.xaml Add trade stations (#23863) 2024-03-08 09:52:50 +01:00
CargoPalletMenu.xaml.cs Add trade stations (#23863) 2024-03-08 09:52:50 +01:00
CargoProductRow.xaml Early cherrypick of Departmental Economy (#36445) (#3458) 2025-04-16 22:05:13 +00:00
CargoProductRow.xaml.cs Add cargo shuttle (#8686) 2022-06-23 14:36:47 +10:00
CargoShuttleMenu.xaml Cargo shuttle changes (#14363) 2023-03-23 16:10:49 +11:00
CargoShuttleMenu.xaml.cs Speedmerge make departmental orders consoles print slips (#3658) 2025-05-09 23:16:18 +01:00
FundingAllocationMenu.xaml Make funding allocation computer more configurable (#36790) (#3555) 2025-04-22 19:23:40 +00:00
FundingAllocationMenu.xaml.cs Make funding allocation computer more configurable (#36790) (#3555) 2025-04-22 19:23:40 +00:00