From 13a74daca22492583d11bb35b07bef75bb73d158 Mon Sep 17 00:00:00 2001 From: lewcc Date: Fri, 8 Oct 2021 01:27:14 -0400 Subject: [PATCH 1/7] Adds vomiting behavior to nutripump emp --- code/modules/surgery/organs/augments_internal.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 00abe28ff71..cbb4768f4d7 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -300,6 +300,7 @@ var/hunger_threshold = NUTRITION_LEVEL_STARVING var/synthesizing = 0 var/poison_amount = 5 + var/disabled_by_emp = FALSE slot = "stomach" origin_tech = "materials=2;powerstorage=2;biotech=2" @@ -308,6 +309,8 @@ return if(synthesizing) return + if(disabled_by_emp) + return if(owner.stat == DEAD) return if(owner.nutrition <= hunger_threshold) @@ -319,11 +322,20 @@ /obj/item/organ/internal/cyberimp/chest/nutriment/proc/synth_cool() synthesizing = FALSE +/obj/item/organ/internal/cyberimp/chest/nutriment/proc/emp_cool() + disabled_by_emp = FALSE + /obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity) if(!owner || emp_proof) return + owner.vomit(100, FALSE, TRUE, 3, FALSE) // because when else do we ever use projectile vomiting + owner.loc.visible_message("The contents of [owner]'s stomach erupt violently from [owner.p_their()] mouth!", + "You hear vomiting and a sickening splattering against the floor!") owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning - to_chat(owner, "You feel like your insides are burning.") + disabled_by_emp = TRUE // Disable the implant for a little bit so this effect actually matters + synthesizing = FALSE + addtimer(CALLBACK(src, .proc/emp_cool), 60 SECONDS) + to_chat(owner, "You feel like your insides are burning!") /obj/item/organ/internal/cyberimp/chest/nutriment/plus name = "Nutriment pump implant PLUS" From 181b63f1d234b296b242f8e3e53d60d251faf2ea Mon Sep 17 00:00:00 2001 From: lewcc Date: Sat, 9 Oct 2021 15:38:27 -0400 Subject: [PATCH 2/7] Add hardened versions of nutriment implants --- code/modules/surgery/organs/augments_internal.dm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index cbb4768f4d7..47475cf5826 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -304,6 +304,12 @@ slot = "stomach" origin_tech = "materials=2;powerstorage=2;biotech=2" +/obj/item/organ/internal/cyberimp/chest/nutriment/hardened/Initialize(mapload) + . = ..() + // Define this here so it doesn't need to be redefined for each sub-implant + if (emp_proof) + desc += " The implant has been hardened. It is invulnerable to EMPs." + /obj/item/organ/internal/cyberimp/chest/nutriment/on_life() if(!owner) return @@ -345,6 +351,13 @@ hunger_threshold = NUTRITION_LEVEL_HUNGRY poison_amount = 10 origin_tech = "materials=4;powerstorage=3;biotech=3" +/obj/item/organ/internal/cyberimp/chest/nutriment/hardened + name = "hardened nutrient pump implant" + emp_proof = TRUE + +/obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened + name = "hardened nutrient pump implant PLUS" + emp_proof = TRUE /obj/item/organ/internal/cyberimp/chest/reviver name = "Reviver implant" From f4c69a3cff75693997c0c452643f437963918d7c Mon Sep 17 00:00:00 2001 From: lewcc Date: Sat, 9 Oct 2021 15:49:44 -0400 Subject: [PATCH 3/7] Hardens ERT nutrient implants --- code/modules/response_team/ert_outfits.dm | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/code/modules/response_team/ert_outfits.dm b/code/modules/response_team/ert_outfits.dm index d4b4f5fc929..029a53b64bc 100644 --- a/code/modules/response_team/ert_outfits.dm +++ b/code/modules/response_team/ert_outfits.dm @@ -75,7 +75,7 @@ mask = /obj/item/clothing/mask/gas/sechailer/swat cybernetic_implants = list( /obj/item/organ/internal/cyberimp/eyes/hud/security, - /obj/item/organ/internal/cyberimp/chest/nutriment + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened ) belt = /obj/item/gun/energy/gun/blueshield/pdw9 @@ -108,7 +108,7 @@ ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/security, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, /obj/item/organ/internal/cyberimp/arm/flash @@ -160,7 +160,7 @@ cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/flash, - /obj/item/organ/internal/cyberimp/chest/nutriment, + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/security ) @@ -196,7 +196,7 @@ ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/security, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, /obj/item/organ/internal/cyberimp/arm/telebaton, @@ -247,7 +247,7 @@ mask = /obj/item/clothing/mask/gas cybernetic_implants = list( /obj/item/organ/internal/eyes/cybernetic/shield, - /obj/item/organ/internal/cyberimp/chest/nutriment + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened ) l_pocket = /obj/item/t_scanner r_pocket = /obj/item/melee/classic_baton/telescopic @@ -280,7 +280,7 @@ ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/security, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened, /obj/item/organ/internal/eyes/cybernetic/shield, @@ -338,7 +338,7 @@ suit_store = /obj/item/gun/energy/gun cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/surgery, - /obj/item/organ/internal/cyberimp/chest/nutriment + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened ) belt = /obj/item/defibrillator/compact/advanced/loaded @@ -387,7 +387,7 @@ cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/surgery/l, /obj/item/organ/internal/cyberimp/arm/medibeam, - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/medical, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened ) @@ -437,7 +437,7 @@ cybernetic_implants = list( /obj/item/organ/internal/cyberimp/eyes/hud/security, - /obj/item/organ/internal/cyberimp/chest/nutriment + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened ) implants = list(/obj/item/implant/mindshield, @@ -454,7 +454,7 @@ r_pocket = /obj/item/nullrod/ert cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/eyes/hud/security, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened ) @@ -505,7 +505,7 @@ cybernetic_implants = list( /obj/item/organ/internal/cyberimp/arm/janitorial, - /obj/item/organ/internal/cyberimp/chest/nutriment + /obj/item/organ/internal/cyberimp/chest/nutriment/hardened ) /datum/outfit/job/centcom/response_team/janitorial/gamma @@ -526,7 +526,7 @@ ) cybernetic_implants = list( - /obj/item/organ/internal/cyberimp/chest/nutriment/plus, + /obj/item/organ/internal/cyberimp/chest/nutriment/plus/hardened, /obj/item/organ/internal/cyberimp/arm/advmop, /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened ) From 7a18aa254ed20f3e469a0aba9c3b18bb7a0d77d9 Mon Sep 17 00:00:00 2001 From: Luc <89928798+lewcc@users.noreply.github.com> Date: Wed, 13 Oct 2021 19:46:49 -0400 Subject: [PATCH 4/7] Apply suggestions from code review Co-authored-by: Farie82 --- code/modules/surgery/organs/augments_internal.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 47475cf5826..db9dff4d582 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -304,10 +304,10 @@ slot = "stomach" origin_tech = "materials=2;powerstorage=2;biotech=2" -/obj/item/organ/internal/cyberimp/chest/nutriment/hardened/Initialize(mapload) +/obj/item/organ/internal/cyberimp/chest/nutriment/Initialize(mapload) . = ..() // Define this here so it doesn't need to be redefined for each sub-implant - if (emp_proof) + if(emp_proof) desc += " The implant has been hardened. It is invulnerable to EMPs." /obj/item/organ/internal/cyberimp/chest/nutriment/on_life() From b6c1ef9ec76e287b1e2a43a9a8ecc3d27fc70f49 Mon Sep 17 00:00:00 2001 From: lewcc Date: Wed, 13 Oct 2021 19:57:52 -0400 Subject: [PATCH 5/7] Update to use owner.visible message --- code/modules/surgery/organs/augments_internal.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index db9dff4d582..f42d8314422 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -335,13 +335,13 @@ if(!owner || emp_proof) return owner.vomit(100, FALSE, TRUE, 3, FALSE) // because when else do we ever use projectile vomiting - owner.loc.visible_message("The contents of [owner]'s stomach erupt violently from [owner.p_their()] mouth!", - "You hear vomiting and a sickening splattering against the floor!") + owner.visible_message("The contents of [owner]'s stomach erupt violently from [owner.p_their()] mouth!", + "You feel like your insides are burning as you vomit profusely!", + "You hear vomiting and a sickening splattering against the floor!") owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning disabled_by_emp = TRUE // Disable the implant for a little bit so this effect actually matters synthesizing = FALSE addtimer(CALLBACK(src, .proc/emp_cool), 60 SECONDS) - to_chat(owner, "You feel like your insides are burning!") /obj/item/organ/internal/cyberimp/chest/nutriment/plus name = "Nutriment pump implant PLUS" From 41e6eefc07c62c86cbc2de3d3de5c7f20f2b07ad Mon Sep 17 00:00:00 2001 From: Luc <89928798+lewcc@users.noreply.github.com> Date: Thu, 14 Oct 2021 10:48:45 -0400 Subject: [PATCH 6/7] Add missing span Co-authored-by: Farie82 --- code/modules/surgery/organs/augments_internal.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index f42d8314422..4eed6c9ff8d 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -337,7 +337,7 @@ owner.vomit(100, FALSE, TRUE, 3, FALSE) // because when else do we ever use projectile vomiting owner.visible_message("The contents of [owner]'s stomach erupt violently from [owner.p_their()] mouth!", "You feel like your insides are burning as you vomit profusely!", - "You hear vomiting and a sickening splattering against the floor!") + "You hear vomiting and a sickening splattering against the floor!") owner.reagents.add_reagent("????",poison_amount / severity) //food poisoning disabled_by_emp = TRUE // Disable the implant for a little bit so this effect actually matters synthesizing = FALSE From 8af58be3d90624508c7b16a09194a2344e65a825 Mon Sep 17 00:00:00 2001 From: lewcc Date: Mon, 18 Oct 2021 16:46:33 -0400 Subject: [PATCH 7/7] Move examine text addition to examine proc --- code/modules/surgery/organs/augments_internal.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 4eed6c9ff8d..cecf33e5557 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -304,11 +304,10 @@ slot = "stomach" origin_tech = "materials=2;powerstorage=2;biotech=2" -/obj/item/organ/internal/cyberimp/chest/nutriment/Initialize(mapload) +/obj/item/organ/internal/cyberimp/chest/nutriment/examine(mob/user) . = ..() - // Define this here so it doesn't need to be redefined for each sub-implant if(emp_proof) - desc += " The implant has been hardened. It is invulnerable to EMPs." + . += " The implant has been hardened. It is invulnerable to EMPs." /obj/item/organ/internal/cyberimp/chest/nutriment/on_life() if(!owner)