Fixes issue 865.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4694 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-09-15 23:37:20 +00:00
parent 0bbb591b3e
commit 5b33027e69
4 changed files with 106 additions and 152 deletions

View File

@@ -1,56 +1,46 @@
/obj/item/assembly/shock_kit
name = "Shock Kit"
desc = "This appears to be made from both an Electric Pack and a Helmet."
name = "electrohelmet assembly"
desc = "This appears to be made from both an electropack and a helmet."
icon_state = "shock_kit"
var/obj/item/clothing/head/helmet/part1 = null
var/obj/item/device/radio/electropack/part2 = null
var/status = 0.0
var/status = 0
w_class = 5.0
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/assembly/shock_kit/Del()
//src.part1 = null
del(src.part1)
//src.part2 = null
del(src.part2)
del(part1)
del(part2)
..()
return
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if ((istype(W, /obj/item/weapon/wrench) && !( src.status )))
var/turf/T = src.loc
if (ismob(T))
if(istype(W, /obj/item/weapon/wrench) && !status)
var/turf/T = loc
if(ismob(T))
T = T.loc
src.part1.loc = T
src.part2.loc = T
src.part1.master = null
src.part2.master = null
src.part1 = null
src.part2 = null
part1.loc = T
part2.loc = T
part1.master = null
part2.master = null
part1 = null
part2 = null
del(src)
return
if (!( istype(W, /obj/item/weapon/screwdriver) ))
return
src.status = !( src.status )
if (!src.status)
user.show_message("\blue The shock pack is now secured!", 1)
else
user.show_message("\blue The shock pack is now unsecured!", 1)
src.add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver))
status = !status
user << "<span class='notice'>[src] is now [status ? "secured" : "unsecured"]!</span>"
add_fingerprint(user)
return
/obj/item/assembly/shock_kit/attack_self(mob/user as mob)
src.part1.attack_self(user, src.status)
src.part2.attack_self(user, src.status)
src.add_fingerprint(user)
part1.attack_self(user, status)
part2.attack_self(user, status)
add_fingerprint(user)
return
/obj/item/assembly/shock_kit/receive_signal()
//*****
//world << "Shock kit got r_signal"
if (istype(src.loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = src.loc
//world << "Shock kit sending shock to EC"
if(istype(loc, /obj/structure/stool/bed/chair/e_chair))
var/obj/structure/stool/bed/chair/e_chair/C = loc
C.shock()
return