Chems with touch_turf should now also do the proper touch_mob and affect_touch

This commit is contained in:
Anewbe
2017-01-01 21:32:00 -06:00
parent 2210a41922
commit 426bb55bfc
3 changed files with 16 additions and 19 deletions

View File

@@ -323,13 +323,13 @@
// This does not handle transferring reagents to things.
// For example, splashing someone with water will get them wet and extinguish them if they are on fire,
// even if they are wearing an impermeable suit that prevents the reagents from contacting the skin.
/datum/reagents/proc/touch(var/atom/target)
/datum/reagents/proc/touch(var/atom/target, var/amount)
if(ismob(target))
touch_mob(target)
touch_mob(target, amount)
if(isturf(target))
touch_turf(target)
touch_turf(target, amount)
if(isobj(target))
touch_obj(target)
touch_obj(target, amount)
return
/datum/reagents/proc/touch_mob(var/mob/target)
@@ -341,21 +341,21 @@
update_total()
/datum/reagents/proc/touch_turf(var/turf/target)
/datum/reagents/proc/touch_turf(var/turf/target, var/amount)
if(!target || !istype(target))
return
for(var/datum/reagent/current in reagent_list)
current.touch_turf(target, current.volume)
current.touch_turf(target, amount)
update_total()
/datum/reagents/proc/touch_obj(var/obj/target)
/datum/reagents/proc/touch_obj(var/obj/target, var/amount)
if(!target || !istype(target))
return
for(var/datum/reagent/current in reagent_list)
current.touch_obj(target, current.volume)
current.touch_obj(target, amount)
update_total()
@@ -402,7 +402,7 @@
var/datum/reagents/R = new /datum/reagents(amount * multiplier)
. = trans_to_holder(R, amount, multiplier, copy)
R.touch_turf(target)
R.touch_turf(target, amount)
return
/datum/reagents/proc/trans_to_obj(var/obj/target, var/amount = 1, var/multiplier = 1, var/copy = 0) // Objects may or may not; if they do, it's probably a beaker or something and we need to transfer properly; otherwise, just touch.
@@ -412,7 +412,7 @@
if(!target.reagents)
var/datum/reagents/R = new /datum/reagents(amount * multiplier)
. = trans_to_holder(R, amount, multiplier, copy)
R.touch_obj(target)
R.touch_obj(target, amount)
return
return trans_to_holder(target.reagents, amount, multiplier, copy)

View File

@@ -156,9 +156,9 @@
glass_name = "welder fuel"
glass_desc = "Unless you are an industrial tool, this is probably not safe for consumption."
/datum/reagent/fuel/touch_turf(var/turf/T)
new /obj/effect/decal/cleanable/liquid_fuel(T, volume)
remove_self(volume)
/datum/reagent/fuel/touch_turf(var/turf/T, var/amount)
new /obj/effect/decal/cleanable/liquid_fuel(T, amount)
remove_self(amount)
return
/datum/reagent/fuel/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)

View File

@@ -59,11 +59,11 @@
if(prob(50))
M.pl_effects()
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T)
/datum/reagent/toxin/phoron/touch_turf(var/turf/simulated/T, var/amount)
if(!istype(T))
return
T.assume_gas("volatile_fuel", volume, T20C)
remove_self(volume)
T.assume_gas("volatile_fuel", amount, T20C)
remove_self(amount)
/datum/reagent/toxin/cyanide //Fast and Lethal
name = "Cyanide"
@@ -212,17 +212,14 @@
W.visible_message("<span class='notice'>The fungi are completely dissolved by the solution!</span>")
/datum/reagent/toxin/plantbgone/touch_obj(var/obj/O, var/volume)
..()
if(istype(O, /obj/effect/plant))
qdel(O)
/datum/reagent/toxin/plantbgone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
M.adjustToxLoss(50 * removed)
/datum/reagent/toxin/plantbgone/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
..()
if(alien == IS_DIONA)
M.adjustToxLoss(50 * removed)