* 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>
* Improve and expand `TakeRoleAndReturn` to fail on bug #38292
* fix#38292 and expanded test cases
* use validated EntProtoIds for tests
remove unusued using declarations
* use const strings that match the TestPrototypes
* Convert string literals to protoids in Content.Tests
* Convert string literals to protoids or consts in Content.IntegrationTests
* Fix linter failures
Tricksy static using misled me
* Mind Role Entities wip
* headrev count fix
* silicon stuff, cleanup
* exclusive antag config, cleanup
* jobroleadd overwerite
* logging stuff
* MindHasRole cleanup, admin log stuff
* last second cleanup
* ocd
* minor cleanup
* remove createdTime datafield
* now actually using the event replacement I made for role time tracking
* weh
* Add tests for ghost spawn position
* Make ghosts spawn immediately
* Format mind system
* Move ghost spawning to GhostSystem
* Spawn ghost on grid or map
This fixes the ghosts being attached the parent entity instead of the grid.
* Move logging out of the ghost system
* Make round start observer spawn using GhostSystem
* Move GameTicker ghost spawning to GhostSystem
Moved the more robust character name selection code over.
Moved the TimeOfDeath code over.
Added canReturn logic.
* Add overrides and default for ghost spawn coordinates
* Add warning log to ghost spawn fail
* Clean up test
* Dont spawn ghost on map delete
* Minor changes to the role test
* Fix role test failing to spawn ghost
It was failing the map check due to using Nullspace
* Fix ghost tests when running in parallel
Not sure what happened, but it seems to be because they were running simultaneously and overwriting values.
* Clean up ghost tests
* Test that map deletion does not spawn ghosts
* Spawn ghost on the next available map
* Disallow spawning on deleted maps
* Fix map deletion ghost test
* Cleanup
* add primary departments
* make command and station specific secondary
* add a unit test
* fixy
* compile
* webedit ops
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* Give .props files 2-space indents.
* Move to Central Package Management.
Allows us to store NuGet package versions all in one place. Yay!
* Update NuGet packages and fix code for changes.
Notable:
Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.
* Remove dotnet-eng NuGet package source.
I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.
* Remove Robust.Physics project.
Never used.
* Remove erroneous NVorbis reference.
Should be VorbisPizza and otherwise wasn't used.
* Sandbox fixes
* Remove unused unit test package references.
Castle.Core and NUnit.ConsoleRunner.
* Update NUnit to 4.0.1
This requires replacing all the old assertion methods because they removed them 🥲
* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.
* Add Robust.Analyzers.Test
* Update submodule
* commit to re-run CI
* Remove mob crit states
At least where it was just a dummy mob state. I'm lazy so this will buff mobs where they will remain active until their death state.
* Update Resources/Prototypes/Entities/Mobs/NPCs/behonker.yml
Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>
---------
Co-authored-by: faint <46868845+ficcialfaint@users.noreply.github.com>