Fixes Issue 1081 - Not being able to analyze tanks with PDA/analyzers. The tank attackby proc was overridden by the one tank bombs.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5025 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
aranclanos@hotmail.com
2012-11-07 21:08:03 +00:00
parent 0e589d575c
commit 437841d8b4
2 changed files with 26 additions and 24 deletions

View File

@@ -75,29 +75,29 @@
// ---------- Procs below are for tanks that are used exclusively in 1-tank bombs ----------
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob) //Bomb assembly proc. This turns assembly+tank into a bomb
if(istype(W, /obj/item/device/assembly_holder))
var/obj/item/device/assembly_holder/S = W
if(!S.secured) //Check if the assembly is secured
return
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
user.drop_item() //Remove the assembly from your hands
user.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
user.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
S.master = R //Tell the assembly about its new owner
S.loc = R //Move the assembly out of the fucking way
R.bombtank = src //Same for tank
master = R
loc = R
R.update_icon()
/obj/item/weapon/tank/proc/bomb_assemble(W,user) //Bomb assembly proc. This turns assembly+tank into a bomb
var/obj/item/device/assembly_holder/S = W
var/mob/M = user
if(!S.secured) //Check if the assembly is secured
return
if(isigniter(S.a_left) == isigniter(S.a_right)) //Check if either part of the assembly has an igniter, but if both parts are igniters, then fuck it
return
var/obj/item/device/onetankbomb/R = new /obj/item/device/onetankbomb(loc)
M.drop_item() //Remove the assembly from your hands
M.remove_from_mob(src) //Remove the tank from your character,in case you were holding it
M.put_in_hands(R) //Equips the bomb if possible, or puts it on the floor.
R.bombassembly = S //Tell the bomb about its assembly part
S.master = R //Tell the assembly about its new owner
S.loc = R //Move the assembly out of the fucking way
R.bombtank = src //Same for tank
master = R
loc = R
R.update_icon()
return
/obj/item/weapon/tank/proc/ignite() //This happens when a bomb is told to explode
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6