From bf87bf6df256e5a4fd0ae2e4629fc70b5247e5b9 Mon Sep 17 00:00:00 2001 From: SmArtKar <44720187+SmArtKar@users.noreply.github.com> Date: Thu, 13 Feb 2025 09:04:24 +0100 Subject: [PATCH] Minor kiss code refactor/unification (#89400) ## About The Pull Request Merged two parts (garlic breath and chef's love/syndie kisses, death's kisses and ink spit) of kiss code, which prevents former from overriding latter. Countering syndicate lipstick by throwing mime berets at its user is pretty funny, but also extremely weird (and makes coders angry at disjointed code) Closes #89395 ## Changelog :cl: fix: Chef's love and french kissing no longer can stop laser projectiles of syndiekissers. code: Unified two parts of kiss code. /:cl: --- code/game/objects/items/hand_items.dm | 18 ++++++++++++------ code/modules/mob/living/emote.dm | 16 +++++++++++----- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/code/game/objects/items/hand_items.dm b/code/game/objects/items/hand_items.dm index 1a22fed70db..5ebb637449f 100644 --- a/code/game/objects/items/hand_items.dm +++ b/code/game/objects/items/hand_items.dm @@ -494,12 +494,6 @@ return ranged_interact_with_atom(interacting_with, user, modifiers) /obj/item/hand_item/kisser/ranged_interact_with_atom(atom/target, mob/living/user, list/modifiers) - if(HAS_TRAIT(user, TRAIT_GARLIC_BREATH)) - kiss_type = /obj/projectile/kiss/french - - if(HAS_TRAIT(user, TRAIT_CHEF_KISS)) - kiss_type = /obj/projectile/kiss/chef - var/obj/projectile/blown_kiss = new kiss_type(get_turf(user)) user.visible_message("[user] blows \a [blown_kiss] at [target]!", span_notice("You blow \a [blown_kiss] at [target]!")) @@ -559,6 +553,18 @@ color = COLOR_ALMOST_BLACK kiss_type = /obj/projectile/kiss/ink +/obj/item/hand_item/kisser/french + name = "french kiss" + desc = "You really should brush your teeth." + color = COLOR_GRAY + kiss_type = /obj/projectile/kiss/french + +/obj/item/hand_item/kisser/chef + name = "chef's kiss" + desc = "The secret ingridient is love. And opium, but mostly love." + color = COLOR_LIGHT_PINK + kiss_type = /obj/projectile/kiss/chef + /obj/projectile/kiss name = "kiss" icon = 'icons/mob/simple/animal.dmi' diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 6827d20c92c..d9df210f11e 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -256,6 +256,12 @@ . = ..() var/kiss_type = /obj/item/hand_item/kisser + if(HAS_TRAIT(user, TRAIT_GARLIC_BREATH)) + kiss_type = /obj/item/hand_item/kisser/french + + if(HAS_TRAIT(user, TRAIT_CHEF_KISS)) + kiss_type = /obj/item/hand_item/kisser/chef + if(HAS_TRAIT(user, TRAIT_SYNDIE_KISS)) kiss_type = /obj/item/hand_item/kisser/syndie @@ -265,17 +271,17 @@ var/datum/action/cooldown/ink_spit/ink_action = locate() in user.actions if(ink_action?.IsAvailable()) kiss_type = /obj/item/hand_item/kisser/ink - ink_action.StartCooldown() else ink_action = null var/obj/item/kiss_blower = new kiss_type(user) if(user.put_in_hands(kiss_blower)) to_chat(user, span_notice("You ready your kiss-blowing hand.")) - else - qdel(kiss_blower) - to_chat(user, span_warning("You're incapable of blowing a kiss in your current state.")) - ink_action?.ResetCooldown() + ink_action?.StartCooldown() + return + + qdel(kiss_blower) + to_chat(user, span_warning("You're incapable of blowing a kiss in your current state.")) /datum/emote/living/laugh key = "laugh"