mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
* Added pickup verb to all items
* Added "Toggle Open" verb to all closets and crates * Added "Toggle Lock" verb to all lockable closets * Modified the cloning computer's UI slightly, makes more sense, added a little delay when scanning to improve user feedback when trying to clone several braindead bodies. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3712 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -83,70 +83,54 @@
|
||||
req_access = list(access_heads) //Only used for record deletion right now.
|
||||
var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning.
|
||||
var/obj/machinery/clonepod/pod1 = null //Linked cloning pod.
|
||||
var/temp = "Initializing System..."
|
||||
var/temp = ""
|
||||
var/scantemp = "Scanner unoccupied"
|
||||
var/menu = 1 //Which menu screen to display
|
||||
var/list/records = list()
|
||||
var/datum/data/record/active_record = null
|
||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||
var/loading = 0 // Nice loading text
|
||||
|
||||
/obj/machinery/computer/cloning/New()
|
||||
..()
|
||||
spawn(5)
|
||||
updatemodules()
|
||||
/*src.scanner = findscanner()//locate(/obj/machinery/dna_scannernew, get_step(src, WEST))
|
||||
src.pod1 = findcloner()//locate(/obj/machinery/clonepod, get_step(src, EAST))
|
||||
world << "SEARCHING FOR MACHEIN"
|
||||
src.temp = ""
|
||||
if (isnull(src.scanner))
|
||||
src.temp += " <font color=red>SCNR-ERROR</font>"
|
||||
if (isnull(src.pod1))
|
||||
src.temp += " <font color=red>POD1-ERROR</font>"
|
||||
else
|
||||
src.pod1.connected = src
|
||||
|
||||
if (src.temp == "")
|
||||
src.temp = "System ready."*/
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
//world << "UPDATING MODULES"
|
||||
src.scanner = findscanner()//locate(/obj/machinery/dna_scannernew, get_step(src, WEST))
|
||||
src.pod1 = findcloner()//locate(/obj/machinery/clonepod, get_step(src, EAST))
|
||||
//world << "SEARCHING FOR MACHEIN"
|
||||
//src.temp = ""
|
||||
//if (isnull(src.scanner))
|
||||
// src.temp += " <font color=red>SCNR-ERROR</font>"
|
||||
if (!isnull(src.pod1))
|
||||
src.pod1.connected = src
|
||||
// src.temp += " <font color=red>POD1-ERROR</font>"
|
||||
//else
|
||||
src.scanner = findscanner()
|
||||
src.pod1 = findcloner()
|
||||
|
||||
//if (src.temp == "")
|
||||
// src.temp = "System ready."
|
||||
if (!isnull(src.pod1))
|
||||
src.pod1.connected = src // Some variable the pod needs
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findscanner()
|
||||
//..()
|
||||
//world << "SEARCHING FOR SCANNER"
|
||||
var/obj/machinery/dna_scannernew/scannerf = null
|
||||
|
||||
// Loop through every direction
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
//world << "SEARCHING IN [dir]"
|
||||
|
||||
// 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))
|
||||
//world << "FOUND"
|
||||
break
|
||||
|
||||
// If no scanner was found, it will return null
|
||||
return scannerf
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findcloner()
|
||||
//..()
|
||||
//world << "SEARCHING FOR POD"
|
||||
var/obj/machinery/clonepod/podf = null
|
||||
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
//world << "SEARCHING IN [dir]"
|
||||
|
||||
podf = locate(/obj/machinery/clonepod, get_step(src, dir))
|
||||
|
||||
if (!isnull(podf))
|
||||
//world << "FOUND"
|
||||
break
|
||||
|
||||
return podf
|
||||
|
||||
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
||||
@@ -184,6 +168,7 @@
|
||||
|
||||
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))
|
||||
@@ -195,18 +180,27 @@
|
||||
else
|
||||
dat += " <font color=green>Pod-Found!</font><br>"
|
||||
|
||||
// Scanner
|
||||
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!"
|
||||
dat += "No scanner connected!<br>"
|
||||
else
|
||||
if (src.scanner.occupant)
|
||||
dat += "<a href='byond://?src=\ref[src];scan=1'>Scan - [src.scanner.occupant]</a>"
|
||||
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
|
||||
dat += "Scanner unoccupied"
|
||||
scantemp = "Scanner unoccupied"
|
||||
|
||||
dat += "<br>Lock status: <a href='byond://?src=\ref[src];lock=1'>[src.scanner.locked ? "Locked" : "Unlocked"]</a>"
|
||||
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>"
|
||||
if (src.diskette)
|
||||
@@ -268,8 +262,21 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
if(loading)
|
||||
return
|
||||
|
||||
if ((href_list["scan"]) && (!isnull(src.scanner)))
|
||||
src.scan_mob(src.scanner.occupant)
|
||||
scantemp = ""
|
||||
|
||||
loading = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
spawn(20)
|
||||
src.scan_mob(src.scanner.occupant)
|
||||
|
||||
loading = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
//No locking an open scanner.
|
||||
else if ((href_list["lock"]) && (!isnull(src.scanner)))
|
||||
@@ -380,22 +387,22 @@
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
|
||||
src.temp = "Error: Unable to locate valid genetic data."
|
||||
scantemp = "Error: Unable to locate valid genetic data."
|
||||
return
|
||||
if (subject.brain_op_stage == 4.0)
|
||||
src.temp = "Error: No signs of intelligence detected."
|
||||
scantemp = "Error: No signs of intelligence detected."
|
||||
return
|
||||
if (subject.suiciding == 1)
|
||||
src.temp = "Error: Subject's brain is not responding to scanning stimuli."
|
||||
scantemp = "Error: Subject's brain is not responding to scanning stimuli."
|
||||
return
|
||||
if ((!subject.ckey) || (!subject.client))
|
||||
src.temp = "Error: Mental interface failure."
|
||||
scantemp = "Error: Mental interface failure."
|
||||
return
|
||||
if (NOCLONE in subject.mutations)
|
||||
src.temp = "Error: Mental interface failure."
|
||||
scantemp = "Error: Mental interface failure."
|
||||
return
|
||||
if (!isnull(find_record(subject.ckey)))
|
||||
src.temp = "Subject already in database."
|
||||
scantemp = "Subject already in database."
|
||||
return
|
||||
|
||||
subject.dna.check_integrity()
|
||||
@@ -428,7 +435,7 @@
|
||||
R.fields["mind"] = "\ref[subject.mind]"
|
||||
|
||||
src.records += R
|
||||
src.temp = "Subject successfully scanned."
|
||||
scantemp = "Subject successfully scanned."
|
||||
|
||||
//Find a specific record by key.
|
||||
/obj/machinery/computer/cloning/proc/find_record(var/find_key)
|
||||
|
||||
Reference in New Issue
Block a user