* 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>
* Added Zombie faction roles everywhere that makes sense for initial infected to be associated with Zombies.
* Adding faction component to round start zombie. (not hopeful)
* Removed stupid attempts and added zombie faction component to the zombie system when the player is given the ability to force themself to zombify.
* Changed use of "zombie" for ProtoId<NpcFactionPrototype>
* Update Content.Server/Zombies/ZombieSystem.cs
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Update Content.Server/Zombies/ZombieSystem.cs
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Removed faction component from ZombieOutbreak event. Shouldn't cause problems with the event as II gets component with their ability to self zombify.
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* cloning refactor
* cleanup and fixes
* don't pick from 0
* give dwarves the correct species
* fix dna and bloodstream reagent data cloning
* don't copy helmets
* be less redundant
* Zombies keep their anomalies on zombification
* Refactor anombies to isolate anomalies and zombies
InnerBodyAnomalies now send an event when the host dies.
Zombies cancels this event if the host is turning into a zombie.
* Anomazombies: deprecate CancellableEntityEventArgs
CancellableEntityEventArgs is deprecated. Use structs
with bool Cancelled instead.
* Mega Antag Refactor
* last minute delta save
* more workshopping
* more shit
* ok tested this for once
* okkkkk sure
* generic delays for starting rules
* well darn
* nukies partially
* ouagh
* ballin' faded and smonkin wed
* obliterated the diff
* Spread my arms and soak up congratulations
* I've got plenty of love, but nothing to show for it
* but there’s too much sunlight
Shining on my laptop monitor, so I
Can’t see anything with any amount of clarity
* ok this junk
* OOK!
* fubar
* most of sloth's review
* oh boy
* eek
* hell yea!
* ASDFJASDJFvsakcvjkzjnhhhyh
* 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
* Fix drones
* They dont need a full bloodstream
* Incorrect indentation
* Nuke drones
* Fix ClothingHeadHatCatEars
* Remove last mention of drones
* Implement requested changes
This reverts f391ff28 and implements an alternate messure where mice and other small animals can no longer infect people as zombies.
This is done through a component which if present cancels the check that would cause zombie components to be added on people that get infected due to a bite.
This still allows other special stuff that happens in that function that may affect already infected individuals.
This is a compromise between what's discussed in discord which would much rather see mice and other animals just die from the infection and people on github which would see no change happen.
Since bats can't go under doors it may not be necessary to make them non spreaders.
If someone disagrees please tell me to just add it back.
* zombie mode redux
* the great zombie changes
* fix this
* 65 down to 50
* empty
* Changes to address stalling
* make zombie nukies no longer nukies
* actually work
* Added component and functionality.
* Fixed ZombieImmune.
* Zombies now have zombie blood.
* Ambuzol plus.
* Ambuzol plus spawns in bundle.
* Fine CBURN get one too.
* Reworked the reaction
* No more magic blood refilling.
* ok CE i fixed it
* Component change.
* Nerf Space zombies, get DoT in space (barotrauma) and spawn stunned.
- Also discard any helmet or mask you might be wearing.
* Zombies have heal over time, infection far more fatal
- Stun time reduced to 2 seconds
* Zombification occurs after you die, rather than after you crit.
- Zombies cannot inflict Zombification DoT on other zombies.
* Heal shock damage, space zombies are back.
* Lower the chance of infection per hit
* Removed the stun, reduced zombification virus slightly
* Add AutoEmote comp/system
* Reduce groan chance so it's the same as before
Old code did 0.2 and then 0.5, now it's just one Prob(0.1)
* Fix typo, curTime var, don't log Resolve
* Maybe fix pausing?
* Fix mistake
* Update NextEmoteTime if an auto emote is removed
* Fix stuff
Get CurTime outside update loop
Use MapInit instead of ComponentInit
Fix a typo in a comment
Debug assert prototype ID in RemoveEmote
Do += PausedTime in OnUnpaused
Add prototype as arg to ResetTimer to avoid an indexing
* Fix dead mobs sneezing and coughing
* SneezeCough update
* Streamlined Event code, moved dead-check
* cleanup
* I can has merge?
* Shared event for SharedMobStateSystem