From 5a91ce4fee66de58c93fd82dbd386f9abdbe77dc Mon Sep 17 00:00:00 2001 From: Iamgoofball Date: Mon, 12 Jan 2015 20:38:56 -0800 Subject: [PATCH] Requested changes by @Cheridan --- code/datums/uplink_item.dm | 6 +- .../items/weapons/storage/uplink_kits.dm | 13 ++ .../reagents/Chemistry-Goon-Pyrotechnics.dm | 132 +++--------------- .../reagent_containers/glass/bottle.dm | 42 ++++++ 4 files changed, 77 insertions(+), 116 deletions(-) diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 189e87df822..c1ab434fd07 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -314,9 +314,9 @@ var/list/uplink_items = list() surplus = 50 /datum/uplink_item/stealthy_weapons/traitor_chem_bottle - name = "Poison Bottle" - desc = "A small bottle. Contains a random nasty chemical." - item = /obj/item/weapon/reagent_containers/glass/bottle/traitor + name = "Poison Kit" + desc = "An assortment of nasty chemicals." + item = /obj/item/weapon/storage/box/syndie_kit/chemical cost = 2 surplus = 50 diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 95318319f48..e3ed3af1d42 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -161,4 +161,17 @@ new /obj/item/weapon/grenade/empgrenade(src) new /obj/item/weapon/implanter/emp/(src) new /obj/item/device/flashlight/emp/(src) + return + +/obj/item/weapon/storage/box/syndie_kit/chemical + name = "boxed chemical kit" + +/obj/item/weapon/storage/box/syndie_kit/chemical/New() + ..() + new /obj/item/weapon/reagent_containers/glass/bottle/polonium(src) + new /obj/item/weapon/reagent_containers/glass/bottle/venom(src) + new /obj/item/weapon/reagent_containers/glass/bottle/neurotoxin2(src) + new /obj/item/weapon/reagent_containers/glass/bottle/formaldehyde(src) + new /obj/item/weapon/reagent_containers/glass/bottle/cyanide(src) + new /obj/item/weapon/reagent_containers/glass/bottle/histamine(src) return \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm index 5202f37bf16..6edcc664817 100644 --- a/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm +++ b/code/modules/reagents/Chemistry-Goon-Pyrotechnics.dm @@ -64,71 +64,18 @@ /datum/reagent/sorium/reaction_turf(var/turf/simulated/T, var/volume) if(istype(T, /turf/simulated/floor/)) - for(var/atom/X in orange(5,T)) - if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_away(X,T) - step_away(X,T) - step_away(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/M = H.shoes - if(M.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_away(H,T) - step_away(H,T) - step_away(H,T) - return + goonchem_vortex(T, 1, 5, 3) /datum/reagent/sorium/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(!istype(M, /mob/living)) return if(method == TOUCH) var/turf/simulated/T = get_turf(M) - for(var/atom/X in orange(5,T)) - if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_away(X,T) - step_away(X,T) - step_away(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/S = H.shoes - if(S.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_away(H,T) - step_away(H,T) - step_away(H,T) - return + goonchem_vortex(T, 1, 5, 3) + /datum/chemical_reaction/sorium/on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - for(var/atom/X in orange(5,T)) - if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_away(X,T) - step_away(X,T) - step_away(X,T) - step_away(X,T) - step_away(X,T) - step_away(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/M = H.shoes - if(M.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_away(H,T) - step_away(H,T) - step_away(H,T) - step_away(H,T) - step_away(H,T) - step_away(H,T) - return + goonchem_vortex(T, 1, 5, 6) /datum/reagent/liquid_dark_matter name = "Liquid Dark Matter" @@ -147,67 +94,26 @@ /datum/reagent/liquid_dark_matter/reaction_turf(var/turf/simulated/T, var/volume) if(istype(T, /turf/simulated/floor/)) - for(var/atom/X in orange(5,T)) - if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/M = H.shoes - if(M.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - return + goonchem_vortex(T, 0, 5, 3) + return /datum/reagent/liquid_dark_matter/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(!istype(M, /mob/living)) return if(method == TOUCH) var/turf/simulated/T = get_turf(M) - for(var/atom/X in orange(5,T)) - if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/S = H.shoes - if(S.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - return + goonchem_vortex(T, 0, 5, 3) + return /datum/chemical_reaction/liquid_dark_matter/on_reaction(var/datum/reagents/holder, var/created_volume) var/turf/simulated/T = get_turf(holder.my_atom) - for(var/atom/X in orange(5,T)) + goonchem_vortex(T, 0, 5, 6) + return + +proc/goonchem_vortex(var/turf/simulated/T, var/setting_type, var/range, var/pull_times) + for(var/atom/movable/X in orange(range, T)) if(istype(X, /atom/movable)) - if((X) &&(!X:anchored) && (!istype(X,/mob/living/carbon/human))) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - step_towards(X,T) - else if(istype(X,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = X - if(istype(H.shoes,/obj/item/clothing/shoes/magboots)) - var/obj/item/clothing/shoes/magboots/M = H.shoes - if(M.magpulse) - continue - H.apply_effect(1, WEAKEN, 0) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - step_towards(H,T) - return \ No newline at end of file + if((X)) + if(setting_type) + for(var/i = 0, i < pull_times, i++) + step_towards(X,T) + else + X.throw_at(T) \ No newline at end of file diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 8e1a6e0fb4c..8beb5518ac3 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -216,6 +216,48 @@ var/new_reagent = pick("polonium", "histamine", "formaldehyde", "venom", "neurotoxin2", "cyanide") reagents.add_reagent(new_reagent, 50) +/obj/item/weapon/reagent_containers/glass/bottle/polonium + name = "polonium bottle" + desc = "A small bottle. Contains Polonium." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "polonium" + +/obj/item/weapon/reagent_containers/glass/bottle/venom + name = "venom bottle" + desc = "A small bottle. Contains Venom." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "venom" + +/obj/item/weapon/reagent_containers/glass/bottle/neurotoxin2 + name = "neurotoxin bottle" + desc = "A small bottle. Contains Neurotoxin." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "neurotoxin2" + +/obj/item/weapon/reagent_containers/glass/bottle/formaldehyde + name = "formaldehyde bottle" + desc = "A small bottle. Contains Formaldehyde." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "formaldehyde" + +/obj/item/weapon/reagent_containers/glass/bottle/cyanide + name = "cyanide bottle" + desc = "A small bottle. Contains Cyanide." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "cyanide" + +/obj/item/weapon/reagent_containers/glass/bottle/histamine + name = "histamine bottle" + desc = "A small bottle. Contains Histamine." + icon = 'icons/obj/chemical.dmi' + icon_state = "bottle16" + spawned_reagent = "histamine" + /obj/item/weapon/reagent_containers/glass/bottle/beesease name = "Beesease culture bottle" desc = "A small bottle. Contains a sample of invasive Apidae."