Send"
-
- //Request Console Logs
- if(4)
-
- var/index = 0
- /* data_rc_msg
- X - 5%
- var/rec_dpt = "Unspecified" //name of the person - 15%
- var/send_dpt = "Unspecified" //name of the sender- 15%
- var/message = "Blank" //transferred message - 300px
- var/stamp = "Unstamped" - 15%
- var/id_auth = "Unauthenticated" - 15%
- var/priority = "Normal" - 10%
- */
- dat += "Back - Refresh
"
- dat += {"| X | Sending Dep. | Receiving Dep. |
- Message | Stamp | ID Auth. | Priority. |
"}
- for(var/datum/data_rc_msg/rc in src.linkedServer.rc_msgs)
- index++
- if(index > 3000)
- break
- // Del - Sender - Recepient - Message
- // X - Al Green - Your Mom - WHAT UP!?
- dat += {"| X | [rc.send_dpt] |
- [rc.rec_dpt] | [rc.message] | [rc.stamp] | [rc.id_auth] | [rc.priority] |
"}
- dat += "
"
-
-
- popup.width = 700
- popup.height = 700
- popup.set_content(dat)
- popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
- popup.open()
- return
-
-
- proc/BruteForce(mob/usr as mob)
- if(isnull(linkedServer))
- usr << "Could not complete brute-force: Linked Server Disconnected!"
- else
- var/currentKey = src.linkedServer.decryptkey
- usr << "Brute-force completed! The key is '[currentKey]'."
- src.hacking = 0
- src.active_state = normal_icon
- src.screen = 0 // Return the screen back to normal
-
- proc/UnmagConsole()
- src.active_state = normal_icon
- src.emag = 0
-
- proc/ResetMessage()
- customsender = "System Administrator"
- customrecepient = null
- custommessage = "This is a test, please ignore."
- customjob = "Admin"
-
- Topic(var/href, var/list/href_list)
- if(!interactable() || ..(href,href_list))
- return
-
- if ("auth" in href_list)
- if(auth)
- auth = 0
- screen = 0
- else
- var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
- if(dkey && dkey != "")
- if(src.linkedServer.decryptkey == dkey)
- auth = 1
- else
- message = incorrectkey
-
- //Turn the server on/off.
- if ("active" in href_list)
- if(auth) linkedServer.active = !linkedServer.active
- //Find a server
- if ("find" in href_list)
- if(message_servers && message_servers.len > 1)
- src.linkedServer = input(usr,"Please select a server.", "Select a server.", null) as null|anything in message_servers
- message = "NOTICE: Server selected."
- else if(message_servers && message_servers.len > 0)
- linkedServer = message_servers[1]
- message = "NOTICE: Only Single Server Detected - Server selected."
- else
- message = noserver
-
- //View the logs - KEY REQUIRED
- if ("view" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 1
-
- //Clears the logs - KEY REQUIRED
- if ("clear" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.linkedServer.pda_msgs = list()
- message = "NOTICE: Logs cleared."
- //Clears the request console logs - KEY REQUIRED
- if ("clearr" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.linkedServer.rc_msgs = list()
- message = "NOTICE: Logs cleared."
- //Change the password - KEY REQUIRED
- if ("pass" in href_list)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- var/dkey = trim(input(usr, "Please enter the decryption key.") as text|null)
- if(dkey && dkey != "")
- if(src.linkedServer.decryptkey == dkey)
- var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
- if(length(newkey) <= 3)
- message = "NOTICE: Decryption key too short!"
- else if(length(newkey) > 16)
- message = "NOTICE: Decryption key too long!"
- else if(newkey && newkey != "")
- src.linkedServer.decryptkey = newkey
- message = "NOTICE: Decryption key set."
- else
- message = incorrectkey
-
- //Hack the Console to get the password
- if ("hack" in href_list)
- if((istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot)) && (usr.mind.special_role && usr.mind.original == usr))
- src.hacking = 1
- src.screen = 2
- src.active_state = hack_icon
- //Time it takes to bruteforce is dependant on the password length.
- spawn(100*length(src.linkedServer.decryptkey))
- if(src && src.linkedServer && usr)
- BruteForce(usr)
- //Delete the log.
- if ("delete" in href_list)
- //Are they on the view logs screen?
- if(screen == 1)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else //if(istype(href_list["delete"], /datum/data_pda_msg))
- src.linkedServer.pda_msgs -= locate(href_list["delete"])
- message = "NOTICE: Log Deleted!"
- //Delete the request console log.
- if ("deleter" in href_list)
- //Are they on the view logs screen?
- if(screen == 4)
- if(!linkedServer || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else //if(istype(href_list["delete"], /datum/data_pda_msg))
- src.linkedServer.rc_msgs -= locate(href_list["deleter"])
- message = "NOTICE: Log Deleted!"
- //Create a custom message
- if ("msg" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 3
- //Fake messaging selection - KEY REQUIRED
- if ("select" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- screen = 0
- else
- switch(href_list["select"])
-
- //Reset
- if("Reset")
- ResetMessage()
-
- //Select Your Name
- if("Sender")
- customsender = input(usr, "Please enter the sender's name.") as text|null
-
- //Select Receiver
- if("Recepient")
- //Get out list of viable PDAs
- var/list/obj/item/device/pda/sendPDAs = list()
- for(var/obj/item/device/pda/P in PDAs)
- if(!P.owner || P.toff || P.hidden) continue
- sendPDAs += P
- if(PDAs && PDAs.len > 0)
- customrecepient = input(usr, "Select a PDA from the list.") as null|anything in sortAtom(sendPDAs)
- else
- customrecepient = null
-
-
- //Enter custom job
- if("RecJob")
- customjob = input(usr, "Please enter the sender's job.") as text|null
-
- //Enter message
- if("Message")
- custommessage = input(usr, "Please enter your message.") as text|null
- custommessage = copytext(sanitize(custommessage), 1, MAX_MESSAGE_LEN)
-
- //Send message
- if("Send")
-
- if(isnull(customsender) || customsender == "")
- customsender = "UNKNOWN"
-
- if(isnull(customrecepient))
- message = "NOTICE: No recepient selected!"
- return src.attack_hand(usr)
-
- if(isnull(custommessage) || custommessage == "")
- message = "NOTICE: No message entered!"
- return src.attack_hand(usr)
-
- var/obj/item/device/pda/PDARec = null
- for (var/obj/item/device/pda/P in PDAs)
- if (!P.owner || P.toff || P.hidden) continue
- if(P.owner == customsender)
- PDARec = P
- //Sender isn't faking as someone who exists
- if(isnull(PDARec))
- src.linkedServer.send_pda_message("[customrecepient.owner]", "[customsender]","[custommessage]")
- customrecepient.tnote += "← From [customsender] ([customjob]):
[custommessage]
"
- if (!customrecepient.silent)
- playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- for (var/mob/O in hearers(3, customrecepient.loc))
- O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
- if( customrecepient.loc && ishuman(customrecepient.loc) )
- var/mob/living/carbon/human/H = customrecepient.loc
- H << "\icon[customrecepient] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)"
- log_pda("[usr] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays.Cut()
- customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
- //Sender is faking as someone who exists
- else
- src.linkedServer.send_pda_message("[customrecepient.owner]", "[PDARec.owner]","[custommessage]")
- customrecepient.tnote += "← From [PDARec.owner] ([customjob]):
[custommessage]
"
- if (!customrecepient.silent)
- playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- for (var/mob/O in hearers(3, customrecepient.loc))
- O.show_message(text("\icon[customrecepient] *[customrecepient.ttone]*"))
- if( customrecepient.loc && ishuman(customrecepient.loc) )
- var/mob/living/carbon/human/H = customrecepient.loc
- H << "\icon[customrecepient] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)"
- log_pda("[usr] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]")
- customrecepient.overlays.Cut()
- customrecepient.overlays += image('icons/obj/pda.dmi', "pda-r")
- //Finally..
- ResetMessage()
-
- //Request Console Logs - KEY REQUIRED
- if("viewr" in href_list)
- if(src.linkedServer == null || (src.linkedServer.stat & (NOPOWER|BROKEN)))
- message = noserver
- else
- if(auth)
- src.screen = 4
-
- //usr << href_list["select"]
-
- if ("back" in href_list)
- src.screen = 0
- interact()
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/prisonshuttle.dm b/code/WorkInProgress/computer3/computers/prisonshuttle.dm
deleted file mode 100644
index f6f246e578..0000000000
--- a/code/WorkInProgress/computer3/computers/prisonshuttle.dm
+++ /dev/null
@@ -1,242 +0,0 @@
-//Config stuff
-#define PRISON_MOVETIME 150 //Time to station is milliseconds.
-#define PRISON_STATION_AREATYPE "/area/shuttle/prison/station" //Type of the prison shuttle area for station
-#define PRISON_DOCK_AREATYPE "/area/shuttle/prison/prison" //Type of the prison shuttle area for dock
-
-var/prison_shuttle_moving_to_station = 0
-var/prison_shuttle_moving_to_prison = 0
-var/prison_shuttle_at_station = 0
-var/prison_shuttle_can_send = 1
-var/prison_shuttle_time = 0
-var/prison_shuttle_timeleft = 0
-
-/obj/machinery/computer3/prison_shuttle
- name = "Prison Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "shuttle"
- req_access = list(access_security)
- circuit = "/obj/item/part/board/circuit/prison_shuttle"
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
- var/prison_break = 0
-
-
- attackby(I as obj, user as mob)
- return src.attack_hand(user)
-
-
- attack_ai(var/mob/user as mob)
- return src.attack_hand(user)
-
-
- attack_paw(var/mob/user as mob)
- return src.attack_hand(user)
-
-
- attackby(I as obj, user as mob)
- if(istype(I, /obj/item/tool/screwdriver))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
- if(do_after(user, 20))
- var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
- var/obj/item/part/board/circuit/prison_shuttle/M = new /obj/item/part/board/circuit/prison_shuttle( A )
- for (var/obj/C in src)
- C.loc = src.loc
- A.circuit = M
- A.anchored = 1
-
- if (src.stat & BROKEN)
- user << "\blue The broken glass falls out."
- new /obj/item/trash/shard( src.loc )
- A.state = 3
- A.icon_state = "3"
- else
- user << "\blue You disconnect the monitor."
- A.state = 4
- A.icon_state = "4"
-
- del(src)
- else if(istype(I,/obj/item/card/emag) && (!hacked))
- hacked = 1
- user << "\blue You disable the lock."
- else
- return src.attack_hand(user)
-
-
- attack_hand(var/mob/user as mob)
- if(!src.allowed(user) && (!hacked))
- user << "\red Access Denied."
- return
- if(prison_break)
- user << "\red Unable to locate shuttle."
- return
- if(..())
- return
- user.set_machine(src)
- post_signal("prison")
- var/dat
- if (src.temp)
- dat = src.temp
- else
- dat += {"Location: [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "Moving to station ([prison_shuttle_timeleft] Secs.)":prison_shuttle_at_station ? "Station":"Dock"]
- [prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison ? "\n*Shuttle already called*
\n
":prison_shuttle_at_station ? "\nSend to Dock
\n
":"\nSend to Station
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", name, 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-
- Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
- if(!prison_shuttle_at_station|| prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
- post_signal("prison")
- usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
- src.temp += "Shuttle sent.
OK"
- src.updateUsrDialog()
- prison_shuttle_moving_to_prison = 1
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
-
- else if (href_list["sendtostation"])
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
- if(prison_shuttle_at_station || prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
- post_signal("prison")
- usr << "\blue The prison shuttle has been called and will arrive in [(PRISON_MOVETIME/10)] seconds."
- src.temp += "Shuttle sent.
OK"
- src.updateUsrDialog()
- prison_shuttle_moving_to_station = 1
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
-
- else if (href_list["mainmenu"])
- src.temp = null
-
- src.add_fingerprint(usr)
- src.updateUsrDialog()
- return
-
-
- proc/prison_can_move()
- if(prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return 0
- else return 1
-
-/*
- proc/prison_break()
- switch(prison_break)
- if (0)
- if(!prison_shuttle_at_station || prison_shuttle_moving_to_prison) return
-
- prison_shuttle_moving_to_prison = 1
- prison_shuttle_at_station = prison_shuttle_at_station
-
- if (!prison_shuttle_moving_to_prison || !prison_shuttle_moving_to_station)
- prison_shuttle_time = world.timeofday + PRISON_MOVETIME
- spawn(0)
- prison_process()
- prison_break = 1
- if(1)
- prison_break = 0
-*/
-
- proc/post_signal(var/command)
- var/datum/radio_frequency/frequency = radio_controller.return_frequency(1311)
- if(!frequency) return
- var/datum/signal/status_signal = new
- status_signal.source = src
- status_signal.transmission_method = 1
- status_signal.data["command"] = command
- frequency.post_signal(src, status_signal)
- return
-
-
- proc/prison_process()
- while(prison_shuttle_time - world.timeofday > 0)
- var/ticksleft = prison_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- prison_shuttle_time = world.timeofday + 10 // midnight rollover
-
- prison_shuttle_timeleft = (ticksleft / 10)
- sleep(5)
- prison_shuttle_moving_to_station = 0
- prison_shuttle_moving_to_prison = 0
-
- switch(prison_shuttle_at_station)
-
- if(0)
- prison_shuttle_at_station = 1
- if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
-
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
-
- var/area/start_location = locate(/area/shuttle/prison/prison)
- var/area/end_location = locate(/area/shuttle/prison/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
- start_location.move_contents_to(end_location)
-
- if(1)
- prison_shuttle_at_station = 0
- if (prison_shuttle_moving_to_station || prison_shuttle_moving_to_prison) return
-
- if (!prison_can_move())
- usr << "\red The prison shuttle is unable to leave."
- return
-
- var/area/start_location = locate(/area/shuttle/prison/station)
- var/area/end_location = locate(/area/shuttle/prison/prison)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
- start_location.move_contents_to(end_location)
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/scanconsole.dm b/code/WorkInProgress/computer3/computers/scanconsole.dm
deleted file mode 100644
index 446fb5c8ff..0000000000
--- a/code/WorkInProgress/computer3/computers/scanconsole.dm
+++ /dev/null
@@ -1,1267 +0,0 @@
-/obj/machinery/computer3/scan_consolenew
- default_prog = /datum/file/program/dnascanner
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/storage/removable,/obj/item/part/computer/networking/prox)
-
-
-#define MAX_UIBLOCK 13
-#define MAX_SEBLOCK 14
-
-/datum/file/program/dnascanner
- name = "DNA Scanner and Manipulator"
- desc = "The DNA ScaM is sure to change your life forever."
- active_state = "dna"
- var/obj/machinery/dna_scannernew/scanner = null
-
- var/ui_block = 1
- var/se_block = 1
- var/subblock = 1
-
- var/uitarget = 1
- var/uitargethex = "1"
-
- var/radduration = 2
- var/radstrength = 1
-
- var/injectorready = 0 //Quick fix for issue 286 (screwdriver the screen twice to restore injector) -Pete
-
- var/mode = 0
- // These keep track of the patient status
- var/present = 0
- var/viable = 0
-
- var/bufferlabel = ""
- var/datum/dna/buffer = null
- var/obj/item/part/computer/target_drive = null
-
- Reset()
- ..()
- mode = 0
- scanner = null
- ui_block = 1
- se_block = 1
- subblock = 1
- buffer = null
- bufferlabel = ""
-
-
- Topic(var/href, var/list/href_list)
- if(!interactable() || !computer.net || ..(href,href_list))
- return
-
- scanner = computer.net.connect_to(/obj/machinery/dna_scannernew, scanner) // if exists, will be verified
- if(!scanner)
- computer.Crash(NETWORK_FAILURE)
- return
-
- // todo check everything goddamnit
- present = scanner.occupant && scanner.occupant.dna
- viable = present && !(NOCLONE in scanner.occupant.mutations)
-
- // current screen/function
- if("mode" in href_list)
- mode = text2num(href_list["mode"])
- // locks scanner door
- if("lock" in href_list)
- scanner.locked = !scanner.locked
-
- // inject good-juice
- if("rejuv" in href_list)
- rejuv()
-
- // expose to radiation, controlled otherwise
- if("pulse" in href_list)
- pulse(href_list["pulse"]) // ui, se, or nothing/null
-
- if("duration" in href_list)
- var/modifier = text2num(href_list["duration"])
- radduration += modifier
- if("strength" in href_list)
- var/modifier = text2num(href_list["strength"])
- radstrength += modifier
-
- if("uiblock" in href_list)
- ui_block = text2num(href_list["uiblock"])
- if("seblock" in href_list)
- se_block = text2num(href_list["seblock"])
- if("subblock" in href_list)
- subblock = text2num(href_list["subblock"])
- if("uitarget" in href_list)
- uitarget = text2num(href_list["uitarget"])
- uitargethex = num2hex(uitarget)
-
- // save dna to buffer - buffer=se,ui,ue,all,clear
- if("buffer" in href_list)
- if(!viable)
- return
- var/which = href_list["buffer"]
- if(!which || which == "clear")
- buffer = null
- else
- if(!buffer)
- buffer = new
- if( which == "all" )
- buffer.unique_enzymes = scanner.occupant.dna.unique_enzymes
- buffer.struc_enzymes = scanner.occupant.dna.struc_enzymes
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- buffer.real_name = scanner.occupant.dna.real_name
- buffer.mutantrace = scanner.occupant.dna.mutantrace
- if( which == "se" )
- buffer.struc_enzymes = scanner.occupant.dna.struc_enzymes
- buffer.mutantrace = scanner.occupant.dna.mutantrace
- if( which == "ui" )
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- if( which == "ue" )
- buffer.uni_identity = scanner.occupant.dna.uni_identity
- buffer.unique_enzymes = scanner.occupant.dna.unique_enzymes
- buffer.real_name = scanner.occupant.dna.real_name
-
- // save buffer to file -
- if("save" in href_list)
- if(!viable || !buffer)
- return
- var/datum/file/data/genome/G = null
- var/obj/item/part/computer/dest = device
- if(target_drive)
- dest = target_drive
-
- switch(href_list["save"])
- if("se")
- if(buffer.struc_enzymes)
- G = new /datum/file/data/genome/SE()
- G.content = buffer.struc_enzymes
- G:mutantrace = buffer.mutantrace // : not . due to inheritance
- G.real_name = buffer.real_name
- if("ui")
- if(buffer.uni_identity)
- G = new /datum/file/data/genome/UI()
- G.content = buffer.uni_identity
- G.real_name = buffer.real_name
- if("ue")
- if(buffer.uni_identity)
- G = new /datum/file/data/genome/UI/UE()
- G.content = buffer.uni_identity
- G.real_name = buffer.real_name
- if(G && dest)
- var/label = input(usr, "Enter a filename:", "Save file", buffer.real_name) as text
- G.name = G.name + "([label])"
- dest:addfile(G)
-
- // load buffer from file
- if("load" in href_list)
- var/datum/file/data/genome/G = locate(href_list["load"])
- if(G)
- if(!buffer)
- buffer = new
- switch(G.type)
- if(/datum/file/data/genome/SE)
- buffer.struc_enzymes = G.content
- buffer.mutantrace = G:mutantrace
- if(/datum/file/data/genome/UI/UE)
- buffer.uni_identity = G.content
- buffer.real_name = G.real_name
- buffer.unique_enzymes = md5(buffer.real_name)
- if(/datum/file/data/genome/UI)
- buffer.uni_identity = G.content
- if(/datum/file/data/genome/cloning)
- var/datum/dna/record = G:record
- buffer.unique_enzymes = record.unique_enzymes
- buffer.struc_enzymes = record.struc_enzymes
- buffer.uni_identity = record.uni_identity
- buffer.real_name = record.real_name
- buffer.mutantrace = record.mutantrace
-
-
- // inject genetics into occupant
- if("inject" in href_list)
- if(!buffer || !viable)
- return
-
- var/which = href_list["inject"]
- var/datum/dna/target = scanner.occupant.dna
- switch(which)
- if("all",null)
- if(buffer.struc_enzymes)
- target.struc_enzymes = buffer.struc_enzymes
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- if(buffer.real_name)
- target.real_name = buffer.real_name
- target.unique_enzymes = md5(target.real_name)
- updateappearance(scanner.occupant,target.uni_identity)
- domutcheck(scanner.occupant, scanner, 1)
- if("se")
- if(buffer.struc_enzymes)
- target.struc_enzymes = buffer.struc_enzymes
- domutcheck(scanner.occupant, scanner, 1)
- if("ui")
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- updateappearance(scanner.occupant,target.uni_identity)
- if("ue")
- if(buffer.uni_identity)
- target.uni_identity = buffer.uni_identity
- if(buffer.real_name)
- target.real_name = buffer.real_name
- target.unique_enzymes = md5(target.real_name)
- updateappearance(scanner.occupant,target.uni_identity)
-
- // generate dna injector
- if("generate" in href_list)
- if(!buffer || !injectorready)
- return
- buffer.check_integrity()
- var/which = href_list["generate"]
- var/obj/item/weapon/dnainjector/inj
- switch(which)
- if("se")
- inj = new(computer.loc)
- inj.dnatype = "se"
- inj.dna = buffer.struc_enzymes
- inj.mutantrace = buffer.mutantrace
- inj.name = "Structural Enzymes"
- if("ui")
- inj = new(computer.loc)
- inj.dnatype = "ui"
- inj.dna = buffer.uni_identity
- inj.ue = null
- inj.name = "Unique Identifiers"
- if("ue")
- inj = new(computer.loc)
- inj.dnatype = "ui"
- inj.dna = buffer.uni_identity
- inj.ue = buffer.real_name
- inj.name = "Unique Enzymes + Unique Identifiers"
- if(inj)
- injectorready = 0
- spawn(300)
- injectorready = 1
- var/label = input(usr, "Enter a label", "Label [inj.name] Injector", buffer.real_name) as null|text
- if(label && inj) // it's possible it was deleted before we get here, input suspends execution
- inj.name += " ([label])"
-
- interact()
- return // putting this in there to visually mark the end of topic() while I do other things
-
- proc/menu()
- if(!present && (mode==1 || mode==2)) // require viable occupant
- mode = 0
- switch(mode)
- if(0) // MAIN MENU
- return main_menu()
-
- if(1)
- return ui_menu()
- if(2)
- return se_menu()
-
- if(3)
- return emitter_menu()
-
- if(4)
- return buffer_menu()
-
- // unified header with health data
- // option to show UI,UE,SE as plaintext
- proc/status_display(var/dna_summary = 0)
- var/mob/living/occupant = scanner.occupant
- var/status_html
- if(viable)
- status_html = "Health:
[occupant.health]%
"
- status_html += "Radiation Level:
[occupant.radiation]%
"
- if(ishuman(occupant))
- var/rejuvenators = round(occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
- status_html += "Rejuvenators:
[occupant.reagents.get_reagent_amount("inaprovaline")] units
"
-
- if (dna_summary)
- status_html += "Unique Enzymes :
[uppertext(occupant.dna.unique_enzymes)]
"
- status_html += "Unique Identifier:
[occupant.dna.uni_identity]
"
- status_html += "Structural Enzymes:
[occupant.dna.struc_enzymes]
"
-
- var/occupant_status = "Scanner Unoccupied"
- if(present)
- if(!viable)
- occupant_status = "Invalid DNA structure"
- else
- switch(occupant.stat) // obvious, see what their status is
- if(0)
- occupant_status = "Conscious"
- if(1)
- occupant_status = "Unconscious"
- else
- occupant_status = "DEAD"
-
- occupant_status = "[occupant.name] => [occupant_status]
"
- var/dat = "Scanner Status
[topic_link(src,"","Scan")][occupant_status][status_html]
"
- if(present)
- dat += topic_link(src,"lock",scanner.locked?"Unlock Scanner":"Lock Scanner") + " " + topic_link(src,"rejuv","Inject Rejuvenators")
- else
- dat += "[scanner.locked?"Unlock Scanner":"Lock Scanner"] Inject Rejuvenators"
- return dat
-
- proc/main_menu()
- var/dat = status_display(dna_summary = 1)
- dat += "
Main Menu
"
- if(present)
- dat += topic_link(src,"mode=1","Modify Unique Identifier") + "
" + topic_link(src,"mode=2","Modify Structural Enzymes") + "
"
- else
- dat += "Modify Unique Identifier
Modify Structural Enzymes
"
- dat += topic_link(src,"mode=3","Radiation Emitter Settings") + "
" + topic_link(src,"mode=4","Transfer Buffer")
- return dat
-
-
- proc/block_plus_minus(var/topicstr, var/blockval,var/min,var/max)
- var/left = blockval - 1
- var/right = blockval + 1
- if(left < min)
- left = max
- if(right > max)
- right = min
- return topic_link(src,"[topicstr]=[left]","<-") + " [blockval] " + topic_link(src,"[topicstr]=[right]","->")
-
-
- proc/getblockstring(var/ui = 0)
- var/mainblock = "seblock"
- var/block = se_block
- var/input = scanner.occupant.dna.struc_enzymes
- if(ui)
- mainblock = "uiblock"
- block = ui_block
- input = scanner.occupant.dna.uni_identity
-
- var/string = ""
- var/subpos = 1 // keeps track of the current sub block
- var/blockpos = 1
-
- for(var/i = 1, i <= length(input), i++) // loop through each letter
-
- if(blockpos == block && subpos == subblock) // if the current block/subblock is selected, mark it
- string += fake_link(copytext(input,i,i+1))
- else
- string += topic_link(src,"[mainblock]=[blockpos];subblock=[subpos]",copytext(input,i,i+1))
-
- subpos++
- if(subpos > 3) // add a line break for every block
- string += "
"
- subpos = 1
- blockpos++
-
- string += "
"
- return string
-
- proc/ui_menu()
- if(!viable)
- return "No viable occupant detected."
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Modify Unique Identifier
"
- dat += "Unique Identifier:
[getblockstring(ui=1)]
"
-
- dat += "Selected Block: " + block_plus_minus("uiblock",ui_block,1,MAX_UIBLOCK) + "
"
- dat += "Selected Sub-Block: " + block_plus_minus("subblock",subblock,1,3) + "
"
- dat += "Selected Target: " + block_plus_minus("uitarget",uitarget,0,15) + "
"
- dat += "Modify Block
"
- dat += topic_link(src,"pulse=ui","Irradiate") + "
"
- return dat
-
- proc/se_menu()
- if(!viable)
- return "No viable occupant detected."
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Modify Structural Enzymes
"
- dat += "Structural Enzymes: [getblockstring(ui=0)]
"
- dat += "Selected Block: " + block_plus_minus("seblock",se_block,1,MAX_SEBLOCK) + "
"
- dat += "Selected Sub-Block: " + block_plus_minus("subblock",subblock,1,3) + "
"
- dat += "Modify Block
"
- dat += topic_link(src,"pulse=se","Irradiate") + "
"
- return dat
-
- proc/emitter_menu()
- var/dat = topic_link(src,"mode=0","<< Main Menu") + "
"
- dat += "Radiation Emitter Settings
"
- if (viable)
- dat += topic_link(src,"pulse","Pulse Radiation")
- else
- dat += fake_link("Pulse Radiation")
- dat += "
"
- dat += "Radiation Duration: " + block_plus_minus("duration",radduration,1,20) + "
"
- dat += "Radiation Intensity: " + block_plus_minus("strength",radstrength,1,10) + "
"
- return dat
-
- proc/buffer_menu()
-
- interact()
- if(!interactable())
- return
- popup.add_stylesheet("scannernew", 'html/browser/scannernew.css')
-
- if(!computer.net)
- computer.Crash(MISSING_PERIPHERAL)
- return
-
- scanner = computer.net.connect_to(/obj/machinery/dna_scannernew, scanner) // if exists, will be verified
- if(!scanner)
- computer.Crash(NETWORK_FAILURE)
- return
-
- // todo check everything goddamnit
-
- present = scanner.occupant && scanner.occupant.dna
- viable = present && !(NOCLONE in scanner.occupant.mutations)
-
- popup.set_content(menu())
- popup.open()
-
- proc/pulse(var/target as null|anything in list("ui","se"))
-
- //Makes sure someone is in there (And valid) before trying anything
- //More than anything, this just acts as a sanity check in case the option DOES appear for whatever reason
-
- if(target != "ui" && target != "se")
- target = null
-
- // transforms into the fail condition instead of having it in yet another nested if block
- else if( prob(20 - (radduration / 2)))
- target += "-f"
-
- if(!viable)
- popup.set_content("No viable occupant detected.")
- popup.open()
- else
- popup.set_content("Working ... Please wait ([radduration]) Seconds)")
- popup.open()
-
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
-
- switch(target)
- if("ui")
- var/ui = scanner.occupant.dna.uni_identity
- var/block = getblock(ui,ui_block,3)
- var/result = ""
- for(var/sb = 1; sb <=3; sb++)
- var/temp = copytext(block,sb,sb+1)
- if(sb == subblock)
- temp = miniscramble("[uitargethex]",radstrength,radduration)
- result += temp
- scanner.occupant.dna.uni_identity = setblock(ui, ui_block, result,3)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += (radstrength+radduration)
- if("ui-f")
- if (prob(20+radstrength))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
-
- if("se")
- var/se = scanner.occupant.dna.struc_enzymes
- var/targetblock = se_block
-
- if (!(se_block in list(2,8,10,12)) && prob (20)) // shifts the target slightly
- if (se_block <= 5)
- targetblock++
- else
- targetblock--
- var/block = getblock(scanner.occupant.dna.struc_enzymes,targetblock,3)
-
- var/result = ""
- for(var/sb = 1; sb <=3; sb++)
- var/temp = copytext(block,sb,sb+1)
- if(sb == subblock)
- temp = miniscramble(temp,radstrength,radduration)
- result += temp
-
- scanner.occupant.dna.struc_enzymes = setblock(se, se_block, result,3)
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- if("se-f")
- if (prob(80-radduration))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
-
- if(null)
- if (prob(95))
- if(prob(75))
- randmutb(scanner.occupant)
- else
- randmuti(scanner.occupant)
- else
- if(prob(95))
- randmutg(scanner.occupant)
- else
- randmuti(scanner.occupant)
- scanner.occupant.radiation += ((radstrength*3)+radduration*3)
-
-
- scanner.locked = lock_state
- interact()
-
- proc/rejuv()
- if(!viable)
- popup.set_content("No viable occupant detected.")
- popup.open()
- var/mob/living/carbon/human/H = scanner.occupant
- if(istype(H))
- var/inap = H.reagents.get_reagent_amount("inaprovaline") // oh my *god* this section was ugly before I shortened it
-
- if (inap < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
- H.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
- else
- H.reagents.add_reagent("inaprovaline", max(REJUVENATORS_MAX - inap,0))
-
-/*
-/obj/machinery/computer/scan_consolenew/Topic(href, href_list)
-
- temp_html = null
- var/temp_header_html = null
- var/temp_footer_html = null
-
- scanner_status_html = null // Scanner status is reset each update
- var/mob/living/occupant = scanner.occupant
- var/viable_occupant = (occupant && occupant.dna && !(NOCLONE in occupant.mutations))
- var/mob/living/carbon/human/human_occupant = scanner.occupant
-
- if (href_list["screen"]) // Passing a screen is only a request, we set current_screen here but it can be overridden below if necessary
- current_screen = href_list["screen"]
-
- if (!viable_occupant) // If there is no viable occupant only allow certain screens
- var/allowed_no_occupant_screens = list("mainmenu", "radsetmenu", "buffermenu") //These are the screens which will be allowed if there's no occupant
- if (!(current_screen in allowed_no_occupant_screens))
- href_list = new /list(0) // clear list of options
- current_screen = "mainmenu"
-
-
- if (!current_screen) // If no screen is set default to mainmenu
- current_screen = "mainmenu"
-
-
- if (!scanner) //Is the scanner not connected?
- scanner_status_html = "ERROR: No DNA Scanner connected."
- current_screen = null // blank does not exist in the switch below, so no screen will be outputted
- updateUsrDialog()
- return
-
- usr.set_machine(src)
- if (href_list["locked"])
- if (scanner.occupant)
- scanner.locked = !( scanner.locked )
- ////////////////////////////////////////////////////////
- if (href_list["genpulse"])
- if(!viable_occupant)//Makes sure someone is in there (And valid) before trying anything
- temp_html = 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(temp_html, "window=scannernew;size=550x650")
- //onclose(usr, "scannernew")
- popup.set_content(temp_html)
- popup.open()
- else
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
- if (!scanner.occupant)
- temp_html = null
- return null
- if (prob(95))
- if(prob(75))
- randmutb(scanner.occupant)
- else
- randmuti(scanner.occupant)
- else
- if(prob(95))
- randmutg(scanner.occupant)
- else
- randmuti(scanner.occupant)
- scanner.occupant.radiation += ((radstrength*3)+radduration*3)
- scanner.locked = lock_state
- temp_html = null
- dopage(src,"screen=radsetmenu")
- if (href_list["radleplus"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- if (radduration < 20)
- radduration++
- radduration++
- dopage(src,"screen=radsetmenu")
- if (href_list["radleminus"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- if (radduration > 2)
- radduration--
- radduration--
- dopage(src,"screen=radsetmenu")
- if (href_list["radinplus"])
- if (radstrength < 10)
- radstrength++
- dopage(src,"screen=radsetmenu")
- if (href_list["radinminus"])
- if (radstrength > 1)
- radstrength--
- dopage(src,"screen=radsetmenu")
- ////////////////////////////////////////////////////////
- if (href_list["unimenuplus"])
- if (ui_block < 13)
- ui_block++
- else
- ui_block = 1
- dopage(src,"screen=unimenu")
- if (href_list["unimenuminus"])
- if (ui_block > 1)
- ui_block--
- else
- ui_block = 13
- dopage(src,"screen=unimenu")
- if (href_list["unimenusubplus"])
- if (subblock < 3)
- subblock++
- else
- subblock = 1
- dopage(src,"screen=unimenu")
- if (href_list["unimenusubminus"])
- if (subblock > 1)
- subblock--
- else
- subblock = 3
- dopage(src,"screen=unimenu")
- if (href_list["unimenutargetplus"])
- if (unitarget < 15)
- unitarget++
- unitargethex = unitarget
- switch(unitarget)
- if(10)
- unitargethex = "A"
- if(11)
- unitargethex = "B"
- if(12)
- unitargethex = "C"
- if(13)
- unitargethex = "D"
- if(14)
- unitargethex = "E"
- if(15)
- unitargethex = "F"
- else
- unitarget = 0
- unitargethex = 0
- dopage(src,"screen=unimenu")
- if (href_list["unimenutargetminus"])
- if (unitarget > 0)
- unitarget--
- unitargethex = unitarget
- switch(unitarget)
- if(10)
- unitargethex = "A"
- if(11)
- unitargethex = "B"
- if(12)
- unitargethex = "C"
- if(13)
- unitargethex = "D"
- if(14)
- unitargethex = "E"
- else
- unitarget = 15
- unitargethex = "F"
- dopage(src,"screen=unimenu")
- if (href_list["uimenuset"] && href_list["uimenusubset"]) // This chunk of code updates selected block / sub-block based on click
- var/menuset = text2num(href_list["uimenuset"])
- var/menusubset = text2num(href_list["uimenusubset"])
- if ((menuset <= 13) && (menuset >= 1))
- ui_block = menuset
- if ((menusubset <= 3) && (menusubset >= 1))
- subblock = menusubset
- dopage(src, "unimenu")
- if (href_list["unipulse"])
- if(scanner.occupant)
- var/block
- var/newblock
- var/tstructure2
- block = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),subblock,1)
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- sleep(10*radduration)
- if (!scanner.occupant)
- temp_html = null
- return null
- ///
- if (prob((80 + (radduration / 2))))
- block = miniscrambletarget(num2text(unitarget), radstrength, radduration)
- newblock = null
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),1,1) + getblock(getblock(scanner.occupant.dna.uni_identity,ui_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.uni_identity, ui_block, newblock,3)
- scanner.occupant.dna.uni_identity = tstructure2
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += (radstrength+radduration)
- else
- if (prob(20+radstrength))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
- scanner.locked = lock_state
- dopage(src,"screen=unimenu")
-
- ////////////////////////////////////////////////////////
- if (href_list["rejuv"])
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- if(human_occupant)
- if (human_occupant.reagents.get_reagent_amount("inaprovaline") < REJUVENATORS_MAX)
- if (human_occupant.reagents.get_reagent_amount("inaprovaline") < (REJUVENATORS_MAX - REJUVENATORS_INJECT))
- human_occupant.reagents.add_reagent("inaprovaline", REJUVENATORS_INJECT)
- else
- human_occupant.reagents.add_reagent("inaprovaline", round(REJUVENATORS_MAX - human_occupant.reagents.get_reagent_amount("inaprovaline")))
- //usr << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", human_occupant.reagents.get_reagent_amount("inaprovaline"))
-
- ////////////////////////////////////////////////////////
- if (href_list["strucmenuplus"])
- if (se_block < 14)
- se_block++
- else
- se_block = 1
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenuminus"])
- if (se_block > 1)
- se_block--
- else
- se_block = 14
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenusubplus"])
- if (subblock < 3)
- subblock++
- else
- subblock = 1
- dopage(src,"screen=strucmenu")
- if (href_list["strucmenusubminus"])
- if (subblock > 1)
- subblock--
- else
- subblock = 3
- dopage(src,"screen=strucmenu")
- if (href_list["semenuset"] && href_list["semenusubset"]) // This chunk of code updates selected block / sub-block based on click (se stands for strutural enzymes)
- var/menuset = text2num(href_list["semenuset"])
- var/menusubset = text2num(href_list["semenusubset"])
- if ((menuset <= 14) && (menuset >= 1))
- se_block = menuset
- if ((menusubset <= 3) && (menusubset >= 1))
- subblock = menusubset
- dopage(src, "strucmenu")
- if (href_list["strucpulse"])
- var/block
- var/newblock
- var/tstructure2
- var/oldblock
- var/lock_state = scanner.locked
- scanner.locked = 1//lock it
- if (viable_occupant)
- block = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),subblock,1)
-
- temp_html = text("Working ... Please wait ([] Seconds)", radduration)
- popup.set_content(temp_html)
- popup.open()
- sleep(10*radduration)
- else
- temp_html = null
- return null
- ///
- if(viable_occupant)
- if (prob((80 + (radduration / 2))))
- if ((se_block != 2 || se_block != 12 || se_block != 8 || se_block || 10) && prob (20))
- oldblock = se_block
- block = miniscramble(block, radstrength, radduration)
- newblock = null
- if (se_block > 1 && se_block < 5)
- se_block++
- else if (se_block > 5 && se_block < 14)
- se_block--
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
- scanner.occupant.dna.struc_enzymes = tstructure2
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- se_block = oldblock
- else
- //
- block = miniscramble(block, radstrength, radduration)
- newblock = null
- if (subblock == 1) newblock = block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 2) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + block + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),3,1)
- if (subblock == 3) newblock = getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),1,1) + getblock(getblock(scanner.occupant.dna.struc_enzymes,se_block,3),2,1) + block
- tstructure2 = setblock(scanner.occupant.dna.struc_enzymes, se_block, newblock,3)
- scanner.occupant.dna.struc_enzymes = tstructure2
- domutcheck(scanner.occupant,scanner)
- scanner.occupant.radiation += (radstrength+radduration)
- else
- if (prob(80-radduration))
- randmutb(scanner.occupant)
- domutcheck(scanner.occupant,scanner)
- else
- randmuti(scanner.occupant)
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- scanner.occupant.radiation += ((radstrength*2)+radduration)
- scanner.locked = lock_state
- ///
- dopage(src,"screen=strucmenu")
-
- ////////////////////////////////////////////////////////
- if (href_list["b1addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1iue = 0
- buffer1 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Unique Identifier"
- buffer1type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b1adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Unique Identifier & Unique Enzymes"
- buffer1type = "ui"
- buffer1iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b2adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Unique Identifier & Unique Enzymes"
- buffer2type = "ui"
- buffer2iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b3adduiue"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Unique Identifier & Unique Enzymes"
- buffer3type = "ui"
- buffer3iue = 1
- dopage(src,"screen=buffermenu")
- if (href_list["b2addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2iue = 0
- buffer2 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Unique Identifier"
- buffer2type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b3addui"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3iue = 0
- buffer3 = scanner.occupant.dna.uni_identity
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Unique Identifier"
- buffer3type = "ui"
- dopage(src,"screen=buffermenu")
- if (href_list["b1addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer1iue = 0
- buffer1 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer1owner = scanner.occupant.name
- else
- buffer1owner = scanner.occupant.real_name
- buffer1label = "Structural Enzymes"
- buffer1type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b2addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer2iue = 0
- buffer2 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer2owner = scanner.occupant.name
- else
- buffer2owner = scanner.occupant.real_name
- buffer2label = "Structural Enzymes"
- buffer2type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b3addse"])
- if(scanner.occupant && scanner.occupant.dna)
- buffer3iue = 0
- buffer3 = scanner.occupant.dna.struc_enzymes
- if (!istype(scanner.occupant,/mob/living/carbon/human))
- buffer3owner = scanner.occupant.name
- else
- buffer3owner = scanner.occupant.real_name
- buffer3label = "Structural Enzymes"
- buffer3type = "se"
- dopage(src,"screen=buffermenu")
- if (href_list["b1clear"])
- buffer1 = null
- buffer1owner = null
- buffer1label = null
- buffer1iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b2clear"])
- buffer2 = null
- buffer2owner = null
- buffer2label = null
- buffer2iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b3clear"])
- buffer3 = null
- buffer3owner = null
- buffer3label = null
- buffer3iue = null
- dopage(src,"screen=buffermenu")
- if (href_list["b1label"])
- buffer1label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b2label"])
- buffer2label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b3label"])
- buffer3label = sanitize(input("New Label:","Edit Label","Infos here"))
- dopage(src,"screen=buffermenu")
- if (href_list["b1transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer1type == "ui")
- if (buffer1iue)
- scanner.occupant.real_name = buffer1owner
- scanner.occupant.name = buffer1owner
- scanner.occupant.dna.uni_identity = buffer1
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer1type == "se")
- scanner.occupant.dna.struc_enzymes = buffer1
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b2transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer2type == "ui")
- if (buffer2iue)
- scanner.occupant.real_name = buffer2owner
- scanner.occupant.name = buffer2owner
- scanner.occupant.dna.uni_identity = buffer2
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer2type == "se")
- scanner.occupant.dna.struc_enzymes = buffer2
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b3transfer"])
- if (!scanner.occupant || (NOCLONE in scanner.occupant.mutations) || !scanner.occupant.dna)
- return
- if (buffer3type == "ui")
- if (buffer3iue)
- scanner.occupant.real_name = buffer3owner
- scanner.occupant.name = buffer3owner
- scanner.occupant.dna.uni_identity = buffer3
- updateappearance(scanner.occupant,scanner.occupant.dna.uni_identity)
- else if (buffer3type == "se")
- scanner.occupant.dna.struc_enzymes = buffer3
- domutcheck(scanner.occupant,scanner)
- temp_html = "Transfered."
- scanner.occupant.radiation += rand(20,50)
-
- if (href_list["b1injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer1
- I.dnatype = buffer1type
- I.loc = loc
- I.name += " ([buffer1label])"
- if (buffer1iue) I.ue = buffer1owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- if (href_list["b2injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer2
- I.dnatype = buffer2type
- I.loc = loc
- I.name += " ([buffer2label])"
- if (buffer2iue) I.ue = buffer2owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- if (href_list["b3injector"])
- if (injectorready)
- var/obj/item/tool/medical/dnainjector/I = new /obj/item/tool/medical/dnainjector
- I.dna = buffer3
- I.dnatype = buffer3type
- I.loc = loc
- I.name += " ([buffer3label])"
- if (buffer3iue) I.ue = buffer3owner //lazy haw haw
- temp_html = "Injector created."
-
- injectorready = 0
- spawn(300)
- injectorready = 1
- else
- temp_html = "Replicator not ready yet."
-
- ////////////////////////////////////////////////////////
- if (href_list["load_disk"])
- var/buffernum = text2num(href_list["load_disk"])
- if ((buffernum > 3) || (buffernum < 1))
- return
- if ((isnull(diskette)) || (!diskette.data) || (diskette.data == ""))
- return
- switch(buffernum)
- if(1)
- buffer1 = diskette.data
- buffer1type = diskette.data_type
- buffer1iue = diskette.ue
- buffer1owner = diskette.owner
- if(2)
- buffer2 = diskette.data
- buffer2type = diskette.data_type
- buffer2iue = diskette.ue
- buffer2owner = diskette.owner
- if(3)
- buffer3 = diskette.data
- buffer3type = diskette.data_type
- buffer3iue = diskette.ue
- buffer3owner = diskette.owner
- temp_html = "Data loaded."
-
- if (href_list["save_disk"])
- var/buffernum = text2num(href_list["save_disk"])
- if ((buffernum > 3) || (buffernum < 1))
- return
- if ((isnull(diskette)) || (diskette.read_only))
- return
- switch(buffernum)
- if(1)
- diskette.data = buffer1
- diskette.data_type = buffer1type
- diskette.ue = buffer1iue
- diskette.owner = buffer1owner
- diskette.name = "data disk - '[buffer1owner]'"
- if(2)
- diskette.data = buffer2
- diskette.data_type = buffer2type
- diskette.ue = buffer2iue
- diskette.owner = buffer2owner
- diskette.name = "data disk - '[buffer2owner]'"
- if(3)
- diskette.data = buffer3
- diskette.data_type = buffer3type
- diskette.ue = buffer3iue
- diskette.owner = buffer3owner
- diskette.name = "data disk - '[buffer3owner]'"
- temp_html = "Data saved."
- if (href_list["eject_disk"])
- if (!diskette)
- return
- diskette.loc = get_turf(src)
- diskette = null
- ////////////////////////////////////////////////////////
-
- temp_html = temp_header_html
- switch(current_screen)
- if ("mainmenu")
- temp_html += "Main Menu
"
- if (viable_occupant) //is there REALLY someone in there who can be modified?
- temp_html += text("Modify Unique Identifier
", src)
- temp_html += text("Modify Structural Enzymes
", src)
- else
- temp_html += "Modify Unique Identifier
"
- temp_html += "Modify Structural Enzymes
"
- temp_html += text("Radiation Emitter Settings
", src)
- temp_html += text("Transfer Buffer
", src)
-
- if ("unimenu")
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- temp_html = "<< Main Menu
"
- temp_html += "Modify Unique Identifier
"
- temp_html += "Unique Identifier:
[getblockstring(scanner.occupant.dna.uni_identity,ui_block,subblock,3, src,1)]
"
- temp_html += "Selected Block:
<- [ui_block] ->"
- temp_html += "Selected Sub-Block:
<- [subblock] ->"
- temp_html += "Selected Target:
<- [unitargethex] ->"
- temp_html += "
Modify Block"
- temp_html += "
Irradiate "
-
- if ("strucmenu")
- if(!viable_occupant)
- temp_html = text("No viable occupant detected.")
- popup.set_content(temp_html)
- popup.open()
- else
- temp_html = "<< Main Menu
"
- temp_html += "Modify Structural Enzymes
"
- temp_html += "Structural Enzymes: [getblockstring(scanner.occupant.dna.struc_enzymes,se_block,subblock,3,src,0)]
"
- temp_html += "Selected Block:
<- [se_block] ->"
- temp_html += "Selected Sub-Block:
<- [subblock] ->"
- temp_html += "
Modify Block"
- temp_html += "
Irradiate "
-
- if ("radsetmenu")
- temp_html = "<< Main Menu
"
- temp_html += "Radiation Emitter Settings
"
- if (viable_occupant)
- temp_html += text("Pulse Radiation", src)
- else
- temp_html += "Pulse Radiation"
- temp_html += "
Radiation Duration: - [radduration] +
"
- temp_html += "Radiation Intensity: - [radstrength] +
"
-
- if ("buffermenu")
- temp_html = "<< Main Menu
"
- temp_html += "Transfer Buffer
"
- temp_html += "Buffer 1:
"
- if (!(buffer1))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer1)
- temp_html += text("By: []
", buffer1owner)
- temp_html += text("Label: []
", buffer1label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer1) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer1) temp_html += text("Isolate Block
", src)
- if (buffer1) temp_html += "Disk: Save To | Load From
"
- if (buffer1) temp_html += text("Edit Label
", src)
- if (buffer1) temp_html += text("Clear Buffer
", src)
- if (!buffer1) temp_html += "
"
- temp_html += "Buffer 2:
"
- if (!(buffer2))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer2)
- temp_html += text("By: []
", buffer2owner)
- temp_html += text("Label: []
", buffer2label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer2) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer2) temp_html += text("Isolate Block
", src)
- if (buffer2) temp_html += "Disk: Save To | Load From
"
- if (buffer2) temp_html += text("Edit Label
", src)
- if (buffer2) temp_html += text("Clear Buffer
", src)
- if (!buffer2) temp_html += "
"
- temp_html += "Buffer 3:
"
- if (!(buffer3))
- temp_html += "Buffer Empty
"
- else
- temp_html += text("Data: []
", buffer3)
- temp_html += text("By: []
", buffer3owner)
- temp_html += text("Label: []
", buffer3label)
- if (viable_occupant) temp_html += text("Save : UI - UI+UE - SE
", src, src, src)
- if (buffer3) temp_html += text("Transfer to: Occupant - Injector
", src, src)
- //if (buffer3) temp_html += text("Isolate Block
", src)
- if (buffer3) temp_html += "Disk: Save To | Load From
"
- if (buffer3) temp_html += text("Edit Label
", src)
- if (buffer3) temp_html += text("Clear Buffer
", src)
- if (!buffer3) temp_html += "
"
- temp_html += temp_footer_html
-
- if(viable_occupant && !scanner_status_html && occupant) //is there REALLY someone in there?
- scanner_status_html = "Health:
[occupant.health]%
"
- scanner_status_html += "Radiation Level:
[occupant.radiation]%
"
- if(human_occupant)
- var/rejuvenators = round(human_occupant.reagents.get_reagent_amount("inaprovaline") / REJUVENATORS_MAX * 100)
- scanner_status_html += "Rejuvenators:
[human_occupant.reagents.get_reagent_amount("inaprovaline")] units
"
-
- if (current_screen == "mainmenu")
- scanner_status_html += "Unique Enzymes :
[uppertext(occupant.dna.unique_enzymes)]
"
- scanner_status_html += "Unique Identifier:
[occupant.dna.uni_identity]
"
- scanner_status_html += "Structural Enzymes:
[occupant.dna.struc_enzymes]
"
-
- var/dat = "Scanner Status
"
-
- var/occupant_status = "Scanner Unoccupied"
- if(occupant && occupant.dna) //is there REALLY someone in there?
- if (!istype(occupant,/mob/living/carbon/human))
- sleep(1)
- if(NOCLONE in occupant.mutations)
- occupant_status = "Invalid DNA structure"
- else
- switch(occupant.stat) // obvious, see what their status is
- if(0)
- occupant_status = "Conscious"
- if(1)
- occupant_status = "Unconscious"
- else
- occupant_status = "DEAD"
-
- occupant_status = "[occupant.name] => [occupant_status]
"
-
- dat += "[occupant_status][scanner_status_html]
"
-
- var/scanner_access_text = "Lock Scanner"
- if (scanner.locked)
- scanner_access_text = "Unlock Scanner"
-
- dat += "Scan "
-
- if (occupant && occupant.dna)
- dat += "[scanner_access_text] "
- if (human_occupant)
- dat += "Inject Rejuvenators
"
- else
- dat += "Inject Rejuvenators
"
- else
- dat += "[scanner_access_text] "
- dat += "Inject Rejuvenators
"
-
- if (!isnull(diskette))
- dat += text("Eject Disk
", src)
-
- dat += "
"
-
- if (temp_html)
- dat += temp_html
-
- popup.set_content(dat)
- popup.open()
-*/
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/shuttle.dm b/code/WorkInProgress/computer3/computers/shuttle.dm
deleted file mode 100644
index 5d5fab6528..0000000000
--- a/code/WorkInProgress/computer3/computers/shuttle.dm
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- This may not migrate to C3. It's basically a machine in the guise of a computer;
- there is nothing interactive about it.
-*/
-
-/obj/machinery/computer3/shuttle
- name = "Shuttle"
- desc = "For shuttle control."
- icon_state = "shuttle"
- var/auth_need = 3.0
- var/list/authorized = list( )
-
-
- attackby(var/obj/item/card/W as obj, var/mob/user as mob)
- if(stat & (BROKEN|NOPOWER)) return
- if ((!( istype(W, /obj/item/card) ) || !( ticker ) || emergency_shuttle.location != 1 || !( user ))) return
- if (istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
- if (istype(W, /obj/item/device/pda))
- var/obj/item/device/pda/pda = W
- W = pda.id
- if (!W:access) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return
-
- var/list/cardaccess = W:access
- if(!istype(cardaccess, /list) || !cardaccess.len) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return
-
- if(!(access_heads in W:access)) //doesn't have this access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
- return 0
-
- var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
- if(emergency_shuttle.location != 1 && user.get_active_hand() != W)
- return 0
- switch(choice)
- if("Authorize")
- src.authorized -= W:registered_name
- src.authorized += W:registered_name
- if (src.auth_need - src.authorized.len > 0)
- message_admins("[key_name_admin(user)] has authorized early shuttle launch")
- log_game("[user.ckey] has authorized early shuttle launch")
- world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
- else
- message_admins("[key_name_admin(user)] has launched the shuttle")
- log_game("[user.ckey] has launched the shuttle early")
- world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
- emergency_shuttle.online = 1
- emergency_shuttle.settimeleft(10)
- //src.authorized = null
- del(src.authorized)
- src.authorized = list( )
-
- if("Repeal")
- src.authorized -= W:registered_name
- world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
-
- if("Abort")
- world << "\blue All authorizations to shorting time for shuttle launch have been revoked!"
- src.authorized.len = 0
- src.authorized = list( )
-
- else if (istype(W, /obj/item/card/emag) && !emagged)
- var/choice = alert(user, "Would you like to launch the shuttle?","Shuttle control", "Launch", "Cancel")
-
- if(!emagged && emergency_shuttle.location == 1 && user.get_active_hand() == W)
- switch(choice)
- if("Launch")
- world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
- emergency_shuttle.settimeleft( 10 )
- emagged = 1
- if("Cancel")
- return
- return
diff --git a/code/WorkInProgress/computer3/computers/specops_shuttle.dm b/code/WorkInProgress/computer3/computers/specops_shuttle.dm
deleted file mode 100644
index 81c94614cf..0000000000
--- a/code/WorkInProgress/computer3/computers/specops_shuttle.dm
+++ /dev/null
@@ -1,246 +0,0 @@
-//Config stuff
-#define SPECOPS_MOVETIME 600 //Time to station is milliseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
-#define SPECOPS_STATION_AREATYPE "/area/shuttle/specops/station" //Type of the spec ops shuttle area for station
-#define SPECOPS_DOCK_AREATYPE "/area/shuttle/specops/centcom" //Type of the spec ops shuttle area for dock
-
-var/specops_shuttle_moving_to_station = 0
-var/specops_shuttle_moving_to_centcom = 0
-var/specops_shuttle_at_station = 0
-var/specops_shuttle_can_send = 1
-var/specops_shuttle_time = 0
-var/specops_shuttle_timeleft = 0
-
-/obj/machinery/computer3/specops_shuttle
- name = "Spec. Ops. Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "shuttle"
- req_access = list(access_cent_specops)
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
-
-/proc/specops_process()
- var/area/centcom/control/cent_com = locate()//To find announcer. This area should exist for this proc to work.
- var/area/centcom/specops/special_ops = locate()//Where is the specops area located?
- var/mob/living/silicon/decoy/announcer = locate() in cent_com//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
-
- var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
- var/message = "THE SPECIAL OPERATIONS SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
- if(announcer)
- announcer.say(message)
- message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
- announcer.say(message)
-
- while(specops_shuttle_time - world.timeofday > 0)
- var/ticksleft = specops_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- specops_shuttle_time = world.timeofday + 10 // midnight rollover
- specops_shuttle_timeleft = (ticksleft / 10)
-
- //All this does is announce the time before launch.
- if(announcer)
- var/rounded_time_left = round(specops_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
- if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
- message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
- if(rounded_time_left==0)
- message = "ALERT: TAKEOFF"
- announcer.say(message)
- message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
- //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
-
- sleep(5)
-
- specops_shuttle_moving_to_station = 0
- specops_shuttle_moving_to_centcom = 0
-
- specops_shuttle_at_station = 1
- if (specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- if (!specops_can_move())
- usr << "\red The Special Operations shuttle is unable to leave."
- return
-
- //Begin Marauder launchpad.
- spawn(0)//So it parallel processes it.
- for(var/obj/machinery/door/poddoor/M in special_ops)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)//1 second delay between each.
- M.open()
- if("ASSAULT1")
- spawn(20)
- M.open()
- if("ASSAULT2")
- spawn(30)
- M.open()
- if("ASSAULT3")
- spawn(40)
- M.open()
-
- sleep(10)
-
- var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Entry")
- spawn_marauder.Add(L)
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Exit")
- var/obj/effect/portal/P = new(L.loc)
- P.invisibility = 101//So it is not seen by anyone.
- P.failchance = 0//So it has no fail chance when teleporting.
- P.target = pick(spawn_marauder)//Where the marauder will arrive.
- spawn_marauder.Remove(P.target)
-
- sleep(10)
-
- for(var/obj/machinery/mass_driver/M in special_ops)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)
- M.drive()
- if("ASSAULT1")
- spawn(20)
- M.drive()
- if("ASSAULT2")
- spawn(30)
- M.drive()
- if("ASSAULT3")
- spawn(40)
- M.drive()
-
- sleep(50)//Doors remain open for 5 seconds.
-
- for(var/obj/machinery/door/poddoor/M in special_ops)
- switch(M.id)//Doors close at the same time.
- if("ASSAULT0")
- spawn(0)
- M.close()
- if("ASSAULT1")
- spawn(0)
- M.close()
- if("ASSAULT2")
- spawn(0)
- M.close()
- if("ASSAULT3")
- spawn(0)
- M.close()
- special_ops.readyreset()//Reset firealarm after the team launched.
- //End Marauder launchpad.
-
- var/area/start_location = locate(/area/shuttle/specops/centcom)
- var/area/end_location = locate(/area/shuttle/specops/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs += T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
-
- start_location.move_contents_to(end_location)
-
- for(var/turf/T in get_area_turfs(end_location) )
- var/mob/M = locate(/mob) in T
- M << "\red You have arrived to [station_name]. Commence operation!"
-
-/proc/specops_can_move()
- if(specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return 0
- else return 1
-
-/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_ai(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_paw(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attackby(I as obj, user as mob)
- if(istype(I,/obj/item/card/emag))
- user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
- else
- return attack_hand(user)
-
-/obj/machinery/computer3/specops_shuttle/attack_hand(var/mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied."
- return
-
- if (sent_strike_team == 0)
- usr << "\red The strike team has not yet deployed."
- return
-
- if(..())
- return
-
- user.set_machine(src)
- var/dat
- if (temp)
- dat = temp
- else
- dat += {"
- Location: [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "Departing for [station_name] in ([specops_shuttle_timeleft] seconds.)":specops_shuttle_at_station ? "Station":"Dock"]
- [specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom ? "\n*The Special Ops. shuttle is already leaving.*
\n
":specops_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", "Special Operations Shuttle", 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-/obj/machinery/computer3/specops_shuttle/Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if(!specops_shuttle_at_station|| specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- usr << "\blue Central Command will not allow the Special Operations shuttle to return."
- return
-
- else if (href_list["sendtostation"])
- if(specops_shuttle_at_station || specops_shuttle_moving_to_station || specops_shuttle_moving_to_centcom) return
-
- if (!specops_can_move())
- usr << "\red The Special Operations shuttle is unable to leave."
- return
-
- usr << "\blue The Special Operations shuttle will arrive on [station_name] in [(SPECOPS_MOVETIME/10)] seconds."
-
- temp += "Shuttle departing.
OK"
- updateUsrDialog()
-
- var/area/centcom/specops/special_ops = locate()
- if(special_ops)
- special_ops.readyalert()//Trigger alarm for the spec ops area.
- specops_shuttle_moving_to_station = 1
-
- specops_shuttle_time = world.timeofday + SPECOPS_MOVETIME
- spawn(0)
- specops_process()
-
- else if (href_list["mainmenu"])
- temp = null
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/station_alert.dm b/code/WorkInProgress/computer3/computers/station_alert.dm
deleted file mode 100644
index 850bfc83c5..0000000000
--- a/code/WorkInProgress/computer3/computers/station_alert.dm
+++ /dev/null
@@ -1,97 +0,0 @@
-/obj/machinery/computer3/station_alert
- default_prog = /datum/file/program/station_alert
- spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/radio)
- icon_state = "frame-eng"
-
-
-/datum/file/program/station_alert
- name = "Station Alert Console"
- desc = "Used to access the station's automated alert system."
- active_state = "alert:0"
- var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
-
- interact(mob/user)
- usr.set_machine(src)
- if(!interactable())
- return
- var/dat = "Current Station Alerts\n"
- dat += "Close
"
- for (var/cat in src.alarms)
- dat += text("[]
\n", cat)
- var/list/L = src.alarms[cat]
- if (L.len)
- for (var/alarm in L)
- var/list/alm = L[alarm]
- var/area/A = alm[1]
- var/list/sources = alm[3]
- dat += ""
- dat += "• "
- dat += "[A.name]"
- if (sources.len > 1)
- dat += text(" - [] sources", sources.len)
- dat += "
\n"
- else
- dat += "-- All Systems Nominal
\n"
- dat += "
\n"
- //user << browse(dat, "window=alerts")
- //onclose(user, "alerts")
- popup.set_content(dat)
- popup.set_title_image(usr.browse_rsc_icon(computer.icon, computer.icon_state))
- popup.open()
- return
-
-
- Topic(href, href_list)
- if(..())
- return
- return
-
-
- proc/triggerAlarm(var/class, area/A, var/O, var/alarmsource)
- var/list/L = src.alarms[class]
- for (var/I in L)
- if (I == A.name)
- var/list/alarm = L[I]
- var/list/sources = alarm[3]
- if (!(alarmsource in sources))
- sources += alarmsource
- return 1
- var/obj/machinery/camera/C = null
- var/list/CL = null
- if (O && istype(O, /list))
- CL = O
- if (CL.len == 1)
- C = CL[1]
- else if (O && istype(O, /obj/machinery/camera))
- C = O
- L[A.name] = list(A, (C) ? C : O, list(alarmsource))
- return 1
-
-
- proc/cancelAlarm(var/class, area/A as area, obj/origin)
- var/list/L = src.alarms[class]
- var/cleared = 0
- for (var/I in L)
- if (I == A.name)
- var/list/alarm = L[I]
- var/list/srcs = alarm[3]
- if (origin in srcs)
- srcs -= origin
- if (srcs.len == 0)
- cleared = 1
- L -= I
- return !cleared
-
-
-
- process()
- var/active_alarms = 0
- for (var/cat in src.alarms)
- var/list/L = src.alarms[cat]
- if(L.len) active_alarms = 1
- if(active_alarms)
- active_state = "alert:2"
- else
- active_state = "alert:0"
- ..()
- return
diff --git a/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm b/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm
deleted file mode 100644
index ccd711788b..0000000000
--- a/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm
+++ /dev/null
@@ -1,103 +0,0 @@
-#define SYNDICATE_SHUTTLE_MOVE_TIME 240
-#define SYNDICATE_SHUTTLE_COOLDOWN 200
-
-/obj/machinery/computer3/syndicate_station
- name = "syndicate shuttle terminal"
- icon = 'icons/obj/computer.dmi'
- icon_state = "syndishuttle"
- req_access = list(access_syndicate)
- var/area/curr_location
- var/moving = 0
- var/lastMove = 0
-
-
-/obj/machinery/computer3/syndicate_station/New()
- curr_location= locate(/area/syndicate_station/start)
-
-
-/obj/machinery/computer3/syndicate_station/proc/syndicate_move_to(area/destination as area)
- if(moving) return
- if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
- var/area/dest_location = locate(destination)
- if(curr_location == dest_location) return
-
- moving = 1
- lastMove = world.time
-
- if(curr_location.z != dest_location.z)
- var/area/transit_location = locate(/area/syndicate_station/transit)
- curr_location.move_contents_to(transit_location)
- curr_location = transit_location
- sleep(SYNDICATE_SHUTTLE_MOVE_TIME)
-
- curr_location.move_contents_to(dest_location)
- curr_location = dest_location
- moving = 0
- return 1
-
-
-/obj/machinery/computer3/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_ai(mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_paw(mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_station/attack_hand(mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied"
- return
-
- user.set_machine(src)
-
- var/dat = {"Location: [curr_location]
- Ready to move[max(lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]
- Syndicate Space
- North West of SS13 |
- North of SS13 |
- North East of SS13
- South West of SS13 |
- South of SS13 |
- South East of SS13
- North East of the Mining Asteroid
- Close"}
-
- user << browse(dat, "window=computer;size=575x450")
- onclose(user, "computer")
- return
-
-
-/obj/machinery/computer3/syndicate_station/Topic(href, href_list)
- if(!isliving(usr)) return
- var/mob/living/user = usr
-
- if(in_range(src, user) || istype(user, /mob/living/silicon))
- user.set_machine(src)
-
- if(href_list["syndicate"])
- syndicate_move_to(/area/syndicate_station/start)
- else if(href_list["station_nw"])
- syndicate_move_to(/area/syndicate_station/northwest)
- else if(href_list["station_n"])
- syndicate_move_to(/area/syndicate_station/north)
- else if(href_list["station_ne"])
- syndicate_move_to(/area/syndicate_station/northeast)
- else if(href_list["station_sw"])
- syndicate_move_to(/area/syndicate_station/southwest)
- else if(href_list["station_s"])
- syndicate_move_to(/area/syndicate_station/south)
- else if(href_list["station_se"])
- syndicate_move_to(/area/syndicate_station/southeast)
-// else if(href_list["commssat"])
-// syndicate_move_to(/area/syndicate_station/commssat)
- else if(href_list["mining"])
- syndicate_move_to(/area/syndicate_station/mining)
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
-
-/obj/machinery/computer3/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
- visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm b/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm
deleted file mode 100644
index 61dc0ba975..0000000000
--- a/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm
+++ /dev/null
@@ -1,259 +0,0 @@
-//Config stuff
-#define SYNDICATE_ELITE_MOVETIME 600 //Time to station is deciseconds. 60 seconds, enough time for everyone to be on the shuttle before it leaves.
-#define SYNDICATE_ELITE_STATION_AREATYPE "/area/shuttle/syndicate_elite/station" //Type of the spec ops shuttle area for station
-#define SYNDICATE_ELITE_DOCK_AREATYPE "/area/shuttle/syndicate_elite/mothership" //Type of the spec ops shuttle area for dock
-
-var/syndicate_elite_shuttle_moving_to_station = 0
-var/syndicate_elite_shuttle_moving_to_mothership = 0
-var/syndicate_elite_shuttle_at_station = 0
-var/syndicate_elite_shuttle_can_send = 1
-var/syndicate_elite_shuttle_time = 0
-var/syndicate_elite_shuttle_timeleft = 0
-
-/obj/machinery/computer3/syndicate_elite_shuttle
- name = "Elite Syndicate Squad Shuttle Console"
- icon = 'icons/obj/computer.dmi'
- icon_state = "syndishuttle"
- req_access = list(access_cent_specops)
- var/temp = null
- var/hacked = 0
- var/allowedtocall = 0
-
-/proc/syndicate_elite_process()
- var/area/syndicate_mothership/control/syndicate_ship = locate()//To find announcer. This area should exist for this proc to work.
- var/area/syndicate_mothership/elite_squad/elite_squad = locate()//Where is the specops area located?
- var/mob/living/silicon/decoy/announcer = locate() in syndicate_ship//We need a fake AI to announce some stuff below. Otherwise it will be wonky.
-
- var/message_tracker[] = list(0,1,2,3,5,10,30,45)//Create a a list with potential time values.
- var/message = "THE SYNDICATE ELITE SHUTTLE IS PREPARING FOR LAUNCH"//Initial message shown.
- if(announcer)
- announcer.say(message)
- // message = "ARMORED SQUAD TAKE YOUR POSITION ON GRAVITY LAUNCH PAD"
- // announcer.say(message)
-
- while(syndicate_elite_shuttle_time - world.timeofday > 0)
- var/ticksleft = syndicate_elite_shuttle_time - world.timeofday
-
- if(ticksleft > 1e5)
- syndicate_elite_shuttle_time = world.timeofday // midnight rollover
- syndicate_elite_shuttle_timeleft = (ticksleft / 10)
-
- //All this does is announce the time before launch.
- if(announcer)
- var/rounded_time_left = round(syndicate_elite_shuttle_timeleft)//Round time so that it will report only once, not in fractions.
- if(rounded_time_left in message_tracker)//If that time is in the list for message announce.
- message = "ALERT: [rounded_time_left] SECOND[(rounded_time_left!=1)?"S":""] REMAIN"
- if(rounded_time_left==0)
- message = "ALERT: TAKEOFF"
- announcer.say(message)
- message_tracker -= rounded_time_left//Remove the number from the list so it won't be called again next cycle.
- //Should call all the numbers but lag could mean some issues. Oh well. Not much I can do about that.
-
- sleep(5)
-
- syndicate_elite_shuttle_moving_to_station = 0
- syndicate_elite_shuttle_moving_to_mothership = 0
-
- syndicate_elite_shuttle_at_station = 1
- if (syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- if (!syndicate_elite_can_move())
- usr << "\red The Syndicate Elite shuttle is unable to leave."
- return
-
- sleep(600)
-/*
- //Begin Marauder launchpad.
- spawn(0)//So it parallel processes it.
- for(var/obj/machinery/door/poddoor/M in elite_squad)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)//1 second delay between each.
- M.open()
- if("ASSAULT1")
- spawn(20)
- M.open()
- if("ASSAULT2")
- spawn(30)
- M.open()
- if("ASSAULT3")
- spawn(40)
- M.open()
-
- sleep(10)
-
- var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Entry")
- spawn_marauder.Add(L)
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Marauder Exit")
- var/obj/effect/portal/P = new(L.loc)
- P.invisibility = 101//So it is not seen by anyone.
- P.failchance = 0//So it has no fail chance when teleporting.
- P.target = pick(spawn_marauder)//Where the marauder will arrive.
- spawn_marauder.Remove(P.target)
-
- sleep(10)
-
- for(var/obj/machinery/mass_driver/M in elite_squad)
- switch(M.id)
- if("ASSAULT0")
- spawn(10)
- M.drive()
- if("ASSAULT1")
- spawn(20)
- M.drive()
- if("ASSAULT2")
- spawn(30)
- M.drive()
- if("ASSAULT3")
- spawn(40)
- M.drive()
-
- sleep(50)//Doors remain open for 5 seconds.
-
- for(var/obj/machinery/door/poddoor/M in elite_squad)
- switch(M.id)//Doors close at the same time.
- if("ASSAULT0")
- spawn(0)
- M.close()
- if("ASSAULT1")
- spawn(0)
- M.close()
- if("ASSAULT2")
- spawn(0)
- M.close()
- if("ASSAULT3")
- spawn(0)
- M.close()
- */
- elite_squad.readyreset()//Reset firealarm after the team launched.
- //End Marauder launchpad.
-/*
- var/obj/explosionmarker = locate("Syndicate Breach Area")
- if(explosionmarker)
- var/turf/simulated/T = explosionmarker.loc
- if(T)
- explosion(T,4,6,8,10,0)
-
- sleep(40)
-// proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
-
-*/
- var/area/start_location = locate(/area/shuttle/syndicate_elite/mothership)
- var/area/end_location = locate(/area/shuttle/syndicate_elite/station)
-
- var/list/dstturfs = list()
- var/throwy = world.maxy
-
- for(var/turf/T in end_location)
- dstturfs = T
- if(T.y < throwy)
- throwy = T.y
-
- // hey you, get out of the way!
- for(var/turf/T in dstturfs)
- // find the turf to move things to
- var/turf/D = locate(T.x, throwy - 1, 1)
- //var/turf/E = get_step(D, SOUTH)
- for(var/atom/movable/AM as mob|obj in T)
- AM.Move(D)
- if(istype(T, /turf/simulated))
- del(T)
-
- start_location.move_contents_to(end_location)
-
- for(var/turf/T in get_area_turfs(end_location) )
- var/mob/M = locate(/mob) in T
- M << "\red You have arrived to [station_name]. Commence operation!"
-
-/proc/syndicate_elite_can_move()
- if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0
- else return 1
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_ai(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_paw(var/mob/user as mob)
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attackby(I as obj, user as mob)
- if(istype(I,/obj/item/card/emag))
- user << "\blue The electronic systems in this console are far too advanced for your primitive hacking peripherals."
- else
- return attack_hand(user)
-
-/obj/machinery/computer3/syndicate_elite_shuttle/attack_hand(var/mob/user as mob)
- if(!allowed(user))
- user << "\red Access Denied."
- return
-
-// if (sent_syndicate_strike_team == 0)
-// usr << "\red The strike team has not yet deployed."
-// return
-
- if(..())
- return
-
- user.set_machine(src)
- var/dat
- if (temp)
- dat = temp
- else
- dat = {"Location: [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "Departing for [station_name] in ([syndicate_elite_shuttle_timeleft] seconds.)":syndicate_elite_shuttle_at_station ? "Station":"Dock"]
- [syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership ? "\n*The Syndicate Elite shuttle is already leaving.*
\n
":syndicate_elite_shuttle_at_station ? "\nShuttle Offline
\n
":"\nDepart to [station_name]
\n
"]
- \nClose"}
-
- //user << browse(dat, "window=computer;size=575x450")
- //onclose(user, "computer")
- var/datum/browser/popup = new(user, "computer", "Special Operations Shuttle", 575, 450)
- popup.set_content(dat)
- popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
- popup.open()
- return
-
-/obj/machinery/computer3/syndicate_elite_shuttle/Topic(href, href_list)
- if(..())
- return
-
- if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (istype(usr, /mob/living/silicon)))
- usr.set_machine(src)
-
- if (href_list["sendtodock"])
- if(!syndicate_elite_shuttle_at_station|| syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- usr << "\blue The Syndicate will not allow the Elite Squad shuttle to return."
- return
-
- else if (href_list["sendtostation"])
- if(syndicate_elite_shuttle_at_station || syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return
-
- if (!specops_can_move())
- usr << "\red The Syndicate Elite shuttle is unable to leave."
- return
-
- usr << "\blue The Syndicate Elite shuttle will arrive on [station_name] in [(SYNDICATE_ELITE_MOVETIME/10)] seconds."
-
- temp = "Shuttle departing.
OK"
- updateUsrDialog()
-
- var/area/syndicate_mothership/elite_squad/elite_squad = locate()
- if(elite_squad)
- elite_squad.readyalert()//Trigger alarm for the spec ops area.
- syndicate_elite_shuttle_moving_to_station = 1
-
- syndicate_elite_shuttle_time = world.timeofday + SYNDICATE_ELITE_MOVETIME
- spawn(0)
- syndicate_elite_process()
-
-
- else if (href_list["mainmenu"])
- temp = null
-
- add_fingerprint(usr)
- updateUsrDialog()
- return
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/test_machines.dm b/code/WorkInProgress/computer3/test_machines.dm
deleted file mode 100644
index 998937e634..0000000000
--- a/code/WorkInProgress/computer3/test_machines.dm
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/obj/machinery/computer3/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/laptop/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell/super(src)
- ..(L,built)
-
-/obj/machinery/computer3/wall_comp/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/server/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/machinery/computer3/server/rack/testing
- spawn_files = list(/datum/file/program/aifixer,/datum/file/program/arcade,/datum/file/program/atmos_alert,
- /datum/file/program/security,/datum/file/program/card_comp,
- /datum/file/program/borg_control,/datum/file/program/holodeck, /datum/file/program/communications,
- /datum/file/program/crew,/datum/file/program/op_monitor, /datum/file/program/powermon,
-
- /datum/file/camnet_key,/datum/file/camnet_key/mining,/datum/file/camnet_key/entertainment,/datum/file/camnet_key/research,
- /datum/file/camnet_key/bombrange,/datum/file/camnet_key/xeno,/datum/file/camnet_key/singulo,/datum/file/camnet_key/prison)
- spawn_parts = list(/obj/item/part/computer/storage/hdd/big,/obj/item/part/computer/storage/removable,/obj/item/part/computer/ai_holder,
- /obj/item/part/computer/networking/radio/subspace,/obj/item/part/computer/networking/cameras,
- /obj/item/part/computer/cardslot/dual,/obj/item/part/computer/networking/area)
- New(var/L,var/built=0)
- if(!built && !battery)
- battery = new /obj/item/weapon/cell(src)
- ..(L,built)
-
-/obj/item/weapon/storage/box/testing_disks
- New()
- ..()
- for(var/typekey in typesof(/obj/item/weapon/disk/file) - /obj/item/weapon/disk/file)
- new typekey(src)
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/upload/lawfile.dm b/code/WorkInProgress/computer3/upload/lawfile.dm
deleted file mode 100644
index 7fcbac0066..0000000000
--- a/code/WorkInProgress/computer3/upload/lawfile.dm
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Computer3 law changes:
-
- * Laws are a file type
- * Connecting to the AI requires a network connection
- * Connecting to a borg requires a radio or network.
-
-*/
-
-/datum/file/ai_law
- var/list/hacklaws = null
- var/zerolaw = null
- var/list/corelaws = null
- var/list/auxlaws = null
-
- var/configurable = 0
-
- // override this when you need to be able to alter the parameters of the lawset
- proc/configure()
- return
-
- execute(var/datum/file/program/source)
- if(istype(usr,/mob/living/silicon))
- return
- if(istype(source,/datum/file/program/ntos))
- if(configurable)
- configure()
- return
- if(istype(source,/datum/file/program/upload/ai))
\ No newline at end of file
diff --git a/code/WorkInProgress/computer3/upload/programs.dm b/code/WorkInProgress/computer3/upload/programs.dm
deleted file mode 100644
index bcf45159b6..0000000000
--- a/code/WorkInProgress/computer3/upload/programs.dm
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- Note that as with existing ai upload, this is not an interactive program.
- That means that the work is done in execute() rather than interact()
-*/
-
-/datum/file/program/upload/ai
- execute(var/datum/file/program/source)
- if(!interactable() || istype(usr,/mob/living/silicon))
- return 0
- if(!computer.net)
- usr << "An indecipherable set of code flicks across the screen. Nothing else happens."
- return
- var/list/results = computer.net.get_machines
\ No newline at end of file
diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm
deleted file mode 100644
index 8e0cdbc638..0000000000
--- a/code/WorkInProgress/kilakk/responseteam.dm
+++ /dev/null
@@ -1,254 +0,0 @@
-// emergency response teams
-// work in progress
-
-var/const/members_possible = 5
-var/const/members_required = 1 // We need at least *one* person ;_;
-var/global/admin_emergency_team = 0 // Used for admin-spawned response teams
-// 'sent_response_team' for automagic response teams
-
-/client/proc/response_team()
- set name = "Dispatch Emergency Response Team"
- set category = "Special Verbs"
- set desc = "Send an emergency response team to the station"
-
- if(!holder)
- usr << "\red Only administrators may use this command."
- return
- if(!ticker)
- usr << "\red The game hasn't started yet!"
- return
- if(ticker.current_state == GAME_STATE_PREGAME)
- usr << "\red The round hasn't started yet!"
- return
- if(admin_emergency_team || send_emergency_team)
- usr << "\red Central Command has already dispatched an emergency response team!"
- return
- if(alert("Do you want to dispatch an Emergency Response Team?",,"Yes","No") != "Yes")
- return
- if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
- switch(alert("The station has not entered code red recently. Do you still want to dispatch a response team?",,"Yes","No"))
- if("No")
- return
-
- var/situation = null
- while(!situation)
- situation = copytext(sanitize(input(src, "Please specify the mission the emergency response team will undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
- if(!situation)
- if(alert("You haven't specified a mission. Exit the setup process?",,"No","Yes")=="Yes")
- return
-
- if(admin_emergency_team || send_emergency_team)
- usr << "\red Looks like somebody beat you to it!"
- return
-
- admin_emergency_team = 1
- message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
- log_admin("[key_name(usr)] used Dispatch Response Team.")
-
- var/member_number = members_possible
- var/leader_selected = 0
-
- // Shamelessly stolen nuke code
- var/nuke_code
- var/temp_code
- for(var/obj/machinery/nuclearbomb/N in machines)
- temp_code = text2num(N.r_code)
- if(temp_code)
- nuke_code = N.r_code
- break
-
-/* var/list/candidates = list() // ghosts who can be picked
- var/list/members = list() // ghosts who have been picked
- for(var/mob/dead/observer/G in player_list)
- if(!G.client.holder && !G.client.is_afk())
- if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
- candidates += G.key
- for(var/i=members_possible,(i>0&&candidates.len), i--)
- var/candidate = input("Choose characters to spawn as response team members. This will go on until there are no more ghosts to pick from or until all slots are full.", "Active Players") as null|anything in candidates */
-
- // I tried doing this differently. Ghosts get a pop-up box similar to pAIs and one-click-antag
- // Biggest diff here is in how the candidates list is updated
- alert(usr, "Active ghosts will be given a chance to choose whether or not they want to be considered for the emergency reponse team. This will take about 30 seconds.") // There's probably a better way to do this, with a fancy count-down timer or something
-
- var/list/candidates = list()
- var/list/members = list()
- var/time_passed = world.time
-
- for(var/mob/dead/observer/G in player_list)
- if(!jobban_isbanned(G, "Syndicate") && !jobban_isbanned(G, "Emergency Response Team") && !jobban_isbanned(G, "Security Officer"))
- spawn(0)
- switch(alert(G, "Do you want to be considered for the Emergency Response Team? Please answer in 30 seconds!",,"Yes","No"))
- if("Yes")
- if((world.time-time_passed)>300)
- return
- candidates += G.key
- if("No")
- return
- else
- return
-
- sleep(300)
-
- if(candidates.len < members_required)
- message_admins("Not enough people signed up for [key_name_admin(usr)]'s response team! Aborting.")
- log_admin("Response Team aborted: Not Enough Signups.")
- admin_emergency_team = 0
- return
-
- for(var/i=members_possible,(i>0&&candidates.len), i--) // The rest of the choosing process is just an input with a list of candidates on it
- var/chosen = input("Time's up! Choose characters to spawn as reponse team members. This will go on until there are no more ghosts to pick from or until all slots are full.", "Considered Players") as null|anything in candidates
- candidates -= chosen
- members += chosen
-
- command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "NMV Icarus Command")
-
- for(var/obj/effect/landmark/L in landmarks_list)
- if(L.name == "Response Team")
- leader_selected = member_number == 1?1:0 // The last person selected will be the leader
-
- var/mob/living/carbon/human/new_member = spawn_response_team(L, leader_selected)
-
- new_member.age = !leader_selected ? rand(23,35) : rand(35,45)
-
- if(members.len)
- new_member.key = pick(members)
- members -= new_member.key
-
- if(!new_member.key) // It works ok? sort of
- del(new_member)
- break
-
- spawn(0)
-
- switch(alert(new_member, "You are an Emergency Response Team member! Are you a boy or a girl?",,"Male","Female"))
- if("Male")
- new_member.gender = MALE
- if("Female")
- new_member.gender = FEMALE
-
- var/new_name = input(new_member, "...Erm, what was your name again?", "Choose your name") as text
-
- if(!new_name)
- new_member.real_name = "Agent [pick("Red","Yellow","Orange","Silver","Gold", "Pink", "Purple", "Rainbow")]" // Choose a "random" agent name
- new_member.name = usr.real_name
- new_member.mind.name = usr.real_name
-
- else
- new_member.real_name = new_name
- new_member.name = new_name
- new_member.mind.name = new_name
-
- // -- CHANGE APPEARANCE --
- var/new_tone = input(new_member, "Please select your new skin tone: 1-220 (1=albino, 35=caucasian, 150=black, 220='very' black)", "Character Generation") as num
-
- if(new_tone)
- new_member.s_tone = max(min(round(text2num(new_tone)), 220), 1)
- new_member.s_tone = -new_member.s_tone + 35
-
- var/new_hair = input(new_member, "Please select your new hair color.","Character Generation") as color
-
- if(new_hair)
- new_member.r_hair = hex2num(copytext(new_hair, 2, 4))
- new_member.g_hair = hex2num(copytext(new_hair, 4, 6))
- new_member.b_hair = hex2num(copytext(new_hair, 6, 8))
-
- var/new_facial = input(new_member, "Please select your new facial hair color.","Character Generation") as color
-
- if(new_facial)
- new_member.r_facial = hex2num(copytext(new_facial, 2, 4))
- new_member.g_facial = hex2num(copytext(new_facial, 4, 6))
- new_member.b_facial = hex2num(copytext(new_facial, 6, 8))
-
- var/new_eyes = input(new_member, "Please select eye color.", "Character Generation") as color
-
- if(new_eyes)
- new_member.r_eyes = hex2num(copytext(new_eyes, 2, 4))
- new_member.g_eyes = hex2num(copytext(new_eyes, 4, 6))
- new_member.b_eyes = hex2num(copytext(new_eyes, 6, 8))
-
- var/new_hstyle = input(new_member, "Please select your new hair style!", "Grooming") as null|anything in hair_styles_list
-
- if(new_hstyle)
- new_member.h_style = new_hstyle
-
- var/new_fstyle = input(new_member, "Please select your new facial hair style!", "Grooming") as null|anything in facial_hair_styles_list
-
- if(new_fstyle)
- new_member.f_style = new_fstyle
-
- // -- END --
-
- new_member.dna.ready_dna(new_member)
- new_member.update_body(1)
- new_member.update_hair(1)
-
- new_member.mind_initialize()
-
- new_member.mind.assigned_role = "Emergency Response Team"
- new_member.mind.special_role = "Emergency Response Team"
- ticker.mode.traitors |= new_member.mind // ERTs will show up at the end of the round on the "traitor" list
-
- // Join message
- new_member << "\blue You are the Emergency Response Team[!leader_selected?"!":" Leader!