Herp-de-derp Missed a file off the last commit.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3023 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
trubblebass@gmail.com
2012-01-31 23:16:12 +00:00
parent cb7123d122
commit 2f46c7aa4f
@@ -207,7 +207,7 @@
//A direct copy paste of the cleaner, fantastic.
/obj/item/weapon/pepperspray
desc = "Manufactred by UhangInc., used to blind and down an opponent quickly."
desc = "Manufactred by UhangInc., used to blind and down an opponent quickly. It has three spray settings, and is currently set to 'low'."
icon = 'weapons.dmi'
name = "pepperspray"
icon_state = "pepperspray"
@@ -217,6 +217,7 @@
w_class = 2.0
throw_speed = 2
throw_range = 10
var/setting = 1
/obj/item/weapon/pepperspray/New()
@@ -225,12 +226,29 @@
R.my_atom = src
R.add_reagent("condensedcapsaicin", 45)
/obj/item/weapon/pepperspray/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/weapon/pepperspray/attack_self( mob/user as mob)
src.setting += 1
switch ( src.setting )
if (2)
user << "You change the spray to 'medium'."
src.desc = "Manufactred by UhangInc., used to blind and down an opponent quickly. It has three spray settings, and is currently set to 'medium'."
if (3)
user << "You change the spray to 'high'."
src.desc = "Manufactred by UhangInc., used to blind and down an opponent quickly. It has three spray settings, and is currently set to 'high'."
if (4)
src.setting = 1
user << "You change the spray to 'low'."
src.desc = "Manufactred by UhangInc., used to blind and down an opponent quickly. It has three spray settings, and is currently set to 'low'."
return
/obj/item/weapon/pepperspray/afterattack(atom/A as mob|obj, mob/user as mob)
if ( A == src )
return
if ( src.setting < 1 || src.setting > 3 ) // Stop var editing from breaking some maths further down
src.setting = 1
if (istype(A, /obj/item/weapon/storage ))
return
if (istype(A, /obj/effect/proc_holder/spell ))
@@ -245,14 +263,15 @@
return
playsound(src.loc, 'spray2.ogg', 50, 1, -6)
var/Sprays[3]
for(var/i=1, i<=3, i++) // intialize sprays
var/Sprays[1] // BubbleWrap - single spray
for(var/i=1, i<=1, i++) // intialize sprays
if(src.reagents.total_volume < 1) break
var/obj/effect/decal/D = new/obj/effect/decal(get_turf(src))
D.name = "chemicals"
D.icon = 'chempuff.dmi'
D.create_reagents(15)
src.reagents.trans_to(D, 15)
var/xfer_volume = round(45/(4-src.setting)) // Use more spray per spray on higher settings
D.create_reagents(xfer_volume)
src.reagents.trans_to(D, xfer_volume)
var/rgbcolor[3]
var/finalcolor
@@ -276,11 +295,11 @@
Sprays[i] = D
var/direction = get_dir(src, A)
var/turf/T = get_turf(A)
var/turf/T1 = get_step(T,turn(direction, 90))
var/turf/T2 = get_step(T,turn(direction, -90))
var/list/the_targets = list(T,T1,T2)
//var/direction = get_dir(src, A)
//var/turf/T = get_turf(A)
//var/turf/T1 = get_step(T,turn(direction, 90))
//var/turf/T2 = get_step(T,turn(direction, -90))
//var/list/the_targets = list(T,T1,T2)
for(var/i=1, i<=Sprays.len, i++)
spawn()
@@ -288,14 +307,17 @@
if(!D) continue
// Spreads the sprays a little bit
var/turf/my_target = pick(the_targets)
the_targets -= my_target
var/turf/my_target = get_turf(A) //pick(the_targets)
//the_targets -= my_target
var/list/affected = new() // BubbleWrap
for(var/j=1, j<=rand(6,8), j++)
step_towards(D, my_target)
D.reagents.reaction(get_turf(D))
for(var/atom/t in get_turf(D))
D.reagents.reaction(t)
if ( !(t in affected) ) // Only spray each person once, removes chat spam
D.reagents.reaction(t)
affected += t
sleep(2)
del(D)
sleep(1)
@@ -305,7 +327,7 @@
janitor.cell.charge -= 20
var/refill = src.reagents.get_master_reagent_id()
spawn(600)
src.reagents.add_reagent(refill, 10)
src.reagents.add_reagent(refill, 45)
return