Admin verb to apply mob random speech behaviour (#89382)

## About The Pull Request

Separate verb and PR from #89375 because this is something you'd apply
on top of a mob with existing behaviour, or one you've used the other
verb on.
This will probably conflict with my other PR but that's my problem.

This adds a shortcut for making mobs say/emote stuff randomly on a timer
from a list of things you have specified.
Doing this via VV is possible but sufficiently complicated that I don't
think anyone would ever bother.
As with the other PR you can optionally do this to mobs who already have
a client if you want them to randomly burp every so often or something.

I briefly flirted with the idea of replacing all
`/datum/ai_planning_subtree/random_speech` subtypes with blackboard ones
but... I think probably actually we save some memory _and_ sanity by not
doing that.
A bunch of mobs on totally different typepaths use the `/insect` subtype
for instance, and I don't think it would be an improvement to paste the
same four vars into all of their blackboards.

## Why It's Good For The Game

This one is frankly more niche than the other PR probably but it is
plausibly useful if you are setting up some kind of VV creature.
This commit is contained in:
Jacquerel
2025-02-14 20:06:27 +00:00
committed by Roxy
parent dc06f271d3
commit d96f38b044
5 changed files with 115 additions and 1 deletions
@@ -34,6 +34,9 @@
var/total_choices_length = audible_emotes_length + non_audible_emotes_length + speak_lines_length
if (total_choices_length == 0)
return
var/random_number_in_range = rand(1, total_choices_length)
var/sound_to_play = length(sound) > 0 ? pick(sound) : null