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
This commit is contained in:
9600bauds
2016-04-21 06:26:00 +02:00
committed by clusterfack
parent f8220fac22
commit fb9edfa5b7
3 changed files with 45 additions and 4 deletions

View File

@@ -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

View File

@@ -447,12 +447,17 @@ var/global/borer_unlock_types = typesof(/datum/unlockable/borer) - /datum/unlock
to_chat(src, "<span class='warning'>You don't have enough energy to synthesize this much!</span>")
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, "<span class='info'>You squirt a measure of [chem.name] from your reservoirs into [host]'s bloodstream.</span>")
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, "<span class='notice'>Somebody jumped your claim on this borer and is already controlling it. Try another </span>")
else if(!(O.can_reenter_corpse))
to_chat(O,"<span class='notice'>While the borer may be mindless, you have recently ghosted and thus are not allowed to take over for now.</span>")
to_chat(O,"<span class='notice'>While the borer may be mindless, you have recently ghosted and thus are not allowed to take over for now.</span>")

View File

@@ -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."