mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 22:19:30 +01:00
Visualizes blushing on characters after using *blush or when they're drunk (#66321)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 96 KiB After Width: | Height: | Size: 96 KiB |
Reference in New Issue
Block a user