diff --git a/code/__DEFINES/colors.dm b/code/__DEFINES/colors.dm index 7d7325e6007..261ff54fee5 100644 --- a/code/__DEFINES/colors.dm +++ b/code/__DEFINES/colors.dm @@ -68,6 +68,7 @@ #define COLOR_PINK "#FFC0CB" #define COLOR_LIGHT_PINK "#ff3cc8" #define COLOR_MOSTLY_PURE_PINK "#E4005B" +#define COLOR_BLUSH_PINK "#DE5D83" #define COLOR_MAGENTA "#FF00FF" #define COLOR_STRONG_MAGENTA "#B800B8" #define COLOR_PURPLE "#800080" diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index b8939c26b94..c233fdd87a8 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -365,6 +365,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_DONT_WRITE_MEMORY "dont_write_memory" /// This mob can be painted with the spraycan #define TRAIT_SPRAY_PAINTABLE "spray_paintable" +/// This person is blushing +#define TRAIT_BLUSHING "blushing" #define TRAIT_NOBLEED "nobleed" //This carbon doesn't bleed /// This atom can ignore the "is on a turf" check for simple AI datum attacks, allowing them to attack from bags or lockers as long as any other conditions are met diff --git a/code/datums/mood_events/drink_events.dm b/code/datums/mood_events/drink_events.dm index 513b5764387..8e168707601 100644 --- a/code/datums/mood_events/drink_events.dm +++ b/code/datums/mood_events/drink_events.dm @@ -2,6 +2,16 @@ mood_change = 3 description = "Everything just feels better after a drink or two." +/datum/mood_event/drunk/add_effects(param) + // Display blush visual + ADD_TRAIT(owner, TRAIT_BLUSHING, "[type]") + owner.update_body() + +/datum/mood_event/drunk/remove_effects() + // Stop displaying blush visual + REMOVE_TRAIT(owner, TRAIT_BLUSHING, "[type]") + owner.update_body() + /datum/mood_event/quality_nice description = "That drink wasn't bad at all." mood_change = 2 diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 1797549ea98..3d1a283631f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -581,6 +581,12 @@ GLOBAL_LIST_EMPTY(features_by_species) eye_overlay.color = species_human.eye_color standing += eye_overlay + // blush + if (HAS_TRAIT(species_human, TRAIT_BLUSHING)) // Caused by either the *blush emote or the "drunk" mood event + var/mutable_appearance/blush_overlay = mutable_appearance('icons/mob/human_face.dmi', "blush", -BODY_ADJ_LAYER) //should appear behind the eyes + blush_overlay.color = COLOR_BLUSH_PINK + standing += blush_overlay + // organic body markings if(HAS_MARKINGS in species_traits) var/obj/item/bodypart/chest/chest = species_human.get_bodypart(BODY_ZONE_CHEST) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 89e9aaa8a14..942659f79a2 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -4,10 +4,35 @@ mob_type_allowed_typecache = /mob/living mob_type_blacklist_typecache = list(/mob/living/brain) +/// The time it takes for the blush visual to be removed +#define BLUSH_DURATION 5.2 SECONDS + /datum/emote/living/blush key = "blush" key_third_person = "blushes" message = "blushes." + /// Timer for the blush visual to wear off + var/blush_timer = TIMER_ID_NULL + +/datum/emote/living/blush/run_emote(mob/user, params, type_override, intentional) + . = ..() + if(. && isliving(user)) + var/mob/living/living_user = user + ADD_TRAIT(living_user, TRAIT_BLUSHING, "[type]") + living_user.update_body() + + // Use a timer to remove the blush effect after the BLUSH_DURATION has passed + var/list/key_emotes = GLOB.emote_list["blush"] + for(var/datum/emote/living/blush/living_emote in key_emotes) + // The existing timer restarts if it's already running + blush_timer = addtimer(CALLBACK(living_emote, .proc/end_blush, living_user), BLUSH_DURATION, TIMER_UNIQUE | TIMER_OVERRIDE) + +/datum/emote/living/blush/proc/end_blush(mob/living/living_user) + if(!QDELETED(living_user)) + REMOVE_TRAIT(living_user, TRAIT_BLUSHING, "[type]") + living_user.update_body() + +#undef BLUSH_DURATION /datum/emote/living/bow key = "bow" diff --git a/icons/mob/human_face.dmi b/icons/mob/human_face.dmi index 3249e8e4470..ce29fc9c662 100644 Binary files a/icons/mob/human_face.dmi and b/icons/mob/human_face.dmi differ