Adds new mob helper for zones, get_random_valid_zone() (#69226)
Adds new mob helper for zones, get_random_valid_zone() (#69226)



ran_zone() returns all possible zones a mob CAN have, even if they've already lost the limb.

This can result in attempting to target bodyparts that do not exist, and requires additional sanity checking (and in most cases, coders typically just default to targeting the chest which is boring.)

This adds a helper that will now randomly pick from the zones/bodyparts that the mob DOES have, and return one of them. This'll allow a bit more dynamic functionality since you won't always fall back on the chest as a target.

cl ShizCalev
qol: Added a new mob helper complementary to ran_zone() called get_random_valid_zone(), which can only return zones/bodyparts that a mob DOES have.
/cl

tgstation/tgstation,Bawhoppen/-tg-station,ShizCalev/tgstation,ShizCalev/tgstation,Bawhoppen/-tg-station,tgstation/tgstation,ShizCalev/tgstation,Bawhoppen/-tg-station,tgstation/tgstation,MicroWorldwide/SS13-TG-station,ShizCalev/tgstation,tgstation/tgstation,tgstation/tgstation,ShizCalev/tgstation,MicroWorldwide/SS13-TG-station,tgstation/tgstation,Bawhoppen/-tg-station,Bawhoppen/-tg-station,tgstation/tgstation,tgstation/tgstation,MicroWorldwide/SS13-TG-station,Bawhoppen/-tg-station,ShizCalev/tgstation,MicroWorldwide/SS13-TG-station,MicroWorldwide/SS13-TG-station,ShizCalev/tgstation,Bawhoppen/-tg-station,Bawhoppen/-tg-station,MicroWorldwide/SS13-TG-station,MicroWorldwide/SS13-TG-station,MicroWorldwide/SS13-TG-station,ShizCalev/tgstation