Skip to content

Commit

Permalink
Merge pull request #105 from honkpocket/sing-emote
Browse files Browse the repository at this point in the history
Overlay Emotes
  • Loading branch information
carpotoxin authored Sep 27, 2024
2 parents a072f1c + bb01bcd commit b598102
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/modules/mob/living/living_say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list(
var/randomnote = pick("\u2669", "\u266A", "\u266B")
message = "[randomnote] [message] [randomnote]"
spans |= SPAN_SINGING
flick_overlay_static(mutable_appearance('modular_doppler/emotes/icons/mob_overlay.dmi', "sing", ABOVE_MOB_LAYER), 50) // DOPPLER STATION ADDITION - sing overlay

if(message_mods[WHISPER_MODE]) // whisper away
spans |= SPAN_ITALICS
Expand Down
74 changes: 74 additions & 0 deletions modular_doppler/emotes/code/overlay_emotes/overlay_emotes.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#define MOB_OVERLAY_FILE 'modular_doppler/emotes/icons/mob_overlay.dmi'

/// Overwrite
/datum/emote/living/sing_tune/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "sing", ABOVE_MOB_LAYER)
user.flick_overlay_static(overlay, 50)

/// Additions
/datum/emote/living/sweatdrop
key = "sweatdrop"
key_third_person = "sweatdrops"
cant_muffle = TRUE

/datum/emote/living/sweatdrop/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "sweatdrop", ABOVE_MOB_LAYER)
overlay.pixel_x = 10
overlay.pixel_y = 10
user.flick_overlay_static(overlay, 50)
playsound(get_turf(user), 'modular_doppler/emotes/sound/sweatdrop.ogg', 25, TRUE)

/datum/emote/living/exclaim
key = "exclaim"
key_third_person = "exclaims"
cant_muffle = TRUE

/datum/emote/living/exclaim/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "exclamation", ABOVE_MOB_LAYER)
overlay.pixel_x = 10
overlay.pixel_y = 28
user.flick_overlay_static(overlay, 50)
playsound(get_turf(user), 'sound/machines/chime.ogg', 25, TRUE)

/datum/emote/living/question
key = "question"
key_third_person = "questions"
cant_muffle = TRUE

/datum/emote/living/question/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "question", ABOVE_MOB_LAYER)
overlay.pixel_x = 10
overlay.pixel_y = 28
user.flick_overlay_static(overlay, 50)
playsound(get_turf(user), 'modular_doppler/emotes/sound/question.ogg', 25, TRUE)

/datum/emote/living/realize
key = "realize"
key_third_person = "realizes"
cant_muffle = TRUE

/datum/emote/living/realize/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "realize", ABOVE_MOB_LAYER)
overlay.pixel_y = 15
user.flick_overlay_static(overlay, 50)
playsound(get_turf(user), 'modular_doppler/emotes/sound/realize.ogg', 25, TRUE)

/datum/emote/living/annoyed
key = "annoyed"
key_third_person = "is annoyed"
cant_muffle = TRUE

/datum/emote/living/annoyed/run_emote(mob/living/user, params, type_override, intentional)
. = ..()
var/mutable_appearance/overlay = mutable_appearance(MOB_OVERLAY_FILE, "annoyed", ABOVE_MOB_LAYER)
overlay.pixel_x = 10
overlay.pixel_y = 10
user.flick_overlay_static(overlay, 50)
playsound(get_turf(user), 'modular_doppler/emotes/sound/annoyed.ogg', 25, TRUE)

#undef MOB_OVERLAY_FILE
Binary file added modular_doppler/emotes/icons/mob_overlay.dmi
Binary file not shown.
Binary file added modular_doppler/emotes/sound/annoyed.ogg
Binary file not shown.
Binary file added modular_doppler/emotes/sound/question.ogg
Binary file not shown.
Binary file added modular_doppler/emotes/sound/realize.ogg
Binary file not shown.
Binary file added modular_doppler/emotes/sound/sweatdrop.ogg
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6534,6 +6534,7 @@
#include "modular_doppler\emotes\code\added_emotes\animal_sounds.dm"
#include "modular_doppler\emotes\code\added_emotes\human_things.dm"
#include "modular_doppler\emotes\code\added_emotes\robot_sounds.dm"
#include "modular_doppler\emotes\code\overlay_emotes\overlay_emotes.dm"
#include "modular_doppler\enterprise_resource_planning\code\breasts.dm"
#include "modular_doppler\enterprise_resource_planning\code\erp_prefs.dm"
#include "modular_doppler\examinemore\code\examine_more.dm"
Expand Down

0 comments on commit b598102

Please sign in to comment.