fish-station/Content.Server/Anomaly/Effects
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
..
AnomalyCoreSystem.cs Move PriceCalculationEvent and EstimatedPriceCalculationEvent to shared (#37782) 2025-05-24 19:36:38 +02:00
BluespaceAnomalySystem.cs Fix bluespace anomaly teleporting borg brains and PAIs in container slots (#30744) 2024-08-17 00:58:23 -04:00
ElectricityAnomalySystem.cs Resolve 'TransformComponent.MapPosition' is obsolete in content (#27939) 2024-05-12 10:31:54 -04:00
EntityAnomalySystem.cs Anomalies behaviours (#24683) 2024-04-01 19:29:13 +11:00
ExplosionAnomalySystem.cs Ice anomaly (#15925) 2023-05-03 11:37:33 -07:00
GasProducerAnomalySystem.cs Replace obsolete GetTilesIntersecting methods (#32455) 2024-12-01 12:56:47 +11:00
GravityAnomalySystem.cs Gravity anomaly rework (#24452) 2024-01-27 04:15:05 -08:00
InjectionAnomalySystem.cs Replace instances of SolutionContainerSystem with SharedSolutionContainerSystem (#30084) 2024-09-02 13:26:04 +02:00
InnerBodyAnomalySystem.cs Fix usages of TryIndex() (#39124) 2025-09-09 18:17:56 +02:00
ProjectileAnomalySystem.cs fix: anomaly shooting no longer throws when it have no possible targets in range (#37927) 2025-05-30 19:11:25 -04:00
PuddleCreateAnomalySystem.cs Replace instances of SolutionContainerSystem with SharedSolutionContainerSystem (#30084) 2024-09-02 13:26:04 +02:00
PyroclasticAnomalySystem.cs Moving FlammableComponent to Shared (#39870) 2025-08-24 13:46:23 -07:00
ReagentProducerAnomalySystem.cs Replace instances of SolutionContainerSystem with SharedSolutionContainerSystem (#30084) 2024-09-02 13:26:04 +02:00
SecretDataAnomalySystem.cs Dynamic anomaly scanner texture (#37585) 2025-09-04 22:11:03 +03:00
ShuffleParticlesAnomalySystem.cs Small anomaly behavior fix (#28290) 2024-05-27 17:52:56 -07:00
TechAnomalySystem.cs Anomaly warnings cleanup (#36188) 2025-03-30 15:16:46 +02:00
TempAffectingAnomalySystem.cs Adds a new AtmosphereSystem.GetTileMixture() override (#21804) 2023-11-29 10:03:44 +11:00
TileAnomalySystem.cs Remove a redundant trycomp from TileAnomalySystem (#36924) 2025-04-25 15:32:23 -04:00