Runtime fixes for trying to use some href buttons on the DNA modifier console without a subject on the DNA scanner.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5446 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
aranclanos@hotmail.com
2013-01-02 07:08:18 +00:00
parent 468a106278
commit 503939e0f3

View File

@@ -931,6 +931,7 @@
src.temphtml = text("No viable occupant detected.")//More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
else
src.delete = 1
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
usr << browse(temphtml, "window=scannernew;size=550x650")
@@ -994,6 +995,7 @@
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
else
//src.temphtml = text("Unique Identifier: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.uni_identity)
//src.temphtml = text("Unique Identifier: <font color='blue'>[getleftblocks(src.connected.occupant.dna.uni_identity,uniblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.uni_identity,src.uniblock,3),3,1)][getrightblocks(src.connected.occupant.dna.uni_identity,uniblock,3)]</FONT><BR><BR>")
@@ -1126,6 +1128,7 @@
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
else
var/mob/living/carbon/human/H = src.connected.occupant
if(H)
if (H.reagents.get_reagent_amount("inaprovaline") < 60)
@@ -1134,7 +1137,11 @@
src.delete = 0
////////////////////////////////////////////////////////
if (href_list["strucmenu"])
if(src.connected.occupant)
if(!src.connected.occupant || !src.connected.occupant.dna)
src.temphtml = text("No viable occupant detected.")
usr << browse(temphtml, "window=scannernew;size=550x650")
onclose(usr, "scannernew")
else
// Get this shit outta here it sucks
//src.temphtml = text("Structural Enzymes: <font color='blue'>[getleftblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)][src.subblock == 1 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1)][src.subblock == 2 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1)][src.subblock == 3 ? "<U><B>"+getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)+"</U></B>" : getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)][getrightblocks(src.connected.occupant.dna.struc_enzymes,strucblock,3)]</FONT><BR><BR>")
//src.temphtml = text("Structural Enzymes: <font color='blue'>[]</FONT><BR><BR>", src.connected.occupant.dna.struc_enzymes)