mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
reworks emote sound code & adds screaming (Which only works if the code forces it. *scream wont make a sound) (#42216)
* done * adds moth scream * Update code/datums/emotes.dm Co-Authored-By: Qustinnus <Floydje123@hotmail.com> * Update code/datums/emotes.dm Co-Authored-By: Qustinnus <Floydje123@hotmail.com> * Update code/datums/emotes.dm Co-Authored-By: Qustinnus <Floydje123@hotmail.com> * Update code/datums/emotes.dm Co-Authored-By: Qustinnus <Floydje123@hotmail.com> * 1 * fixed * fixed * wew
This commit is contained in:
+12
-10
@@ -20,8 +20,13 @@
|
||||
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 //used for the honk borg emote
|
||||
var/only_forced_audio = FALSE //can only code call this event instead of the player.
|
||||
|
||||
var/static/list/emote_list = list()
|
||||
|
||||
|
||||
/datum/emote/New()
|
||||
if(key_third_person)
|
||||
emote_list[key_third_person] = src
|
||||
@@ -59,6 +64,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
|
||||
@@ -71,6 +80,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())
|
||||
@@ -138,13 +150,3 @@
|
||||
var/mob/living/L = user
|
||||
if(L.has_trait(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)
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
message_alien = "hisses."
|
||||
message_larva = "hisses softly."
|
||||
|
||||
/datum/emote/living/alien/hiss/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && isalienadult(user))
|
||||
playsound(user.loc, "hiss", 40, 1, 1)
|
||||
/datum/emote/living/alien/hiss/get_sound(mob/living/user)
|
||||
if(isalienadult(user))
|
||||
return "hiss"
|
||||
|
||||
/datum/emote/living/alien/roar
|
||||
key = "roar"
|
||||
@@ -23,8 +22,8 @@
|
||||
message_alien = "roars."
|
||||
message_larva = "softly roars."
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
vary = TRUE
|
||||
|
||||
/datum/emote/living/alien/roar/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && isalienadult(user))
|
||||
playsound(user.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
|
||||
/datum/emote/living/alien/roar/get_sound(mob/living/user)
|
||||
if(isalienadult(user))
|
||||
return 'sound/voice/hiss5.ogg'
|
||||
|
||||
@@ -22,19 +22,17 @@
|
||||
muzzle_ignore = TRUE
|
||||
restraint_check = TRUE
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
vary = TRUE
|
||||
|
||||
/datum/emote/living/carbon/clap/run_emote(mob/living/user, params)
|
||||
. = ..()
|
||||
if (.)
|
||||
if (ishuman(user))
|
||||
// Need hands to clap
|
||||
if (!user.get_bodypart(BODY_ZONE_L_ARM) || !user.get_bodypart(BODY_ZONE_R_ARM))
|
||||
return
|
||||
var/clap = pick('sound/misc/clap1.ogg',
|
||||
'sound/misc/clap2.ogg',
|
||||
'sound/misc/clap3.ogg',
|
||||
'sound/misc/clap4.ogg')
|
||||
playsound(user, clap, 50, 1, -1)
|
||||
/datum/emote/living/carbon/clap/get_sound(mob/living/user)
|
||||
if(ishuman(user))
|
||||
if(!user.get_bodypart(BODY_ZONE_L_ARM) || !user.get_bodypart(BODY_ZONE_R_ARM))
|
||||
return
|
||||
else
|
||||
return pick('sound/misc/clap1.ogg',
|
||||
'sound/misc/clap2.ogg',
|
||||
'sound/misc/clap3.ogg',
|
||||
'sound/misc/clap4.ogg')
|
||||
|
||||
/datum/emote/living/carbon/gnarl
|
||||
key = "gnarl"
|
||||
|
||||
@@ -45,6 +45,31 @@
|
||||
message = "mumbles!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/human/scream
|
||||
key = "scream"
|
||||
key_third_person = "screams"
|
||||
message = "screams!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
only_forced_audio = TRUE
|
||||
vary = TRUE
|
||||
|
||||
/datum/emote/living/carbon/human/scream/get_sound(mob/living/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.mind?.miming)
|
||||
return
|
||||
if(ishumanbasic(H) || iscatperson(H))
|
||||
if(user.gender == FEMALE)
|
||||
return pick('sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg')
|
||||
else
|
||||
if(prob(1))
|
||||
return 'sound/voice/human/wilhelm_scream.ogg'
|
||||
return pick('sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg')
|
||||
else if(ismoth(H))
|
||||
return 'sound/voice/moth/scream_moth.ogg'
|
||||
|
||||
|
||||
/datum/emote/living/carbon/human/pale
|
||||
key = "pale"
|
||||
message = "goes pale for a second."
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
message = "laughs."
|
||||
message_mime = "laughs silently!"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
vary = TRUE
|
||||
|
||||
/datum/emote/living/laugh/can_run_emote(mob/living/user, status_check = TRUE)
|
||||
. = ..()
|
||||
@@ -211,15 +212,14 @@
|
||||
var/mob/living/carbon/C = user
|
||||
return !C.silent
|
||||
|
||||
/datum/emote/living/laugh/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(. && ishuman(user))
|
||||
/datum/emote/living/laugh/get_sound(mob/living/user)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna.species.id == "human" && (!H.mind || !H.mind.miming))
|
||||
if(user.gender == FEMALE)
|
||||
playsound(H, 'sound/voice/human/womanlaugh.ogg', 50, 1)
|
||||
return 'sound/voice/human/womanlaugh.ogg'
|
||||
else
|
||||
playsound(H, pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg'), 50, 1)
|
||||
return pick('sound/voice/human/manlaugh1.ogg', 'sound/voice/human/manlaugh2.ogg')
|
||||
|
||||
/datum/emote/living/look
|
||||
key = "look"
|
||||
@@ -475,12 +475,13 @@
|
||||
|
||||
to_chat(user, message)
|
||||
|
||||
/datum/emote/sound/beep
|
||||
/datum/emote/beep
|
||||
key = "beep"
|
||||
key_third_person = "beeps"
|
||||
message = "beeps."
|
||||
message_param = "beeps at %t."
|
||||
sound = 'sound/machines/twobeep.ogg'
|
||||
mob_type_allowed_typecache = list(/mob/living/brain, /mob/living/silicon)
|
||||
|
||||
/datum/emote/living/circle
|
||||
key = "circle"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
mob_type_allowed_typecache = list(/mob/living/silicon)
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/sound/silicon
|
||||
/datum/emote/silicon
|
||||
mob_type_allowed_typecache = list(/mob/living/silicon)
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
@@ -11,50 +11,50 @@
|
||||
key_third_person = "boops"
|
||||
message = "boops."
|
||||
|
||||
/datum/emote/sound/silicon/buzz
|
||||
/datum/emote/silicon/buzz
|
||||
key = "buzz"
|
||||
key_third_person = "buzzes"
|
||||
message = "buzzes."
|
||||
message_param = "buzzes at %t."
|
||||
sound = 'sound/machines/buzz-sigh.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/buzz2
|
||||
/datum/emote/silicon/buzz2
|
||||
key = "buzz2"
|
||||
message = "buzzes twice."
|
||||
sound = 'sound/machines/buzz-two.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/chime
|
||||
/datum/emote/silicon/chime
|
||||
key = "chime"
|
||||
key_third_person = "chimes"
|
||||
message = "chimes."
|
||||
sound = 'sound/machines/chime.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/honk
|
||||
/datum/emote/silicon/honk
|
||||
key = "honk"
|
||||
key_third_person = "honks"
|
||||
message = "honks."
|
||||
vary = TRUE
|
||||
sound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/ping
|
||||
/datum/emote/silicon/ping
|
||||
key = "ping"
|
||||
key_third_person = "pings"
|
||||
message = "pings."
|
||||
message_param = "pings at %t."
|
||||
sound = 'sound/machines/ping.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/chime
|
||||
/datum/emote/silicon/chime
|
||||
key = "chime"
|
||||
key_third_person = "chimes"
|
||||
message = "chimes."
|
||||
sound = 'sound/machines/chime.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/sad
|
||||
/datum/emote/silicon/sad
|
||||
key = "sad"
|
||||
message = "plays a sad trombone..."
|
||||
sound = 'sound/misc/sadtrombone.ogg'
|
||||
|
||||
/datum/emote/sound/silicon/warn
|
||||
/datum/emote/silicon/warn
|
||||
key = "warn"
|
||||
message = "blares an alarm!"
|
||||
sound = 'sound/machines/warning-buzzer.ogg'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/datum/emote/sound/gorilla
|
||||
/datum/emote/gorilla
|
||||
mob_type_allowed_typecache = /mob/living/simple_animal/hostile/gorilla
|
||||
mob_type_blacklist_typecache = list()
|
||||
|
||||
/datum/emote/sound/gorilla/ooga
|
||||
/datum/emote/gorilla/ooga
|
||||
key = "ooga"
|
||||
key_third_person = "oogas"
|
||||
message = "oogas."
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user