Files
a590870d00 Monke Business - Ports monkey AI from TG (#31067)
* Monke Mode

* Punch

* Some comment stuff

* Linters, excess

* Linters

* Emote stuff

* Pause monkey AI during do afters

* Small improvements

* Oops

* Fixes monkeys trying to drink forever from a glass

* Knockdowns and stamcrit fixes

* Removes eating/drinking from Pun Pun

* Monkey controller improvement, bug fix

* Fixes monkey item giving

* Fixes brain swaps

* Fixes

* Update code/datums/ai/monkey/monkey_controller.dm

Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>

* Addresses code review

* Oops

* Oops round 2

* Fixes monkeys staying in trip mode when evolved

---------

Signed-off-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com>
Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
2025-12-26 22:44:52 +00:00

38 lines
1.1 KiB
Plaintext

/datum/idle_behavior/idle_monkey
/// Emotes that will be played commonly during idle behavior.
var/list/common_emotes = list(
"screech",
"roar",
)
/// Emotes that will be played rarely during idle behavior.
var/list/rare_emotes = list(
"scratch",
"jump",
"roll",
"tail",
)
/datum/idle_behavior/idle_monkey/perform_idle_behavior(seconds_per_tick, datum/ai_controller/controller)
. = ..()
var/mob/living/living_pawn = controller.pawn
if(SPT_PROB(25, seconds_per_tick) && (living_pawn.mobility_flags & MOBILITY_MOVE) && isturf(living_pawn.loc) && !living_pawn.pulledby)
var/move_dir = pick(GLOB.alldirs)
living_pawn.Move(get_step(living_pawn, move_dir), move_dir)
else if(SPT_PROB(5, seconds_per_tick))
INVOKE_ASYNC(living_pawn, TYPE_PROC_REF(/mob, emote), pick(common_emotes))
else if(SPT_PROB(1, seconds_per_tick))
INVOKE_ASYNC(living_pawn, TYPE_PROC_REF(/mob, emote), pick(rare_emotes))
/datum/idle_behavior/idle_monkey/pun_pun
common_emotes = list(
"tunesing",
"dance",
"bow",
)
rare_emotes = list(
"clear",
"sign",
"tail",
)