[Goonchem] Reagent TOUCH Rework

This commit is contained in:
Fox-McCloud
2015-03-31 21:43:09 -04:00
parent f7b945d91d
commit 5d89a61c1b
4 changed files with 33 additions and 29 deletions
+17 -27
View File
@@ -25,38 +25,24 @@ datum
//var/list/viruses = list()
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
var/shock_reduction = 0
var/penetrates_skin = 0 //Whether or not a reagent penetrates the skin
proc
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //By default we have a chance to transfer some
reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //Some reagents transfer on touch, others don't; dependent on if they penetrate the skin or not.
if(!istype(M, /mob/living)) return 0
var/datum/reagent/self = src
src = null //of the reagent to the mob on TOUCHING it.
src = null
if(self.holder) //for catching rare runtimes
if(!istype(self.holder.my_atom, /obj/effect/effect/chem_smoke))
// If the chemicals are in a smoke cloud, do not try to let the chemicals "penetrate" into the mob's system (balance station 13) -- Doohl
if(method == TOUCH)
var/chance = 1
var/block = 0
for(var/obj/item/clothing/C in M.get_equipped_items())
if(C.permeability_coefficient < chance) chance = C.permeability_coefficient
if(istype(C, /obj/item/clothing/suit/bio_suit))
// bio suits are just about completely fool-proof - Doohl
// kind of a hacky way of making bio suits more resistant to chemicals but w/e
if(prob(75))
block = 1
if(istype(C, /obj/item/clothing/head/bio_hood))
if(prob(75))
block = 1
chance = chance * 100
if(prob(chance) && !block)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume/2)
if(method == TOUCH && self.penetrates_skin)
var/block = 0
for(var/obj/item/clothing/C in M.get_equipped_items())
if(istype(C, /obj/item/clothing/suit/bio_suit))
block += 1
if(istype(C, /obj/item/clothing/head/bio_hood))
block += 1
if(block < 2)
if(M.reagents)
M.reagents.add_reagent(self.id,self.volume)
/*
if(method == INGEST && istype(M, /mob/living/carbon))
@@ -596,6 +582,7 @@ datum
reagent_state = LIQUID
color = "#484848" // rgb: 72, 72, 72
metabolization_rate = 0.2
penetrates_skin = 1
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -631,6 +618,7 @@ datum
description = "A chemical element."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
penetrates_skin = 1
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -644,6 +632,7 @@ datum
description = "A highly-reactive chemical element."
reagent_state = GAS
color = "#808080" // rgb: 128, 128, 128
penetrates_skin = 1
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -811,6 +800,7 @@ datum
reagent_state = SOLID
color = "#C7C7C7" // rgb: 199,199,199
metabolization_rate = 0.4
penetrates_skin = 1
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
+2
View File
@@ -185,6 +185,7 @@ datum/reagent/hairgrownium
description = "A solution to hair loss across the world."
reagent_state = LIQUID
color = "#C8A5DC"
penetrates_skin = 1
/datum/chemical_reaction/hairgrownium
name = "hairgrownium"
@@ -208,6 +209,7 @@ datum/reagent/super_hairgrownium
description = "A concentrated solution to hair loss across the world."
reagent_state = LIQUID
color = "#C8A5DC"
penetrates_skin = 1
/datum/chemical_reaction/super_hairgrownium
name = "Super Hairgrownium"
+7 -2
View File
@@ -158,6 +158,7 @@
reagent_state = LIQUID
color = "#000000"
metabolization_rate = 0.05
penetrates_skin = 1
/datum/chemical_reaction/blackpowder
name = "Black Powder"
@@ -173,10 +174,14 @@
required_reagents = list("blackpowder" = 1)
result_amount = 1
required_temp = 474
mix_message = "<span class = 'userdanger'>Sparks start flying around the black powder!</span>"
mix_message = "sparks start flying about."
/datum/chemical_reaction/blackpowder_explosion/on_reaction(var/datum/reagents/holder, var/created_volume)
sleep(rand(50,100))
var/location = get_turf(holder.my_atom)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, location)
s.start()
sleep(rand(30,50))
blackpowder_detonate(holder, created_volume)
return
+7
View File
@@ -11,6 +11,7 @@ datum/reagent/polonium
reagent_state = LIQUID
color = "#CF3600"
metabolization_rate = 0.1
penetrates_skin = 1
datum/reagent/polonium/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -58,6 +59,7 @@ datum/reagent/formaldehyde
description = "Formaldehyde is a common industrial chemical and is used to preserve corpses and medical samples. It is highly toxic and irritating."
reagent_state = LIQUID
color = "#CF3600"
penetrates_skin = 1
datum/reagent/formaldehyde/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -143,6 +145,7 @@ datum/reagent/cyanide
reagent_state = LIQUID
color = "#CF3600"
metabolization_rate = 0.1
penetrates_skin = 1
datum/reagent/cyanide/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -176,6 +179,7 @@ datum/reagent/itching_powder
reagent_state = LIQUID
color = "#CF3600"
metabolization_rate = 0.3
penetrates_skin = 1
/datum/reagent/itching_powder/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)
if(method == TOUCH)
@@ -369,6 +373,7 @@ datum/reagent/ketamine
reagent_state = LIQUID
color = "#646EA0"
metabolization_rate = 0.8
penetrates_skin = 1
datum/reagent/ketamine/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -470,6 +475,7 @@ datum/reagent/curare
reagent_state = LIQUID
color = "#CF3600"
metabolization_rate = 0.1
penetrates_skin = 1
datum/reagent/curare/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
@@ -487,6 +493,7 @@ datum/reagent/sarin
reagent_state = LIQUID
color = "#C7C7C7"
metabolization_rate = 0.1
penetrates_skin = 1
/datum/chemical_reaction/sarin
name = "sarin"