Another stack of runtime errors dealt with.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@260 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-10-10 05:36:31 +00:00
parent 5b6d51966f
commit 7391fac4e9
28 changed files with 234 additions and 424 deletions
+3 -2
View File
@@ -79,8 +79,9 @@
if(href_list["open"])
toggle_valve()
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device = null
if(attached_device)
attached_device.loc = get_turf(src)
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
+22 -21
View File
@@ -1206,30 +1206,31 @@ Code:
else if (href_list["detonate"] && istype(src.cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["detonate"])
if (!P.toff && src.cartridge:shock_charges > 0)
src.cartridge:shock_charges--
if(P)
if (!P.toff && src.cartridge:shock_charges > 0)
src.cartridge:shock_charges--
var/difficulty = 0
var/difficulty = 0
if (!isnull(P.cartridge))
difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
difficulty += P.cartridge.access_manifest * 2
else
difficulty += 2
if (!isnull(P.cartridge))
difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
difficulty += P.cartridge.access_manifest * 2
else
difficulty += 2
if ((prob(difficulty * 12)) || (P.uplink))
usr.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3))
usr.show_message("\red Energy feeds back into your [src]!", 1)
src.explode()
else
usr.show_message("\blue Success!", 1)
P.explode()
src.updateUsrDialog()
if ((prob(difficulty * 12)) || (P.uplink))
usr.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3))
usr.show_message("\red Energy feeds back into your [src]!", 1)
src.explode()
else
usr.show_message("\blue Success!", 1)
P.explode()
src.updateUsrDialog()
else if (href_list["sendhonk"] && istype(src.cartridge, /obj/item/weapon/cartridge/clown))
var/obj/item/device/pda/P = locate(href_list["sendhonk"])
@@ -71,9 +71,10 @@ MOP
for(var/mob/O in viewers(user, null))
O.show_message(text("\red <B>[user] begins to clean [A]</B>"), 1)
sleep(20)
user << "\blue You have finished mopping!"
var/turf/U = A.loc
src.reagents.reaction(U)
if(A)
user << "\blue You have finished mopping!"
var/turf/U = A.loc
src.reagents.reaction(U)
if(A) del(A)
mopcount++
+10 -9
View File
@@ -92,15 +92,16 @@ obj/structure
if (src.icon_state == "reinforced") //Time to finalize!
user << "\blue Now finalising reinforced wall."
sleep(50)
if(get_turf(user) == T)
user << "\blue Wall fully reinforced!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithRWall()
W:amount--
if (W:amount <= 0)
del(W)
del(src)
return
if(W)
if(get_turf(user) == T)
user << "\blue Wall fully reinforced!"
var/turf/Tsrc = get_turf(src)
Tsrc.ReplaceWithRWall()
W:amount--
if (W:amount <= 0)
del(W)
del(src)
return
else
user << "\blue Now reinforcing girders"
sleep(60)
+6 -4
View File
@@ -434,11 +434,13 @@
return
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank( user )
R.part1 = S.part1
S.part1.loc = R
S.part1.master = R
if (S.part1)
S.part1.loc = R
S.part1.master = R
R.part2 = S.part2
S.part2.loc = R
S.part2.master = R
if (S.part2)
S.part2.loc = R
S.part2.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S