diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index af30aa6e33f..8166467ded4 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -516,3 +516,16 @@ description = "I didn't want to believe it, but there are people out there that are genuinely evil." mood_change = -4 timeout = 1 MINUTES + +/datum/mood_event/smoke_in_face + description = "Cigarette smoke is disgusting." + mood_change = -3 + timeout = 30 SECONDS + +/datum/mood_event/smoke_in_face/add_effects(param) + if(HAS_TRAIT(owner, TRAIT_ANOSMIA)) + description = "Cigarette smoke is unpleasant." + mood_change = -1 + if(HAS_TRAIT(owner, TRAIT_SMOKER)) + description = "Blowing smoke in my face, really?" + mood_change = 0 diff --git a/code/game/objects/items/cigarettes.dm b/code/game/objects/items/cigarettes.dm index 1acf813b669..7af2171125e 100644 --- a/code/game/objects/items/cigarettes.dm +++ b/code/game/objects/items/cigarettes.dm @@ -449,10 +449,41 @@ CIGARETTE PACKETS ARE IN FANCY.DM QDEL_NULL(mob_smoke) /obj/item/cigarette/proc/long_exhale(mob/living/carbon/smoker) - smoker.visible_message( - span_notice("[smoker] exhales a large cloud of smoke from [src]."), - span_notice("You exhale a large cloud of smoke from [src]."), - ) + // Find a mob to blow smoke at + var/mob/living/guy_infront + for(var/mob/living/guy in get_step(smoker, smoker.dir)) + // one of you has to get on the other's level + if(guy.body_position != smoker.body_position) + continue + // ensures we're face to face + if(!(REVERSE_DIR(guy.dir) & smoker.dir)) + continue + guy_infront = guy + // in case we get a living first, we wanna prioritize humans + if(ishuman(guy_infront)) + break + + if(isnull(guy_infront)) + smoker.visible_message( + span_notice("[smoker] exhales a large cloud of smoke from [src]."), + span_notice("You exhale a large cloud of smoke from [src]."), + ) + + else if(ishuman(guy_infront) && guy_infront.get_bodypart(BODY_ZONE_HEAD) && !guy_infront.is_pepper_proof()) + guy_infront.visible_message( + span_notice("[smoker] exhales a large cloud of smoke from [src] directly at [guy_infront]'s face!"), + span_notice("You exhale a large cloud of smoke from [src] directly at [guy_infront]'s face."), + ignored_mobs = guy_infront, + ) + to_chat(guy_infront, span_warning("You get a face full of smoke from [smoker]'s [name]!")) + smoke_in_face(guy_infront) + + else + guy_infront.visible_message( + span_notice("[smoker] exhales a large cloud of smoke from [src] at [guy_infront]."), + span_notice("You exhale a large cloud of smoke from [src] at [guy_infront]."), + ) + if(!isturf(smoker.loc)) return @@ -460,6 +491,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM update_particle_position(big_smoke, smoker.dir) QDEL_IN(big_smoke, big_smoke.particles.lifespan) +/// Called when a mob gets smoke blown in their face. +/obj/item/cigarette/proc/smoke_in_face(mob/living/getting_smoked) + getting_smoked.add_mood_event("smoke_bm", /datum/mood_event/smoke_in_face) + if(prob(20) && !HAS_TRAIT(getting_smoked, TRAIT_SMOKER) && !HAS_TRAIT(getting_smoked, TRAIT_ANOSMIA)) + getting_smoked.emote("cough") + /// Handles processing the reagents in the cigarette. /obj/item/cigarette/proc/handle_reagents(seconds_per_tick) if(!reagents.total_volume) @@ -608,6 +645,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM lung_harm = 1.5 list_reagents = list(/datum/reagent/drug/nicotine = 10, /datum/reagent/medicine/omnizine = 15) +/obj/item/cigarette/syndicate/smoke_in_face(mob/living/getting_smoked) + . = ..() + getting_smoked.adjust_eye_blur(6 SECONDS) + getting_smoked.adjust_temp_blindness(2 SECONDS) + /obj/item/cigarette/shadyjims desc = "A Shady Jim's Super Slims cigarette." lung_harm = 1.5