From d9580bdb3d39cb09e7958b9b2008831316444d97 Mon Sep 17 00:00:00 2001 From: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> Date: Thu, 10 Nov 2022 21:36:21 +0100 Subject: [PATCH] Fixes Some Parapen Issues (#15029) --- code/modules/mob/living/carbon/human/human.dm | 2 +- code/modules/paperwork/pen.dm | 112 +++++++++--------- .../Chemistry-Reagents-Medicine.dm | 11 +- .../Chemistry-Reagents-Toxins.dm | 11 +- html/changelogs/parapen_spam_fix.yml | 6 + 5 files changed, 72 insertions(+), 70 deletions(-) create mode 100644 html/changelogs/parapen_spam_fix.yml diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0eba3373352..125fb963ad3 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1570,7 +1570,7 @@ user.visible_message("[user] begins hunting for \the [src]'s injection port.") if(!. && error_msg && user) if(!fail_msg) - fail_msg = "There is no exposed flesh or thin material [target_zone == BP_HEAD ? "on their head" : "on their body"] to inject into." + fail_msg = "There is no exposed skin nor thin material on \the [affecting.loc]'s [target_zone] to inject into." to_chat(user, SPAN_ALERT("[fail_msg]")) /mob/living/carbon/human/proc/get_bp_coverage(var/bp) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 8556446a195..26e50e512ad 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -13,29 +13,31 @@ * Pens */ /obj/item/pen - desc = "An instrument for writing or drawing with ink. This one is in black, in a classic, grey casing. Stylish, classic and professional." - desc_info = {"This is an item for writing down your thoughts, on paper or elsewhere. The following special commands are available: -Pen and crayon commands -\[br\] : Creates a linebreak. -\[center\] - \[/center\] : Centers the text. -\[h1\] - \[/h1\] : Makes the text a first level heading. -\[h2\] - \[/h2\] : Makes the text a second level headin. -\[h3\] - \[/h3\] : Makes the text a third level heading. -\[b\] - \[/b\] : Makes the text bold. -\[i\] - \[/i\] : Makes the text italic. -\[u\] - \[/u\] : Makes the text underlined. -\[large\] - \[/large\] : Increases the size of the text. -\[redacted\] - \[/redacted\] : Covers the text in an unbreachable black box. -\[sign\] : Inserts a signature of your name in a foolproof way. -\[field\] : Inserts an invisible field which lets you start type from there. Useful for forms. -\[date\] : Inserts today's station date. -\[time\] : Inserts the current station time. -Pen exclusive commands -\[small\] - \[/small\] : Decreases the size of the text. -\[list\] - \[/list\] : A list. -\[*\] : A dot used for lists. -\[hr\] : Adds a horizontal rule."} name = "pen" + desc = "An instrument for writing or drawing. This one is in black." + desc_info = {"This is an item for writing down your thoughts, on paper or elsewhere. The following special commands are available: +
+ Pen and crayon commands + \[br\] : Creates a linebreak. + \[center\] - \[/center\] : Centers the text. + \[h1\] - \[/h1\] : Makes the text a first level heading. + \[h2\] - \[/h2\] : Makes the text a second level headin. + \[h3\] - \[/h3\] : Makes the text a third level heading. + \[b\] - \[/b\] : Makes the text bold. + \[i\] - \[/i\] : Makes the text italic. + \[u\] - \[/u\] : Makes the text underlined. + \[large\] - \[/large\] : Increases the size of the text. + \[redacted\] - \[/redacted\] : Covers the text in an unbreachable black box. + \[sign\] : Inserts a signature of your name in a foolproof way. + \[field\] : Inserts an invisible field which lets you start type from there. Useful for forms. + \[date\] : Inserts today's station date. + \[time\] : Inserts the current station time. +
+ Pen Exclusive Commands + \[small\] - \[/small\] : Decreases the size of the text. + \[list\] - \[/list\] : A list. + \[*\] : A dot used for lists. + \[hr\] : Adds a horizontal rule."} icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" item_state = "pen" @@ -45,10 +47,11 @@ Pen exclusive commands throw_speed = 7 throw_range = 15 matter = list(DEFAULT_WALL_MATERIAL = 10) - var/colour = "black" //what colour the ink is! drop_sound = 'sound/items/drop/accessory.ogg' pickup_sound = 'sound/items/pickup/accessory.ogg' - var/cursive = FALSE //done here so other pen variants can access cursive variable + + var/colour = "black" // Ink colour. + var/cursive = FALSE // Done here so other pen variants can access the cursive variable. /obj/item/pen/ispen() return TRUE @@ -117,16 +120,6 @@ Pen exclusive commands to_chat(user, "Changed color to '[colour].'") -/obj/item/pen/attack(mob/M as mob, mob/user as mob, var/target_zone) - if(!ismob(M)) - return - to_chat(user, "You stab [M] with \the [src].") -// to_chat(M, "\red You feel a tiny prick!" //That's a whole lot of meta!) - M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [name] by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [name] to stab [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (JMP)",ckey=key_name(user),ckey_target=key_name(M)) - return - /obj/item/pen/attack_self(var/mob/user) playsound(loc, 'sound/items/penclick.ogg', 50, 1) @@ -172,78 +165,79 @@ Pen exclusive commands icon_state = "pen_fountain-nbc" /* - * Reagent pens + * Reagent Pens */ - /obj/item/pen/reagent flags = OPENCONTAINER slot_flags = SLOT_BELT origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + /obj/item/pen/reagent/Initialize() . = ..() create_reagents(30) -/obj/item/pen/reagent/attack(mob/living/M as mob, mob/user as mob) - - if(!istype(M)) - return - +/obj/item/pen/reagent/attack(mob/living/M, mob/user) . = ..() - - if(M.can_inject(user,1)) + if(!ismob(M)) + return + if(M.can_inject(user, 1)) if(reagents.total_volume) if(M.reagents) var/contained_reagents = reagents.get_reagents() var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD) - admin_inject_log(user, M, src, contained_reagents, reagents.get_temperature(), trans) + to_chat(user, SPAN_ALERT("You stab \the [M] with \the [src], injecting all of its contents.")) // To the stabber. + to_chat(M, SPAN_WARNING("You feel a small pinch!")) // To the stabbed. + M.attack_log += text("\[[time_stamp()]\] Has been stabbed with [name] by [user.name] ([user.ckey])") + user.attack_log += text("\[[time_stamp()]\] Used the [name] to stab [M.name] ([M.ckey])") + msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (JMP)",ckey=key_name(user),ckey_target=key_name(M)) + admin_inject_log(user, M, src, contained_reagents, reagents.get_temperature(), trans) // Admin log. /* * Sleepy Pens */ /obj/item/pen/reagent/sleepy - desc = "It's a black ink pen with a sharp point and a carefully engraved \"Waffle Co.\"" + desc = "It's a black ink pen with a sharp point and a carefully engraved \"Sleepy Co.\"" origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) reagents_to_add = list(/decl/reagent/polysomnine = 22) - /* * Parapens */ /obj/item/pen/reagent/paralysis - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - reagents_to_add = list(/decl/reagent/toxin/dextrotoxin = 10) //~~5 minutes worth of Dextrotoxin icon_state = "pen_red" colour = "red" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + reagents_to_add = list(/decl/reagent/toxin/dextrotoxin = 10) // ~5 minutes worth of paralysis. Measured from falling over to getting up. /obj/item/pen/reagent/purge + icon_state = "pen_green" + colour = "green" origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) reagents_to_add = list(/decl/reagent/fluvectionem = 5) - icon_state = "pen_green" - colour = "green" /obj/item/pen/reagent/healing - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - reagents_to_add = list(/decl/reagent/tricordrazine = 10, /decl/reagent/dermaline = 5, /decl/reagent/bicaridine = 5) icon_state = "pen_green" colour = "green" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + reagents_to_add = list(/decl/reagent/tricordrazine = 10, /decl/reagent/dermaline = 5, /decl/reagent/bicaridine = 5) /obj/item/pen/reagent/pacifier - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - reagents_to_add = list(/decl/reagent/wulumunusha = 2, /decl/reagent/pacifier = 15, /decl/reagent/cryptobiolin = 10) icon_state = "pen_blue" colour = "blue" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + reagents_to_add = list(/decl/reagent/wulumunusha = 2, /decl/reagent/pacifier = 15, /decl/reagent/cryptobiolin = 10) /obj/item/pen/reagent/hyperzine - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - reagents_to_add = list(/decl/reagent/hyperzine = 10) icon_state = "pen_yellow" colour = "yellow" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + reagents_to_add = list(/decl/reagent/hyperzine = 10) /obj/item/pen/reagent/poison - origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) - reagents_to_add = list(/decl/reagent/toxin/cyanide = 1, /decl/reagent/lexorin = 20) icon_state = "pen_red" colour = "red" + origin_tech = list(TECH_MATERIAL = 2, TECH_ILLEGAL = 5) + reagents_to_add = list(/decl/reagent/toxin/cyanide = 1, /decl/reagent/lexorin = 20) /* * Chameleon pen @@ -251,7 +245,7 @@ Pen exclusive commands /obj/item/pen/chameleon var/signature = "" -/obj/item/pen/chameleon/attack_self(mob/user as mob) +/obj/item/pen/chameleon/attack_self(mob/user) signature = sanitize(input("Enter new signature. Leave blank for 'Anonymous'", "New Signature", signature)) /obj/item/pen/proc/get_signature(var/mob/user) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 6486fd33b86..c1fb5fc56d9 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -1316,6 +1316,9 @@ taste_description = "blood" specific_heat = 1 +/decl/reagent/sanasomnum/initial_effect(mob/living/carbon/M) + to_chat(M, SPAN_WARNING("Your limbs start to feel numb and weak, and your legs wobble as it becomes hard to stand!")) + /decl/reagent/sanasomnum/affect_chem_effect(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) . = ..() if(.) @@ -1341,10 +1344,7 @@ var/mob/living/carbon/human/H = M if(istype(H) && (H.species.flags & NO_SCAN)) return - if (!(CE_UNDEXTROUS in M.chem_effects)) - to_chat(M, SPAN_WARNING("Your limbs start to feel numb and weak, and your legs wobble as it becomes hard to stand...")) - M.confused = max(M.confused, 250) - M.eye_blurry = max(M.eye_blurry, 250) + M.add_chemical_effect(CE_UNDEXTROUS, 1) if(M.chem_doses[type] > 0.2) M.Weaken(10) if(M.chem_doses[type] > 5) @@ -1360,6 +1360,9 @@ if(E.status & TENDON_CUT && prob(10)) E.status &= ~TENDON_CUT +/decl/reagent/sanasomnum/final_effect(mob/living/carbon/M) + to_chat(M, SPAN_GOOD("You can feel sensation creeping back into your limbs!")) + /decl/reagent/verunol name = "Verunol Syrup" description = "A complex emetic medication that causes the patient to vomit due to gastric irritation and the stimulating of the vomit centres of the brain." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 2a3001cd164..fdc4b1299d0 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -797,21 +797,20 @@ strength = 0 taste_description = "danger" +/decl/reagent/toxin/dextrotoxin/initial_effect(mob/living/carbon/M) + to_chat(M, SPAN_WARNING("Your limbs start to feel numb and weak, and your legs wobble as it becomes hard to stand!")) + /decl/reagent/toxin/dextrotoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) ..() var/mob/living/carbon/human/H = M if(istype(H) && (H.species.flags & NO_SCAN)) return - if (!(CE_UNDEXTROUS in M.chem_effects)) - to_chat(M, SPAN_WARNING("Your limbs start to feel numb and weak, and your legs wobble as it becomes hard to stand...")) - M.confused = max(M.confused, 250) M.add_chemical_effect(CE_UNDEXTROUS, 1) if(M.chem_doses[type] > 0.2) M.Weaken(10) -/decl/reagent/toxin/dextrotoxin/final_effect(mob/living/carbon/M, datum/reagents/holder) - to_chat(M, SPAN_WARNING("You can feel sensation creeping back into your limbs...")) - return ..() +/decl/reagent/toxin/dextrotoxin/final_effect(mob/living/carbon/M) + to_chat(M, SPAN_GOOD("You can feel sensation creeping back into your limbs!")) /decl/reagent/toxin/coagulated_blood name = "Hemoglobin" diff --git a/html/changelogs/parapen_spam_fix.yml b/html/changelogs/parapen_spam_fix.yml new file mode 100644 index 00000000000..0ffca032789 --- /dev/null +++ b/html/changelogs/parapen_spam_fix.yml @@ -0,0 +1,6 @@ +author: SleepyGemmy + +delete-after: True + +changes: + - bugfix: "Fixes some parapen issues." \ No newline at end of file