* 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>
* Give silicons proper lobby/character editor previews
No more naked dummies, properly show a borg/AI sprite now.
This means taking the JobEntity into account when spawning the dummy. For AIs I had to add a "JobPreviewEntity" field because they'd look like a posibrain otherwise. AI therefore uses a custom dummy entity I defined.
Also I had to add some margins to the UI, because otherwise the 32x32 sprite of the AI would look bad.
* Update Content.Shared/Roles/JobPrototype.cs
* Update Content.Client/Lobby/LobbyUIController.cs
* Update Resources/Prototypes/Entities/Mobs/Player/silicon.yml
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* De-duplicate loadout gear
Needs supporting code, probably with an interface with StartingGearPrototype which would also use it, but I regexed the yaml.
* Code updates
* Remaining yaml
* Fix automatic naming
* raiseEvent
* Don't code when tired kids
* Character menu asks if you want to save your character on exit
* Fix
* Another fix, little mistake by me
* Update Content.Client/Lobby/UI/CharacterSetupGuiSavePanel.xaml.cs
---------
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
* Don't use invalid defaults for loadouts
At the time it made more sense but now with species specific stuff it's better to have nothing.
* Loadout SetDefault only applies valid loadouts
* Vox stuff
* Species loadouts and lobby refactor
The control flow for lobby is all over the shop so I pulled it all up from the individual controls so now they handle the bare minimum required and LobbyUIController handles the rest.
* a
* Bulk changes
* a
* weh
* Character import / export
* finalise
* woops this stuff too
* Also datafield exporting
* comments
* Review