Files
Paradise/code/datums/ai/generic/generic_behaviors.dm
T
c820499f90 Basic mobs core implementation and cow migration. (#28667)
* Basic mobs core implementation and cow migration.

* fix whitespace

* uncomfortable fix for null weirdness

* update updatepaths script number

* lewc review 1

* fix delta

* Update code/datums/ai/basic_mobs/basic_ai_behaviors/tipped_reaction.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

---------

Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
2025-04-05 11:35:42 +00:00

27 lines
1015 B
Plaintext

/datum/ai_behavior/perform_emote
/datum/ai_behavior/perform_emote/perform(seconds_per_tick, datum/ai_controller/controller, emote, speech_sound)
var/mob/living/living_pawn = controller.pawn
if(!istype(living_pawn))
return AI_BEHAVIOR_INSTANT
if(emote in GLOB.emote_list)
living_pawn.emote(emote)
else
living_pawn.custom_emote(EMOTE_VISIBLE, emote)
if(speech_sound) // Only audible emotes will pass in a sound
playsound(living_pawn, speech_sound, 80, vary = TRUE, pressure_affected =TRUE, ignore_walls = FALSE)
return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_SUCCEEDED
/datum/ai_behavior/perform_speech
/datum/ai_behavior/perform_speech/perform(seconds_per_tick, datum/ai_controller/controller, speech, speech_sound, speech_verb)
. = ..()
var/mob/living/living_pawn = controller.pawn
if(!istype(living_pawn))
return AI_BEHAVIOR_INSTANT
living_pawn.say(speech, speech_verb)
if(speech_sound)
playsound(living_pawn, speech_sound, 80, vary = TRUE)
return AI_BEHAVIOR_INSTANT | AI_BEHAVIOR_SUCCEEDED