you scope increase !

This commit is contained in:
ReoDaProtovali
2024-05-09 04:46:22 -05:00
parent e08d5bf94c
commit 01d528ef32
42 changed files with 480 additions and 178 deletions
+10 -10
View File
@@ -20,6 +20,9 @@
var/list/mob_type_blacklist_typecache //Types that are NOT allowed to use that emote
var/list/mob_type_ignore_stat_typecache
var/stat_allowed = CONSCIOUS
var/sound //Sound to play when emote is called
var/vary = FALSE
var/only_forced_audio = FALSE //can only code call this event instead of the player.
var/static/list/emote_list = list()
var/static/regex/stop_bad_mime = regex(@"says|exclaims|yells|asks")
@@ -60,6 +63,10 @@
user.log_message(msg, LOG_EMOTE)
msg = "<b>[user]</b> " + msg
var/tmp_sound = get_sound(user)
if(tmp_sound && (!only_forced_audio || !intentional))
playsound(user, tmp_sound, 50, vary)
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
@@ -72,6 +79,9 @@
else
user.visible_message(msg)
/datum/emote/proc/get_sound(mob/living/user)
return sound //by default just return this var.
/datum/emote/proc/replace_pronoun(mob/user, message)
if(findtext(message, "their"))
message = replacetext(message, "their", user.p_their())
@@ -136,13 +146,3 @@
var/mob/living/L = user
if(HAS_TRAIT(L, TRAIT_EMOTEMUTE))
return FALSE
/datum/emote/sound
var/sound //Sound to play when emote is called
var/vary = FALSE //used for the honk borg emote
mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon)
/datum/emote/sound/run_emote(mob/user, params)
. = ..()
if(.)
playsound(user.loc, sound, 50, vary)