* 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>
* Adds Survivor Antag
* Adds Survivor Role
* Adds Survivor Rule ECS, adds a survivor role event, adds make antagonist to random global spawn spell
* Moves Survivor Ensurecomp to event handler. Makes Add Survivor Role a broadcast. Adds Survivor Component. Removes redundant briefing.
* Adds Survivor Antagonist role type for admins to keep track of this easier, adds it to Survivor.
* Adds access to survivor game rule system
* Adds Survivor Rule
* Adds end of round survivor text
* Adds end of round reporting logic. Adds logic to start the survivor rule.
* Changes desc from centcomm to shuttle
* survivor (S)
* Checks if they're alive on the shuttle instead of centcomm.
* ftl text selection based on number of survivors.
* Removed Survivor Antagonist, replaced it with Free Agent.
* Adds InvalidForGlobalSpawnSpell tag, checks for it on spawnspell, and adds it to a zombified person.
* Changes logic so we launch the game rule if it hasnt launched yet. Moves rule logic starting to server. Moved survivor rule logic out of event and into Start method.
* Fixes invalid entity issue
* Descs for Survivor Rule and Survivor comps
* Moves Survivor Rule to its own yml
* Checks for dead survivors, changes survivor checks for mind. Adds survivor comp to mind to fix any mindswap issues. Same for invalid survivor tag
* Changes shuttle xform call to just mapid
* Protoid fix
* THE WIZARD
* Wizard spawner
* adds the correct state
* Wizard preset and weight
* Fixes wizard rule
* Weight back to 100%
* Adds Random Metadata
* Wizard locs
* Puts requirements in the right place
* Adds wiz ghost spawner and mob
* wizard spawnpoint fix + shuttle mapping
* wizard loadout + fix wizard spawning + wizard random name
* comment
* Adds Wizard testing
* FIXES SHUTTLE ISSUE BASED REI
* THE WIZARD LOBBY SONG. Special thanks to song creator Chris Remo for allowing us to use this.
* Free Objective ECS + Base Free Objective
* Space Wizard Federation for Wiz Obj issuer.
* Wizard Objectives
* Moves wizard shuttle to base wizard rule. Gives Wizard their objectives. Removes WizardRule
* Renames midround to subgamemodes. Adds wizard sub game mode.
* Adds SubWizard to SubGameModesRule. Adds a SubGameMode with no wizard. Adds No SubGamemodeRule for Wizard preset
* Wizard midround event
* Fixes wizard midround
* Wizard Guidebook
* Removes todo
* Fixes text
* Removes wizard rule ECS, not needed
* Wizard jetpack
---------
Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
* 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
* Added codeword highlighting
* Updated to support more codeword roles, color is set serverside
* Review feedback
* Change to a Component-based system using SessionSpecific
* Tidied up CanGetState, set Access restrictions on component
* Clean-up
* Makes the injection ignore brackets, restore some codewords, remove "Taste/Touch" from adjectives
* remove deprecated entity coordinate extension functions. Reduces warning count by approximately 50
* final toCoords Removed
* Remove all unused variables and dead code paths
* remove always true variable, should be a cvar or something instead
* remove superfluous variables from tests
* move spider charge target from role
* shorter field names
* remove ninja role comment
* remove unused systems in SpaceNinjaSystem
* GenericAntagObjectivesAddedEvent
* check if warp point is on same map
* remove unnecessary import
* add missing loc when spider charge has no target
* a
* remove spider charge target requirement comp
* inline SpiderChargeTitle
* allow planting charge without objective
* remove map check
* fix role check when planting
* obj.Target
* Fix merge
---------
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
* terminator locale
* terminate objective
* terminator components and shared system
* terminator roles rules and system
* terminator events
* skeleton recolour
* terminator and endoskeleton
* ghost role spawn
* damage modifier sets
* :trollface:
* :trollface:
* add antag prototype
* ghost role locale
* skynet
* :trollface:
* :trollface:
* :trollface:
* add endoskeleton body prototype
* :trollface:
* :trollface:
* smite locale
* implement terminate smite
* :trollface:
* :trollface:
* implement PopupBehavior
* endoskeleton transform popup
* move stuff from shared to server since nothing actually used it
* recolour everything
* update parts
* :trollface:
* :trollface:
* ok fire was using the damage set, back to 1.0
* tweak
* :trollface:
* :trollface:
* simplemob ops
* 1 rule per pro
* :trollface:
* :trollface:
* update some sprites
* structural damage
* :trollface:
* :trollface:
* Revert "update some sprites"
This reverts commit 459196c6a8942c5412885d5fe2f1a83a48408ddc.
* offbrand, add die objective to maybe remove fear of murderbone
* add shut down objective to the list
* fix ghost role
* fix control mob
* :trollface:
* :trollface:
* please
* naming
* code changes for GenericAntag terminator
* yml changes for GenericAntag terminator
* :trollface:
* moved kill objective override to an objective component
* use kill objective override
* fix
* oh
* locale changes
* change burn to heat for skin melting gib
* change some endoskeleton stuff
* pro
* i already did this dementia ops
* objective
* fix
* pro
* swap out full sprite
* update parts
* forgor
* fix mind transfer
* type
* endoskeleton has 500 mass
* evil
* fishops
* warops
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* add ConvertedCount field to role
* make objectives roundend title logic reusable
* change rev system + use GetTitle
---------
Co-authored-by: deltanedas <@deltanedas:kde.org>
* TryGetObjectiveComp
* helper function to get objective
* store N of jacked doors in condition
* store called in threat bool in condition
* store techs in steal research condition
* fix access
* remove unused transform system
* use popup from shared system
* fix formatting
* condition => obj everywhere
* i fogror to remove downloaded nodes from role
* change signature
* use query
* View Variables
* spider charge detonated => condition
* Refactoring of antagonist roles and notifications about antagonist role assignment.
Refactoring of traitor assignment methods and bug fixing.
* Announcement files moved, code is adjusted to new revision
* Play to entity changed to play to global cause of mono audio restrictions.
* Path to audio files changed to sound specifiers, unique alerts for each role.
* Uncommited changes
* New alert sounds for each antag role.
* PR review fixes
* Antagonist role assignment sound notifications moved to Systems, sounds moved to Components.
* License update
* Fixed naming and redundant parameters
---------
Co-authored-by: Титов Вячеслав Витальевич <rincew1nd@yandex.ru>