Delta-v/Content.Server/Anomaly/Effects
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
..
AnomalyCoreSystem.cs Move PriceCalculationEvent and EstimatedPriceCalculationEvent to shared (#37782) 2025-08-05 16:21:45 +02:00
BluespaceAnomalySystem.cs Fix bluespace anomaly teleporting borg brains and PAIs in container slots (#30744) 2024-08-21 15:21:03 +01:00
ElectricityAnomalySystem.cs hopefully this all goes through well 2025-09-11 08:45:11 -07:00
EntityAnomalySystem.cs Anomalies behaviours (#24683) 2024-04-07 14:28:52 +02:00
ExplosionAnomalySystem.cs Ice anomaly (#15925) 2023-05-03 11:37:33 -07:00
GasProducerAnomalySystem.cs Replace obsolete GetTilesIntersecting methods (#32455) 2024-12-07 21:55:22 +00:00
GravityAnomalySystem.cs Gravity anomaly rework (#24452) 2024-01-28 00:33:39 +01:00
InjectionAnomalySystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
InnerBodyAnomalySystem.cs Fix usages of TryIndex() (#39124) 2025-12-29 11:39:03 -06:00
ProjectileAnomalySystem.cs fix: anomaly shooting no longer throws when it have no possible targets in range (#37927) 2025-08-06 22:05:48 +02:00
PuddleCreateAnomalySystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
PyroclasticAnomalySystem.cs Moving FlammableComponent to Shared (#39870) 2025-11-23 15:22:31 -06:00
ReagentProducerAnomalySystem.cs upstream merge 7/9 (#1762) 2024-09-10 01:20:38 +10:00
SecretDataAnomalySystem.cs Dynamic anomaly scanner texture (#37585) 2025-12-29 11:39:00 -06:00
ShuffleParticlesAnomalySystem.cs Fix anomaly shuffle particles type (#40624) 2025-11-18 12:40:31 -06:00
TechAnomalySystem.cs Anomaly warnings cleanup (#36188) 2025-04-06 20:51:06 +01:00
TempAffectingAnomalySystem.cs Adds a new `AtmosphereSystem.GetTileMixture()` override (#21804) 2023-12-02 20:26:02 +01:00
TileAnomalySystem.cs upstream merge 27/04/2025 (#3596) 2025-05-06 19:35:03 -04:00