From d291953ca6f28c859e67ee1152f8f0d4e04c6bef Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 22 Jan 2021 19:00:01 +0100 Subject: [PATCH] [MIRROR] Adds Noogies (Perfect for bullying Moths) (#2832) * Adds Noogies (Perfect for bullying Moths) (#56286) * i HATE mothblocks * Adds Noogies (Perfect for bullying Moths) Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> --- code/__DEFINES/DNA.dm | 2 +- code/__DEFINES/traits.dm | 2 + .../mood_events/generic_negative_events.dm | 10 ++ code/game/objects/items/weaponry.dm | 91 +++++++++++++++++++ code/modules/mob/living/carbon/emote.dm | 16 ++++ .../carbon/human/species_types/flypeople.dm | 2 +- .../carbon/human/species_types/mothmen.dm | 2 +- 7 files changed, 122 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 8e7d053366f..5ad465efac9 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -1,6 +1,6 @@ /*ALL DNA, SPECIES, AND GENETICS-RELATED DEFINES GO HERE*/ -#define CHECK_DNA_AND_SPECIES(C) if((!(C.dna)) || (!(C.dna.species))) return +#define CHECK_DNA_AND_SPECIES(C) if(!(C.dna?.species)) return //Defines copying names of mutations in all cases, make sure to change this if you change mutation's type #define HULK /datum/mutation/human/hulk diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index a76320a7a10..2b14310fd15 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -239,6 +239,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_CANT_RIDE "cant_ride" #define TRAIT_BLOODY_MESS "bloody_mess" //from heparin, makes open bleeding wounds rapidly spill more blood #define TRAIT_COAGULATING "coagulating" //from coagulant reagents, this doesn't affect the bleeding itself but does affect the bleed warning messages +/// The holder of this trait has antennae or whatever that hurt a ton when noogied +#define TRAIT_ANTENNAE "antennae" #define TRAIT_NOBLEED "nobleed" //This carbon doesn't bleed diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 5b2866ff039..c8c62372b1a 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -295,3 +295,13 @@ description = "I really don't like when people touch me.\n" mood_change = -5 timeout = 4 MINUTES + +/datum/mood_event/noogie + description = "Ow! This is like space high school all over again...\n" + mood_change = -2 + timeout = 1 MINUTES + +/datum/mood_event/noogie_harsh + description = "OW!! That was even worse than a regular noogie!\n" + mood_change = -4 + timeout = 1 MINUTES diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 0fbabb4bf9b..7be6dd9e7e0 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -847,6 +847,97 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 "You slap [M]!",\ "You hear a slap.") return + +/obj/item/noogie + name = "noogie" + desc = "Get someone in an aggressive grab then use this on them to ruin their day." + icon_state = "latexballon" + inhand_icon_state = "nothing" + force = 0 + throwforce = 0 + item_flags = DROPDEL | ABSTRACT | HAND_ITEM + +/obj/item/noogie/attack(mob/living/carbon/target, mob/living/carbon/human/user) + if(!istype(target)) + to_chat(user, "You don't think you can give this a noogie!") + return + + if(!(target?.get_bodypart(BODY_ZONE_HEAD)) || user.pulling != target || user.grab_state < GRAB_AGGRESSIVE || user.getStaminaLoss() > 80) + return FALSE + + var/obj/item/bodypart/head/the_head = target.get_bodypart(BODY_ZONE_HEAD) + if((target.get_biological_state() != BIO_FLESH_BONE && target.get_biological_state() != BIO_JUST_FLESH) || !the_head.is_organic_limb()) + to_chat(user, "You can't noogie [target], [target.p_they()] [target.p_have()] no skin on [target.p_their()] head!") + return + + // [user] gives [target] a [prefix_desc] noogie[affix_desc]! + var/brutal_noogie = FALSE // was it an extra hard noogie? + var/prefix_desc = "rough" + var/affix_desc = "" + var/affix_desc_target = "" + + if(HAS_TRAIT(target, TRAIT_ANTENNAE)) + prefix_desc = "violent" + affix_desc = "on [target.p_their()] sensitive antennae" + affix_desc_target = "on your highly sensitive antennae" + brutal_noogie = TRUE + if(user.dna?.check_mutation(HULK)) + prefix_desc = "sickeningly brutal" + brutal_noogie = TRUE + + var/message_others = "[prefix_desc] noogie[affix_desc]" + var/message_target = "[prefix_desc] noogie[affix_desc_target]" + + user.visible_message("[user] begins giving [target] a [message_others]!", "You start giving [target] a [message_others]!", vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=target) + to_chat(target, "[user] starts giving you a [message_target]!") + + if(!do_after(user, 1.5 SECONDS, target)) + to_chat(user, "You fail to give [target] a noogie!") + to_chat(target, "[user] fails to give you a noogie!") + return + + if(brutal_noogie) + SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "noogie_harsh", /datum/mood_event/noogie_harsh) + else + SEND_SIGNAL(target, COMSIG_ADD_MOOD_EVENT, "noogie", /datum/mood_event/noogie) + + noogie_loop(user, target, 0) + +/// The actual meat and bones of the noogie'ing +/obj/item/noogie/proc/noogie_loop(mob/living/carbon/human/user, mob/living/carbon/target, iteration) + if(!(target?.get_bodypart(BODY_ZONE_HEAD)) || user.pulling != target) + return FALSE + + if(user.getStaminaLoss() > 80) + to_chat(user, "You're too tired to continue giving [target] a noogie!") + to_chat(target, "[user] is too tired to continue giving you a noogie!") + return + + var/damage = rand(1, 5) + if(HAS_TRAIT(target, TRAIT_ANTENNAE)) + damage += rand(3,7) + if(user.dna?.check_mutation(HULK)) + damage += rand(3,7) + + if(damage >= 5) + target.emote("scream") + + target.apply_damage(damage, BRUTE, BODY_ZONE_HEAD) + user.adjustStaminaLoss(iteration + 5) + playsound(get_turf(user), pick('sound/effects/rustle1.ogg','sound/effects/rustle2.ogg','sound/effects/rustle3.ogg','sound/effects/rustle4.ogg','sound/effects/rustle5.ogg'), 50) + + if(prob(33)) + user.visible_message("[user] continues noogie'ing [target]!", "You continue giving [target] a noogie!", vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=target) + to_chat(target, "[user] continues giving you a noogie!") + + if(!do_after(user, 1 SECONDS + (iteration * 2), target)) + to_chat(user, "You fail to give [target] a noogie!") + to_chat(target, "[user] fails to give you a noogie!") + return + + iteration++ + noogie_loop(user, target, iteration) + /obj/item/proc/can_trigger_gun(mob/living/user) if(!user.can_use_guns(src)) return FALSE diff --git a/code/modules/mob/living/carbon/emote.dm b/code/modules/mob/living/carbon/emote.dm index fe9092e3b52..efe0053bb65 100644 --- a/code/modules/mob/living/carbon/emote.dm +++ b/code/modules/mob/living/carbon/emote.dm @@ -129,3 +129,19 @@ qdel(N) to_chat(user, "You're incapable of slapping in your current state.") +/datum/emote/living/carbon/noogie + key = "noogie" + key_third_person = "noogies" + hands_use_check = TRUE + +/datum/emote/living/carbon/noogie/run_emote(mob/user, params, type_override, intentional) + . = ..() + if(!.) + return + var/obj/item/noogie/noogie = new(user) + if(user.put_in_hands(noogie)) + to_chat(user, "You ready your noogie'ing hand.") + else + qdel(noogie) + to_chat(user, "You're incapable of noogie'ing in your current state.") + diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index c743fe85aa8..c94027b029a 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -2,7 +2,7 @@ name = "Flyperson" id = "fly" say_mod = "buzzes" - species_traits = list(NOEYESPRITES,HAS_FLESH,HAS_BONE) + species_traits = list(NOEYESPRITES,HAS_FLESH,HAS_BONE,TRAIT_ANTENNAE) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG meat = /obj/item/food/meat/slab/human/mutant/fly disliked_food = null diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index e3c56eef451..9f14f6791b3 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -3,7 +3,7 @@ id = "moth" say_mod = "flutters" default_color = "00FF00" - species_traits = list(LIPS, NOEYESPRITES, HAS_FLESH, HAS_BONE, HAS_MARKINGS) + species_traits = list(LIPS, NOEYESPRITES, HAS_FLESH, HAS_BONE, HAS_MARKINGS, TRAIT_ANTENNAE) inherent_biotypes = MOB_ORGANIC|MOB_HUMANOID|MOB_BUG mutant_bodyparts = list("moth_wings" = "Plain", "moth_antennae" = "Plain", "moth_markings" = "None") attack_verb = "slash"