Fixes #36752
Attacking silicons now properly plays hitsounds.
Cleaned up item_attack a little. The slime item attack code is now its own code in the slime code (and has been slightly tweaked so that it isn't so long, with some minimal gameplay changes). Moved the mob attack code into attacked_by, which has been turned into a living proc instead of just a carbon proc. Silicons make use of their own variant of this proc in order to play hitsounds because hitsounds were only played in the carbon proc.
Also fixed a bug where critical damage did not apply to slimes for the purpose of how strong the weapon has to be in order to get rid of them.
Slime code has been refactored a little; removed some sleep() and spawn() instances where SStun would wear off afterwards and instead turned SStun into a variable that ticks down every tick. The timings are relatively similar (mostly with Life() timings) and the difference is small enough that nobody will notice. It also helps that repeatedly stunning a slime no longer has a big chance of immediately wearing off because a previous timing was wearing off.
Slimes should no longer be included in the global list of things ghost can hear, just like simple_animals.
Fixed emotes so that slimes can actually do most of their emotes. Previously it checked if the slime was a monkey. This means the slimes should now actually do more emotes over time instead of just "swaying dizzily".
Fixed the "mobs shouldn't play their emotes when no one is near" mechanic even more. It no longer plays emotes even when the type is overridden.
Added a client check before trying to send a to_chat to a mob for a failed emote.
The pronoun proc will now respect neuter/plural genders by removing "%s" from any emote that has it, and will also work for every living mob instead of just humans.
Robots now have a new surrender text.
:cl:
bugfix: Silicons will now properly play hitsounds when hit.
bugfix: Fixed a bug where critical hits would not affect the likelihood of getting slimes off of players by using items.
bugfix: Slightly reworked how slime stunning works, and in the process fixed a bug where repeatedly stunning a slime would be less effective than intended because the previous stun's "remove the slime's stun" timer cancelled subsequent stuns too early.
bugfix: Slimes should no longer be globally audible to observers, just like regular mindless creatures, while someone is near them.
bugfix: Fixed a 7-year-old bug where certain slime-exclusive emotes checked if the slime was a monkey. Slimes can now also bounce, jiggle, light up for a bit and vibrate rather than just sway dizzily around.
bugfix: Certain pets such as Ian, Lisa, Poly, Sasha etc. will no longer spam deadchat with their actions.
Fixes #36752 Attacking silicons now properly plays hitsounds. Cleaned up item_attack a little. The slime item attack code is now its own code in the slime code (and has been slightly tweaked so that it isn't so long, with some minimal gameplay changes). Moved the mob attack code into attacked_by, which has been turned into a living proc instead of just a carbon proc. Silicons make use of their own variant of this proc in order to play hitsounds because hitsounds were only played in the carbon proc. Also fixed a bug where critical damage did not apply to slimes for the purpose of how strong the weapon has to be in order to get rid of them. Slime code has been refactored a little; removed some sleep() and spawn() instances where SStun would wear off afterwards and instead turned SStun into a variable that ticks down every tick. The timings are relatively similar (mostly with Life() timings) and the difference is small enough that nobody will notice. It also helps that repeatedly stunning a slime no longer has a big chance of immediately wearing off because a previous timing was wearing off. Slimes should no longer be included in the global list of things ghost can hear, just like simple_animals. Fixed emotes so that slimes can actually do most of their emotes. Previously it checked if the slime was a monkey. This means the slimes should now actually do more emotes over time instead of just "swaying dizzily". Fixed the "mobs shouldn't play their emotes when no one is near" mechanic even more. It no longer plays emotes even when the type is overridden. Added a client check before trying to send a to_chat to a mob for a failed emote. The pronoun proc will now respect neuter/plural genders by removing "%s" from any emote that has it, and will also work for every living mob instead of just humans. Robots now have a new surrender text.
:cl: