From fb9edfa5b7b555cc736fcc9fa8d6fdb3a9a041ce Mon Sep 17 00:00:00 2001 From: 9600bauds Date: Thu, 21 Apr 2016 06:26:00 +0200 Subject: [PATCH] Confirmation box for borers overdosing their hosts with chemicals (#9493) * Confirmation box for borers overdosing their hosts, better logging * Borers aren't counted as antagonists in playerpanel --- code/modules/admin/admin.dm | 4 +-- .../modules/mob/living/simple_animal/borer.dm | 9 +++-- html/changelogs/9600bauds_murderborer.yml | 36 +++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 html/changelogs/9600bauds_murderborer.yml diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index e5736c33177..ff49cb6cfc5 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1151,10 +1151,10 @@ var/global/floorIsLava = 0 if (ticker.mode.config_tag == "changeling") return 2 return 1 - if(isborer(M)) + /*if(isborer(M)) //They ain't antags anymore if (ticker.mode.config_tag == "borer") return 2 - return 1 + return 1*/ if(isbadmonkey(M)) if (ticker.mode.config_tag == "monkey") return 2 diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index 8a3ea755b32..965f713d696 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -447,12 +447,17 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock to_chat(src, "You don't have enough energy to synthesize this much!") return + var/datum/reagent/C = chemical_reagents_list[chemID] //we need to get the datum for this reagent to read the overdose threshold + if(units >= C.overdose - host.reagents.get_reagent_amount(chemID)) + if(alert("Secreting that much [chemID] would cause an overdose in your host. Are you sure?", "Secrete Chemicals", "Yes", "No") != "Yes") + return + add_gamelogs(src, "intentionally overdosed \the [host] with '[chemID]'", admin = TRUE, tp_link = TRUE, span_class = "danger") if(!host || controlling || !src || stat) //Sanity check. return to_chat(src, "You squirt a measure of [chem.name] from your reservoirs into [host]'s bloodstream.") - add_gamelogs(src, "secreted [units]U of '[chemID]' into \the [host]", admin = TRUE, tp_link = TRUE, span_class = "danger") + add_gamelogs(src, "secreted [units]U of '[chemID]' into \the [host]", admin = TRUE, tp_link = TRUE, span_class = "message") host.reagents.add_reagent(chem.name, units) chemicals -= chem.cost*units @@ -847,4 +852,4 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock else if(src.key) to_chat(src, "Somebody jumped your claim on this borer and is already controlling it. Try another ") else if(!(O.can_reenter_corpse)) - to_chat(O,"While the borer may be mindless, you have recently ghosted and thus are not allowed to take over for now.") \ No newline at end of file + to_chat(O,"While the borer may be mindless, you have recently ghosted and thus are not allowed to take over for now.") diff --git a/html/changelogs/9600bauds_murderborer.yml b/html/changelogs/9600bauds_murderborer.yml new file mode 100644 index 00000000000..c95d2728fb6 --- /dev/null +++ b/html/changelogs/9600bauds_murderborer.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscdel (general deleting of nice things) +# rscadd (general adding of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +# tgs (TG-ported fixes?) +################################# + +# Your name. +author: 9600bauds + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# There needs to be a space after the - and before the prefix. Don't use tabs anywhere in this file. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# If you're using characters such as # ' : - or the like in your changelog, surround the entire change with quotes as shown in the second example. These quotes don't show up on the changelog once it's merged and prevent errors. +# SCREW ANY OF THIS UP AND IT WON'T WORK. +changes: +- rscadd: "Added a confirmation box for the borer 'Secrete Chemical' ability that warns the borer if the dose selected would overdose their host."