Merge branch 'master' of https://github.com/tgstation/-tg-station into explosive

This commit is contained in:
Iamgoofball
2015-04-07 16:21:07 -07:00
529 changed files with 13541 additions and 7660 deletions
@@ -173,7 +173,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
return
/datum/reagent/methamphetamine/overdose_process(var/mob/living/M as mob)
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 4, i++)
step(M, pick(cardinal))
if(prob(20))
@@ -203,7 +203,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
..()
return
/datum/reagent/methamphetamine/addiction_act_stage3(var/mob/living/M as mob)
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 4, i++)
step(M, pick(cardinal))
M.Jitter(15)
@@ -213,7 +213,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
..()
return
/datum/reagent/methamphetamine/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 8, i++)
step(M, pick(cardinal))
M.Jitter(20)
@@ -268,7 +268,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
M.adjustBrainLoss(1)
M.adjustToxLoss(0.1)
M.hallucination += 10
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
step(M, pick(cardinal))
step(M, pick(cardinal))
..()
@@ -284,7 +284,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
/datum/reagent/bath_salts/overdose_process(var/mob/living/M as mob)
M.hallucination += 10
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 8, i++)
step(M, pick(cardinal))
if(prob(20))
@@ -298,7 +298,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
/datum/reagent/bath_salts/addiction_act_stage1(var/mob/living/M as mob)
M.hallucination += 10
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 8, i++)
step(M, pick(cardinal))
M.Jitter(5)
@@ -309,7 +309,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
return
/datum/reagent/bath_salts/addiction_act_stage2(var/mob/living/M as mob)
M.hallucination += 20
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 8, i++)
step(M, pick(cardinal))
M.Jitter(10)
@@ -321,7 +321,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
return
/datum/reagent/bath_salts/addiction_act_stage3(var/mob/living/M as mob)
M.hallucination += 30
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 12, i++)
step(M, pick(cardinal))
M.Jitter(15)
@@ -333,7 +333,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
return
/datum/reagent/bath_salts/addiction_act_stage4(var/mob/living/carbon/human/M as mob)
M.hallucination += 40
if(M.canmove && !istype(M.loc, /turf/space))
if(M.canmove && !istype(M.loc, /atom/movable))
for(var/i = 0, i < 16, i++)
step(M, pick(cardinal))
M.Jitter(50)
@@ -366,7 +366,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
M << "<span class='notice'>[high_message]</span>"
M.adjustStaminaLoss(-35)
M.adjustToxLoss(1)
if(prob(rand(1,100)))
if(prob(50))
M.losebreath++
M.adjustOxyLoss(20)
..()
@@ -627,7 +627,7 @@ datum/reagent/strange_reagent/reaction_mob(var/mob/living/carbon/human/M as mob,
return
datum/reagent/strange_reagent/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(rand(1,100)))
if(prob(50))
M.adjustBruteLoss(2*REM)
M.adjustFireLoss(2*REM)
..()
@@ -209,7 +209,7 @@ datum/reagent/corgium
/datum/chemical_reaction/corgium/on_reaction(var/datum/reagents/holder, var/created_volume)
var/location = get_turf(holder.my_atom)
new /mob/living/simple_animal/corgi(location)
new /mob/living/simple_animal/pet/corgi(location)
..()
return
@@ -450,7 +450,7 @@ datum/reagent/cryostylane/on_tick()
datum/reagent/cryostylane/reaction_turf(var/turf/simulated/T, var/volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(15,30))
datum/reagent/pyrosium
@@ -176,13 +176,13 @@ datum/reagent/itching_powder
datum/reagent/itching_powder/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(rand(5,50)))
if(prob(27))
M << "You scratch at your head."
M.adjustBruteLoss(0.2*REM)
if(prob(rand(5,50)))
if(prob(27))
M << "You scratch at your leg."
M.adjustBruteLoss(0.2*REM)
if(prob(rand(5,50)))
if(prob(27))
M << "You scratch at your arm."
M.adjustBruteLoss(0.2*REM)
if(prob(6))
@@ -218,7 +218,7 @@ datum/reagent/initropidril/on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(prob(33))
M.adjustToxLoss(rand(5,25))
if(prob(rand(5,10)))
if(prob(7))
var/picked_option = rand(1,3)
switch(picked_option)
if(1)
@@ -306,11 +306,10 @@ datum/reagent/amanitin/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/amanitin/reagent_deleted(var/mob/living/M as mob)
datum/reagent/amanitin/on_mob_delete(var/mob/living/M as mob)
if(!M) M = holder.my_atom
M.adjustToxLoss(current_cycle*rand(2,4))
..()
return
datum/reagent/lipolicide
name = "Lipolicide"
+14 -15
View File
@@ -51,6 +51,15 @@ datum/reagents/New(maximum=100)
chemical_reactions_list[id] += D
break // Don't bother adding ourselves to other reagent ids, it is redundant.
datum/reagents/Destroy()
..()
for(var/datum/reagent/R in reagent_list)
qdel(R)
reagent_list.Cut()
reagent_list = null
if(my_atom && my_atom.reagents == src)
my_atom.reagents = null
datum/reagents/proc/remove_any(var/amount=1)
var/total_transfered = 0
var/current_list_element = 1
@@ -361,22 +370,18 @@ datum/reagents/proc/isolate_reagent(var/reagent)
update_total()
datum/reagents/proc/del_reagent(var/reagent)
for(var/A in reagent_list)
var/datum/reagent/R = A
for(var/datum/reagent/R in reagent_list)
if (R.id == reagent)
if(istype(my_atom, /mob/living))
var/mob/living/M = my_atom
R.reagent_deleted(M)
reagent_list -= A
del(A)
R.on_mob_delete(M)
qdel(R)
reagent_list -= R
update_total()
my_atom.on_reagent_change()
check_ignoreslow(my_atom)
check_gofast(my_atom)
check_goreallyfast(my_atom)
return 0
return 1
datum/reagents/proc/check_ignoreslow(var/mob/M)
@@ -540,12 +545,6 @@ datum/reagents/proc/remove_all_type(var/reagent_type, var/amount, var/strict = 0
return has_removed_reagent
datum/reagents/proc/delete()
for(var/datum/reagent/R in reagent_list)
R.holder = null
if(my_atom)
my_atom.reagents = null
//two helper functions to preserve data across reactions (needed for xenoarch)
datum/reagents/proc/get_data(var/reagent_id)
for(var/datum/reagent/D in reagent_list)
@@ -586,6 +585,6 @@ datum/reagents/proc/copy_data(var/datum/reagent/current_reagent)
// Max vol is maximum volume of holder
atom/proc/create_reagents(var/max_vol)
if(reagents)
reagents.delete()
qdel(reagents)
reagents = new/datum/reagents(max_vol)
reagents.my_atom = src
@@ -575,6 +575,67 @@
desc = "Used to create condiments and other cooking supplies."
condi = 1
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/obj/machinery/chem_master/constructable
name = "ChemMaster 2999"
desc = "Used to seperate chemicals and distribute them in a variety of forms."
/obj/machinery/chem_master/constructable/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/chem_master(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null)
component_parts += new /obj/item/weapon/reagent_containers/glass/beaker(null)
/obj/machinery/chem_master/constructable/attackby(var/obj/item/B as obj, var/mob/user as mob, params)
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0_", B))
if(beaker)
beaker.loc = src.loc
beaker = null
reagents.clear_reagents()
if(loaded_pill_bottle)
loaded_pill_bottle.loc = src.loc
loaded_pill_bottle = null
return
if(exchange_parts(user, B))
return
if(panel_open)
if(istype(B, /obj/item/weapon/crowbar))
default_deconstruction_crowbar(B)
return 1
else
user << "<span class='warning'>You can't use the [src.name] while it's panel is opened.</span>"
return 1
if(istype(B, /obj/item/weapon/reagent_containers/glass))
if(src.beaker)
user << "<span class='alert'>A beaker is already loaded into the machine.</span>"
return
src.beaker = B
user.drop_item()
B.loc = src
user << "You add the beaker to the machine!"
src.updateUsrDialog()
icon_state = "mixer1"
else if(!condi && istype(B, /obj/item/weapon/storage/pill_bottle))
if(src.loaded_pill_bottle)
user << "<span class='alert'>A pill bottle is already loaded into the machine.</span>"
return
src.loaded_pill_bottle = B
user.drop_item()
B.loc = src
user << "You add the pill bottle into the dispenser slot!"
src.updateUsrDialog()
return
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
@@ -21,8 +21,7 @@ datum/reagent
var/list/data
var/current_cycle = 0
var/volume = 0
//var/list/viruses = list()
var/color = "#000000" // rgb: 0, 0, 0 (does not support alpha channels - yet!)
var/color = "#000000" // rgb: 0, 0, 0
var/can_synth = 1
var/metabolization_rate = REAGENTS_METABOLISM
var/overrides_metab = 0
@@ -30,6 +29,11 @@ datum/reagent
var/addiction_threshold = 0
var/addiction_stage = 0
var/overdosed = 0 // You fucked up and this is now triggering it's overdose effects, purge that shit quick.
datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
..()
holder = null
datum/reagent/proc/reaction_mob(var/mob/M, var/method=TOUCH, var/volume, var/show_message = 1) //By default we have a chance to transfer some
if(!istype(M, /mob/living))
return 0
@@ -80,6 +84,10 @@ datum/reagent/proc/on_mob_life(var/mob/living/M as mob)
holder.remove_reagent(src.id, metabolization_rate * M.metabolism_efficiency) //By default it slowly disappears.
return
// Called when this reagent is removed while inside a mob
datum/reagent/proc/on_mob_delete(mob/M)
return
datum/reagent/proc/on_move(var/mob/M)
return
@@ -129,9 +137,6 @@ datum/reagent/proc/addiction_act_stage4(var/mob/living/M as mob)
M << "<span class = 'boldannounce'>You're not feeling good at all! You really need some [name].</span>"
return
/datum/reagent/proc/reagent_deleted()
return
datum/reagent/blood
data = list("donor"=null,"viruses"=null,"blood_DNA"=null,"blood_type"=null,"resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null)
name = "Blood"
@@ -220,14 +225,6 @@ datum/reagent/blood/reaction_turf(var/turf/simulated/T, var/volume)//splash the
newVirus.holder = blood_prop
return
/* Must check the transfering of reagents and their data first. They all can point to one disease datum.
Del()
if(src.data["virus"])
var/datum/disease/D = src.data["virus"]
D.cure(0)
..()
*/
datum/reagent/vaccine
//data must contain virus type
name = "Vaccine"
@@ -263,7 +260,7 @@ datum/reagent/water/reaction_turf(var/turf/simulated/T, var/volume)
if(volume >= 10)
T.MakeSlippery()
for(var/mob/living/carbon/slime/M in T)
for(var/mob/living/simple_animal/slime/M in T)
M.apply_water()
var/hotspot = (locate(/obj/effect/hotspot) in T)
@@ -693,7 +690,7 @@ datum/reagent/space_cleaner/reaction_turf(var/turf/T, var/volume)
for(var/obj/effect/decal/cleanable/C in T)
qdel(C)
for(var/mob/living/carbon/slime/M in T)
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(5,10))
if(istype(T, /turf/simulated/floor))
var/turf/simulated/floor/F = T
@@ -703,6 +700,11 @@ datum/reagent/space_cleaner/reaction_turf(var/turf/T, var/volume)
datum/reagent/space_cleaner/reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.lip_style)
H.lip_style = null
H.update_body()
if(C.r_hand)
C.r_hand.clean_blood()
if(C.l_hand)
@@ -100,15 +100,15 @@ datum/reagent/consumable/capsaicin/on_mob_life(var/mob/living/M as mob)
M.bodytemperature += 5 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("cryostylane"))
holder.remove_reagent("cryostylane", 5)
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(5,20)
if(15 to 25)
M.bodytemperature += 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(10,20)
if(25 to INFINITY)
M.bodytemperature += 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature += rand(15,20)
..()
return
@@ -125,24 +125,24 @@ datum/reagent/consumable/frostoil/on_mob_life(var/mob/living/M as mob)
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 5)
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(5,20)
if(15 to 25)
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(10,20)
if(25 to INFINITY)
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
if(prob(1))
M.emote("shiver")
if(istype(M, /mob/living/carbon/slime))
if(isslime(M))
M.bodytemperature -= rand(15,20)
..()
return
datum/reagent/consumable/frostoil/reaction_turf(var/turf/simulated/T, var/volume)
if(volume >= 5)
for(var/mob/living/carbon/slime/M in T)
for(var/mob/living/simple_animal/slime/M in T)
M.adjustToxLoss(rand(15,30))
//if(istype(T))
// T.atmos_spawn_air(SPAWN_COLD)
@@ -158,10 +158,8 @@ datum/reagent/toxin/zombiepowder/on_mob_life(var/mob/living/carbon/M as mob)
..()
return
datum/reagent/toxin/zombiepowder/Del()
if(holder && ismob(holder.my_atom))
var/mob/M = holder.my_atom
M.status_flags &= ~FAKEDEATH
datum/reagent/toxin/zombiepowder/on_mob_delete(mob/M)
M.status_flags &= ~FAKEDEATH
..()
datum/reagent/toxin/mindbreaker
@@ -289,6 +287,45 @@ datum/reagent/toxin/beer2/on_mob_life(var/mob/living/M as mob)
..()
return
datum/reagent/toxin/coffeepowder
name = "Coffee Grounds"
id = "coffeepowder"
description = "Finely ground coffee beans, used to make coffee."
reagent_state = SOLID
color = "#5B2E0D" // rgb: 91, 46, 13
toxpwr = 0.5
datum/reagent/toxin/teapowder
name = "Ground Tea Leaves"
id = "teapowder"
description = "Finely shredded tea leaves, used for making tea."
reagent_state = SOLID
color = "#7F8400" // rgb: 127, 132, 0
toxpwr = 0.5
datum/reagent/toxin/mutetoxin //the new zombie powder.
name = "Mute Toxin"
id = "mutetoxin"
description = "A toxin that temporarily paralyzes the vocal cords."
color = "#F0F8FF" // rgb: 240, 248, 255
toxpwr = 0
datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M)
M.silent = max(M.silent, 3)
..()
datum/reagent/toxin/staminatoxin
name = "Tirizene"
id = "tirizene"
description = "A toxin that affects the stamina of a person when injected into the bloodstream."
color = "#6E2828"
data = 13
toxpwr = 0
datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M)
M.adjustStaminaLoss(REM * data)
data = max(data - 1, 3)
..()
//ACID
@@ -324,46 +361,5 @@ datum/reagent/toxin/acid/fluacid
toxpwr = 2
acidpwr = 20
datum/reagent/toxin/coffeepowder
name = "Coffee Grounds"
id = "coffeepowder"
description = "Finely ground coffee beans, used to make coffee."
reagent_state = SOLID
color = "#5B2E0D" // rgb: 91, 46, 13
toxpwr = 0.5
datum/reagent/toxin/teapowder
name = "Ground Tea Leaves"
id = "teapowder"
description = "Finely shredded tea leaves, used for making tea."
reagent_state = SOLID
color = "#7F8400" // rgb: 127, 132, 0
toxpwr = 0.5
datum/reagent/toxin/mutetoxin //the new zombie powder.
name = "Mute Toxin"
id = "mutetoxin"
description = "A toxin that temporarily paralyzes the vocal cords."
color = "#F0F8FF" // rgb: 240, 248, 255
toxpwr = 0
datum/reagent/toxin/mutetoxin/on_mob_life(mob/living/carbon/M)
M.silent += REM + 1 //If this var is increased by one or less, it will have no effect since silent is decreased right after reagents are handled in Life(). Hence the + 1.
..()
datum/reagent/toxin/staminatoxin
name = "Tirizene"
id = "tirizene"
description = "A toxin that affects the stamina of a person when injected into the bloodstream."
color = "#6E2828"
data = 13
toxpwr = 0
datum/reagent/toxin/staminatoxin/on_mob_life(mob/living/carbon/M)
M.adjustStaminaLoss(REM * data)
data = max(data - 1, 3)
..()
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
#undef REM
+3 -3
View File
@@ -198,7 +198,7 @@ silicate
name = "Zombie Powder"
id = "zombiepowder"
result = "zombiepowder"
required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5)
required_reagents = list("carpotoxin" = 5, "morphine" = 5, "copper" = 5)
result_amount = 2
/datum/chemical_reaction/rezadone
@@ -433,7 +433,7 @@ datum/chemical_reaction/pestkiller
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("<span class='danger'>Infused with plasma, the core begins to quiver and grow, and soon a new baby slime emerges from it!</span>"), 1)
var/mob/living/carbon/slime/S = new /mob/living/carbon/slime
var/mob/living/simple_animal/slime/S = new /mob/living/simple_animal/slime
S.loc = get_turf(holder.my_atom)
/datum/chemical_reaction/slimeinaprov
@@ -755,7 +755,7 @@ datum/chemical_reaction/pestkiller
required_other = 1
/datum/chemical_reaction/slimebloodlust/on_reaction(var/datum/reagents/holder)
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
for(var/mob/living/carbon/slime/slime in viewers(get_turf(holder.my_atom), null))
for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null))
slime.rabid = 1
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("<span class='danger'>The [slime] is driven into a frenzy!</span>"), 1)
@@ -154,10 +154,10 @@
list_reagents = list("pancuronium" = 30)
/obj/item/weapon/reagent_containers/glass/bottle/sodium_thiopental
name = "sodium_thiopental bottle"
name = "sodium thiopental bottle"
desc = "A small bottle. Contains sodium thiopental."
icon_state = "bottle16"
list_reagents = list("formaldehyde" = 30)
list_reagents = list("sodium_thiopental" = 30)
/obj/item/weapon/reagent_containers/glass/bottle/coniine
name = "coniine bottle"
@@ -68,7 +68,8 @@
reagents.trans_to(D, amount_per_transfer_from_this, 1/range)
D.color = mix_color_from_reagents(D.reagents.reagent_list)
var/puff_reagent_left = range //how many turf, mob or dense objet we can react with before we consider the chem puff consumed
var/wait_step = max(round(9/range),2)
var/wait_step = max(round(2+3/range), 2)
spawn(0)
for(var/i=0, i<range, i++)
step_towards(D,A)
+3 -3
View File
@@ -67,12 +67,12 @@
return
if(2.0)
if (prob(50))
new /obj/effect/effect/water(src.loc)
PoolOrNew(/obj/effect/effect/water, src.loc)
qdel(src)
return
if(3.0)
if (prob(5))
new /obj/effect/effect/water(src.loc)
PoolOrNew(/obj/effect/effect/water, src.loc)
qdel(src)
return
else
@@ -80,7 +80,7 @@
/obj/structure/reagent_dispensers/watertank/blob_act()
if(prob(50))
new /obj/effect/effect/water(src.loc)
PoolOrNew(/obj/effect/effect/water, loc)
qdel(src)
/obj/structure/reagent_dispensers/fueltank