Fixes cloning. I'll take a working cloner over fancy text anyday.

This commit is contained in:
Erthilo
2012-06-04 03:34:06 +01:00
parent 2466b084b0
commit 8955c23d90
2 changed files with 19 additions and 39 deletions
+16 -36
View File
@@ -106,7 +106,7 @@
src.scanner = findscanner()
src.pod1 = findcloner()
if (!isnull(src.pod1) && !wantspod)
if (!isnull(src.pod1) && !wantspod)
src.pod1.connected = src // Some variable the pod needs
/obj/machinery/computer/cloning/proc/findscanner()
@@ -114,13 +114,14 @@
// Loop through every direction
for(dir in list(1,2,4,8,5,6,9,10))
// Try to find a scanner in that direction
scannerf = locate(/obj/machinery/dna_scannernew, get_step(src, dir))
// If found, then we break, and return the scanner
if (!isnull(scannerf))
break
if(isnull(scannerf) && wantsscan)
src.temp += " <font color=red>SCNR-ERROR</font>"
// If no scanner was found, it will return null
return scannerf
@@ -135,9 +136,6 @@
if (!isnull(podf))
break
if(isnull(podf) && wantspod)
src.temp += " <font color=red>POD1-ERROR</font>"
return podf
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
@@ -178,39 +176,21 @@
switch(src.menu)
if(1)
// Modules
dat += "<h4>Modules</h4>"
//dat += "<a href='byond://?src=\ref[src];relmodules=1'>Reload Modules</a>"
if (isnull(src.scanner))
dat += " <font color=red>Scanner-ERROR</font><br>"
else
dat += " <font color=green>Scanner-Found!</font><br>"
if (isnull(src.pod1))
dat += " <font color=red>Pod-ERROR</font><br>"
else
dat += " <font color=green>Pod-Found!</font><br>"
// Scanner
if(wantsscan)
dat += "<h4>Scanner Functions</h4>"
if(loading)
dat += "<b>Scanning...</b><br>"
else
dat += "<b>[scantemp]</b><br>"
if (isnull(src.scanner))
dat += "No scanner connected!<br>"
else
if (src.scanner.occupant)
if(scantemp == "Scanner unoccupied") scantemp = "" // Stupid check to remove the text
dat += "<a href='byond://?src=\ref[src];scan=1'>Scan - [src.scanner.occupant]</a><br>"
else
scantemp = "Scanner unoccupied"
dat += "Scanner unoccupied"
dat += "Lock status: <a href='byond://?src=\ref[src];lock=1'>[src.scanner.locked ? "Locked" : "Unlocked"]</a><br>"
// Database
dat += "<h4>Database Functions</h4>"
dat += "<a href='byond://?src=\ref[src];menu=2'>View Records</a><br>"
@@ -403,22 +383,22 @@
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
scantemp = "Error: Unable to locate valid genetic data."
src.temp = "Error: Unable to locate valid genetic data."
return
if (subject.brain_op_stage == 4.0)
scantemp = "Error: No signs of intelligence detected."
src.temp = "Error: No signs of intelligence detected."
return
// if (subject.suiciding == 1)
// scantemp = "Error: Subject's brain is not responding to scanning stimuli."
// src.temp = "Error: Subject's brain is not responding to scanning stimuli."
// return
// if ((!subject.ckey) || (!subject.client))
// scantemp = "Error: Mental interface failure."
// src.temp = "Error: Mental interface failure."
// return
if (NOCLONE in subject.mutations)
scantemp = "Error: Mental interface failure."
src.temp = "Error: Mental interface failure."
return
if (!isnull(find_record(subject.ckey)))
scantemp = "Subject already in database."
src.temp = "Subject already in database."
return
subject.dna.check_integrity()
@@ -458,7 +438,7 @@
R.fields["mind"] = "\ref[subject.mind]"
geneticsrecords["[copytext(md5(subject.real_name), 2, 6)]"] = R //Save it to the global scan list.
scantemp = "Subject successfully scanned."
src.temp = "Subject successfully scanned."
//Find a specific record by key.
/obj/machinery/computer/cloning/proc/find_record(var/find_key)
+3 -3
View File
@@ -3570,7 +3570,7 @@
"bqH" = (/obj/machinery/requests_console{announcementConsole = 0; department = "Medbay"; departmentType = 1; name = "Medbay RC"; pixel_x = 30; pixel_y = 0; pixel_z = 0},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/effect/sign/securearea{pixel_x = 32; pixel_y = 32},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"bqI" = (/turf/simulated/wall,/area/medical/genetics)
"bqJ" = (/obj/machinery/dna_scannernew,/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bqK" = (/obj/machinery/computer/cloning{wantspod = 0},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bqK" = (/obj/machinery/computer/cloning,/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bqL" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 8; on = 1},/obj/machinery/alarm{frequency = 1437; pixel_y = 23},/obj/structure/table,/obj/item/weapon/paper_bin,/obj/item/weapon/pen,/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bqM" = (/turf/simulated/wall/r_wall,/area/medical/genetics)
"bqN" = (/obj/structure/disposalpipe/segment{dir = 1},/turf/simulated/wall/r_wall,/area/medical/genetics)
@@ -3878,7 +3878,7 @@
"bwD" = (/obj/machinery/door/firedoor/border_only,/obj/machinery/door/airlock/medical{name = "Patient Room 3"; req_access_txt = "5"},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"bwE" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 4},/obj/item/device/radio/intercom{dir = 8; name = "Station Intercom (General)"; pixel_x = -28},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwF" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwG" = (/obj/machinery/computer/cloning{wantsscan = 0},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwG" = (/obj/structure/disposalpipe/segment{dir = 4},/obj/machinery/computer/cloning,/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwH" = (/obj/machinery/clonepod,/obj/structure/disposalpipe/segment{dir = 8; icon_state = "pipe-c"},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwI" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/obj/structure/closet/wardrobe/genetics_white,/turf/simulated/floor{icon_state = "white"},/area/medical/genetics)
"bwJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/wall/r_wall,/area/medical/genetics)
@@ -6592,7 +6592,7 @@
"cwN" = (/obj/machinery/r_n_d/server/centcom,/turf/unsimulated/floor{icon_state = "green"; dir = 6},/area/centcom/control)
"cwO" = (/turf/unsimulated/floor{tag = "icon-warning (NORTH)"; icon_state = "warning"; dir = 1; heat_capacity = 1},/area/centcom/control)
"cwP" = (/obj/machinery/dna_scannernew,/turf/unsimulated/floor{icon_state = "white"},/area/centcom/test)
"cwQ" = (/obj/machinery/scan_consolenew,/turf/unsimulated/floor{icon_state = "white"},/area/centcom/test)
"cwQ" = (/obj/machinery/computer/scan_consolenew,/turf/unsimulated/floor{icon_state = "white"},/area/centcom/test)
"cwR" = (/obj/machinery/computer/cloning,/turf/unsimulated/floor{icon_state = "white"},/area/centcom/test)
"cwS" = (/obj/machinery/clonepod,/turf/unsimulated/floor{icon_state = "white"},/area/centcom/test)
"cwT" = (/turf/unsimulated/floor{icon_state = "carpet"; dir = 2},/area/centcom/control)