* 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>
* Add the chameleon controller implant
* address the issues (Git please dont kill me)
* Address the review and fix some merge conflicts!
* Cleanup
* Add use delay
* Silly mistakes
* Making a PR at 2 am: Gone wrong
* Predict use delay and disable the buttons until you can choose another
* First phase custom clothing
* Better system, now relays to agent id and mindshield. Chameleon loadouts are a lot better to work with as well
* Address the review! No more evil goto
* Slams way is better I should have read more closely xD
* Some of the jobs
* Add to Cargo, CentComm, Service, Passenger, Ninja, Cluwne, Wizard + Minor changes to existing; Add chameleon to bandanas, medals, jugsuits and HUDs
* Add everything else
* Fix test
* Job name
* This looks better
* Add department organization
* Minor cleanup
* Added some mindshields
* Remove redudent comment and change funcion name to be clearer
* Fix cluwne outfit
* fix merge conflicts
---------
Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
* add tooltips to agentid job icons
* forgot to stage this
* make StatusIconPrototype abstract
* minor visual improvements
* cleanup
* use currentculture to sort job names
* review
* Use new Subs.CVar helper
Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.
This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.
* Fix a bunch of warnings
* More warning fixes
* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.
* Get rid of some more ISerializationHooks for enums
* And a little more
* Apply suggestions from code review
Co-authored-by: 0x6273 <0x40@keemail.me>
---------
Co-authored-by: 0x6273 <0x40@keemail.me>