mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
* 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>
27 lines
1015 B
Plaintext
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
|