Delta-v/Content.IntegrationTests
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
..
Pair Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
Tests Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
AssemblyInfo.cs Fix SOME test fails (#4588) 2025-11-13 12:21:38 +00:00
Content.IntegrationTests.csproj Switch project files to C# 12. (#25487) 2024-03-05 09:49:02 +01:00
DummyParallaxManager.cs Update content vectors to numerics (#17759) 2023-07-08 14:08:32 +10:00
ExternalTestContext.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
GlobalUsings.cs Fix content.integration tests warnings (#17817) 2023-07-06 14:54:25 +10:00
ITestContextLike.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
NUnitTestContextWrap.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
PoolManager.Cvars.cs Add CVar for disabling loadout item role timers (#36775) 2025-11-23 15:22:34 -06:00
PoolManager.Prototypes.cs Update component query benchmarks (#27967) 2024-06-01 16:51:14 +02:00
PoolManager.cs Upstream Merge (June / July) attempt 2 electric boogaloo (#4607) 2025-11-06 18:22:39 +00:00
PoolManagerTestEventHandler.cs Test parallelization stuff. (#31650) 2024-09-01 03:55:29 +01:00
PoolSettings.cs Add random seed options to tests (#30735) 2024-08-09 19:04:17 +01:00
PoolTestLogHandler.cs Add some tests and fix some miscellaneous bugs (#22836) 2024-01-22 18:44:30 +01:00
TestPrototypesAttribute.cs Fix test prototypes fields being marked as unused (#20853) 2023-10-14 22:01:27 +02:00