[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>
This commit is contained in:
SkyratBot
2021-01-22 18:00:01 +00:00
committed by GitHub
co-authored by Ryll Ryll
parent be4b552155
commit d291953ca6
7 changed files with 122 additions and 3 deletions
+1 -1
View File
@@ -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
+2
View File
@@ -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
@@ -295,3 +295,13 @@
description = "<span class='warning'>I really don't like when people touch me.</span>\n"
mood_change = -5
timeout = 4 MINUTES
/datum/mood_event/noogie
description = "<span class='warning'>Ow! This is like space high school all over again...</span>\n"
mood_change = -2
timeout = 1 MINUTES
/datum/mood_event/noogie_harsh
description = "<span class='warning'>OW!! That was even worse than a regular noogie!</span>\n"
mood_change = -4
timeout = 1 MINUTES
+91
View File
@@ -847,6 +847,97 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
"<span class='notice'>You slap [M]!</span>",\
"<span class='hear'>You hear a slap.</span>")
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, "<span class='warning'>You don't think you can give this a noogie!</span>")
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, "<span class='warning'>You can't noogie [target], [target.p_they()] [target.p_have()] no skin on [target.p_their()] head!</span>")
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("<span class='danger'>[user] begins giving [target] a [message_others]!</span>", "<span class='warning'>You start giving [target] a [message_others]!</span>", vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=target)
to_chat(target, "<span class='userdanger'>[user] starts giving you a [message_target]!</span>")
if(!do_after(user, 1.5 SECONDS, target))
to_chat(user, "<span class='warning'>You fail to give [target] a noogie!</span>")
to_chat(target, "<span class='danger'>[user] fails to give you a noogie!</span>")
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, "<span class='warning'>You're too tired to continue giving [target] a noogie!</span>")
to_chat(target, "<span class='danger'>[user] is too tired to continue giving you a noogie!</span>")
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("<span class='danger'>[user] continues noogie'ing [target]!</span>", "<span class='warning'>You continue giving [target] a noogie!</span>", vision_distance=COMBAT_MESSAGE_RANGE, ignored_mobs=target)
to_chat(target, "<span class='userdanger'>[user] continues giving you a noogie!</span>")
if(!do_after(user, 1 SECONDS + (iteration * 2), target))
to_chat(user, "<span class='warning'>You fail to give [target] a noogie!</span>")
to_chat(target, "<span class='danger'>[user] fails to give you a noogie!</span>")
return
iteration++
noogie_loop(user, target, iteration)
/obj/item/proc/can_trigger_gun(mob/living/user)
if(!user.can_use_guns(src))
return FALSE
+16
View File
@@ -129,3 +129,19 @@
qdel(N)
to_chat(user, "<span class='warning'>You're incapable of slapping in your current state.</span>")
/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, "<span class='notice'>You ready your noogie'ing hand.</span>")
else
qdel(noogie)
to_chat(user, "<span class='warning'>You're incapable of noogie'ing in your current state.</span>")
@@ -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
@@ -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"