diff --git a/main-src/Code/!atoms.dm b/main-src/Code/!atoms.dm
index c0bfc5b..2c5e536 100644
--- a/main-src/Code/!atoms.dm
+++ b/main-src/Code/!atoms.dm
@@ -2212,51 +2212,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
-/obj/machinery/computer
- name = "computer"
- density = 1
- anchored = 1.0
-/obj/machinery/computer/airtunnel
- name = "Air Tunnel Control"
- icon = 'airtunnelcomputer.dmi'
- icon_state = "console00"
-/obj/machinery/computer/atmosphere
- name = "atmosphere"
- icon = 'turfs.dmi'
-/obj/machinery/computer/atmosphere/siphonswitch
- name = "Area Air Control"
- icon_state = "switch"
- var/otherarea
- var/area/area
-/obj/machinery/computer/atmosphere/siphonswitch/mastersiphonswitch
- name = "Master Air Control"
-/obj/machinery/computer/card
- name = "Identification Computer"
- icon = 'stationobjs.dmi'
- icon_state = "id_computer"
- var/obj/item/weapon/card/id/scan = null
- var/obj/item/weapon/card/id/modify = null
- var/authenticated = 0.0
- var/mode = 0.0
- var/printing = null
-/obj/machinery/computer/communications
- name = "communications"
- icon = 'stationobjs.dmi'
- icon_state = "comm_computer"
-/obj/machinery/computer/data
- name = "data"
- icon = 'weap_sat.dmi'
- icon_state = "computer"
-
- var/list/topics = list( )
-
-/obj/machinery/computer/data/weapon
- name = "weapon"
-/obj/machinery/computer/data/weapon/info
- name = "Research Computer"
-/obj/machinery/computer/data/weapon/log
- name = "Log Computer"
/obj/machinery/computer/dna
name = "DNA operations computer"
icon = 'Cryogenic2.dmi'
@@ -2266,68 +2222,10 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
var/obj/item/weapon/card/data/modify2 = null
var/mode = null
var/temp = null
-/obj/machinery/computer/engine
- name = "engine"
- icon = 'enginecomputer.dmi'
- var/temp = null
- var/id = 1
- var/obj/machinery/gas_sensor/gs
- var/access = "4000/0030"
- var/allowed
-
-/obj/machinery/computer/hologram_comp
- name = "Hologram Computer"
- icon = 'stationobjs.dmi'
- icon_state = "holo_console0"
- var/obj/machinery/hologram_proj/projector = null
- var/temp = null
- var/lumens = 0.0
- var/h_r = 245.0
- var/h_g = 245.0
- var/h_b = 245.0
-/obj/machinery/computer/med_data
- name = "Medical Records"
- icon = 'weap_sat.dmi'
- icon_state = "computer"
- var/obj/item/weapon/card/id/scan = null
- var/authenticated = null
- var/rank = null
- var/screen = null
- var/datum/data/record/active1 = null
- var/datum/data/record/active2 = null
- var/a_id = null
- var/temp = null
- var/printing = null
- var/allowed = "Medical Researcher/Medical Doctor/Head of Personnel/Captain"
- var/access
-
-/obj/machinery/computer/pod
- name = "Pod Launch Control"
- icon = 'escapepod.dmi'
- icon_state = "computer"
- var/id = 1.0
- var/obj/machinery/mass_driver/connected = null
- var/timing = 0.0
- var/time = 30.0
-/obj/machinery/computer/prison_shuttle
- name = "prison shuttle"
- icon = 'shuttle.dmi'
- icon_state = "shuttlecom"
-/obj/machinery/computer/secure_data
- name = "Security Records"
- icon = 'weap_sat.dmi'
- icon_state = "computer"
- var/obj/item/weapon/card/id/scan = null
- var/authenticated = null
- var/rank = null
- var/screen = null
- var/datum/data/record/active1 = null
- var/datum/data/record/active2 = null
- var/a_id = null
- var/temp = null
- var/printing = null
+
+
/obj/machinery/computer/security
name = "security"
icon = 'stationobjs.dmi'
@@ -2336,21 +2234,8 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
var/last_pic = 1.0
var/network = "SS13"
var/maplevel = 1
-/obj/machinery/computer/shuttle
- name = "shuttle"
- icon = 'shuttle.dmi'
- icon_state = "shuttlecom"
- var/auth_need = 3.0
- var/list/authorized = list( )
- var/allowed
- var/access = "2000"
-/obj/machinery/computer/sleep_console
- name = "sleep console"
- icon = 'Cryogenic2.dmi'
- icon_state = "sleeperconsole"
- var/obj/machinery/sleeper/connected = null
/obj/machinery/computer/teleporter
name = "teleporter"
icon = 'stationobjs.dmi'
@@ -2361,24 +2246,6 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
-/obj/machinery/cryo_cell
- name = "cryo cell"
- icon = 'Cryogenic2.dmi'
- icon_state = "celltop"
- density = 1
- var/obj/machinery/line_in = null
- var/mob/occupant = null
- var/obj/substance/gas/gas = null
- var/obj/substance/gas/ngas = null
- anchored = 1.0
- p_dir = 8.0
- capmult = 1
-
- var/obj/overlay/O1 = null
- var/obj/overlay/O2 = null
-
- var/obj/machinery/vnode = null
-
/obj/machinery/dna_scanner
name = "DNA Scanner/Implanter"
icon = 'Cryogenic2.dmi'
@@ -2390,58 +2257,6 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
-/obj/machinery/freezer
- name = "freezer"
- icon = 'Cryogenic2.dmi'
- icon_state = "freezer_0"
- density = 1
- var/connector = null
- var/obj/machinery/line_out = null
- var/obj/machinery/vnode = null
- var/c_used = 1.0
- var/status = 0.0
- var/t_flags = 3.0
- var/transfer = 0.0
- var/temperature = 60.0+T0C
-
- var/obj/substance/gas/gas
- var/obj/substance/gas/ngas
- p_dir = 4.0
- anchored = 1.0
- capmult = 1
-
-
-/obj/machinery/hologram_proj
- name = "Hologram Projector"
- icon = 'stationobjs.dmi'
- icon_state = "hologram0"
- var/atom/projection = null
- anchored = 1.0
-
-/obj/machinery/mass_driver
- name = "mass driver"
- icon = 'stationobjs.dmi'
- icon_state = "mass_driver"
- var/power = 1.0
- var/code = 1.0
- var/id = 1.0
- anchored = 1.0
-
-/obj/machinery/nuclearbomb
- desc = "Uh oh."
- name = "Nuclear Fission Explosive"
- icon = 'stationobjs.dmi'
- icon_state = "nuclearbomb0"
- density = 1
- var/extended = 0.0
- var/timeleft = 60.0
- var/timing = 0.0
- var/r_code = "ADMIN"
- var/code = ""
- var/yes_code = 0.0
- var/safety = 1.0
- var/obj/item/weapon/disk/nuclear/auth = null
- flags = 320.0
@@ -2449,24 +2264,6 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
-/obj/machinery/pod
- name = "Escape Pod"
- icon = 'escapepod.dmi'
- icon_state = "pod"
- density = 1
- var/id = 1.0
- var/speed = 10.0
- var/capacity = null
- flags = 320.0
- anchored = 1.0
-/obj/machinery/recon
- name = "1-Person Reconaissance Pod"
- icon = 'escapepod.dmi'
- icon_state = "recon"
- density = 1
- var/speed = 1.0
- flags = 320.0
- anchored = 1.0
/obj/machinery/restruct
name = "DNA Physical Restructurization Accelerator"
icon = 'Cryogenic2.dmi'
@@ -2497,41 +2294,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
//*****
-/obj/machinery/shuttle
- name = "shuttle"
- icon = 'shuttle.dmi'
-/obj/machinery/shuttle/engine
- name = "engine"
- density = 1
- anchored = 1.0
-/obj/machinery/shuttle/engine/heater
- name = "heater"
- icon_state = "heater"
-/obj/machinery/shuttle/engine/platform
- name = "platform"
- icon_state = "platform"
-/obj/machinery/shuttle/engine/propulsion
- name = "propulsion"
- icon_state = "propulsion"
- opacity = 1
-/obj/machinery/shuttle/engine/propulsion/burst
- name = "burst"
-/obj/machinery/shuttle/engine/propulsion/burst/left
- name = "left"
- icon_state = "burst_l"
-/obj/machinery/shuttle/engine/propulsion/burst/right
- name = "right"
- icon_state = "burst_r"
-/obj/machinery/shuttle/engine/router
- name = "router"
- icon_state = "router"
-/obj/machinery/sleeper
- name = "sleeper"
- icon = 'Cryogenic2.dmi'
- icon_state = "sleeper_0"
- density = 1
- var/mob/occupant = null
- anchored = 1.0
+
/obj/machinery/teleport
name = "teleport"
icon = 'stationobjs.dmi'
@@ -2680,9 +2443,7 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
density = 1
var/obj/target = null
anchored = 1.0
-/obj/projection
- name = "Projection"
- anchored = 1.0
+
/obj/rack
name = "rack"
icon = 'Icons.dmi'
diff --git a/main-src/Code/Machinery/Atmoalter/siphs.dm b/main-src/Code/Machinery/Atmoalter/siphs.dm
index f0c6d7c..37827f4 100644
--- a/main-src/Code/Machinery/Atmoalter/siphs.dm
+++ b/main-src/Code/Machinery/Atmoalter/siphs.dm
@@ -60,6 +60,8 @@ obj/machinery/atmoalter/siphs
// Reset the siphon state. If "valve" is negative, main valve is set to release at that rate
// If "valve" is positive, main valve set to siphon at that rate
// If "auto" true, main valve set to automatic status
+ // This routine is called by the siphonswitch computers to control the siphs
+
proc/reset(valve, auto)
if(c_status!=0)
diff --git a/main-src/Code/Machinery/Computer/_computer.dm b/main-src/Code/Machinery/Computer/_computer.dm
new file mode 100644
index 0000000..f8964d8
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/_computer.dm
@@ -0,0 +1,82 @@
+/*
+ * Computer -- the base computer machine
+ *
+ *
+ * TODO: Eventual rewrite of computer system from scratch?
+ */
+
+
+obj/machinery/computer
+ name = "computer"
+ density = 1
+ anchored = 1
+
+ // Note the icon files for computer objects should have a "broken" and "c_unpowered" state, unless the following procs are overridden.
+
+
+
+ // Called when area power state changes
+ // Display the correct icon depending on the state of the machine
+
+ power_change()
+ if(stat & BROKEN)
+ icon_state = "broken"
+ else
+ if( powered() ) // Defaults to equipment channel
+ icon_state = initial(icon_state)
+ stat &= ~NOPOWER
+ else
+ spawn(rand(0, 15))
+ src.icon_state = "c_unpowered"
+ stat |= NOPOWER
+
+
+ // Default timed process. Use power (as long as computer is operating)
+
+ process()
+ if(stat & (NOPOWER|BROKEN))
+ return
+ use_power(250)
+
+
+ // Default when hit by a meteor. Break the computer, and remove any verbs.
+
+ meteorhit(var/obj/O)
+ for(var/x in src.verbs)
+ src.verbs -= x
+ src.icon_state = "broken"
+ stat |= BROKEN
+
+
+ // Default when attacked by blob. 50% change to break computer.
+
+ blob_act()
+ if (prob(50))
+ for(var/x in src.verbs)
+ src.verbs -= x
+ src.icon_state = "broken"
+ src.stat |= BROKEN
+ src.density = 0
+
+
+ // Default when exploded. Delete or chance to break the computer
+
+ ex_act(severity)
+
+ switch(severity)
+ if(1.0)
+ del(src)
+
+ if(2.0)
+ if (prob(50))
+ for(var/x in src.verbs)
+ src.verbs -= x
+
+ src.icon_state = "broken"
+ stat |= BROKEN
+ if(3.0)
+ if (prob(25))
+ for(var/x in src.verbs)
+ src.verbs -= x
+ src.icon_state = "broken"
+ stat |= BROKEN
diff --git a/main-src/Code/Machinery/Computer/airtunnel.dm b/main-src/Code/Machinery/Computer/airtunnel.dm
new file mode 100644
index 0000000..b736862
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/airtunnel.dm
@@ -0,0 +1,156 @@
+/*
+ * Airtunnel -- the airtunnel computer
+ * Controls extention and retraction of the tunnel, and regulation of the atmosphere in it.
+ *
+ * Note: Currently, only 1 airtunnel per map can be operated; there is no link to the global airtunnel datum
+ */
+
+
+obj/machinery/computer/airtunnel
+ name = "Air Tunnel Control"
+ icon = 'airtunnelcomputer.dmi'
+ icon_state = "console00"
+
+
+ // Update icon_state depending on computer and airtunnel status
+
+ proc/update_icon()
+
+ if(stat & BROKEN)
+ icon_state = "broken"
+ return
+
+ if(stat & NOPOWER)
+ icon_state = "c_unpowered"
+ return
+
+ var/status = 0
+ if (SS13_airtunnel.operating == 1)
+ status = "r"
+ else if (SS13_airtunnel.operating == 2)
+ status = "e"
+ else
+ var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
+
+ if (C.current == C)
+ status = 0
+ else if (!( C.current.next ))
+ status = 2
+ else
+ status = 1
+
+ src.icon_state = "console[SS13_airtunnel.siphon_status >= 2 ? "1" : "0"][status]"
+
+
+ // Timed process
+ // Update the icon, use power, and update interaction window for viewers
+
+ process()
+
+ src.update_icon()
+ if(stat & (NOPOWER|BROKEN) )
+ return
+ use_power(250)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+
+ // Monkey interct same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact
+ // Show airtunnel status and interaction window
+
+ attack_hand(mob/user)
+
+ if(stat & (NOPOWER|BROKEN) )
+ return
+
+ var/dat = "
Air Tunnel Controls
"
+ user.machine = src
+
+ if (SS13_airtunnel.operating == 1)
+ dat += "Status: RETRACTING
"
+
+ else if (SS13_airtunnel.operating == 2)
+ dat += "Status: EXPANDING
"
+
+ else
+ var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
+
+ if (C.current == C)
+ dat += "Status: Fully Retracted
"
+ else if (!( C.current.next ))
+ dat += "Status: Fully Extended
"
+ else
+ dat += "Status: Stopped Midway
"
+
+ dat += "Retract Stop Extend
"
+ dat += "
Air Level: [(SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS")]
"
+ dat += "Air System Status: "
+
+ switch(SS13_airtunnel.siphon_status)
+ if(0.0)
+ dat += "Stopped "
+ if(1.0)
+ dat += "Siphoning (Siphons only) "
+ if(2.0)
+ dat += "Regulating (BOTH) "
+ if(3.0)
+ dat += "RELEASING MAX (Siphons only) "
+
+ dat += "(Refresh)
"
+ dat += "RELEASE (Siphons only) Siphon (Siphons only) Stop Regulate
"
+ dat += "
Close"
+
+ user << browse(dat, "window=computer;size=400x500")
+
+
+ // Handle topic links from interaction window
+ // Control the airtunnel through the global datum
+
+ Topic(href, href_list)
+ ..()
+
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+
+ if (href_list["retract"])
+ SS13_airtunnel.retract()
+ else if (href_list["stop"])
+ SS13_airtunnel.operating = 0
+ else if (href_list["extend"])
+ SS13_airtunnel.extend()
+ else if (href_list["release"])
+ SS13_airtunnel.siphon_status = 3
+ SS13_airtunnel.siphons()
+ else if (href_list["siphon"])
+ SS13_airtunnel.siphon_status = 1
+ SS13_airtunnel.siphons()
+ else if (href_list["stop_siph"])
+ SS13_airtunnel.siphon_status = 0
+ SS13_airtunnel.siphons()
+ else if (href_list["auto"])
+ SS13_airtunnel.siphon_status = 2
+ SS13_airtunnel.siphons()
+ else if (href_list["refresh"])
+ SS13_airtunnel.siphons()
+
+ src.add_fingerprint(usr)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
diff --git a/main-src/Code/Machinery/Computer/atmosphere.dm b/main-src/Code/Machinery/Computer/atmosphere.dm
new file mode 100644
index 0000000..7abc2d0
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/atmosphere.dm
@@ -0,0 +1,133 @@
+/*
+ * Atmosphere -- the base type for atmosphere computers
+ *
+ * Two derived types:
+ * Siphonsiwtch control the siphons and air filters/regulator in an area
+ * Mastersiphonswitch controls all areas in the world, but isn't used in current maps as it's too powerful
+ *
+ */
+
+
+obj/machinery/computer/atmosphere
+ name = "atmosphere"
+ icon = 'turfs.dmi'
+
+
+ // Prototype: returns the contents of the area that the computer controls
+ // Used to find all the siphon objects in the controlled region
+
+ proc/returnarea()
+ return
+
+
+ // The siphon switch derived type
+
+ siphonswitch
+ name = "Area Air Control"
+ icon_state = "switch"
+ var
+ otherarea // set this for the computer to control an area other than the one its in
+ // e.g. set this to "testlab1" to control /area/testlab1
+ area/area // the area to control. Defaults to the area containing the computer, unless otherarea is set.
+
+
+ // Create a siphonswitch computer
+ // Set the controlled area to the containing area, or to that in the "otherarea" var if set
+
+ New()
+ ..()
+
+ spawn(5) // wait for map to finish loading
+ src.area = src.loc.loc
+ if(otherarea)
+ src.area = locate(text2path("/area/[otherarea]"))
+
+
+ // Return the contents of the controlled area
+
+ returnarea()
+ return area.contents
+
+
+ // The verbs for siphonswitch and mastersiphonswitch
+ // Siphons are controlled through the reset() proc for each
+
+ // Switch all siphons on
+
+ verb/siphon_all()
+ set src in oview(1)
+ if(stat & NOPOWER) return
+ if (usr.stat)
+ return
+ usr << "Starting all siphon systems."
+ for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
+ S.reset(1, 0)
+ src.add_fingerprint(usr)
+
+
+ // Turn off all siphons
+
+ verb/stop_all()
+ set src in oview(1)
+ if(stat & NOPOWER) return
+ if (usr.stat)
+ return
+ usr << "Stopping all siphon systems."
+ for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
+ S.reset(0, 0)
+ src.add_fingerprint(usr)
+
+
+ // Set all siphons to automatic mode
+
+ verb/auto_on()
+ set src in oview(1)
+ if(stat & NOPOWER) return
+ if (usr.stat)
+ return
+ usr << "Starting automatic air control systems."
+ for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
+ S.reset(0, 1)
+ src.add_fingerprint(usr)
+
+
+ // Set all scrubber type siphons to release
+
+ verb/release_scrubbers()
+ set src in oview(1)
+
+ if(stat & NOPOWER) return
+ if (usr.stat)
+ return
+ usr << "Releasing all scrubber toxins."
+ for(var/obj/machinery/atmoalter/siphs/scrubbers/S in src.returnarea())
+ S.reset(-1.0, 0)
+ src.add_fingerprint(usr)
+
+
+ // Set all siphons to release
+
+ verb/release_all()
+ set src in oview(1)
+ if(stat & NOPOWER) return
+ if (usr.stat)
+ return
+ usr << "Releasing all stored air."
+ for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
+ S.reset(-1.0, 0)
+ src.add_fingerprint(usr)
+
+
+
+ // The master siphon switch - controls all siphons in the world
+ // Not used in current maps since it's rather too powerful
+
+ mastersiphonswitch
+ name = "Master Air Control"
+
+
+ // Return the world as the contolled area
+
+ returnarea()
+ return world
+
diff --git a/main-src/Code/Machinery/Computer/card.dm b/main-src/Code/Machinery/Computer/card.dm
new file mode 100644
index 0000000..a4131e6
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/card.dm
@@ -0,0 +1,287 @@
+/*
+ * Card -- the identification computer
+ *
+ * Used to alter the settings of an ID card
+ * Also provides a crew manifest
+ *
+ */
+
+obj/machinery/computer/card
+ name = "Identification Computer"
+ icon = 'stationobjs.dmi'
+ icon_state = "id_computer"
+
+ var
+ obj/item/weapon/card/id/scan = null // The ID card used to authenticate
+ // Must be assigned to Captain or Head of Personnel
+ obj/item/weapon/card/id/modify = null // The ID card to modify
+ authenticated = 0 // true if Capt/HoP card is authenticated
+ mode = 0 // 0 = show card edit, 1 = show crew manifest
+ printing = null // true if printing the crew manifest
+
+
+
+ // Attack with object same as interact
+
+ attackby(obj/I, mob/user)
+ src.attack_hand(user)
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact.
+ // Show interaction window
+
+ attack_hand(mob/user)
+
+ if(stat & (NOPOWER|BROKEN) ) return
+
+ user.machine = src
+ var/dat
+ if (!( ticker ))
+ return
+
+ if (src.mode)
+
+ var/d2 = "Confirm Identity: [(src.scan ? text("[]", src.scan.name) : "----------")]\n[(src.authenticated ? "You are logged in!" :"{Log in}")]"
+
+ var/d1 = "Please use security Records to modify entries.
"
+ for(var/datum/data/record/t in data_core.general)
+ d1 += "[t.fields["name"]] - [t.fields["rank"]]
"
+
+ dat = "[d2]
\n
\nCrew Manifest:
\n[d1]\n
\nPrint
\n
\nAccess ID modification console.
\n"
+ else
+ var/d1 = "{Log in}"
+ if ((src.authenticated && src.modify))
+ var/vo = null
+ var/va = null
+ var/vl = null
+ var/ve = null
+ switch(src.modify.access_level)
+ if(1.0)
+ vo = "0 1 2 3 4 5"
+ if(2.0)
+ vo = "0 1 2 3 4 5"
+ if(3.0)
+ vo = "0 1 2 3 4 5"
+ if(4.0)
+ vo = "0 1 2 3 4 5"
+ if(5.0)
+ vo = "0 1 2 3 4 5"
+ else
+ vo = "0 1 2 3 4 5"
+ switch(src.modify.lab_access)
+ if(1.0)
+ vl = "0 1 2 3 4 5"
+ if(2.0)
+ vl = "0 1 2 3 4 5"
+ if(3.0)
+ vl = "0 1 2 3 4 5"
+ if(4.0)
+ vl = "0 1 2 3 4 5"
+ if(5.0)
+ vl = "0 1 2 3 4 5"
+ else
+ vl = "0 1 2 3 4 5"
+ switch(src.modify.engine_access)
+ if(1.0)
+ ve = "0 1 2 3 4 5"
+ if(2.0)
+ ve = "0 1 2 3 4 5"
+ if(3.0)
+ ve = "0 1 2 3 4 5"
+ if(4.0)
+ ve = "0 1 2 3 4 5"
+ if(5.0)
+ ve = "0 1 2 3 4 5"
+ else
+ ve = "0 1 2 3 4 5"
+ switch(src.modify.air_access)
+ if(1.0)
+ va = "0 1 2 3 4 5"
+ if(2.0)
+ va = "0 1 2 3 4 5"
+ if(3.0)
+ va = "0 1 2 3 4 5"
+ if(4.0)
+ va = "0 1 2 3 4 5"
+ if(5.0)
+ va = "0 1 2 3 4 5"
+ else
+ va = "0 1 2 3 4 5"
+
+ var/list/L = list( "Research Assistant", "Staff Assistant", "Medical Assistant", "Technical Assistant", "Engineer", "Forensic Technician", "Research Technician", "Medical Doctor", "Captain", "Security Officer", "Medical Researcher", "Toxin Researcher", "Head of Research", "Head of Personnel", "Station Technician", "Atmospheric Technician", "Unassigned", "Systems", "Custom" )
+ var/assign = ""
+ if (istype(user, /mob/human))
+ var/counter = 1
+ for(var/t in L)
+ assign += "[t] "
+ counter++
+ if (counter >= 3)
+ assign += "
"
+ counter = 1
+
+ d1 = "[src.modify.name] :
\nGeneral Access Level: [vo]
\nLaboratory Access: [vl]
\nReactor/Engine Access: [ve]
\nMain Systems Access: [va]
\nRegistered: [src.modify.registered ? "[src.modify.registered]" : "{None: Click to modify}"]
\nAssignment: [src.modify.assignment ? "[src.modify.assignment]" : "None"]
\n[assign]
"
+ else
+ var/counter = 1
+ for(var/t in L)
+ assign += "[stars(t)] "
+ counter++
+ if (counter >= 4)
+ assign += "
"
+ counter = 1
+
+ d1 = "[stars(modify.name)] :
\n[stars("General Access Level:")] [vo]
\n[stars("Laboratory Access:")] [vl]
\n[stars("Reactor/Engine Access:")] [ve]
\n[stars("Main Systems Access:")] [va]
\n[stars("Registered:")] [src.modify.registered ? stars(src.modify.registered) : stars("{None: Click to modify}")]
\n[stars("Assignment:")] [src.modify.assignment ? "[stars(src.modify.assignment)]" : "None"]
\n[assign]
"
+
+
+ if (istype(user, /mob/human))
+ dat = text("Identification Card Modifier
\nPlease Insert the cards into the slots
\nTarget: []
\nConfirm Identity: []
\n-----------------
\n[]
\n
\n
\nAccess Crew Manifest
\n", src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.scan ? text("[]", src.scan.name) : "----------"), d1, src)
+ else
+ dat = text("[]
\n[]
\n[] []
\n[] []
\n-----------------
\n[]
\n
\n
\n[]
\n", stars("Identification Card Modifier"), stars("Please Insert the cards into the slots"), stars("Target:"), src, (src.modify ? text("[]", stars(src.modify.name)) : "----------"), stars("Confirm Identity:"), src, (src.scan ? text("[]", stars(src.scan.name)) : "----------"), d1, src, stars("Access Crew Manifest"))
+ user << browse(dat, "window=id_com;size=400x500")
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+
+ if(stat & (NOPOWER|BROKEN))
+ usr << browse(null, "window=id_com")
+ return
+
+ if(usr.restrained() || usr.lying) return
+
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.stat || usr.restrained()))
+ return
+
+ if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
+ usr.machine = src
+ if (href_list["modify"])
+ if (src.modify)
+ src.modify.name = "[src.modify.registered]'s ID Card ([src.modify.access_level]>[src.modify.lab_access]-[src.modify.engine_access]-[src.modify.air_access])"
+ src.modify.loc = src.loc
+ src.modify = null
+ else
+ var/obj/item/I = usr.equipped()
+ if (istype(I, /obj/item/weapon/card/id))
+ usr.drop_item()
+ I.loc = src
+ src.modify = I
+ src.authenticated = 0
+
+ if (href_list["scan"])
+ if (src.scan)
+ src.scan.loc = src.loc
+ src.scan = null
+ else
+ var/obj/item/I = usr.equipped()
+ if (istype(I, /obj/item/weapon/card/id))
+ usr.drop_item()
+ I.loc = src
+ src.scan = I
+ src.authenticated = 0
+
+ if (href_list["auth"])
+ if ((!( src.authenticated ) && src.scan && (src.modify || src.mode)))
+ if ((src.scan.assignment == "Captain" || src.scan.assignment == "Head of Personnel"))
+ src.authenticated = 1
+
+ if (href_list["vo"])
+ if (src.authenticated)
+ var/t1 = text2num(href_list["vo"])
+ if (t1 == -1.0)
+ t1 = 0
+ src.modify.access_level = t1
+
+ if (href_list["vl"])
+ if (src.authenticated)
+ var/t1 = text2num(href_list["vl"])
+ if (t1 == -1.0)
+ t1 = 0
+ src.modify.lab_access = t1
+
+ if (href_list["ve"])
+ if (src.authenticated)
+ var/t1 = text2num(href_list["ve"])
+ if (t1 == -1.0)
+ t1 = 0
+ src.modify.engine_access = t1
+
+ if (href_list["va"])
+ if (src.authenticated)
+ var/t1 = text2num(href_list["va"])
+ if (t1 == -1.0)
+ t1 = 0
+ src.modify.air_access = t1
+
+ if (href_list["assign"])
+ if (src.authenticated)
+ var/t1 = href_list["assign"]
+
+ if(t1 == "Custom")
+ t1 = input("Enter a custom job assignment.","Assignment")
+
+ src.modify.assignment = t1
+
+ if (href_list["reg"])
+ if (src.authenticated)
+ var/t2 = src.modify
+ var/t1 = input(usr, "What name?", "ID computer", null) as text
+ if ((src.authenticated && src.modify == t2 && get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
+ src.modify.registered = t1
+
+ if (href_list["mode"])
+ src.mode = text2num(href_list["mode"])
+
+ if (href_list["print"])
+ if (!( src.printing ))
+ src.printing = 1
+ sleep(50)
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
+ var/t1 = "Crew Manifest:
"
+ for(var/datum/data/record/t in data_core.general)
+ t1 += "[t.fields["name"]] - [t.fields["rank"]]
"
+
+ P.info = "[t1]"
+ P.name = "paper- 'Crew Manifest'"
+ src.printing = null
+
+ if (href_list["mode"])
+ src.authenticated = 0
+ src.mode = text2num(href_list["mode"])
+ if (src.modify)
+ src.modify.name = "[src.modify.registered]'s ID Card ([src.modify.access_level]>[src.modify.lab_access]-[src.modify.engine_access]-[src.modify.air_access])"
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+ src.add_fingerprint(usr)
+ else
+ usr << browse(null, "window=id_com")
+
+
+ // Called when area power state changes
+ // Update machione stat and icon_state
+
+ power_change()
+ if(stat & BROKEN)
+ icon_state = "broken"
+ else
+ if( powered() )
+ icon_state = initial(icon_state)
+ stat &= ~NOPOWER
+ else
+ spawn(rand(0, 15))
+ src.icon_state = "id_unpowered"
+ stat |= NOPOWER
+
+
diff --git a/main-src/Code/Machinery/Computer/communications.dm b/main-src/Code/Machinery/Computer/communications.dm
new file mode 100644
index 0000000..a0cfc32
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/communications.dm
@@ -0,0 +1,47 @@
+/*
+ * Communications -- the communications computer
+ *
+ * Used to call the emergency shuttle.
+ */
+
+obj/machinery/computer/communications
+ name = "communications"
+ icon = 'stationobjs.dmi'
+ icon_state = "comm_computer"
+
+
+ // Call the shuttle
+
+ verb/call_shuttle()
+ set src in oview(1)
+
+ src.add_fingerprint(usr)
+ if(stat & NOPOWER) return
+
+ if ((!( ticker ) || ticker.shuttle_location == 1))
+ return
+
+ if( ticker.mode == "blob" ) // Shuttle cannot be called in blob mode
+ usr << "Under directive 7-10, SS13 is quarantined until further notice."
+ return
+
+ world << "\blue Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes."
+ if (!( ticker.timeleft ))
+ ticker.timeleft = 6000
+ ticker.timing = 1
+
+
+ // Cancel the shuttle call
+
+ verb/cancel_call()
+ set src in oview(1)
+
+ src.add_fingerprint(usr)
+ if(stat & NOPOWER) return
+ if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300))
+ return
+ if( ticker.mode == "blob" )
+ return
+
+ world << "\blue Alert: The shuttle is going back!"
+ ticker.timing = -1.0
diff --git a/main-src/Code/Machinery/Computer/data.dm b/main-src/Code/Machinery/Computer/data.dm
new file mode 100644
index 0000000..a2207a2
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/data.dm
@@ -0,0 +1,114 @@
+/*
+ * Data -- A computer that displays data
+ *
+ * All these do is display a list of entries, Each entry can be read to display information about it.
+ *
+ */
+
+
+obj/machinery/computer/data
+ name = "data"
+ icon = 'weap_sat.dmi'
+ icon_state = "computer"
+
+ var
+ list/topics = list( ) // An associative list of entries and content
+
+
+ // Display the list of entries
+
+ verb/display()
+ set src in oview(1)
+
+ for(var/x in src.topics)
+ usr << "[x], \..."
+
+ usr << ""
+ src.add_fingerprint(usr)
+ return
+
+
+ // Display the content of an entry, given the entry name as an argument
+
+ verb/read(topic as text)
+ set src in oview(1)
+
+ if (src.topics[text("[]", topic)])
+ usr << "[topic]\n\t [src.topics["[topic]"]]"
+ else
+ usr << "Unable to find- [topic]"
+ src.add_fingerprint(usr)
+ return
+
+
+
+ weapon
+ name = "weapon"
+
+ info
+ name = "Research Computer"
+
+ // Create the entries and content for this computer
+
+ New()
+ ..()
+ src.topics["LOG(001)"] = "System: Deployment successful"
+ src.topics["LOG(002)"] = "System: Safe orbit at inclination .003 established"
+ src.topics["LOG(003)"] = "CenCom: Attempting test fire...ALERT(001)"
+ src.topics["ALERT(001)"] = "System: Cannot attempt test fire"
+ src.topics["LOG(004)"] = "System: Airlock accessed..."
+ src.topics["LOG(005)"] = "System: System successfully reset...Generator engaged"
+ src.topics["LOG(006)"] = "Physical: Super-heater (W005) added to power grid"
+ src.topics["LOG(007)"] = "Physical: Amplifier (W007) added to power grid"
+ src.topics["LOG(008)"] = "Physical: Plasma Energizer (W006) added to power grid"
+ src.topics["LOG(009)"] = "Physical: Laser (W004) added to power grid"
+ src.topics["LOG(010)"] = "Physical: Laser test firing"
+ src.topics["LOG(011)"] = "Physical: Plasma added to Super-heater"
+ src.topics["LOG(012)"] = "Physical: Orient N12.525,E22.124"
+ src.topics["LOG(013)"] = "System: Location N12.525,E22.124"
+ src.topics["LOG(014)"] = "Physical: Test fire...successful"
+ src.topics["LOG(015)"] = "Physical: Airlock accessed..."
+ src.topics["LOG(016)"] = "******: Disable locater systems"
+ src.topics["LOG(017)"] = "System: Locater Beacon-Disengaged,CenCom link-Cut...ALERT(002)"
+ src.topics["ALERT(002)"] = "System: Cannot seem to establish contact with Central Command"
+ src.topics["LOG(018)"] = "******: Shutting down all systems...ALERT(003)"
+ src.topics["ALERT(003)"] = "System: Power grid failure-Activating back-up power...ALERT(004)"
+ src.topics["ALERT(004)"] = "System: Engine failure...All systems deactivated."
+
+
+ // Overrides display verb to show a title
+
+ display()
+ set src in oview(1)
+
+ usr << "Research Information:"
+ ..()
+ return
+
+
+ log
+ name = "Log Computer"
+
+
+ // Create the list for this computer
+
+ New()
+ ..()
+ src.topics["Super-heater"] = "This turns a can of semi-liquid plasma into a super-heated ball of plasma."
+ src.topics["Amplifier"] = "This increases the intensity of a laser."
+ src.topics["Class 11 Laser"] = "This creates a very slow laser that is capable of penetrating most objects."
+ src.topics["Plasma Energizer"] = "This combines super-heated plasma with a laser beam."
+ src.topics["Generator"] = "This controls the entire power grid."
+ src.topics["Mirror"] = "this can reflect LOW power lasers. HIGH power goes through it!"
+ src.topics["Targetting Prism"] = "This focuses a laser coming from any direction forward."
+
+
+ // Override display verb to show a title
+
+ display()
+ set src in oview(1)
+
+ usr << "Research Log:"
+ ..()
+ return
+
diff --git a/main-src/Code/Machinery/Computer/engine.dm b/main-src/Code/Machinery/Computer/engine.dm
new file mode 100644
index 0000000..c105f27
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/engine.dm
@@ -0,0 +1,133 @@
+/*
+ * Engine -- engine computer
+ *
+ * Used to eject the engine section, and can also read the gas levels present at a gas sensor
+ *
+ * Most of the ejection logic is contained in the engine_eject datum
+ */
+
+/obj/machinery/computer/engine
+ name = "engine"
+ icon = 'enginecomputer.dmi'
+ var
+ temp = null // temporary text string used for interaction window
+ id = 1 // id of gas sensor to display
+ obj/machinery/gas_sensor/gs // the gas sensor object
+ access = "4000/0030" // the access levels required to start ejection timer (Capt, Head, or Engineer)
+ allowed // the job assignments to eject (null = none)
+
+
+ // Create the engine computer, and the global ejector datum if not already exisiting
+ // Also find the gas sensor object matching "id"
+
+ New()
+ if (!( engine_eject_control ))
+ engine_eject_control = new /datum/engine_eject( )
+ ..()
+
+ spawn(5)
+ for(var/obj/machinery/gas_sensor/G in machines)
+ if(G.id == src.id)
+ gs = G
+ break
+
+
+ // Timed process
+ // Use power, update interaction window for viewers
+
+ process()
+ if(stat & (NOPOWER|BROKEN) )
+ return
+ use_power(250)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+ // Attackby object - pass through to interact
+
+ attackby(var/obj/O, mob/user)
+ return src.attack_hand(user)
+
+
+ // Monkey interact same a human
+
+ attack_paw(var/mob/user as mob)
+ return src.attack_hand(user)
+
+
+ // Human interact
+ // Show interaction window
+
+ attack_hand(var/mob/user as mob)
+ if(stat & (NOPOWER|BROKEN) )
+ return
+
+ user.machine = src
+ var/dat
+ if (src.temp)
+ dat = "[src.temp]
Clear Screen"
+ else if (engine_eject_control.status == 0)
+ dat = "Engine Gas Monitor
"
+ if(gs)
+ dat += "[gs.sense_string()]"
+
+ else
+ dat += "No sensor found."
+
+ dat += "
Engine Ejection Module
\nStatus: Docked
\n
\nCountdown: [engine_eject_control.timeleft]/60 \[Reset\]
\n
\nEject Engine
\n
\nClose"
+ else
+ if (engine_eject_control.status == 1)
+ dat = "Engine Ejection Module
\nStatus: Ejecting
\n
\nCountdown: [engine_eject_control.timeleft]/60 \[Reset\]
\n
\nStop Ejection
\n
\nClose"
+ else
+ dat = "Engine Ejection Module
\nStatus: Ejected
\n
\nCountdown: N/60 \[Reset\]
\n
\nEngine Ejected!
\n
\nClose"
+ user << browse(dat, "window=computer;size=400x500")
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+
+ if (href_list["eject"])
+ if (engine_eject_control.status == 0)
+ src.temp = "Eject Engine?
\[Swipe ID to initiate eject sequence\]
Cancel"
+
+ else if (href_list["eject2"]) // check ID card against access levels before ejecting
+ var/obj/item/weapon/card/id/I = usr.equipped()
+ if (istype(I))
+ if(I.check_access(access,allowed))
+ if (engine_eject_control.status == 0)
+ engine_eject_control.ejectstart()
+ src.temp = null
+ else
+ usr << "\red Access Denied."
+ else if (href_list["stop"])
+ if (engine_eject_control.status > 0)
+ src.temp = text("Stop Ejection?
Yes
No", src, src)
+
+ else if (href_list["stop2"])
+ if (engine_eject_control.status > 0)
+ engine_eject_control.stopcount()
+ src.temp = null
+
+ else if (href_list["reset"])
+ if (engine_eject_control.status == 0)
+ engine_eject_control.resetcount()
+
+ else if (href_list["temp"])
+ src.temp = null
+
+ src.add_fingerprint(usr)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
diff --git a/main-src/Code/Machinery/Computer/hologram.dm b/main-src/Code/Machinery/Computer/hologram.dm
new file mode 100644
index 0000000..119f4ed
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/hologram.dm
@@ -0,0 +1,159 @@
+/*
+ * /obj/machinery/computer/hologram_comp - Hologram computer
+ *
+ * /obj/machinery/holograp_proj - Hologram projector
+ *
+ * /obj/projection - Hologram projection
+ *
+ * Used to display a mob with variable skin colour, hair, etc.
+ */
+
+
+/*
+ * The hologram computer
+ */
+
+
+obj/machinery/computer/hologram_comp
+ name = "Hologram Computer"
+ icon = 'stationobjs.dmi'
+ icon_state = "holo_console0"
+
+ var
+ obj/machinery/hologram_proj/projector = null // the projector object associated with this computer
+ temp = null // temporary text for interaction window (not used)
+ lumens = 0.0 // brightness of the hologram skin image
+ h_r = 245.0 //
+ h_g = 245.0 // RGB settings for the hologram hair
+ h_b = 245.0 //
+
+
+ // Create a new computer
+ // After world has finished loading, located the hologram projector to the north
+
+ New()
+ ..()
+ spawn( 10 )
+ src.projector = locate(/obj/machinery/hologram_proj, get_step(src.loc, NORTH))
+
+
+ // Interact when double clicked
+ // Possibly using this instead of usual attack_hand() because its designed to be used before game starts
+ // However this doesn't seem to be necessary in the current code
+
+ DblClick()
+ if (get_dist(src, usr) > 1)
+ return 0
+ src.show_console(usr)
+
+
+ // Render a human male with the current settings
+ // Set the projector to use the resulting icon
+
+ proc/render()
+ var/icon/I = new /icon( 'human.dmi', "male" )
+ if (src.lumens >= 0)
+ I.Blend(rgb(src.lumens, src.lumens, src.lumens), 0)
+ else
+ I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), 1)
+ I.Blend(new /icon( 'human.dmi', "mouth" ), 3)
+ var/icon/U = new /icon( 'human.dmi', "diaper" )
+ U.Blend(U, 3)
+ U = new /icon( 'mob.dmi', "hair_a" )
+ U.Blend(rgb(src.h_r, src.h_g, src.h_b), 0)
+ I.Blend(U, 3)
+ src.projector.projection.icon = I
+
+
+ // Show interaction window
+
+ proc/show_console(var/mob/user)
+
+ var/dat
+ user.machine = src
+ if (src.temp)
+ dat = "[temp]
Clear"
+ else
+ dat = {"Hologram Status:
+Power: [(src.projector.projection ? "On" : "Off")]
+Hologram Control:
+Color Luminosity: [-src.lumens + 35]/220 \[Reset\]
+Lighten: 1 10
+Darken: 1 10
+
+Hair Color: ([h_r],[h_g],[h_b]) \[Reset\]
+Red (0-255): \[0\] -10 -1 [h_r] 1 10 \[255\]
+Green (0-255): \[0\] -10 -1 [h_g] 1 10 \[255\]
+Blue (0-255): \[0\] -10 -1 [h_b] 1 10 \[255\]
"}
+ user << browse(dat, "window=hologram_console")
+
+
+ // Handle topic links from window
+
+ Topic(href, href_list)
+ ..()
+ if (get_dist(src, usr) <= 1)
+ flick("holo_console1", src)
+ if (href_list["power"])
+ if (src.projector.projection) // remove the current projection
+ src.projector.icon_state = "hologram0"
+ del(src.projector.projection)
+ else // create a new projection
+ src.projector.projection = new /obj/projection( src.projector.loc )
+ src.projector.projection.icon = 'human.dmi'
+ src.projector.projection.icon_state = "male"
+ src.projector.icon_state = "hologram1"
+ src.render()
+ else if (href_list["h_r"])
+ if (src.projector.projection)
+ src.h_r += text2num(href_list["h_r"])
+ src.h_r = min(max(src.h_r, 0), 255)
+ render()
+ else if (href_list["h_g"])
+ if (src.projector.projection)
+ src.h_g += text2num(href_list["h_g"])
+ src.h_g = min(max(src.h_g, 0), 255)
+ render()
+ else if (href_list["h_b"])
+ if (src.projector.projection)
+ src.h_b += text2num(href_list["h_b"])
+ src.h_b = min(max(src.h_b, 0), 255)
+ render()
+ else if (href_list["light"])
+ if (src.projector.projection)
+ src.lumens += text2num(href_list["light"])
+ src.lumens = min(max(src.lumens, -185.0), 35)
+ render()
+ else if (href_list["reset"])
+ if (src.projector.projection)
+ src.lumens = 0
+ render()
+ else if (href_list["temp"])
+ src.temp = null
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.show_console(M)
+
+
+/*
+ * The hologram projector
+ */
+
+
+obj/machinery/hologram_proj
+ name = "Hologram Projector"
+ icon = 'stationobjs.dmi'
+ icon_state = "hologram0"
+ anchored = 1
+ var
+ obj/projection/projection = null // the projection object
+
+
+/*
+ * The projected hologram
+ */
+
+/obj/projection
+ name = "Projection"
+ anchored = 1.0
\ No newline at end of file
diff --git a/main-src/Code/Machinery/Computer/med_data.dm b/main-src/Code/Machinery/Computer/med_data.dm
new file mode 100644
index 0000000..a9647fe
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/med_data.dm
@@ -0,0 +1,399 @@
+/*
+ * Med_data -- a computer that shows player medical data.
+ *
+ *
+ */
+
+
+
+obj/machinery/computer/med_data
+ name = "Medical Records"
+ icon = 'weap_sat.dmi'
+ icon_state = "computer"
+ var
+ obj/item/weapon/card/id/scan = null // ID card inserted in the computer
+ authenticated = null // name on ID card (if has access)
+ rank = null // job assignment of ID card
+ screen = null // active screen displayed
+ // 1=menu, 2=list of records, 3=maint. menu ,4=record edit
+ datum/data/record/active1 = null // selected general record (from data_core.general)
+ datum/data/record/active2 = null // selected medical record (from data_code.medical)
+ a_id = null // not used
+ temp = null // temporary text to show in window
+ printing = null // true if printing a record
+ allowed = "Medical Researcher/Medical Doctor/Head of Personnel/Captain" // the job assignments which have access
+ access // the access levels which have access (none)
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact
+ // Show interaction window
+
+ attack_hand(mob/user)
+
+ var/dat
+ if (src.temp) // show temporary text
+ dat = "[temp]
Clear Screen"
+ else // show ID card inserted
+ dat = "Confirm Identity: [src.scan ? "[src.scan.name]" : "----------"]
"
+ if (src.authenticated)
+ switch(src.screen)
+ if(1.0)
+ dat += {"Search Records
+List Records
+
+Record Maintenance
+{Log Out}
+"}
+ if(2.0)
+ dat += "Record List:
"
+ for(var/datum/data/record/R in data_core.general)
+ dat += "[R.fields["id"]]: [R.fields["name"]]
"
+
+ dat += "
Back"
+ if(3.0)
+ dat += {"Records Maintenance
+Backup To Disk
+Upload From disk
+Delete All Records
+
+Back"}
+
+ if(4.0)
+ dat += "Medical Record
"
+ if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
+ dat += {"Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]]
+Sex: [src.active1.fields["sex"]]
+Age: [src.active1.fields["age"]]
+Fingerprint: [src.active1.fields["fingerprint"]]
+Physical Status: [src.active1.fields["p_stat"]]
+Mental Status: [src.active1.fields["m_stat"]]
"}
+
+ else
+ dat += "General Record Lost!
"
+ if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
+ dat += {"
+Medical Data
+Blood Type: [src.active2.fields["b_type"]]
+
+Minor Disabilities: [src.active2.fields["mi_dis"]]
+Details: [src.active2.fields["mi_dis_d"]]
+
+Major Disabilities: [src.active2.fields["ma_dis"]]
+Details: [src.active2.fields["ma_dis_d"]]
+
+Allergies: [src.active2.fields["alg"]]
+Details: [src.active2.fields["alg_d"]]
+
+Current Diseases: [src.active2.fields["cdi"]] (per disease info placed in log/comment section)
+Details: [src.active2.fields["cdi_d"]]
+
+Important Notes:
+ [src.active2.fields["notes"]]
+
+Comments/Log
"}
+
+ var/counter = 1
+ while(src.active2.fields["com_[counter]"])
+ dat += "[src.active2.fields["com_[counter]"]]
Delete Entry
"
+ counter++
+ dat += "Add Entry
"
+ dat += "Delete Record (Medical Only)
"
+ else
+ dat += "Medical Record Lost!
"
+ dat += "New Record
"
+ dat += "\nPrint Record
\nBack
"
+
+ else
+ dat += "{Log In}"
+ user << browse("Medical Records[dat]", "window=med_rec")
+
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+ if (!( data_core.general.Find(src.active1) ))
+ src.active1 = null
+ if (!( data_core.medical.Find(src.active2) ))
+ src.active2 = null
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+
+ usr.machine = src
+ if (href_list["temp"])
+ src.temp = null // close the temporary display
+ if (href_list["scan"])
+ if (src.scan)
+ src.scan.loc = src.loc // remove ID card from computer
+ src.scan = null
+ else
+ var/obj/item/I = usr.equipped()
+ if (istype(I, /obj/item/weapon/card/id))
+ usr.drop_item()
+ I.loc = src // insert ID card into computer
+ src.scan = I
+ else if (href_list["logout"])
+ src.authenticated = null
+ src.screen = null
+ src.active1 = null
+ src.active2 = null
+ else if (href_list["login"]) // check inserted ID card against access requirements
+ if (istype(src.scan, /obj/item/weapon/card/id))
+ src.active1 = null
+ src.active2 = null
+ if(scan.check_access(access, allowed))
+ src.authenticated = src.scan.registered
+ src.rank = src.scan.assignment
+ src.screen = 1
+ if (src.authenticated)
+ if (href_list["list"])
+ src.screen = 2
+ src.active1 = null
+ src.active2 = null
+ else if (href_list["rec_m"])
+ src.screen = 3
+ src.active1 = null
+ src.active2 = null
+ else if (href_list["del_all"])
+ src.temp = "Are you sure you wish to delete all records?
\n\tYes
\n\tNo
"
+ else if (href_list["del_all2"])
+ for(var/datum/data/record/R in data_core.medical)
+ del(R)
+ src.temp = "All records deleted."
+ else if (href_list["main"])
+ src.screen = 1
+ src.active1 = null
+ src.active2 = null
+
+ else if (href_list["field"]) // edit fields
+ var/a1 = src.active1
+ var/a2 = src.active2
+ switch(href_list["field"])
+ if("fingerprint")
+ if (istype(src.active1, /datum/data/record))
+ var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["id"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["fingerprint"] = t1
+ if("sex")
+ if (istype(src.active1, /datum/data/record))
+ if (src.active1.fields["sex"] == "Male")
+ src.active1.fields["sex"] = "Female"
+ else
+ src.active1.fields["sex"] = "Male"
+ if("age")
+ if (istype(src.active1, /datum/data/record))
+ var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["age"] = t1
+ if("mi_dis")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["mi_dis"] = t1
+ if("mi_dis_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["mi_dis_d"] = t1
+ if("ma_dis")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["ma_dis"] = t1
+ if("ma_dis_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["ma_dis_d"] = t1
+ if("alg")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["alg"] = t1
+ if("alg_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["alg_d"] = t1
+ if("cdi")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["cdi"] = t1
+ if("cdi_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["cdi_d"] = t1
+ if("notes")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["notes"] = t1
+ if("p_stat")
+ if (istype(src.active1, /datum/data/record))
+ src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
", src, src, src, src)
+ if("m_stat")
+ if (istype(src.active1, /datum/data/record))
+ src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src)
+ if("b_type")
+ if (istype(src.active2, /datum/data/record))
+ src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src)
+
+ else if (href_list["p_stat"])
+ if (src.active1)
+ switch(href_list["p_stat"])
+ if("deceased")
+ src.active1.fields["p_stat"] = "*Deceased*"
+ if("unconscious")
+ src.active1.fields["p_stat"] = "*Unconscious*"
+ if("active")
+ src.active1.fields["p_stat"] = "Active"
+ if("unfit")
+ src.active1.fields["p_stat"] = "Physically Unfit"
+ else if (href_list["m_stat"])
+ if (src.active1)
+ switch(href_list["m_stat"])
+ if("insane")
+ src.active1.fields["m_stat"] = "*Insane*"
+ if("unstable")
+ src.active1.fields["m_stat"] = "*Unstable*"
+ if("watch")
+ src.active1.fields["m_stat"] = "*Watch*"
+ if("stable")
+ src.active2.fields["m_stat"] = "Stable"
+
+ else if (href_list["b_type"])
+ if (src.active2)
+ switch(href_list["b_type"])
+ if("an")
+ src.active2.fields["b_type"] = "A-"
+ if("bn")
+ src.active2.fields["b_type"] = "B-"
+ if("abn")
+ src.active2.fields["b_type"] = "AB-"
+ if("on")
+ src.active2.fields["b_type"] = "O-"
+ if("ap")
+ src.active2.fields["b_type"] = "A+"
+ if("bp")
+ src.active2.fields["b_type"] = "B+"
+ if("abp")
+ src.active2.fields["b_type"] = "AB+"
+ if("op")
+ src.active2.fields["b_type"] = "O+"
+
+ else if (href_list["del_r"])
+ if (src.active2)
+ src.temp = text("Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
", src, src)
+ else if (href_list["del_r2"])
+ if (src.active2)
+ del(src.active2)
+ else if (href_list["d_rec"])
+ var/datum/data/record/R = locate(href_list["d_rec"])
+ var/datum/data/record/M = locate(href_list["d_rec"])
+ if (!( data_core.general.Find(R) ))
+ src.temp = "Record Not Found!"
+ return
+ for(var/datum/data/record/E in data_core.medical)
+ if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
+ M = E
+ src.active1 = R
+ src.active2 = M
+ src.screen = 4
+ else if (href_list["new"])
+ if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
+ var/datum/data/record/R = new /datum/data/record( )
+ R.fields["name"] = src.active1.fields["name"]
+ R.fields["id"] = src.active1.fields["id"]
+ R.name = text("Medical Record #[]", R.fields["id"])
+ R.fields["b_type"] = "Unknown"
+ R.fields["mi_dis"] = "None"
+ R.fields["mi_dis_d"] = "No minor disabilities have been declared."
+ R.fields["ma_dis"] = "None"
+ R.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
+ R.fields["alg"] = "None"
+ R.fields["alg_d"] = "No allergies have been detected in this patient."
+ R.fields["cdi"] = "None"
+ R.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
+ R.fields["notes"] = "No notes."
+ data_core.medical += R
+ src.active2 = R
+ src.screen = 4
+ else if (href_list["add_c"])
+ if (!( istype(src.active2, /datum/data/record) ))
+ return
+ var/a2 = src.active2
+ var/t1 = input("Add Comment:", "Med. records", null, null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ var/counter = 1
+ while(src.active2.fields[text("com_[]", counter)])
+ counter++
+ src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
+ else if (href_list["del_c"])
+ if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
+ src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted"
+ else if (href_list["search"])
+ var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text
+ if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
+ return
+ src.active1 = null
+ src.active2 = null
+ t1 = lowertext(t1)
+ for(var/datum/data/record/R in data_core.general)
+ if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
+ src.active1 = R
+ if (!( src.active1 ))
+ src.temp = text("Could not locate record [].", t1)
+ else
+ for(var/datum/data/record/E in data_core.medical)
+ if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
+ src.active2 = E
+ src.screen = 4
+ else if (href_list["print_p"])
+ if (!( src.printing ))
+ src.printing = 1
+ sleep(50)
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
+ P.info = "Medical Record
"
+ if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
+ P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
+ else
+ P.info += "General Record Lost!
"
+ if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
+ P.info += text("
\nMedical Data
\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src.active2.fields["b_type"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"])
+ var/counter = 1
+ while(src.active2.fields[text("com_[]", counter)])
+ P.info += text("[]
", src.active2.fields[text("com_[]", counter)])
+ counter++
+ else
+ P.info += "Medical Record Lost!
"
+ P.info += ""
+ P.name = "paper- 'Medical Record'"
+ src.printing = null
+
+ src.add_fingerprint(usr)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
diff --git a/main-src/Code/Machinery/Computer/pod.dm b/main-src/Code/Machinery/Computer/pod.dm
new file mode 100644
index 0000000..1a5188a
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/pod.dm
@@ -0,0 +1,226 @@
+/*
+ * Pod computer -- controls launch of escape pods
+ *
+ * Mass driver - launches the pods
+ *
+ */
+
+
+/*
+ * The pod computer
+ */
+
+obj/machinery/computer/pod
+ name = "Pod Launch Control"
+ icon = 'escapepod.dmi'
+ icon_state = "computer"
+
+ var
+ id = 1.0 // ID of mass driver(s) and poddoors to control
+ obj/machinery/mass_driver/connected = null // the controlled mass driver
+ timing = 0.0 // true if counting down before launch
+ time = 30.0 // time (seconds) to count down
+
+ // Note: Only one massdriver is located via connected, but all drivers with matching ID are fired together
+
+
+ // Create a new pod computer
+ // Locate and set a massdriver with the same ID
+
+ New()
+ ..()
+ spawn( 5 )
+ for(var/obj/machinery/mass_driver/M in machines)
+ if (M.id == src.id)
+ src.connected = M
+
+
+ // Called to fire the driver
+ // Open the poddoors with same ID, fire the matching mass drivers, then close the doors
+
+ proc/alarm()
+
+ if(stat & (NOPOWER|BROKEN)) return
+
+ if (!( src.connected ))
+ viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
+ return
+
+ for(var/obj/machinery/door/poddoor/M in machines)
+ if (M.id == src.id)
+ spawn( 0 )
+ M.openpod()
+ return
+
+ sleep(20)
+
+ // Note updated from 40.93.3S source - all massdrivers with same ID are fired
+ // (Previously, only the connected driver was fired)
+ for(var/obj/machinery/mass_driver/M in machines)
+ if(M.id == src.id)
+ M.power = src.connected.power
+ M.drive()
+ //
+
+ sleep(50)
+ for(var/obj/machinery/door/poddoor/M in machines)
+ if (M.id == src.id)
+ spawn( 0 )
+ M.closepod()
+ return
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact, show window
+
+ attack_hand(mob/user)
+
+ if(stat & (NOPOWER|BROKEN)) return
+
+ var/dat = "Mass Driver Controls"
+ user.machine = src
+ var/d2
+ if (src.timing)
+ d2 = "Stop Time Launch"
+ else
+ d2 = "Initiate Time Launch"
+ var/second = src.time % 60
+ var/minute = (src.time - second) / 60
+ dat += {"
+Timer System: [d2]
+Time Left: [(minute ? "[minute]:" : null)][second] - - + +"}
+
+ if (src.connected)
+ var/temp = ""
+ var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
+ for(var/t in L)
+ if (t == src.connected.power)
+ temp += "[t] "
+ else
+ temp += "[t] "
+
+ dat += "
\nPower Level: [temp]
\nFiring Sequence
\nTest Fire Driver
\nToggle Outer Door
"
+
+ else
+ dat += "
\nToggle Outer Door
"
+
+ dat += "
Close"
+ user << browse(dat, "window=computer;size=400x500")
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+
+ if(stat & (NOPOWER|BROKEN))
+ usr << browse(null, "window=computer")
+ return
+
+ if(usr.restrained() || usr.lying) return
+
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+ if (href_list["power"])
+ var/t = text2num(href_list["power"])
+ t = min(max(0.25, t), 16)
+ if (src.connected)
+ src.connected.power = t
+ else if (href_list["alarm"])
+ src.alarm()
+ else if (href_list["time"])
+ src.timing = text2num(href_list["time"])
+ else if (href_list["tp"])
+ var/tp = text2num(href_list["tp"])
+ src.time += tp
+ src.time = min(max(round(src.time), 0), 120)
+ else if (href_list["door"])
+ for(var/obj/machinery/door/poddoor/M in machines)
+ if (M.id == src.id)
+ if (M.density)
+ spawn( 0 )
+ M.openpod()
+ return
+ else
+ spawn( 0 )
+ M.closepod()
+ return
+
+ src.add_fingerprint(usr)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+ //Foreach goto(394)
+ return
+
+
+ // Timed process
+ // Countdown timer and fire when zero reached
+
+ process()
+ if(stat & (NOPOWER|BROKEN) )
+ return
+ use_power(250)
+
+ if (src.timing)
+ if (src.time > 0)
+ src.time = round(src.time) - 1
+ else
+ alarm()
+ src.time = 0
+ src.timing = 0
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+
+/*
+ * The mass driver
+ */
+
+obj/machinery/mass_driver
+ name = "mass driver"
+ icon = 'stationobjs.dmi'
+ icon_state = "mass_driver"
+ anchored = 1
+ var
+ power = 1.0 // The power level to launch the pod
+ id = 1.0 // ID of the mass driver. Pod computer must have matching ID.
+
+
+
+ // Fire the driver
+ // All objects at the location (that have the DRIVABLE flag) are launched in the direction of the driver
+ // Show the firing animation
+
+ proc/drive(amount)
+
+ if(stat & NOPOWER)
+ return
+
+ use_power(500)
+ for(var/obj/O in src.loc)
+ if (O.flags & DRIVABLE)
+ O.throwing = 1
+ O.throwspeed = 100
+ spawn( 0 )
+ O.throwing(src.dir, src.power)
+ return
+
+ flick("mass_driver1", src)
+
+
+
diff --git a/main-src/Code/Machinery/Computer/prision_shuttle.dm b/main-src/Code/Machinery/Computer/prision_shuttle.dm
new file mode 100644
index 0000000..02fc1da
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/prision_shuttle.dm
@@ -0,0 +1,97 @@
+/*
+ * Prison shuttle -- prision shuttle control computer
+ *
+ * TODO: Allow prision shuttle Z level to be adjusted more easily (marker on map)
+ */
+
+#define PRISON_SHUTTLE_Z 8 // Z level of the prison station
+
+
+obj/machinery/computer/prison_shuttle
+ name = "prison shuttle"
+ icon = 'shuttle.dmi'
+ icon_state = "shuttlecom"
+
+
+ // Take off verb
+ // Move the shuttle (and all objects in it) between station and prison Z level
+
+ verb/take_off()
+ set src in oview(1)
+
+ if ((usr.stat || usr.restrained()))
+ return
+ src.add_fingerprint(usr)
+
+ if (prison_entered) // shuttle is at station
+ var/A = locate(/area/shuttle)
+ for(var/turf/T in A)
+ if (T.z == 1)
+ for(var/atom/movable/AM in T)
+ AM.z = PRISON_SHUTTLE_Z
+ var/turf/U = locate(T.x, T.y, PRISON_SHUTTLE_Z) // move to prison level
+ U.oxygen = T.oxygen
+ U.oldoxy = T.oldoxy
+ U.tmpoxy = T.tmpoxy
+ U.poison = T.poison
+ U.oldpoison = T.oldpoison
+ U.tmppoison = T.tmppoison
+ U.co2 = T.co2
+ U.oldco2 = T.oldco2
+ U.tmpco2 = T.tmpco2
+ del(T)
+ prison_entered = null
+ else if (!( prison_entered )) // shuttle is at prision
+ if (ticker.shuttle_location != 1) // make sure emergency shuttle isn't at station
+ var/A = locate(/area/shuttle_prison)
+ for(var/turf/T in A)
+ if (T.z == PRISON_SHUTTLE_Z)
+ for(var/atom/movable/AM in T)
+ AM.z = 1
+ var/turf/U = locate(T.x, T.y, 1) // move to station level
+ U.oxygen = T.oxygen
+ U.oldoxy = T.oldoxy
+ U.tmpoxy = T.tmpoxy
+ U.poison = T.poison
+ U.oldpoison = T.oldpoison
+ U.tmppoison = T.tmppoison
+ U.co2 = T.co2
+ U.oldco2 = T.oldco2
+ U.tmpco2 = T.tmpco2
+ del(T)
+ prison_entered = 1
+ else
+ usr << "\blue There is an obstructing shuttle!"
+
+
+ // Restabalize verb
+ // Set all shuttle locations to standard atmosphere settings
+
+ verb/restabalize()
+ set src in oview(1)
+
+ viewers(null, null) << "\red Restabalizing prison shuttle atmosphere!"
+ var/A = locate(/area/shuttle_prison)
+ for(var/obj/move/T in A)
+ T.firelevel = 0
+ T.oxygen = O2STANDARD
+ T.oldoxy = O2STANDARD
+ T.tmpoxy = O2STANDARD
+ T.poison = 0
+ T.oldpoison = 0
+ T.tmppoison = 0
+ T.co2 = 0
+ T.oldco2 = 0
+ T.tmpco2 = 0
+ T.sl_gas = 0
+ T.osl_gas = 0
+ T.tsl_gas = 0
+ T.n2 = N2STANDARD
+ T.on2 = N2STANDARD
+ T.tn2 = N2STANDARD
+ T.temp = T20C
+ T.otemp = T20C
+ T.ttemp = T20C
+
+ viewers(null, null) << "\red Prison shuttle Restabalized!"
+ src.add_fingerprint(usr)
diff --git a/main-src/Code/Machinery/Computer/secure_data.dm b/main-src/Code/Machinery/Computer/secure_data.dm
new file mode 100644
index 0000000..e0dd616
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/secure_data.dm
@@ -0,0 +1,425 @@
+/*
+ * Secure_data -- computer that displays security data about a player
+ *
+ *
+ * Very similar to the med_data computer
+ */
+
+
+obj/machinery/computer/secure_data
+ name = "Security Records"
+ icon = 'weap_sat.dmi'
+ icon_state = "computer"
+ var
+ obj/item/weapon/card/id/scan = null // the inserted ID card
+ authenticated = null // the name on the ID card
+ rank = null // the job assignment on the ID card
+ screen = null // the screen to show in the window
+ // 1=Search, 2=List, 3=Maint, 4=Edit record
+ datum/data/record/active1 = null // record from data_core.general
+ datum/data/record/active2 = null // record from data_core.security
+ temp = null // temporary text display for window
+ printing = null // true while printing a record
+
+ access = null // required access levels (none)
+ allowed = "Security Officer/Forensic Technician/Prison Warden/Head of Personnel/Captain"
+ // required job assignments to access records
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact, display window
+
+ attack_hand(mob/user)
+
+ if(stat & (NOPOWER|BROKEN) )
+ return
+
+ var/dat
+ if (src.temp)
+ dat = text("[]
Clear Screen", src.temp, src)
+ else
+ dat = text("Confirm Identity: []
", src, (src.scan ? text("[]", src.scan.name) : "----------"))
+ if (src.authenticated)
+ switch(src.screen)
+ if(1.0)
+ dat += text("Search Records
\nList Records
\nSearch Fingerprints
\nNew Record
\n
\nRecord Maintenance
\n{Log Out}
\n", src, src, src, src, src, src)
+ if(2.0)
+ dat += "Record List:
"
+ for(var/datum/data/record/R in data_core.general)
+ dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"])
+
+ dat += text("
Back", src)
+ if(3.0)
+ dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src)
+ if(4.0)
+ dat += "Security Record
"
+ if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
+ dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nRank: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src, src.active1.fields["name"], src, src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["rank"], src, src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
+ else
+ dat += "General Record Lost!
"
+ if ((istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)))
+ dat += text("
\nSecurity Data
\nCriminal Status: []
\n
\nMinor Crimes: []
\nDetails: []
\n
\nMajor Crimes: []
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src, src.active2.fields["criminal"], src, src.active2.fields["mi_crim"], src, src.active2.fields["mi_crim_d"], src, src.active2.fields["ma_crim"], src, src.active2.fields["ma_crim_d"], src, src.active2.fields["notes"])
+ var/counter = 1
+ while(src.active2.fields[text("com_[]", counter)])
+ dat += text("[]
Delete Entry
", src.active2.fields[text("com_[]", counter)], src, counter)
+ counter++
+ dat += text("Add Entry
", src)
+ dat += text("Delete Record (Security Only)
", src)
+ else
+ dat += "Security Record Lost!
"
+ dat += text("New Record
", src)
+ dat += text("\nDelete Record (ALL)
\nPrint Record
\nBack
", src, src, src)
+ else
+ else
+ dat += text("{Log In}", src)
+ user << browse(text("Security Records[]", dat), "window=secure_rec")
+
+
+ // Handle topic links
+
+ Topic(href, href_list)
+ ..()
+ if(stat & (NOPOWER|BROKEN) )
+ return
+ if (!( data_core.general.Find(src.active1) ))
+ src.active1 = null
+ if (!( data_core.security.Find(src.active2) ))
+ src.active2 = null
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+ if (href_list["temp"])
+ src.temp = null
+ if (href_list["scan"])
+ if (src.scan)
+ src.scan.loc = src.loc
+ src.scan = null
+ else
+ var/obj/item/I = usr.equipped()
+ if (istype(I, /obj/item/weapon/card/id))
+ usr.drop_item()
+ I.loc = src
+ src.scan = I
+ else
+ if (href_list["logout"])
+ src.authenticated = null
+ src.screen = null
+ src.active1 = null
+ src.active2 = null
+ else
+ if (href_list["login"])
+ if (istype(src.scan, /obj/item/weapon/card/id))
+ src.active1 = null
+ src.active2 = null
+ if (scan.check_access(access, allowed))
+ src.authenticated = src.scan.registered
+ src.rank = src.scan.assignment
+ src.screen = 1
+ if (src.authenticated)
+ if (href_list["list"])
+ src.screen = 2
+ src.active1 = null
+ src.active2 = null
+ else
+ if (href_list["rec_m"])
+ src.screen = 3
+ src.active1 = null
+ src.active2 = null
+ else
+ if (href_list["del_all"])
+ src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src)
+ else
+ if (href_list["del_all2"])
+ for(var/datum/data/record/R in data_core.security)
+ del(R)
+
+ src.temp = "All records deleted."
+ else
+ if (href_list["main"])
+ src.screen = 1
+ src.active1 = null
+ src.active2 = null
+ else
+ if (href_list["field"])
+ var/a1 = src.active1
+ var/a2 = src.active2
+ switch(href_list["field"])
+ if("name")
+ if (istype(src.active1, /datum/data/record))
+ var/t1 = input("Please input name:", "Secure. records", src.active1.fields["name"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["name"] = t1
+ if("id")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please input id:", "Secure. records", src.active1.fields["id"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["id"] = t1
+ if("fingerprint")
+ if (istype(src.active1, /datum/data/record))
+ var/t1 = input("Please input fingerprint hash:", "Secure. records", src.active1.fields["fingerprint"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["fingerprint"] = t1
+ if("sex")
+ if (istype(src.active1, /datum/data/record))
+ if (src.active1.fields["sex"] == "Male")
+ src.active1.fields["sex"] = "Female"
+ else
+ src.active1.fields["sex"] = "Male"
+ if("age")
+ if (istype(src.active1, /datum/data/record))
+ var/t1 = input("Please input age:", "Secure. records", src.active1.fields["age"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
+ return
+ src.active1.fields["age"] = t1
+ if("mi_crim")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please input minor disabilities list:", "Secure. records", src.active2.fields["mi_crim"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["mi_crim"] = t1
+ if("mi_crim_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize minor dis.:", "Secure. records", src.active2.fields["mi_crim_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["mi_crim_d"] = t1
+ if("ma_crim")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please input major diabilities list:", "Secure. records", src.active2.fields["ma_crim"], null) as text
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["ma_crim"] = t1
+ if("ma_crim_d")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize major dis.:", "Secure. records", src.active2.fields["ma_crim_d"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["ma_crim_d"] = t1
+ if("notes")
+ if (istype(src.active2, /datum/data/record))
+ var/t1 = input("Please summarize notes:", "Secure. records", src.active2.fields["notes"], null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ src.active2.fields["notes"] = t1
+ if("criminal")
+ if (istype(src.active2, /datum/data/record))
+ src.temp = text("Criminal Status:
\n\tNone
\n\t*Arrest*
\n\tIncarcerated
\n\tParolled
\n\tReleased
", src, src, src, src, src)
+ if("rank")
+ var/list/L = list( "Head of Personnel", "Captain" )
+ if ((istype(src.active1, /datum/data/record) && L.Find(src.rank)))
+ src.temp = text("Rank:
\nAssistants:
\nResearch Assistant
\nStaff Assistant
\nMedical Assistant
\nTechnical Assistant
\nTechnicians:
\nForensic Technician
\nResearch Technician
\nStation Technician
\nAtmospheric Technician
\nEngineer (Engine Technician)\nResearchers:
\nMedical Researcher
\nToxin Researcher
\nOfficers:
\nMedical Doctor
\nSecurity Officer
\nHigher Officers:
\nHead of Research
\nHead of Personnel
\nCaptain
", src, src, src, src, src, src, src, src, src, src, src, src, src, src, src, src)
+ else
+ else
+ if (href_list["rank"])
+ var/list/L = list( "Head of Personnel", "Captain" )
+ if ((src.active1 && L.Find(src.rank)))
+ switch(href_list["rank"])
+ if("res_assist")
+ src.active1.fields["rank"] = "Research Assistant"
+ if("staff_assist")
+ src.active1.fields["rank"] = "Staff Assistant"
+ if("med_assist")
+ src.active1.fields["rank"] = "Medical Assistant"
+ if("tech_assist")
+ src.active1.fields["rank"] = "Technical Assistant"
+ if("foren_tech")
+ src.active1.fields["rank"] = "Forensic Technician"
+ if("res_tech")
+ src.active1.fields["rank"] = "Research Technician"
+ if("stat_tech")
+ src.active1.fields["rank"] = "Station Technician"
+ if("atmo_tech")
+ src.active1.fields["rank"] = "Atmospheric Technician"
+ if("engineer")
+ src.active1.fields["rank"] = "Engineer"
+ if("med_res")
+ src.active1.fields["rank"] = "Medical Researcher"
+ if("tox_res")
+ src.active1.fields["rank"] = "Toxin Researcher"
+ if("med_doc")
+ src.active1.fields["rank"] = "Medical Doctor"
+ if("secure_off")
+ src.active1.fields["rank"] = "Security Officer"
+ if("hoperson")
+ src.active1.fields["rank"] = "Head of Research"
+ if("horesearch")
+ src.active1.fields["rank"] = "Head of Personnel"
+ if("captain")
+ src.active1.fields["rank"] = "Captain"
+
+ else
+ if (href_list["criminal2"])
+ if (src.active2)
+ switch(href_list["criminal2"])
+ if("none")
+ src.active2.fields["criminal"] = "None"
+ if("arrest")
+ src.active2.fields["criminal"] = "*Arrest*"
+ if("incarcerated")
+ src.active2.fields["criminal"] = "Incarcerated"
+ if("parolled")
+ src.active2.fields["criminal"] = "Parolled"
+ if("released")
+ src.active2.fields["criminal"] = "Released"
+
+ else
+ if (href_list["del_r"])
+ if (src.active2)
+ src.temp = text("Are you sure you wish to delete the record (Security Portion Only)?
\n\tYes
\n\tNo
", src, src)
+ else
+ if (href_list["del_r2"])
+ if (src.active2)
+
+ del(src.active2)
+ else
+ if (href_list["dela_r"])
+ if (src.active1)
+ src.temp = text("Are you sure you wish to delete the record (ALL)?
\n\tYes
\n\tNo
", src, src)
+ else
+ if (href_list["dela_r2"])
+ for(var/datum/data/record/R in data_core.medical)
+ if ((R.fields["name"] == src.active1.fields["name"] || R.fields["id"] == src.active1.fields["id"]))
+
+ del(R)
+
+ if (src.active2)
+
+ del(src.active2)
+ if (src.active1)
+
+ del(src.active1)
+ else
+ if (href_list["d_rec"])
+ var/datum/data/record/R = locate(href_list["d_rec"])
+ var/S = locate(href_list["d_rec"])
+ if (!( data_core.general.Find(R) ))
+ src.temp = "Record Not Found!"
+ return
+ for(var/datum/data/record/E in data_core.security)
+ if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
+ S = E
+
+ src.active1 = R
+ src.active2 = S
+ src.screen = 4
+ else
+ if (href_list["new_r"])
+ var/datum/data/record/G = new /datum/data/record( )
+ G.fields["name"] = "New Record"
+ G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
+ G.fields["rank"] = "Unassigned"
+ G.fields["sex"] = "Male"
+ G.fields["age"] = "Unknown"
+ G.fields["fingerprint"] = "Unknown"
+ G.fields["p_stat"] = "Active"
+ G.fields["m_stat"] = "Stable"
+ data_core.general += G
+ src.active1 = G
+ src.active2 = null
+ else
+ if (href_list["new"])
+ if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
+ var/datum/data/record/R = new /datum/data/record( )
+ R.fields["name"] = src.active1.fields["name"]
+ R.fields["id"] = src.active1.fields["id"]
+ R.name = text("Security Record #[]", R.fields["id"])
+ R.fields["criminal"] = "None"
+ R.fields["mi_crim"] = "None"
+ R.fields["mi_crim_d"] = "No minor crime convictions."
+ R.fields["ma_crim"] = "None"
+ R.fields["ma_crim_d"] = "No minor crime convictions."
+ R.fields["notes"] = "No notes."
+ data_core.security += R
+ src.active2 = R
+ src.screen = 4
+ else
+ if (href_list["add_c"])
+ if (!( istype(src.active2, /datum/data/record) ))
+ return
+ var/a2 = src.active2
+ var/t1 = input("Add Comment:", "Secure. records", null, null) as message
+ if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
+ return
+ var/counter = 1
+ while(src.active2.fields[text("com_[]", counter)])
+ counter++
+ src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
+ else
+ if (href_list["del_c"])
+ if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
+ src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted"
+ else
+ if (href_list["search_f"])
+ var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
+ if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
+ return
+ src.active1 = null
+ src.active2 = null
+ t1 = lowertext(t1)
+ for(var/datum/data/record/R in data_core.general)
+ if (lowertext(R.fields["fingerprint"]) == t1)
+ src.active1 = R
+
+ if (!( src.active1 ))
+ src.temp = text("Could not locate record [].", t1)
+ else
+ for(var/datum/data/record/E in data_core.security)
+ if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
+ src.active2 = E
+
+ src.screen = 4
+ else
+ if (href_list["search"])
+ var/t1 = input("Search String: (Name or ID)", "Secure. records", null, null) as text
+ if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
+ return
+ src.active1 = null
+ src.active2 = null
+ t1 = lowertext(t1)
+ for(var/datum/data/record/R in data_core.general)
+ if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
+ src.active1 = R
+
+ if (!( src.active1 ))
+ src.temp = text("Could not locate record [].", t1)
+ else
+ for(var/datum/data/record/E in data_core.security)
+ if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
+ src.active2 = E
+
+ src.screen = 4
+ else
+ if (href_list["print_p"])
+ if (!( src.printing ))
+ src.printing = 1
+ sleep(50)
+ var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
+ P.info = "Security Record
"
+ if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
+ P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
+ else
+ P.info += "General Record Lost!
"
+ if ((istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)))
+ P.info += text("
\nSecurity Data
\nCriminal Status: []
\n
\nMinor Crimes: []
\nDetails: []
\n
\nMajor Crimes: []
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src.active2.fields["criminal"], src.active2.fields["mi_crim"], src.active2.fields["mi_crim_d"], src.active2.fields["ma_crim"], src.active2.fields["ma_crim_d"], src.active2.fields["notes"])
+ var/counter = 1
+ while(src.active2.fields[text("com_[]", counter)])
+ P.info += text("[]
", src.active2.fields[text("com_[]", counter)])
+ counter++
+ else
+ P.info += "Security Record Lost!
"
+ P.info += ""
+ P.name = "paper- 'Security Record'"
+ src.printing = null
+ src.add_fingerprint(usr)
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
diff --git a/main-src/Code/Machinery/Computer/shuttle.dm b/main-src/Code/Machinery/Computer/shuttle.dm
new file mode 100644
index 0000000..5fae624
--- /dev/null
+++ b/main-src/Code/Machinery/Computer/shuttle.dm
@@ -0,0 +1,99 @@
+/*
+ * Shuttle -- emergency shuttle control computer
+ *
+ *
+ */
+
+obj/machinery/computer/shuttle
+ name = "shuttle"
+ icon = 'shuttle.dmi'
+ icon_state = "shuttlecom"
+
+ var
+ auth_need = 3 // number of authorizations needed to launch shuttle early
+ list/authorized = list( ) // list of names of those authorizing the early launch
+ allowed // ID card job assignmented needed to authorize (none)
+ access = "2000" // ID card access level needed to authorize
+
+
+ // Restabalize verb
+ // Set all shuttle locations to standard atmosphere
+
+ verb/restabalize()
+ set src in oview(1)
+
+ world << "\red Restabalizing shuttle atmosphere!"
+ var/A = locate(/area/shuttle)
+ for(var/obj/move/T in A)
+ T.firelevel = 0
+ T.oxygen = O2STANDARD
+ T.oldoxy = O2STANDARD
+ T.tmpoxy = O2STANDARD
+ T.poison = 0
+ T.oldpoison = 0
+ T.tmppoison = 0
+ T.co2 = 0
+ T.oldco2 = 0
+ T.tmpco2 = 0
+ T.sl_gas = 0
+ T.osl_gas = 0
+ T.tsl_gas = 0
+ T.n2 = N2STANDARD
+ T.on2 = N2STANDARD
+ T.tn2 = N2STANDARD
+ T.temp = T20C
+ T.otemp = T20C
+ T.ttemp = T20C
+
+ world << "\red Shuttle Restabalized!"
+ src.add_fingerprint(usr)
+
+
+ // Hijack verb
+ // Can be used only by the traitor to end a round
+ // Note can only occur when shuttle is at CC, not at the station level
+
+ verb/hijack()
+ set src in oview(1)
+
+ if ((!( ticker ) || ticker.shuttle_location != shuttle_z))
+ return
+ if (usr != ticker.killer)
+ return
+ world << "\blue Alert: The shuttle is has been hijacked prematurely by the traitor!"
+ ticker.timing = 0
+ ticker.check_win()
+ src.add_fingerprint(usr)
+
+
+ // Attack with object
+ // Allows shuttle to be launched early if 3 ID card of sufficient level (from different holders) are used
+
+ attackby(obj/item/weapon/card/id/W, mob/user)
+
+
+ if ((!( istype(W, /obj/item/weapon/card/id) ) || !( ticker ) || ticker.shuttle_location == shuttle_z || !( user )))
+ return
+ if (!W.check_access(access, allowed))
+ user << text("The access level ([]) of [] card is not high enough. ", W.access_level, W.registered)
+ return
+ 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")
+ switch(choice)
+ if("Authorize")
+ src.authorized -= W.registered
+ src.authorized += W.registered
+ if (src.auth_need - src.authorized.len > 0)
+ world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
+ else
+ world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
+ ticker.timeleft = 100
+ //src.authorized = null
+ del(src.authorized)
+ src.authorized = list( )
+ if("Repeal")
+ src.authorized -= W.registered
+ 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( )
diff --git a/main-src/Code/Machinery/Computer/sleeper.dm b/main-src/Code/Machinery/Computer/sleeper.dm
new file mode 100644
index 0000000..e69de29
diff --git a/main-src/Code/Machinery/cryocell.dm b/main-src/Code/Machinery/cryocell.dm
new file mode 100644
index 0000000..aadff74
--- /dev/null
+++ b/main-src/Code/Machinery/cryocell.dm
@@ -0,0 +1,421 @@
+/*
+ * Cryo_cell -- used to heal mobs of major damage
+ *
+ * Needs a freezer unit attached by a (flex)pipe to operate.
+ *
+ * TODO: Cell does not seem to have a broken icon state, nor does breaking the cell affect overlays. Needs further work.
+ */
+
+obj/machinery/cryo_cell
+ name = "cryo cell"
+ icon = 'Cryogenic2.dmi'
+ icon_state = "celltop"
+ density = 1
+ anchored = 1
+ p_dir = 8 // pipe direction is west
+ capmult = 1 // capacity multiplier
+
+ var
+ mob/occupant = null // the mob inside, or null if none
+
+ obj/substance/gas/gas = null // the gas reservoir
+ obj/substance/gas/ngas = null // the new calculated gas
+
+ obj/overlay/O1 = null // the console overlay object
+ obj/overlay/O2 = null // the base of cell overlay object
+
+ obj/machinery/line_in = null // the connected pipe
+ obj/machinery/vnode = null // the connected pipeline of line_in
+
+
+ // Create a cryo_cell
+ // Pixel-displaced overlays are used to show the console and base of the cell, with the main icon being the cell top
+
+ New()
+ ..()
+ src.layer = 5
+ O1 = new /obj/overlay( )
+ O1.icon = 'Cryogenic2.dmi'
+ O1.icon_state = "cellconsole"
+ O1.pixel_y = -32.0
+ O1.layer = 4
+
+ O2 = new /obj/overlay( )
+ O2.icon = 'Cryogenic2.dmi'
+ O2.icon_state = "cellbottom"
+ O2.pixel_y = -32.0
+
+ src.pixel_y = 32
+
+ add_overlays()
+
+ src.gas = new /obj/substance/gas( null )
+ gas.temperature = T20C
+ src.ngas = new /obj/substance/gas (null)
+ ngas.temperature = T20C
+
+ gasflowlist += src
+
+
+ // Find the connected (flex)pipe and its pipeline object
+
+ buildnodes()
+
+ var/turf/T = src.loc
+
+ line_in = get_machine(level, T, p_dir )
+
+ if(line_in) vnode = line_in.getline()
+
+
+
+ // Called to set the object overlays to the stored values
+
+ proc/add_overlays()
+ src.overlays = list(O1, O2)
+
+
+ // Gas procs
+
+
+ // Return gas fullness value
+
+ get_gas_val(from)
+ return gas.tot_gas()
+
+
+ // Return the gas reservoir
+
+ get_gas(from)
+ return gas
+
+
+ // Update gas levels with new levels calculated in process()
+
+ gas_flow()
+ gas.replace_by(ngas)
+
+
+
+ // Called when area power state changes
+ // If no power, update icon states to show unpowered versions
+
+ power_change()
+ ..()
+ if(stat & NOPOWER)
+ icon_state = "celltop-p"
+ O1.icon_state="cellconsole-p"
+ O2.icon_state="cellbottom-p"
+ else
+ icon_state = "celltop[ occupant ? "_1" : ""]"
+ O1.icon_state ="cellconsole"
+ O2.icon_state ="cellbottom"
+
+ add_overlays()
+
+
+ // Timed process
+ // Perform gas flow, use area power
+
+ process()
+
+ if(vnode)
+ var/delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.tot_gas() / capmult)
+ calc_delta( src, gas, ngas, vnode, delta_gt)
+ else
+ leak_to_turf()
+
+
+ if(stat & NOPOWER)
+ return
+ use_power(500)
+
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+ // Called if no pipe is present
+ // Leak gas contents to turf to west
+
+ proc/leak_to_turf()
+ var/turf/T = get_step(src, WEST)
+
+ if(T.density)
+ T = src.loc
+ if(T.density)
+ return
+
+ flow_to_turf(gas, ngas, T)
+
+
+ // Cryocell verbs
+
+
+ // Eject the occupant
+
+ verb/move_eject()
+ set src in oview(1)
+
+ if (usr.stat != 0)
+ return
+ src.go_out()
+ add_fingerprint(usr)
+
+
+ // Move the player into the cell
+ // Cell must be powered, can't already have an occupant, and player can't be wearing anything.
+ // If all true, move the player inside and update the view
+
+ verb/move_inside()
+ set src in oview(1)
+
+ if (usr.stat != 0 || stat & NOPOWER)
+ return
+ if (src.occupant)
+ usr << "\blue The cell is already occupied!"
+ return
+ if (usr.abiotic())
+ usr << "Subject may not have abiotic items on."
+ return
+ usr.pulling = null
+ usr.client.perspective = EYE_PERSPECTIVE
+ usr.client.eye = src
+ usr.loc = src
+ src.occupant = usr
+ src.icon_state = "celltop_1"
+ for(var/obj/O in src)
+ O.loc = src.loc
+
+ src.add_fingerprint(usr)
+
+
+ // Attack by item
+ // A special case - only works with the pseudo-item representing grabbing another player
+ // Make standard checks, then move grabbed player into the cell, and update their view.
+
+ attackby(obj/item/weapon/grab/G, mob/user)
+
+ if (stat & NOPOWER) return
+
+ if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
+ return
+ if (src.occupant)
+ user << "\blue The cell is already occupied!"
+ return
+ if (G.affecting.abiotic())
+ user << "Subject may not have abiotic items on."
+ return
+ var/mob/M = G.affecting
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ M.loc = src
+ src.occupant = M
+ src.icon_state = "celltop_1"
+ for(var/obj/O in src)
+ del(O)
+ src.add_fingerprint(user)
+ del(G)
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact, show status window of machine and occupant
+ // No topic links, since all control is handled through the freezer unit
+
+ attack_hand(mob/user)
+
+ if(stat & NOPOWER)
+ return
+
+ user.machine = src
+ if (istype(user, /mob/human))
+ var/dat = " System Statistics:
"
+ if (src.gas.temperature > T0C)
+ dat += text("\tTemperature (°C): [] (MUST be below 0, add coolant to mixture)
", round(src.gas.temperature-T0C, 0.1))
+ else
+ dat += text("\tTemperature (°C): []
", round(src.gas.temperature-T0C, 0.1))
+ if (src.gas.plasma < 1)
+ dat += text("\tPlasma Units: [] (Add plasma to mixture!)
", round(src.gas.plasma, 0.1))
+ else
+ dat += text("\tPlasma Units: []
", round(src.gas.plasma, 0.1))
+ if (src.gas.oxygen < 1)
+ dat += text("\tOxygen Units: [] (Add oxygen to mixture!)
", round(src.gas.oxygen, 0.1))
+ else
+ dat += text("\tOxygen Units: []
", round(src.gas.oxygen, 0.1))
+ if (src.occupant)
+ dat += "Occupant Statistics:
"
+ var/t1
+ switch(src.occupant.stat)
+ if(0.0)
+ t1 = "Conscious"
+ if(1.0)
+ t1 = "Unconscious"
+ if(2.0)
+ t1 = "*dead*"
+ else
+ dat += text("[]\tHealth %: [] ([])
", (src.occupant.health > 50 ? "" : ""), src.occupant.health, t1)
+ dat += text("[]\t-Respiratory Damage %: []
", (src.occupant.oxyloss < 60 ? "" : ""), src.occupant.oxyloss)
+ dat += text("[]\t-Toxin Content %: []
", (src.occupant.toxloss < 60 ? "" : ""), src.occupant.toxloss)
+ dat += text("[]\t-Burn Severity %: []", (src.occupant.fireloss < 60 ? "" : ""), src.occupant.fireloss)
+ dat += text("
Close", user)
+ user << browse(dat, "window=cryo;size=400x500")
+ else
+ var/dat = text(" []
", stars("System Statistics:"))
+ if (src.gas.temperature > T0C)
+ dat += text("\t[]
", stars(text("Temperature (C): [] (MUST be below 0, add coolant to mixture)", round(src.gas.temperature-T0C, 0.1))))
+ else
+ dat += text("\t[]
", stars(text("Temperature(C): []", round(src.gas.temperature-T0C, 0.1))))
+ if (src.gas.plasma < 1)
+ dat += text("\t[]
", stars(text("Plasma Units: [] (Add plasma to mixture!)", round(src.gas.plasma, 0.1))))
+ else
+ dat += text("\t[]
", stars(text("Plasma Units: []", round(src.gas.plasma, 0.1))))
+ if (src.gas.oxygen < 1)
+ dat += text("\t[]
", stars(text("Oxygen Units: [] (Add oxygen to mixture!)", round(src.gas.oxygen, 0.1))))
+ else
+ dat += text("\t[]
", stars(text("Oxygen Units: []", round(src.gas.oxygen, 0.1))))
+ if (src.occupant)
+ dat += "Occupant Statistics:
"
+ var/t1 = null
+ switch(src.occupant.stat)
+ if(0.0)
+ t1 = "Conscious"
+ if(1.0)
+ t1 = "Unconscious"
+ if(2.0)
+ t1 = "*dead*"
+ else
+ dat += text("[]\t[]
", (src.occupant.health > 50 ? "" : ""), stars(text("Health %: [] ([])", src.occupant.health, t1)))
+ dat += text("[]\t[]
", (src.occupant.oxyloss < 60 ? "" : ""), stars(text("-Respiratory Damage %: []", src.occupant.oxyloss)))
+ dat += text("[]\t[]
", (src.occupant.toxloss < 60 ? "" : ""), stars(text("-Toxin Content %: []", src.occupant.toxloss)))
+ dat += text("[]\t[]", (src.occupant.fireloss < 60 ? "" : ""), stars(text("-Burn Severity %: []", src.occupant.fireloss)))
+ dat += text("
Close", user)
+ user << browse(dat, "window=cryo;size=400x500")
+
+
+ // Called to remove the occupant of a cell
+ // Reset the view back to normal
+
+ proc/go_out()
+
+ if (!( src.occupant ))
+ return
+ for(var/obj/O in src)
+ O.loc = src.loc
+
+ if (src.occupant.client)
+ src.occupant.client.eye = src.occupant.client.mob
+ src.occupant.client.perspective = MOB_PERSPECTIVE
+ src.occupant.loc = src.loc
+ src.occupant = null
+ src.icon_state = "celltop"
+
+
+ // Called when client tries to move while inside the cell
+ // If the user is able to move, leave the cell
+
+ relaymove(mob/user)
+
+ if (user.stat)
+ return
+ src.go_out()
+
+
+ // Called in mob/Life() proc while mob is inside the cell
+ // Actually heal the occupant, while using up plasma and oxygen from the cell
+
+ alter_health(mob/M)
+
+ if(stat & NOPOWER)
+ return
+
+ if (M.health < 0)
+ if ((src.gas.temperature > T0C || src.gas.plasma < 1))
+ return
+ if (M.stat == 2)
+ return
+ if (src.gas.oxygen >= 1)
+ src.ngas.oxygen--
+ if (M.oxyloss >= 10)
+ var/amount = max(0.15, 2)
+ M.oxyloss -= amount
+ else
+ M.oxyloss = 0
+ M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
+ if ((src.gas.temperature < T0C && src.gas.plasma >= 1))
+ src.ngas.plasma--
+ if (M.toxloss > 5)
+ var/amount = max(0.1, 2)
+ M.toxloss -= amount
+ else
+ M.toxloss = 0
+ M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
+ if (istype(M, /mob/human))
+ var/mob/human/H = M
+ var/ok = 0
+ for(var/organ in H.organs)
+ var/obj/item/weapon/organ/external/affecting = H.organs[text("[]", organ)]
+ ok += affecting.heal_damage(5, 5)
+
+ if (ok)
+ H.UpdateDamageIcon()
+ else
+ H.UpdateDamage()
+ else
+ if (M.fireloss > 15)
+ var/amount = max(0.3, 2)
+ M.fireloss -= amount
+ else
+ M.fireloss = 0
+ if (M.bruteloss > 10)
+ var/amount = max(0.3, 2)
+ M.bruteloss -= amount
+ else
+ M.bruteloss = 0
+ M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
+ M.paralysis += 5
+ if (src.gas.temperature < (60+T0C))
+ src.gas.temperature = min(src.gas.temperature + 1, 60+T0C)
+
+ for(var/mob/E in viewers(1, src))
+ if ((E.client && E.machine == src))
+ src.attack_hand(E)
+
+
+
+ // Explosion - delete the cell or break it
+
+ ex_act(severity)
+
+ switch(severity)
+ if(1.0)
+ del(src)
+ if(2.0)
+ if (prob(50))
+ for(var/x in src.verbs)
+ src.verbs -= x
+ src.icon_state = "broken"
+
+
+ // Blob attack - break the cell
+
+ blob_act()
+ for(var/x in src.verbs)
+ src.verbs -= x
+ src.icon_state = "broken"
+ src.density = 0
+
+
+
+ /* Unused
+
+ allow_drop()
+ return 0
+
+ */
\ No newline at end of file
diff --git a/main-src/Code/Machinery/freezer.dm b/main-src/Code/Machinery/freezer.dm
new file mode 100644
index 0000000..0c2579e
--- /dev/null
+++ b/main-src/Code/Machinery/freezer.dm
@@ -0,0 +1,390 @@
+/*
+ * Freezer -- freezer part of cryocell system.
+ * attaches to the cryocell via a (flex)pipe
+ *
+ * TODO: Better handling of gas flow when freezer is turned off
+ * TODO: Improve flask finding in process()
+ * TODO: Logically, the freezer should warm the environment somewhat just like a real freezer
+ */
+
+obj/machinery/freezer
+ name = "freezer"
+ icon = 'Cryogenic2.dmi'
+ icon_state = "freezer_0"
+ density = 1
+ p_dir = 4 // the pipe connection direction (west)
+ anchored = 1
+ capmult = 1 // capacity multiplier
+
+ var
+ connector = null // the flask connecter overlay object
+ obj/machinery/line_out = null // the pipe object connected
+ obj/machinery/vnode = null // the pipeline object associated with line_out
+ c_used = 1.0 // coolant amount used
+ status = 0.0 // true if cooling
+ t_flags = 3.0 // bitflags for oxygen (bit-0) and plasma (bit-1) delivery
+ transfer = 0.0 // true if transfering to cryocell
+ temperature = 60.0+T0C // the temperature setpoint (kelvin)
+
+ obj/substance/gas/gas // the gas reservoir
+ obj/substance/gas/ngas // the new value of the gas reservoir
+
+
+ // Create a new freezer
+ // Create the overlay object for the flask connectors
+ // Create the 3 flasks (as contents of the freezer)
+ // Allocate the gas reservoir and register with the gasflowlist
+
+ New()
+ ..()
+ var/obj/overlay/O1 = new /obj/overlay( )
+ O1.icon = 'Cryogenic2.dmi'
+ O1.icon_state = "canister connector_0"
+ O1.pixel_y = -16.0
+ src.overlays += O1
+ src.connector = O1
+ new /obj/item/weapon/flasks/oxygen( src )
+ new /obj/item/weapon/flasks/coolant( src )
+ new /obj/item/weapon/flasks/plasma( src )
+ rebuild_overlay()
+
+ gas = new/obj/substance/gas()
+ ngas = new/obj/substance/gas()
+
+ gasflowlist += src
+
+
+ // Find the (flex)pipe connected to the freezer
+
+ buildnodes()
+ var/turf/T = src.loc
+
+ line_out = get_machine(level, T, p_dir )
+
+ if(line_out) vnode = line_out.getline() // the pipeline associated with the pipe
+
+
+ // Update gas levels with the new levels calculated in process()
+
+ gas_flow()
+ gas.replace_by(ngas)
+
+
+ // Called to leak gas to the turf one step east, if the pipe is not present
+
+ proc/leak_to_turf()
+ var/turf/T = get_step(src, EAST)
+
+ if(T.density)
+ T = src.loc
+ if(T.density)
+ return
+
+ flow_to_turf(gas, ngas, T)
+
+
+ // Returns the gas fullness value
+
+ get_gas_val(from)
+ return gas.tot_gas()
+
+
+ // Returns the gas reservoir
+
+ get_gas(from)
+ return gas
+
+
+ // Interact by monkey same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Interact by human
+ // Show the interaction window
+
+ attack_hand(mob/user)
+
+ user.machine = src
+
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ var/d1
+ if (locate(/obj/item/weapon/flasks, src))
+ var/counter = 1
+
+ for(var/obj/item/weapon/flasks/F in src)
+ d1 += text("Flask []: [] / [] / []
", src, counter, counter, F.oxygen, F.plasma, F.coolant)
+ counter++
+ //Foreach goto(78)
+ d1 += "Key: Oxygen / Plasma / Coolant
"
+ else
+ d1 = "No flasks!"
+ var/t1 = null
+ switch(src.t_flags)
+ if(0.0)
+ t1 = text("Oxygen-No Plasma-No", src, src)
+ if(1.0)
+ t1 = text("Oxygen-Yes Plasma-No", src, src)
+ if(2.0)
+ t1 = text("Oxygen-No Plasma-Yes", src, src)
+ if(3.0)
+ t1 = text("Oxygen-Yes Plasma-Yes", src, src)
+ else
+ var/t2 = null
+ if (src.status)
+ t2 = text("Cooling-[] Stop", src.c_used, src)
+ else
+ t2 = text("Cool Stopped", src)
+ var/dat = text("
\n\t\tTemperature: []
\n\t\tTransfer Status: []
\n\t\t Chemicals Used: []
\n\t\tFreezer status: []
\n\t\t - - [] + +
\n
\n\t[]
\n
\n
\n\tClose
\n\t", src.temperature-T0C, (src.transfer ? text("Transfering Stop", src) : text("Transfer Stopped", src)), t1, t2, src, src, src.c_used, src, src, d1, user)
+ user << browse(dat, "window=freezer;size=400x500")
+ else
+ var/d1 = null
+ if (locate(/obj/item/weapon/flasks, src))
+ var/counter = 1
+ for(var/obj/item/weapon/flasks/F in src)
+ d1 += text("[] []: []
", src, counter, stars("Flask"), counter, stars(text("[] / [] / []", F.oxygen, F.plasma, F.coolant)))
+ counter++
+ //Foreach goto(380)
+ d1 += "Key: Oxygen / Plasma / Coolant
"
+ else
+ d1 = "No flasks!"
+ var/t1 = null
+ switch(src.t_flags)
+ if(0.0)
+ t1 = text("[] []", src, stars("Oxygen-No"), src, stars("Plasma-No"))
+ if(1.0)
+ t1 = text("[] []", src, stars("Oxygen-Yes"), src, stars("Plasma-No"))
+ if(2.0)
+ t1 = text("[] []", src, stars("Oxygen-No"), src, stars("Plasma-Yes"))
+ if(3.0)
+ t1 = text("[] []", src, stars("Oxygen-Yes"), src, stars("Plasma-Yes"))
+ else
+ var/t2 = null
+ if (src.status)
+ t2 = text("Cooling-[] []", src.c_used, src, stars("Stop"))
+ else
+ t2 = text("Cool []", src, stars("Stopped"))
+ var/dat = text("
\n\t\t[]: []
\n\t\t[]: []
\n\t\t []: []
\n\t\t[]: []
\n\t\t - - [] + +
\n
\n\t[]
\n
\n
\n\tClose\n\t", stars("Temperature"), src.temperature-T0C, stars("Transfer Status"), (src.transfer ? text("Transfering Stop", src) : text("Transfer Stopped", src)), stars("Chemicals Used"), t1, stars("Freezer status"), t2, src, src, src.c_used, src, src, d1, user)
+ user << browse(dat, "window=freezer;size=400x500")
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+ if (href_list["cp"])
+ var/cp = text2num(href_list["cp"])
+ src.c_used += cp
+ src.c_used = min(max(round(src.c_used), 0), 10)
+ if (href_list["oxygen"])
+ var/t1 = text2num(href_list["oxygen"])
+ if (t1)
+ src.t_flags |= 1
+ else
+ src.t_flags &= 65534
+ if (href_list["plasma"])
+ var/t1 = text2num(href_list["plasma"])
+ if (t1)
+ src.t_flags |= 2
+ else
+ src.t_flags &= 65533
+ if (href_list["cool"])
+ src.status = text2num(href_list["cool"])
+ src.icon_state = text("freezer_[]", src.status)
+ if (href_list["transfer"])
+ src.transfer = text2num(href_list["transfer"])
+ if (href_list["flask"])
+ var/t1 = text2num(href_list["flask"])
+ if (t1 <= src.contents.len)
+ var/obj/F = src.contents[t1]
+ F.loc = src.loc
+ src.rebuild_overlay()
+ src.add_fingerprint(usr)
+
+
+ // Attack with item
+ // If a flask, add to contents and rebuild overlays
+
+ attackby(obj/item/weapon/flasks/F, mob/user)
+
+ if (!( istype(F, /obj/item/weapon/flasks) ))
+ return
+ if (src.contents.len >= 3)
+ user << "\blue All slots are full!"
+ return
+ else
+ user.drop_item()
+ F.loc = src
+ src.rebuild_overlay()
+
+
+ // Called when area power state changes
+ // Set icon state depending on power status
+
+ power_change()
+ ..()
+ if(stat & NOPOWER)
+ icon_state = "freezer_0"
+ else
+ src.icon_state = "freezer_[status]"
+
+
+ // Called to update the overlays of the connector and flasks
+
+ proc/rebuild_overlay()
+ for(var/x in src.overlays)
+ src.overlays -= x
+
+ src.overlays += src.connector
+ var/counter = 0
+
+ for(var/obj/item/weapon/flasks/F in src.contents)
+ var/obj/overlay/O = new /obj/overlay( )
+ O.icon = F.icon
+ O.icon_state = F.icon_state
+ O.pixel_y = -17.0
+ O.pixel_x = counter * 12
+ src.overlays += O
+ counter++
+ if (counter >= 3)
+ return
+ return
+
+
+ // Timed process
+ // Deplete flasks and cool/add to gas reservoir as appropriate
+ // Perform flow into pipe
+ // Note: Flask finding/depletion process is rather inefficient - rewrite?
+ // TODO: Make gas flow when not transfering from flasks
+
+ process()
+
+ if(stat & NOPOWER)
+ return
+
+ use_power(50)
+
+ var/obj/item/weapon/flasks/F1
+ var/obj/item/weapon/flasks/F2
+ var/obj/item/weapon/flasks/F3
+ if (src.contents.len >= 3)
+ F3 = src.contents[3]
+ if (src.contents.len >= 2)
+ F2 = src.contents[2]
+ if (src.contents.len >= 1)
+ F1 = src.contents[1]
+ var/u_cool = 0
+ if (src.status)
+ u_cool = src.c_used
+
+ if ((F2 && F2.coolant))
+ if (F2.coolant >= u_cool)
+ F2.coolant -= u_cool
+ else
+ u_cool = F2.coolant
+ F2.coolant = 0
+
+ else if ((F1 && F1.coolant))
+ if (F1.coolant >= u_cool)
+ F1.coolant -= u_cool
+ else
+ u_cool = F1.coolant
+ F1.coolant = 0
+
+ else if ((F3 && F3.coolant))
+ if (F3.coolant >= u_cool)
+ F3.coolant -= u_cool
+ else
+ u_cool = F3.coolant
+ F3.coolant = 0
+ else
+ u_cool = 0
+
+ if (u_cool)
+ src.temperature = max((-100.0+T0C), src.temperature - (u_cool * 5) )
+ use_power(200)
+
+ src.temperature = min(src.temperature + 5, 20+T0C)
+ if (src.transfer)
+ var/u_oxy = 0
+ var/u_pla = 0
+
+ if (src.t_flags & 1)
+ u_oxy = 1
+ if ((F1 && F1.oxygen))
+ if (F1.oxygen >= u_oxy)
+ F1.oxygen -= u_oxy
+ else
+ u_oxy = F1.oxygen
+ F1.oxygen = 0
+ else
+ if ((F2 && F2.oxygen))
+ if (F2.oxygen >= u_oxy)
+ F2.oxygen -= u_oxy
+ else
+ u_oxy = F2.oxygen
+ F2.oxygen = 0
+ else
+ if ((F3 && F3.oxygen))
+ if (F3.oxygen >= u_oxy)
+ F3.oxygen -= u_oxy
+ else
+ u_oxy = F3.oxygen
+ F3.oxygen = 0
+ else
+ u_oxy = 0
+
+ if (src.t_flags & 2)
+ u_pla = 1
+ if ((F3 && F3.plasma))
+ if (F3.plasma >= u_pla)
+ F3.plasma -= u_pla
+ else
+ u_pla = F3.plasma
+ F3.plasma = 0
+ else
+ if ((F2 && F2.plasma))
+ if (F2.plasma >= u_pla)
+ F2.plasma -= u_pla
+ else
+ u_pla = F2.plasma
+ F2.plasma = 0
+ else
+ if ((F1 && F1.plasma))
+ if (F1.plasma >= u_pla)
+ F1.plasma -= u_pla
+ else
+ u_pla = F1.plasma
+ F1.plasma = 0
+ else
+ u_pla = 0
+ if ( (u_oxy + u_pla) > 0)
+ ngas.oxygen += u_oxy
+ ngas.plasma += u_pla
+ ngas.temperature = src.temperature
+ spawn( 1 )
+ if (src.line_out)
+
+ if(vnode)
+ var/delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.tot_gas() / capmult)
+ calc_delta( src, gas, ngas, vnode, delta_gt)
+ else
+ leak_to_turf()
+
+ return
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+ return
+
+
+
diff --git a/main-src/Code/Machinery/nuclearbomb.dm b/main-src/Code/Machinery/nuclearbomb.dm
new file mode 100644
index 0000000..e269138
--- /dev/null
+++ b/main-src/Code/Machinery/nuclearbomb.dm
@@ -0,0 +1,280 @@
+/*
+ * Nuclearbomb -- A nuclear explosive
+ *
+ * Requires authentication disk and code to activate
+ *
+ * As used in "Nuclear" mode.
+ *
+ * TODO: Unify explosion proc with other explosions (plamsabombs, etc.)
+ *
+ */
+
+obj/machinery/nuclearbomb
+ desc = "Uh oh."
+ name = "Nuclear Fission Explosive"
+ icon = 'stationobjs.dmi'
+ icon_state = "nuclearbomb0"
+ density = 1
+ flags = FPRINT|DRIVABLE
+
+ var
+ extended = 0 // True if bomb is deployed
+ timeleft = 60.0 // Time (seconds) until explosion
+ timing = 0 // True if counting down the timer
+ r_code = "ADMIN" // The activation code of the nuke
+ code = "" // The code typed in
+ yes_code = 0 // True if typed code matches
+ safety = 1 // False to enable bomb to explode
+ obj/item/weapon/disk/nuclear/auth = null // The authenication disk of the nuke, or null if none inserted
+
+
+ // Create a nuclear bomb.
+ // nuke_code is a global integer randomly set between 10000 and 99999
+
+ New()
+
+ if (nuke_code)
+ src.r_code = "[nuke_code]"
+ ..()
+
+
+ // Timed process
+ // If timing, count down the timer and explode when expires
+ // Update interaction window of viewing clients
+
+ process()
+
+ if (src.timing)
+ src.timeleft--
+ if (src.timeleft <= 0)
+ explode()
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+
+ // Human interact
+ // If already deployed, show the interaction window
+ // Otherwise, deploy and anchor the bomb
+
+ attack_hand(mob/user)
+ if (src.extended) // Bomb deployed?
+ user.machine = src
+
+ // insert auth disk here
+ var/dat = {"Nuclear Fission Explosive
+Auth. Disk: [(src.auth ? "++++++++++" : "----------")]
"}
+
+ if (src.auth) // auth disk inserted
+ if (src.yes_code) // and code is correct
+ // show full control panel
+ dat += {"
+Status: [(src.timing ? "Func/Set" : "Functional")]-[(src.safety ? "Safe" : "Engaged")]
+Timer: [src.timeleft]
+
+Timer: [(src.timing ? "On" : "Off")] Toggle
+Time: - - [src.timeleft] + +
+
+Safety: [(src.safety ? "On" : "Off")] Toggle
+Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle
+"}
+
+ else // otherwise, lock controls until code entered
+
+ dat += {"
+Status: Auth. S2-[(src.safety ? "Safe" : "Engaged")]
+Timer: [src.timeleft]
+
\nTimer: [(src.timing ? "On" : "Off")] Toggle
+Time: - - [src.timeleft] + +
+
+Safety: [(src.safety ? "On" : "Off")] Toggle
+Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle
+"}
+
+ else
+ if (src.timing) // auth disk removed, but counting down, lock controls
+
+ dat += {"
+Status: Set-[(src.safety ? "Safe" : "Engaged")]
+Timer: [src.timeleft]
+
+Timer: [(src.timing ? "On" : "Off")] Toggle
+Time: - - [src.timeleft] + +
+
+Safety: [(src.safety ? "On" : "Off")] Toggle
+Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle
+"}
+
+ else // also lock controls if not counting, no auth disk
+
+ dat += {"
+Status: Auth. S1-[(src.safety ? "Safe" : "Engaged")]
+Timer: [src.timeleft]
+
+Timer: [(src.timing ? "On" : "Off")] Toggle
+Time: - - [src.timeleft] + +
+
+Safety: [(src.safety ? "On" : "Off")] Toggle
+Anchor: [(src.anchored ? "Engaged" : "Off")] Toggle
+"}
+
+ var/message = "AUTH"
+
+ if (src.auth)
+ message = "[src.code]"
+ if (src.yes_code)
+ message = "*****"
+ // The keypad - enter code here
+ dat += {"
+[message]
+1-2-3
+4-5-6
+7-8-9
+R-0-E
+"}
+ user << browse(dat, "window=nuclearbomb;size=300x400")
+
+ else // Deploy and anchor the bomb.
+
+ src.anchored = 1
+ flick("nuclearbombc", src)
+ src.icon_state = "nuclearbomb1"
+ src.extended = 1
+ return
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+ if (usr.stat || usr.restrained())
+ return
+ if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ usr << "\red You don't have the dexterity to do this!"
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+
+ if (href_list["auth"]) // auth link - if disk already inserted, remove it
+ if (src.auth)
+ src.auth.loc = src.loc
+ src.yes_code = 0
+ src.auth = null
+ else // if not inserted, check that it's in the player's hand
+ var/obj/item/I = usr.equipped()
+ if (istype(I, /obj/item/weapon/disk/nuclear))
+ usr.drop_item()
+ I.loc = src
+ src.auth = I
+ if (src.auth)
+ if (href_list["type"]) // keypad typing
+ if (href_list["type"] == "E") // enter the current code, check against nuke code
+ if (src.code == src.r_code)
+ src.yes_code = 1
+ src.code = null
+ else
+ src.code = "ERROR"
+ else
+ if (href_list["type"] == "R") // reset code
+ src.yes_code = 0
+ src.code = null
+ else
+ src.code += "[href_list["type"]]" // otherwise, add a digit
+ if (length(src.code) > 5)
+ src.code = "ERROR"
+ if (src.yes_code)
+ if (href_list["time"])
+ var/time = text2num(href_list["time"])
+ src.timeleft += time
+ src.timeleft = min(max(round(src.timeleft), 5), 600)
+ if (href_list["timer"])
+ if (src.timing == -1.0)
+ return
+ src.timing = !( src.timing )
+ if (src.timing)
+ src.icon_state = "nuclearbomb2"
+ else
+ src.icon_state = "nuclearbomb1"
+ if (href_list["safety"])
+ src.safety = !( src.safety )
+ if (href_list["anchor"])
+ src.anchored = !( src.anchored )
+
+ src.add_fingerprint(usr)
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+ else
+ usr << browse(null, "window=nuclearbomb")
+ return
+
+
+ // On explosion, only (potentially) delete nuke if not about to explode
+
+ ex_act()
+ if (src.timing == -1.0)
+ return
+ else
+ return ..()
+
+
+ // Blob attack same as explosion
+
+ blob_act()
+
+ if (src.timing == -1.0)
+ return
+ else
+ return ..()
+
+
+ // Explode the nuke, destroying almost everything around
+ // TODO: Unify this explosion proc with others
+
+ proc/explode()
+
+ if (src.safety)
+ src.timing = 0
+ return
+ src.timing = -1.0
+ src.yes_code = 0
+ src.icon_state = "nuclearbomb3"
+ sleep(20) // 2 second delay
+ var/turf/T = src.loc
+ while(!( istype(T, /turf) ))
+ T = T.loc
+ var/min = 50
+ var/med = 250
+ var/max = 500
+ var/sw = locate(1, 1, T.z) // explosion encompasses whole of z-level
+ var/ne = locate(world.maxx, world.maxy, T.z)
+
+ defer_powernet_rebuild = 1 // Prevent powenet being rebuilt when cable objects deleted
+
+ for(var/turf/U in block(sw, ne))
+ var/zone = 4
+ if ((U.y <= T.y + max && U.y >= T.y - max && U.x <= T.x + max && U.x >= T.x - max))
+ zone = 3
+ if ((U.y <= T.y + med && U.y >= T.y - med && U.x <= T.x + med && U.x >= T.x - med))
+ zone = 2
+ if ((U.y <= T.y + min && U.y >= T.y - min && U.x <= T.x + min && U.x >= T.x - min))
+ zone = 1
+ for(var/atom/A in U)
+ A.ex_act(zone)
+
+ U.ex_act(zone)
+ U.buildlinks()
+
+
+ defer_powernet_rebuild = 0 // Renable powernet rebuilt
+ makepowernets() // And do so
+ ticker.nuclear(src.z) // inform gameticker that nuke exploded
+ del(src)
diff --git a/main-src/Code/Machinery/pod.dm b/main-src/Code/Machinery/pod.dm
new file mode 100644
index 0000000..19c54e0
--- /dev/null
+++ b/main-src/Code/Machinery/pod.dm
@@ -0,0 +1,201 @@
+/*
+ * Pod -- escape pod.
+ *
+ * Pilotable object that can carry people and other objects
+ *
+ * TODO: Work out whats going on at low speeds <=10 in process()
+ * TODO: Limit the capcity of the pod in some way - current carrying capacity is infinite
+ * Could use a simple count or based on item weight, w_class, etc.
+ */
+
+obj/machinery/pod
+ name = "Escape Pod"
+ icon = 'escapepod.dmi'
+ icon_state = "pod"
+ density = 1
+ flags = FPRINT|DRIVABLE
+ anchored = 1
+
+ var
+ id = 1.0 // Not used
+ speed = 10.0 // The current speed, in tiles per second, roughly
+ capacity = null // Not used
+
+
+ // Timed process
+ // Move the pod depending on its speed and direction
+
+ process()
+ if (src.speed)
+ if (src.speed <= 10) // at low speed
+ var/t1 = 10 - src.speed // very odd - step (with delay) an inverse number of times?
+ //var t1 = speed // consider replacing with this - much more controllable! - Hobnob
+ while(t1 > 0)
+ step(src, src.dir)
+ sleep(1)
+ t1--
+ else // at high speed
+ var/t1 = round(src.speed / 5) // step speed/5 times per process
+ while(t1 > 0)
+ step(src, src.dir)
+ t1--
+
+
+ // Called when pod bumps into something
+ // Set the speed to zero
+
+ Bump(var/atom/A)
+ spawn( 0 )
+ ..()
+ src.speed = 0
+
+
+ // Called when client attempts to move, and is inside a pod
+ // direction is the direction key the client used
+
+ relaymove(mob/user, direction)
+
+ if (user.stat)
+ return
+ if ((user in src)) // make sure player is inside this pod
+
+ if (direction & 1) // North pressed
+ src.speed = max(src.speed - 1, 1) // slow down to minimum speed (1)
+
+ else if (direction & 2) // South pressed
+ src.speed++ // Increase speed up to maximum (10)
+ if (src.speed > 10)
+ src.speed = 10
+ if (direction & 4) // East pressed
+ src.dir = turn(src.dir, -90.0) // Turn clockwise
+
+ else if (direction & 8) // West pressed
+ src.dir = turn(src.dir, 90) // Turn anticlockwise
+
+
+
+ // Pod Verbs
+
+
+ // Eject from pod - place player behind pod and restore view
+
+ verb/eject()
+ set src = usr.loc
+
+ if (usr.stat)
+ return
+ var/mob/M = usr
+ M.loc = src.loc
+ if (M.client)
+ M.client.eye = M.client.mob
+ M.client.perspective = MOB_PERSPECTIVE
+ step(M, turn(src.dir, 180))
+
+
+ // Board the pod - place player inside the pod and set the view to follow the pod
+
+ verb/board()
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ var/mob/M = usr
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ M.loc = src
+ return
+
+
+ // Load pod - whatever the player is pulling gets loaded into the pod (including other players)
+
+ verb/load()
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ if (( ( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ var/mob/human/H = usr
+
+ if ((H.pulling && !( H.pulling.anchored )))
+
+ H.pulling.loc = src
+
+ if (ismob(H.pulling))
+ var/mob/M = H.pulling
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ for(var/mob/O in viewers(src, null))
+ if ((O.client && !( O.blinded )))
+ O << text("\blue [] loads [] into []!", H, H.pulling, src)
+ H.pulling = null
+ return
+
+
+ // Unload a pod - remove an item or mob from the pod
+ // If a client mob, restore their view settings
+
+ verb/unload(var/atom/movable/A in src.contents)
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ if (istype(A, /atom/movable))
+ A.loc = src.loc
+ for(var/mob/O in viewers(src, null))
+ if ((O.client && !( O.blinded )))
+ O << text("\blue [] unloads [] from []!", usr, A, src)
+ //Foreach goto(54)
+ if (ismob(A))
+ var/mob/M = A
+ if (M.client)
+ M.client.perspective = MOB_PERSPECTIVE
+ M.client.eye = M
+ step(A, turn(src.dir, 180))
+ return
+
+
+ // Damage procs
+
+ // Hit by meteor - eject/unload everything from the pod
+
+ meteorhit(var/obj/O)
+
+ if (O.icon_state == "flaming")
+ for(var/obj/item/I in src)
+ I.loc = src.loc
+
+ for(var/mob/M in src)
+ M.loc = src.loc
+ if (M.client)
+ M.client.eye = M.client.mob
+ M.client.perspective = MOB_PERSPECTIVE
+
+ del(src)
+
+
+ // In explosion - eject everything and destroy pod
+
+ ex_act(severity)
+ switch(severity)
+ if(1.0)
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+ if(2.0)
+ if (prob(50))
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+
+
+ // Blob attack - eject everything and destroy pod
+
+ blob_act()
+
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ del(src)
diff --git a/main-src/Code/Machinery/recon.dm b/main-src/Code/Machinery/recon.dm
new file mode 100644
index 0000000..bf45342
--- /dev/null
+++ b/main-src/Code/Machinery/recon.dm
@@ -0,0 +1,198 @@
+/*
+ * Recon -- reconaissance pod
+ *
+ * Very similar to escape pods, except can carry only 1 person
+ *
+ */
+
+
+obj/machinery/recon
+ name = "1-Person Reconaissance Pod"
+ icon = 'escapepod.dmi'
+ icon_state = "recon"
+ density = 1
+ flags = FPRINT|DRIVABLE
+ anchored = 1
+ var
+ speed = 1 // the current speed, turfs/second
+
+
+ // Timed process
+ // Move according to current speed and direction
+
+ process()
+ if (src.speed)
+ if (src.speed <= 10)
+ var/t1 = 10 - src.speed // See note for pod/process()
+ // var/t1 = src.speed
+ while(t1 > 0)
+ step(src, src.dir)
+ sleep(1)
+ t1--
+ else
+ var/t1 = round(src.speed / 5)
+ while(t1 > 0)
+ step(src, src.dir)
+ t1--
+
+
+ // Called when we bump into a dense object
+ // Set speed to zero
+
+ Bump()
+ spawn( 0 )
+ ..()
+ src.speed = 0
+
+
+ // Called by client/Move() when player tries to move while inside a recon
+ // direction is the key pressed
+
+ relaymove(mob/user, direction)
+ if (user.stat)
+ return
+
+ if ((user in src))
+ if (direction & 1) // North
+ src.speed = max(src.speed - 1, 1) // Slow down
+
+ else if (direction & 2) // South
+ src.speed++ // Speed up
+
+ if (direction & 4) // East
+ src.dir = turn(src.dir, -90.0) // Turn clockwise
+
+ else if (direction & 8) // West
+ src.dir = turn(src.dir, 90) // Turn anticlockwise
+
+ if (direction & 16) // Centre
+ src.speed = 30 // Speed boost
+ else
+ src.speed = min(src.speed, 10) // otherwise max speed is 10 turfs/second
+
+
+ // Recon verbs
+
+
+ // Eject from the recon, reset view to player
+
+ verb/eject()
+ set src = usr.loc
+
+ if (usr.stat)
+ return
+ var/mob/M = usr
+ M.loc = src.loc
+ if (M.client)
+ M.client.eye = M.client.mob
+ M.client.perspective = MOB_PERSPECTIVE
+
+
+ // Board the recon, set view to follow the object
+
+ verb/board()
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ if (locate(/mob, src))
+ usr << "There is no room! You can only fit one person."
+ return
+ var/mob/M = usr
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ M.loc = src
+
+
+ // Load the recon with the pulled object
+ // Note recons can carry only items, unlike escape pobs which can carry any movable object
+
+ verb/load()
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ if ((( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
+ var/mob/human/H = usr
+ if ((H.pulling && !( H.pulling.anchored )))
+ if (!( istype(H.pulling, /obj/item/weapon) ))
+ usr << "You may only place items in."
+ else
+ if ((locate(/mob, src) && ismob(H.pulling)))
+ usr << "There is no room! You can only fit one person."
+ else
+ H.pulling.loc = src
+ if (ismob(H.pulling))
+ var/mob/M = H.pulling
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ for(var/mob/O in viewers(src, null))
+ if ((O.client && !( O.blinded )))
+ O << text("\blue [] loads [] into []!", H, H.pulling, src)
+ //Foreach goto(204)
+ H.pulling = null
+
+
+ // Unload an object from the recon
+ // If a player, reset the player's view to normal
+
+ verb/unload(atom/movable/A in src)
+ set src in oview(1)
+
+ if (usr.stat)
+ return
+ if (istype(A, /atom/movable))
+ A.loc = src.loc
+ for(var/mob/O in view(src, null))
+ if ((O.client && !( O.blinded )))
+ O << text("\blue [] unloads [] from []!", usr, A, src)
+ //Foreach goto(53)
+ if (ismob(A))
+ var/mob/M = A
+ if (M.client)
+ M.client.perspective = MOB_PERSPECTIVE
+ M.client.eye = M
+
+
+ // Damage procs
+
+ // Meteor hit, dump all contents and delete recon
+
+ meteorhit(var/obj/O)
+ if (O.icon_state == "flaming")
+ for(var/obj/item/I in src)
+ I.loc = src.loc
+
+ for(var/mob/M in src)
+ M.loc = src.loc
+ if (M.client)
+ M.client.eye = M.client.mob
+ M.client.perspective = MOB_PERSPECTIVE
+ del(src)
+
+
+ // Explosion, dump all contents and explode them, then delete recon
+
+ ex_act(severity)
+ switch(severity)
+ if(1.0)
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+ if(2.0)
+ if (prob(50))
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+
+
+ // Blob attack, dump contents and delete recon
+
+ blob_act()
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ del(src)
diff --git a/main-src/Code/Machinery/shuttle.dm b/main-src/Code/Machinery/shuttle.dm
new file mode 100644
index 0000000..0d53d12
--- /dev/null
+++ b/main-src/Code/Machinery/shuttle.dm
@@ -0,0 +1,41 @@
+/*
+ * Shuttle - machines for shuttle propulsion
+ *
+ * These do nothing, but are used in certain places as graphical elements
+ *
+ * TODO: Make them actually do something? This would require significant coding for moving objects.
+ */
+
+obj/machinery/shuttle
+ name = "shuttle"
+ icon = 'shuttle.dmi'
+
+ engine
+ name = "engine"
+ density = 1
+ anchored = 1.0
+
+ heater
+ name = "heater"
+ icon_state = "heater"
+
+ platform
+ name = "platform"
+ icon_state = "platform"
+
+ propulsion
+ name = "propulsion"
+ icon_state = "propulsion"
+ opacity = 1
+
+ burst
+ left
+ name = "left"
+ icon_state = "burst_l"
+ right
+ name = "right"
+ icon_state = "burst_r"
+
+ router
+ name = "router"
+ icon_state = "router"
\ No newline at end of file
diff --git a/main-src/Code/Machinery/sleeper.dm b/main-src/Code/Machinery/sleeper.dm
new file mode 100644
index 0000000..66b9a43
--- /dev/null
+++ b/main-src/Code/Machinery/sleeper.dm
@@ -0,0 +1,320 @@
+/*
+ * Sleeper -- allows a mob to be preserved without further damage
+ *
+ * /obj/machinery/sleeper -- the sleeper itself
+ *
+ * /obj/machinery/computer/sleep_console -- the control console
+ *
+ * TODO: Sleepers currently do not use or need power. If altered, need to make the occupant suffer if the power goes out.
+ *
+ */
+
+
+/*
+ * The sleeper
+ */
+
+obj/machinery/sleeper
+ name = "sleeper"
+ icon = 'Cryogenic2.dmi'
+ icon_state = "sleeper_0"
+ density = 1
+ anchored = 1
+ var
+ mob/occupant = null // the mob in the sleeper, or null if none
+
+
+ // Eject verb
+ // Remove the occupant from the sleeper
+
+ verb/eject()
+ set src in oview(1)
+
+ if (usr.stat != 0)
+ return
+ src.go_out()
+ add_fingerprint(usr)
+
+
+ // Move inside verb
+ // Insert the mob you are pulling into the sleeper
+ // Sleeper must be empty, and mob cannot be wearing anything
+
+ verb/move_inside()
+ set src in oview(1)
+
+ if (usr.stat != 0)
+ return
+ if (src.occupant)
+ usr << "\blue The sleeper is already occupied!"
+ return
+ if (usr.abiotic())
+ usr << "Subject may not have abiotic items on."
+ return
+ usr.pulling = null
+ usr.client.perspective = EYE_PERSPECTIVE
+ usr.client.eye = src
+ usr.loc = src
+ src.occupant = usr
+ src.icon_state = "sleeper_1"
+ for(var/obj/O in src)
+ del(O)
+
+ src.add_fingerprint(usr)
+
+
+ // Attack by item
+ // Only used for the grab pseudo-item, places the grabbed mob in the sleeper
+
+ attackby(obj/item/weapon/grab/G, mob/user)
+
+ if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
+ return
+ if (src.occupant)
+ user << "\blue The sleeper is already occupied!"
+ return
+ if (G.affecting.abiotic())
+ user << "Subject may not have abiotic items on."
+ return
+ var/mob/M = G.affecting
+ if (M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ M.loc = src
+ src.occupant = M
+ src.icon_state = "sleeper_1"
+ for(var/obj/O in src)
+ O.loc = src.loc
+
+ src.add_fingerprint(user)
+
+ del(G)
+
+
+ // Called to remove a mob from the sleeper
+ // If a client, reset the view to normal
+
+ proc/go_out()
+ if (!( src.occupant ))
+ return
+ for(var/obj/O in src)
+ O.loc = src.loc
+
+ if (src.occupant.client)
+ src.occupant.client.eye = src.occupant.client.mob
+ src.occupant.client.perspective = MOB_PERSPECTIVE
+ src.occupant.loc = src.loc
+ src.occupant = null
+ src.icon_state = "sleeper_0"
+
+
+ // Called to inject rejuve chemicals into the occupant
+ // Maximum is 60 units
+
+ proc/inject(mob/user)
+
+ if (src.occupant)
+ if (src.occupant.rejuv < 60)
+ src.occupant.rejuv = 60
+ user << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", src.occupant.rejuv)
+ else
+ user << "No occupant!"
+
+
+ // Shows the health statistics of the occupant
+ // Does not seem to be used?
+
+ proc/check(mob/user)
+ if (src.occupant)
+ user << "\blue Occupant ([src.occupant]) Statistics:"
+ var/t1
+ switch(src.occupant.stat)
+ if(0.0)
+ t1 = "Conscious"
+ if(1.0)
+ t1 = "Unconscious"
+ if(2.0)
+ t1 = "*dead*"
+ else
+ user << "[(src.occupant.health > 50 ? "\blue " : "\red ")]\t Health %: [src.occupant.health] ([t1])"
+ user << "[(src.occupant.oxyloss < 60 ? "\blue " : "\red ")]\t -Respiratory Damage %: [src.occupant.oxyloss]"
+ user << "[(src.occupant.toxloss < 60 ? "\blue " : "\red ")]\t -Toxin Content %: [src.occupant.toxloss]"
+ user << "[(src.occupant.fireloss < 60 ? "\blue " : "\red ")]\t -Burn Severity %: [src.occupant.fireloss]"
+ user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
+ user << "\blue \t [src.occupant.paralysis / 5] second\s (if around 1 or 2 the sleeper is keeping them asleep.)"
+ else
+ user << "\blue There is no one inside!"
+ return
+
+
+ // Called in mob/Life() while the occupant is inside
+ // Sets the health settings of the occupant
+
+ alter_health(mob/M)
+
+ if (M.health > 0)
+ if (M.oxyloss >= 10)
+ var/amount = max(0.15, 1)
+ M.oxyloss -= amount
+ else
+ M.oxyloss = 0
+ M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
+ M.paralysis -= 4
+ M.weakened -= 4
+ M.stunned -= 4
+ if (M.paralysis <= 1)
+ M.paralysis = 3
+ if (M.weakened <= 1)
+ M.weakened = 3
+ if (M.stunned <= 1)
+ M.stunned = 3
+ if (M.rejuv < 3)
+ M.rejuv = 4
+
+
+ // Explosion damage
+ // Chance to remove the occupant and explode them, then delete the sleeper
+
+ ex_act(severity)
+
+ switch(severity)
+ if(1.0)
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+ return
+ if(2.0)
+ if (prob(50))
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+ return
+ if(3.0)
+ if (prob(25))
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ A.ex_act(severity)
+ del(src)
+ return
+
+
+ // Blob attack, remove the occupant and delete
+
+ blob_act()
+ for(var/atom/movable/A in src)
+ A.loc = src.loc
+ del(src)
+
+
+ /* Unused
+
+ allow_drop()
+ return 0
+
+ */
+
+/*
+ * The sleep console
+ */
+
+
+obj/machinery/computer/sleep_console
+ name = "sleep console"
+ icon = 'Cryogenic2.dmi'
+ icon_state = "sleeperconsole"
+ var
+ obj/machinery/sleeper/connected = null // the associated sleeper
+
+
+ // Create a new sleep console
+ // Locate the connected sleeper 1 step west
+
+ New()
+ ..()
+ spawn( 5 ) // wait for world to finish loading
+ src.connected = locate(/obj/machinery/sleeper, get_step(src, WEST))
+
+
+ // Monkey interact same as human
+
+ attack_paw(mob/user)
+ return src.attack_hand(user)
+
+ // Human interact
+ // Show the interaction window
+
+ attack_hand(mob/user)
+ if (src.connected)
+ var/mob/occupant = src.connected.occupant
+ var/dat = "Occupant Statistics:
"
+ if (occupant)
+ var/t1
+ switch(occupant.stat)
+ if(0.0)
+ t1 = "Conscious"
+ if(1.0)
+ t1 = "Unconscious"
+ if(2.0)
+ t1 = "*dead*"
+ else
+ dat += "[occupant.health > 50 ? "" : ""]\tHealth %: [occupant.health] ([t1])
"
+ dat += "[occupant.oxyloss < 60 ? "" : ""]\t-Respiratory Damage %: [occupant.oxyloss]
"
+ dat += "[occupant.toxloss < 60 ? "" : ""]\t-Toxin Content %: [occupant.toxloss]
"
+ dat += "[occupant.fireloss < 60 ? "" : ""]\t-Burn Severity %: [occupant.fireloss]
"
+ dat += "
Paralysis Summary %: [occupant.paralysis] ([round(occupant.paralysis / 4)] seconds left!)
"
+ dat += "
Refresh
Inject Rejuvenators"
+ else
+ dat += "The sleeper is empty."
+ dat += "
Close"
+ user << browse(dat, "window=sleeper;size=400x500")
+
+
+ // Handle topic links from interaction window
+
+ Topic(href, href_list)
+ ..()
+ if ((usr.stat || usr.restrained()))
+ return
+ if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
+ usr.machine = src
+ if (href_list["rejuv"])
+ if (src.connected)
+ src.connected.inject(usr)
+ if (href_list["refresh"])
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+ //Foreach goto(123)
+ src.add_fingerprint(usr)
+
+
+ // Timed process - just update interaction window for those viewing
+
+ process()
+
+ for(var/mob/M in viewers(1, src))
+ if ((M.client && M.machine == src))
+ src.attack_hand(M)
+
+
+ // Called when area power state changes
+ // no change - sleeper works without power
+ // Note overrides standard /obj/machinery/computer/power_change()
+
+ power_change()
+ return
+
+
+ // Explosion damage, chance to delete the sleeper console
+
+ ex_act(severity)
+
+ switch(severity)
+ if(1.0)
+ del(src)
+
+ if(2.0)
+ if (prob(50))
+ del(src)
diff --git a/main-src/Code/airtunnel.dm b/main-src/Code/airtunnel.dm
index f7a65fa..d977e4f 100644
--- a/main-src/Code/airtunnel.dm
+++ b/main-src/Code/airtunnel.dm
@@ -99,163 +99,6 @@
-/obj/machinery/computer/airtunnel/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/computer/airtunnel/attack_paw(user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/airtunnel/attack_hand(var/mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN) )
- return
-
- var/dat = "Air Tunnel Controls
"
- user.machine = src
- if (SS13_airtunnel.operating == 1)
- dat += "Status: RETRACTING
"
- else
- if (SS13_airtunnel.operating == 2)
- dat += "Status: EXPANDING
"
- else
- var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
- if (C.current == C)
- dat += "Status: Fully Retracted
"
- else
- if (!( C.current.next ))
- dat += "Status: Fully Extended
"
- else
- dat += "Status: Stopped Midway
"
- dat += text("Retract Stop Extend
", src, src, src)
- dat += text("
Air Level: []
", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS"))
- dat += "Air System Status: "
- switch(SS13_airtunnel.siphon_status)
- if(0.0)
- dat += "Stopped "
- if(1.0)
- dat += "Siphoning (Siphons only) "
- if(2.0)
- dat += "Regulating (BOTH) "
- if(3.0)
- dat += "RELEASING MAX (Siphons only) "
- else
- dat += text("(Refresh)
", src)
- dat += text("RELEASE (Siphons only) Siphon (Siphons only) Stop Regulate
", src, src, src, src)
- dat += text("
Close", user)
- user << browse(dat, "window=computer;size=400x500")
- return
-
-/obj/machinery/computer/airtunnel/proc/update_icon()
-
- if(stat & BROKEN)
- icon_state = "broken"
- return
-
- if(stat & NOPOWER)
- icon_state = "c_unpowered"
- return
-
- var/status = 0
- if (SS13_airtunnel.operating == 1)
- status = "r"
- else
- if (SS13_airtunnel.operating == 2)
- status = "e"
- else
- var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors)
- if (C.current == C)
- status = 0
- else
- if (!( C.current.next ))
- status = 2
- else
- status = 1
- src.icon_state = text("console[][]", (SS13_airtunnel.siphon_status >= 2 ? "1" : "0"), status)
- return
-
-/obj/machinery/computer/airtunnel/process()
-
- src.update_icon()
- if(stat & (NOPOWER|BROKEN) )
- return
- use_power(250)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(27)
- return
-
-/obj/machinery/computer/airtunnel/Topic(href, href_list)
- ..()
-
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["retract"])
- SS13_airtunnel.retract()
- else
- if (href_list["stop"])
- SS13_airtunnel.operating = 0
- else
- if (href_list["extend"])
- SS13_airtunnel.extend()
- else
- if (href_list["release"])
- SS13_airtunnel.siphon_status = 3
- SS13_airtunnel.siphons()
- else
- if (href_list["siphon"])
- SS13_airtunnel.siphon_status = 1
- SS13_airtunnel.siphons()
- else
- if (href_list["stop_siph"])
- SS13_airtunnel.siphon_status = 0
- SS13_airtunnel.siphons()
- else
- if (href_list["auto"])
- SS13_airtunnel.siphon_status = 2
- SS13_airtunnel.siphons()
- else
- if (href_list["refresh"])
- SS13_airtunnel.siphons()
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(346)
- return
-
-
-
-
-
-
-
/datum/air_tunnel/air_tunnel1/New()
diff --git a/main-src/Code/atmo_control.dm b/main-src/Code/atmo_control.dm
deleted file mode 100644
index 785b2f7..0000000
--- a/main-src/Code/atmo_control.dm
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/obj/machinery/mass_driver/proc/drive(amount)
-
- if(stat & NOPOWER)
- return
-
- use_power(500)
- for(var/obj/O in src.loc)
- if (O.flags & 64)
- O.throwing = 1
- O.throwspeed = 100
- spawn( 0 )
- O.throwing(src.dir, src.power)
- return
- //Foreach goto(17)
- flick("mass_driver1", src)
- return
-
-
-
diff --git a/main-src/Code/computer.dm b/main-src/Code/computer.dm
index a7e582c..4911a5c 100644
--- a/main-src/Code/computer.dm
+++ b/main-src/Code/computer.dm
@@ -48,869 +48,6 @@
return 1
return
-/obj/machinery/computer/meteorhit(var/obj/O as obj)
-
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(17)
- src.icon_state = "broken"
- stat |= BROKEN
- return
-
-/obj/machinery/computer/communications/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- stat |= BROKEN
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- stat |= BROKEN
- else
- return
-
-/obj/machinery/computer/blob_act()
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- src.stat |= BROKEN
- src.density = 0
-
-/obj/machinery/computer/power_change()
- if(stat & BROKEN)
- icon_state = "broken"
- else
- if( powered() )
- icon_state = initial(icon_state)
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "c_unpowered"
- stat |= NOPOWER
-
-
-/obj/machinery/computer/process()
-
- if(stat & (NOPOWER|BROKEN))
- return
- use_power(250)
-
-
-/obj/machinery/computer/communications/verb/call_shuttle()
- set src in oview(1)
-
- src.add_fingerprint(usr)
- if(stat & NOPOWER) return
-
- if ((!( ticker ) || ticker.shuttle_location == 1))
- return
-
- if( ticker.mode == "blob" )
- usr << "Under directive 7-10, SS13 is quarantined until further notice."
- return
-
- world << "\blue Alert: The emergency shuttle has been called. It will arrive in T-10:00 minutes."
- if (!( ticker.timeleft ))
- ticker.timeleft = 6000
- ticker.timing = 1
- return
-
-/obj/machinery/computer/communications/verb/cancel_call()
- set src in oview(1)
-
- src.add_fingerprint(usr)
- if(stat & NOPOWER) return
- if ((!( ticker ) || ticker.shuttle_location == 1 || ticker.timing == 0 || ticker.timeleft < 300))
- return
- if( ticker.mode == "blob" )
- return
-
- world << "\blue Alert: The shuttle is going back!"
- ticker.timing = -1.0
-
- return
-
-/obj/machinery/computer/card/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- stat |= BROKEN
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- stat |= BROKEN
- else
- return
-
-/obj/machinery/computer/card/power_change()
- if(stat & BROKEN)
- icon_state = "broken"
- else
- if( powered() )
- icon_state = initial(icon_state)
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "id_unpowered"
- stat |= NOPOWER
-
-/obj/machinery/computer/card/attack_paw(var/mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/card/attack_hand(var/mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN) ) return
-
- user.machine = src
- var/dat
- if (!( ticker ))
- return
- if (src.mode)
- var/d2 = text("Confirm Identity: []\n[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), (src.authenticated ? "You are logged in!" : text("{Log in}", src)))
- var/d1 = "Please use security Records to modify entries.
"
- for(var/datum/data/record/t in data_core.general)
- d1 += text("[] - []
", t.fields["name"], t.fields["rank"])
- //Foreach goto(104)
- dat = text("[]
\n
\nCrew Manifest:
\n[]\n
\nPrint
\n
\nAccess ID modification console.
\n", d2, d1, src, src)
- else
- var/d1 = text("{Log in}", src)
- if ((src.authenticated && src.modify))
- var/vo = null
- var/va = null
- var/vl = null
- var/ve = null
- switch(src.modify.access_level)
- if(1.0)
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- if(2.0)
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- if(3.0)
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- if(4.0)
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- if(5.0)
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- else
- vo = text("0 1 2 3 4 5", src, src, src, src, src)
- switch(src.modify.lab_access)
- if(1.0)
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- if(2.0)
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- if(3.0)
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- if(4.0)
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- if(5.0)
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- else
- vl = text("0 1 2 3 4 5", src, src, src, src, src)
- switch(src.modify.engine_access)
- if(1.0)
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- if(2.0)
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- if(3.0)
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- if(4.0)
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- if(5.0)
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- else
- ve = text("0 1 2 3 4 5", src, src, src, src, src)
- switch(src.modify.air_access)
- if(1.0)
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- if(2.0)
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- if(3.0)
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- if(4.0)
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- if(5.0)
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- else
- va = text("0 1 2 3 4 5", src, src, src, src, src)
- var/list/L = list( "Research Assistant", "Staff Assistant", "Medical Assistant", "Technical Assistant", "Engineer", "Forensic Technician", "Research Technician", "Medical Doctor", "Captain", "Security Officer", "Medical Researcher", "Toxin Researcher", "Head of Research", "Head of Personnel", "Station Technician", "Atmospheric Technician", "Unassigned", "Systems", "Custom" )
- var/assign = ""
- if (istype(user, /mob/human))
- var/counter = 1
- for(var/t in L)
- assign += text("[] ", src, t, t)
- counter++
- if (counter >= 3)
- assign += "
"
- counter = 1
- //Foreach goto(912)
- d1 = text("[] :
\nGeneral Access Level: []
\nLaboratory Access: []
\nReactor/Engine Access: []
\nMain Systems Access: []
\nRegistered: []
\nAssignment: []
\n[]
", src.modify.name, vo, vl, ve, va, src, (src.modify.registered ? text("[]", src.modify.registered) : "{None: Click to modify}"), (src.modify.assignment ? text("[]", src.modify.assignment) : "None"), assign)
- else
- var/counter = 1
- for(var/t in L)
- assign += text("[] ", src, t, stars(t))
- counter++
- if (counter >= 4)
- assign += "
"
- counter = 1
- //Foreach goto(1057)
- d1 = text("[] :
\n[] []
\n[] []
\n[] []
\n[] []
\n[] []
\n[] []
\n[]
", stars("modify.name"), stars("General Access Level:"), vo, stars("Laboratory Access:"), vl, stars("Reactor/Engine Access:"), ve, stars("Main Systems Access:"), va, stars("Registered:"), src, (src.modify.registered ? text("[]", stars(src.modify.registered)) : text("[]", stars("{None: Click to modify}"))), stars("Assignment:"), (src.modify.assignment ? text("[]", stars(src.modify.assignment)) : "None"), assign)
- if (istype(user, /mob/human))
- dat = text("Identification Card Modifier
\nPlease Insert the cards into the slots
\nTarget: []
\nConfirm Identity: []
\n-----------------
\n[]
\n
\n
\nAccess Crew Manifest
\n", src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.scan ? text("[]", src.scan.name) : "----------"), d1, src)
- else
- dat = text("[]
\n[]
\n[] []
\n[] []
\n-----------------
\n[]
\n
\n
\n[]
\n", stars("Identification Card Modifier"), stars("Please Insert the cards into the slots"), stars("Target:"), src, (src.modify ? text("[]", stars(src.modify.name)) : "----------"), stars("Confirm Identity:"), src, (src.scan ? text("[]", stars(src.scan.name)) : "----------"), d1, src, stars("Access Crew Manifest"))
- user << browse(dat, "window=id_com;size=400x500")
- return
-
-/obj/machinery/computer/card/Topic(href, href_list)
- ..()
-
- if(stat & (NOPOWER|BROKEN))
- usr << browse(null, "window=id_com")
- return
-
- if(usr.restrained() || usr.lying) return
-
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.stat || usr.restrained()))
- return
- if ((get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
- usr.machine = src
- if (href_list["modify"])
- if (src.modify)
- src.modify.name = text("[]'s ID Card ([]>[]-[]-[])", src.modify.registered, src.modify.access_level, src.modify.lab_access, src.modify.engine_access, src.modify.air_access)
- src.modify.loc = src.loc
- src.modify = null
- else
- var/obj/item/I = usr.equipped()
- if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item()
- I.loc = src
- src.modify = I
- src.authenticated = 0
- if (href_list["scan"])
- if (src.scan)
- src.scan.loc = src.loc
- src.scan = null
- else
- var/obj/item/I = usr.equipped()
- if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item()
- I.loc = src
- src.scan = I
- src.authenticated = 0
- if (href_list["auth"])
- if ((!( src.authenticated ) && src.scan && (src.modify || src.mode)))
- if ((src.scan.assignment == "Captain" || src.scan.assignment == "Head of Personnel"))
- src.authenticated = 1
- if (href_list["vo"])
- if (src.authenticated)
- var/t1 = text2num(href_list["vo"])
- if (t1 == -1.0)
- t1 = 0
- src.modify.access_level = t1
- if (href_list["vl"])
- if (src.authenticated)
- var/t1 = text2num(href_list["vl"])
- if (t1 == -1.0)
- t1 = 0
- src.modify.lab_access = t1
- if (href_list["ve"])
- if (src.authenticated)
- var/t1 = text2num(href_list["ve"])
- if (t1 == -1.0)
- t1 = 0
- src.modify.engine_access = t1
- if (href_list["va"])
- if (src.authenticated)
- var/t1 = text2num(href_list["va"])
- if (t1 == -1.0)
- t1 = 0
- src.modify.air_access = t1
- if (href_list["assign"])
- if (src.authenticated)
- var/t1 = href_list["assign"]
-
- if(t1 == "Custom")
- t1 = input("Enter a custom job assignment.","Assignment")
-
- src.modify.assignment = t1
- if (href_list["reg"])
- if (src.authenticated)
- var/t2 = src.modify
- var/t1 = input(usr, "What name?", "ID computer", null) as text
- if ((src.authenticated && src.modify == t2 && get_dist(src, usr) <= 1 && istype(src.loc, /turf)))
- src.modify.registered = t1
- if (href_list["mode"])
- src.mode = text2num(href_list["mode"])
- if (href_list["print"])
- if (!( src.printing ))
- src.printing = 1
- sleep(50)
- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
- var/t1 = "Crew Manifest:
"
- for(var/datum/data/record/t in data_core.general)
- t1 += text("[] - []
", t.fields["name"], t.fields["rank"])
- //Foreach goto(868)
- P.info = text("[]", t1)
- P.name = "paper- 'Crew Manifest'"
- src.printing = null
- if (href_list["mode"])
- src.authenticated = 0
- src.mode = text2num(href_list["mode"])
- if (src.modify)
- src.modify.name = text("[]'s ID Card ([]>[]-[]-[])", src.modify.registered, src.modify.access_level, src.modify.lab_access, src.modify.engine_access, src.modify.air_access)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(1015)
- src.add_fingerprint(usr)
- else
- usr << browse(null, "window=id_com")
- return
- return
-
-/obj/machinery/computer/card/attackby(I as obj, user as mob)
-
- src.attack_hand(user)
- return
-
-/obj/machinery/computer/pod/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- stat |= BROKEN
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- stat |= BROKEN
- else
- return
-
-/obj/machinery/computer/pod/proc/alarm()
-
- if(stat & (NOPOWER|BROKEN)) return
-
- if (!( src.connected ))
- viewers(null, null) << "Cannot locate mass driver connector. Cancelling firing sequence!"
- return
- for(var/obj/machinery/door/poddoor/M in machines)
- if (M.id == src.id)
- spawn( 0 )
- M.openpod()
- return
- //Foreach goto(41)
- sleep(20)
-
- //src.connected.drive() *****RM from 40.93.3S
- for(var/obj/machinery/mass_driver/M in machines)
- if(M.id == src.id)
- M.power = src.connected.power
- M.drive()
-
- //*****
- sleep(50)
- for(var/obj/machinery/door/poddoor/M in machines)
- if (M.id == src.id)
- spawn( 0 )
- M.closepod()
- return
- //Foreach goto(123)
- return
-
-/obj/machinery/computer/pod/New()
-
- ..()
- spawn( 5 )
- for(var/obj/machinery/mass_driver/M in machines)
- if (M.id == src.id)
- src.connected = M
- else
- //Foreach continue //goto(25)
- return
- return
-
-/obj/machinery/computer/pod/attack_paw(var/mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/pod/attack_hand(var/mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN)) return
-
- var/dat = "Mass Driver Controls"
- user.machine = src
- var/d2
- if (src.timing)
- d2 = text("Stop Time Launch", src)
- else
- d2 = text("Initiate Time Launch", src)
- var/second = src.time % 60
- var/minute = (src.time - second) / 60
- dat += text("
\nTimer System: []\nTime Left: [][] - - + +", d2, (minute ? text("[]:", minute) : null), second, src, src, src, src)
- if (src.connected)
- var/temp = ""
- var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 )
- for(var/t in L)
- if (t == src.connected.power)
- temp += text("[] ", t)
- else
- temp += text("[] ", src, t, t)
- //Foreach goto(172)
- dat += text("
\nPower Level: []
\nFiring Sequence
\nTest Fire Driver
\nToggle Outer Door
", temp, src, src, src)
- //*****RM from 40.93.3S
- else
- dat += text("
\nToggle Outer Door
", src)
- //*****
- dat += text("
Close", user)
- user << browse(dat, "window=computer;size=400x500")
- return
-
-/obj/machinery/computer/pod/process()
-
-
- if(stat & (NOPOWER|BROKEN) )
- return
- use_power(250)
-
- if (src.timing)
- if (src.time > 0)
- src.time = round(src.time) - 1
- else
- alarm()
- src.time = 0
- src.timing = 0
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(68)
- return
-
-/obj/machinery/computer/pod/Topic(href, href_list)
- ..()
-
- if(stat & (NOPOWER|BROKEN))
- usr << browse(null, "window=computer")
- return
-
-
- if(usr.restrained() || usr.lying) return
-
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["power"])
- var/t = text2num(href_list["power"])
- t = min(max(0.25, t), 16)
- if (src.connected)
- src.connected.power = t
- else
- if (href_list["alarm"])
- src.alarm()
- else
- if (href_list["time"])
- src.timing = text2num(href_list["time"])
- else
- if (href_list["tp"])
- var/tp = text2num(href_list["tp"])
- src.time += tp
- src.time = min(max(round(src.time), 0), 120)
- else
- if (href_list["door"])
- for(var/obj/machinery/door/poddoor/M in machines)
- if (M.id == src.id)
- if (M.density)
- spawn( 0 )
- M.openpod()
- return
- else
- spawn( 0 )
- M.closepod()
- return
- //Foreach goto(298)
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(394)
- return
-
-/obj/machinery/pod/meteorhit(var/obj/O as obj)
-
- if (O.icon_state == "flaming")
- for(var/obj/item/I in src)
- I.loc = src.loc
- //Foreach goto(29)
- for(var/mob/M in src)
- M.loc = src.loc
- if (M.client)
- M.client.eye = M.client.mob
- M.client.perspective = MOB_PERSPECTIVE
- //Foreach goto(71)
- //SN src = null
- del(src)
- return
- return
-
-/obj/machinery/pod/process()
-
- if (src.speed)
- if (src.speed <= 10)
- var/t1 = 10 - src.speed
- while(t1 > 0)
- step(src, src.dir)
- sleep(1)
- t1--
- else
- var/t1 = round(src.speed / 5)
- while(t1 > 0)
- step(src, src.dir)
- t1--
- return
-
-/obj/machinery/pod/ex_act(severity)
-
- switch(severity)
- if(1.0)
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(31)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(104)
- //SN src = null
- del(src)
- return
- else
- return
-
-/obj/machinery/pod/blob_act()
-
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- del(src)
-
-/obj/machinery/pod/Bump(var/atom/A)
-
- //world << "[src] bumped into [A]"
- spawn( 0 )
- ..()
- src.speed = 0
- return
- return
-
-/obj/machinery/pod/relaymove(mob/user as mob, direction)
-
- if (user.stat)
- return
- if ((user in src))
- if (direction & 1)
- src.speed = max(src.speed - 1, 1)
- else
- if (direction & 2)
- src.speed++
- if (src.speed > 10)
- src.speed = 10
- if (direction & 4)
- src.dir = turn(src.dir, -90.0)
- else
- if (direction & 8)
- src.dir = turn(src.dir, 90)
- return
-
-/obj/machinery/pod/verb/eject()
- set src = usr.loc
-
- if (usr.stat)
- return
- var/mob/M = usr
- M.loc = src.loc
- if (M.client)
- M.client.eye = M.client.mob
- M.client.perspective = MOB_PERSPECTIVE
- step(M, turn(src.dir, 180))
- return
-
-/obj/machinery/pod/verb/board()
- set src in oview(1)
-
- if (usr.stat)
- return
- var/mob/M = usr
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- M.loc = src
- return
-
-/obj/machinery/pod/verb/load()
- set src in oview(1)
-
-
-
- if (usr.stat)
- return
- if (( ( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- var/mob/human/H = usr
-
- if ((H.pulling && !( H.pulling.anchored )))
-
- H.pulling.loc = src
-
-
- if (ismob(H.pulling))
- var/mob/M = H.pulling
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O << text("\blue [] loads [] into []!", H, H.pulling, src)
- //Foreach goto(152)
- H.pulling = null
- return
-
-/obj/machinery/pod/verb/unload(var/atom/movable/A in src.contents)
- set src in oview(1)
-
- if (usr.stat)
- return
- if (istype(A, /atom/movable))
- A.loc = src.loc
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O << text("\blue [] unloads [] from []!", usr, A, src)
- //Foreach goto(54)
- if (ismob(A))
- var/mob/M = A
- if (M.client)
- M.client.perspective = MOB_PERSPECTIVE
- M.client.eye = M
- step(A, turn(src.dir, 180))
- return
-
-/obj/machinery/recon/meteorhit(var/obj/O as obj)
-
- if (O.icon_state == "flaming")
- for(var/obj/item/I in src)
- I.loc = src.loc
- //Foreach goto(29)
- for(var/mob/M in src)
- M.loc = src.loc
- if (M.client)
- M.client.eye = M.client.mob
- M.client.perspective = MOB_PERSPECTIVE
- //Foreach goto(71)
- //SN src = null
- del(src)
- return
- return
-
-/obj/machinery/recon/process()
-
- if (src.speed)
- if (src.speed <= 10)
- var/t1 = 10 - src.speed
- while(t1 > 0)
- step(src, src.dir)
- sleep(1)
- t1--
- else
- var/t1 = round(src.speed / 5)
- while(t1 > 0)
- step(src, src.dir)
- t1--
- return
-
-/obj/machinery/recon/ex_act(severity)
-
- switch(severity)
- if(1.0)
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(31)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(104)
- //SN src = null
- del(src)
- return
- else
- return
-
-/obj/machinery/recon/blob_act()
-
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- del(src)
-
-/obj/machinery/recon/Bump()
-
- spawn( 0 )
- ..()
- src.speed = 0
- return
- return
-
-/obj/machinery/recon/verb/eject()
- set src = usr.loc
-
- if (usr.stat)
- return
- var/mob/M = usr
- M.loc = src.loc
- if (M.client)
- M.client.eye = M.client.mob
- M.client.perspective = MOB_PERSPECTIVE
- return
-
-/obj/machinery/recon/verb/board()
- set src in oview(1)
-
- if (usr.stat)
- return
- if (locate(/mob, src))
- usr << "There is no room! You can only fit one person."
- return
- var/mob/M = usr
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- M.loc = src
- return
-
-/obj/machinery/recon/verb/load()
- set src in oview(1)
-
- if (usr.stat)
- return
- if ((( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- var/mob/human/H = usr
- if ((H.pulling && !( H.pulling.anchored )))
- if (!( istype(H.pulling, /obj/item/weapon) ))
- usr << "You may only place items in."
- else
- if ((locate(/mob, src) && ismob(H.pulling)))
- usr << "There is no room! You can only fit one person."
- else
- H.pulling.loc = src
- if (ismob(H.pulling))
- var/mob/M = H.pulling
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- for(var/mob/O in viewers(src, null))
- if ((O.client && !( O.blinded )))
- O << text("\blue [] loads [] into []!", H, H.pulling, src)
- //Foreach goto(204)
- H.pulling = null
- return
-
-/obj/machinery/recon/verb/unload(var/atom/movable/A in src)
- set src in oview(1)
-
- if (usr.stat)
- return
- if (istype(A, /atom/movable))
- A.loc = src.loc
- for(var/mob/O in view(src, null))
- if ((O.client && !( O.blinded )))
- O << text("\blue [] unloads [] from []!", usr, A, src)
- //Foreach goto(53)
- if (ismob(A))
- var/mob/M = A
- if (M.client)
- M.client.perspective = MOB_PERSPECTIVE
- M.client.eye = M
- return
-
-/obj/machinery/recon/Bump()
-
- spawn( 0 )
- ..()
- src.speed = 0
- return
- return
-
-/obj/machinery/recon/relaymove(var/mob/user as mob, direction)
-
- if (user.stat)
- return
- if ((user in src))
- if (direction & 1)
- src.speed = max(src.speed - 1, 1)
- else
- if (direction & 2)
- src.speed++
- if (direction & 4)
- src.dir = turn(src.dir, -90.0)
- else
- if (direction & 8)
- src.dir = turn(src.dir, 90)
- if (direction & 16)
- src.speed = 30
- else
- src.speed = min(src.speed, 10)
- return
/obj/datacore/proc/manifest()
diff --git a/main-src/Code/cryo.dm b/main-src/Code/cryo.dm
index 2a60873..c5ee2bd 100644
--- a/main-src/Code/cryo.dm
+++ b/main-src/Code/cryo.dm
@@ -1,1745 +1,4 @@
-/obj/machinery/computer/med_data/attack_paw(user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/med_data/attack_hand(mob/user as mob)
-
- var/dat
- if (src.temp)
- dat = text("[]
Clear Screen", src.temp, src)
- else
- dat = text("Confirm Identity: []
", src, (src.scan ? text("[]", src.scan.name) : "----------"))
- if (src.authenticated)
- switch(src.screen)
- if(1.0)
- dat += text("Search Records
\nList Records
\n
\nRecord Maintenance
\n{Log Out}
\n", src, src, src, src)
- if(2.0)
- dat += "Record List:
"
- for(var/datum/data/record/R in data_core.general)
- dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"])
- //Foreach goto(132)
- dat += text("
Back", src)
- if(3.0)
- dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src)
- if(4.0)
- dat += "Medical Record
"
- if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
- dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"])
- else
- dat += "General Record Lost!
"
- if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
- dat += text("
\nMedical Data
\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src, src.active2.fields["b_type"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"])
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- dat += text("[]
Delete Entry
", src.active2.fields[text("com_[]", counter)], src, counter)
- counter++
- dat += text("Add Entry
", src)
- dat += text("Delete Record (Medical Only)
", src)
- else
- dat += "Medical Record Lost!
"
- dat += text("New Record
", src)
- dat += text("\nPrint Record
\nBack
", src, src)
- else
- else
- dat += text("{Log In}", src)
- user << browse(text("Medical Records[]", dat), "window=med_rec")
- return
-
-/obj/machinery/computer/med_data/Topic(href, href_list)
- ..()
- if (!( data_core.general.Find(src.active1) ))
- src.active1 = null
- if (!( data_core.medical.Find(src.active2) ))
- src.active2 = null
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["temp"])
- src.temp = null
- if (href_list["scan"])
- if (src.scan)
- src.scan.loc = src.loc
- src.scan = null
- else
- var/obj/item/I = usr.equipped()
- if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item()
- I.loc = src
- src.scan = I
- else
- if (href_list["logout"])
- src.authenticated = null
- src.screen = null
- src.active1 = null
- src.active2 = null
- else
- if (href_list["login"])
- if (istype(src.scan, /obj/item/weapon/card/id))
- src.active1 = null
- src.active2 = null
- if(scan.check_access(access, allowed))
- src.authenticated = src.scan.registered
- src.rank = src.scan.assignment
- src.screen = 1
- if (src.authenticated)
- if (href_list["list"])
- src.screen = 2
- src.active1 = null
- src.active2 = null
- else
- if (href_list["rec_m"])
- src.screen = 3
- src.active1 = null
- src.active2 = null
- else
- if (href_list["del_all"])
- src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src)
- else
- if (href_list["del_all2"])
- for(var/datum/data/record/R in data_core.medical)
- //R = null
- del(R)
- //Foreach goto(494)
- src.temp = "All records deleted."
- else
- if (href_list["main"])
- src.screen = 1
- src.active1 = null
- src.active2 = null
- else
- if (href_list["field"])
- var/a1 = src.active1
- var/a2 = src.active2
- switch(href_list["field"])
- if("fingerprint")
- if (istype(src.active1, /datum/data/record))
- var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["id"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["fingerprint"] = t1
- if("sex")
- if (istype(src.active1, /datum/data/record))
- if (src.active1.fields["sex"] == "Male")
- src.active1.fields["sex"] = "Female"
- else
- src.active1.fields["sex"] = "Male"
- if("age")
- if (istype(src.active1, /datum/data/record))
- var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["age"] = t1
- if("mi_dis")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["mi_dis"] = t1
- if("mi_dis_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["mi_dis_d"] = t1
- if("ma_dis")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["ma_dis"] = t1
- if("ma_dis_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["ma_dis_d"] = t1
- if("alg")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["alg"] = t1
- if("alg_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["alg_d"] = t1
- if("cdi")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["cdi"] = t1
- if("cdi_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["cdi_d"] = t1
- if("notes")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["notes"] = t1
- if("p_stat")
- if (istype(src.active1, /datum/data/record))
- src.temp = text("Physical Condition:
\n\t*Deceased*
\n\t*Unconscious*
\n\tActive
\n\tPhysically Unfit
", src, src, src, src)
- if("m_stat")
- if (istype(src.active1, /datum/data/record))
- src.temp = text("Mental Condition:
\n\t*Insane*
\n\t*Unstable*
\n\t*Watch*
\n\tStable
", src, src, src, src)
- if("b_type")
- if (istype(src.active2, /datum/data/record))
- src.temp = text("Blood Type:
\n\tA- A+
\n\tB- B+
\n\tAB- AB+
\n\tO- O+
", src, src, src, src, src, src, src, src)
- else
- else
- if (href_list["p_stat"])
- if (src.active1)
- switch(href_list["p_stat"])
- if("deceased")
- src.active1.fields["p_stat"] = "*Deceased*"
- if("unconscious")
- src.active1.fields["p_stat"] = "*Unconscious*"
- if("active")
- src.active1.fields["p_stat"] = "Active"
- if("unfit")
- src.active1.fields["p_stat"] = "Physically Unfit"
- else
- if (href_list["m_stat"])
- if (src.active1)
- switch(href_list["m_stat"])
- if("insane")
- src.active1.fields["m_stat"] = "*Insane*"
- if("unstable")
- src.active1.fields["m_stat"] = "*Unstable*"
- if("watch")
- src.active1.fields["m_stat"] = "*Watch*"
- if("stable")
- src.active2.fields["m_stat"] = "Stable"
-
- else
- if (href_list["b_type"])
- if (src.active2)
- switch(href_list["b_type"])
- if("an")
- src.active2.fields["b_type"] = "A-"
- if("bn")
- src.active2.fields["b_type"] = "B-"
- if("abn")
- src.active2.fields["b_type"] = "AB-"
- if("on")
- src.active2.fields["b_type"] = "O-"
- if("ap")
- src.active2.fields["b_type"] = "A+"
- if("bp")
- src.active2.fields["b_type"] = "B+"
- if("abp")
- src.active2.fields["b_type"] = "AB+"
- if("op")
- src.active2.fields["b_type"] = "O+"
-
- else
- if (href_list["del_r"])
- if (src.active2)
- src.temp = text("Are you sure you wish to delete the record (Medical Portion Only)?
\n\tYes
\n\tNo
", src, src)
- else
- if (href_list["del_r2"])
- if (src.active2)
- //src.active2 = null
- del(src.active2)
- else
- if (href_list["d_rec"])
- var/datum/data/record/R = locate(href_list["d_rec"])
- var/datum/data/record/M = locate(href_list["d_rec"])
- if (!( data_core.general.Find(R) ))
- src.temp = "Record Not Found!"
- return
- for(var/datum/data/record/E in data_core.medical)
- if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
- M = E
- else
- //Foreach continue //goto(2540)
- src.active1 = R
- src.active2 = M
- src.screen = 4
- else
- if (href_list["new"])
- if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
- var/datum/data/record/R = new /datum/data/record( )
- R.fields["name"] = src.active1.fields["name"]
- R.fields["id"] = src.active1.fields["id"]
- R.name = text("Medical Record #[]", R.fields["id"])
- R.fields["b_type"] = "Unknown"
- R.fields["mi_dis"] = "None"
- R.fields["mi_dis_d"] = "No minor disabilities have been declared."
- R.fields["ma_dis"] = "None"
- R.fields["ma_dis_d"] = "No major disabilities have been diagnosed."
- R.fields["alg"] = "None"
- R.fields["alg_d"] = "No allergies have been detected in this patient."
- R.fields["cdi"] = "None"
- R.fields["cdi_d"] = "No diseases have been diagnosed at the moment."
- R.fields["notes"] = "No notes."
- data_core.medical += R
- src.active2 = R
- src.screen = 4
- else
- if (href_list["add_c"])
- if (!( istype(src.active2, /datum/data/record) ))
- return
- var/a2 = src.active2
- var/t1 = input("Add Comment:", "Med. records", null, null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- counter++
- src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
- else
- if (href_list["del_c"])
- if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
- src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted"
- else
- if (href_list["search"])
- var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text
- if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
- return
- src.active1 = null
- src.active2 = null
- t1 = lowertext(t1)
- for(var/datum/data/record/R in data_core.general)
- if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
- src.active1 = R
- else
- //Foreach continue //goto(3229)
- if (!( src.active1 ))
- src.temp = text("Could not locate record [].", t1)
- else
- for(var/datum/data/record/E in data_core.medical)
- if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
- src.active2 = E
- else
- //Foreach continue //goto(3334)
- src.screen = 4
- else
- if (href_list["print_p"])
- if (!( src.printing ))
- src.printing = 1
- sleep(50)
- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
- P.info = "Medical Record
"
- if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
- P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
- else
- P.info += "General Record Lost!
"
- if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)))
- P.info += text("
\nMedical Data
\nBlood Type: []
\n
\nMinor Disabilities: []
\nDetails: []
\n
\nMajor Disabilities: []
\nDetails: []
\n
\nAllergies: []
\nDetails: []
\n
\nCurrent Diseases: [] (per disease info placed in log/comment section)
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src.active2.fields["b_type"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"])
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- P.info += text("[]
", src.active2.fields[text("com_[]", counter)])
- counter++
- else
- P.info += "Medical Record Lost!
"
- P.info += ""
- P.name = "paper- 'Medical Record'"
- src.printing = null
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(3792)
- return
-
-/obj/machinery/computer/secure_data/attack_paw(mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/secure_data/attack_hand(mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN) )
- return
-
- var/dat
- if (src.temp)
- dat = text("[]
Clear Screen", src.temp, src)
- else
- dat = text("Confirm Identity: []
", src, (src.scan ? text("[]", src.scan.name) : "----------"))
- if (src.authenticated)
- switch(src.screen)
- if(1.0)
- dat += text("Search Records
\nList Records
\nSearch Fingerprints
\nNew Record
\n
\nRecord Maintenance
\n{Log Out}
\n", src, src, src, src, src, src)
- if(2.0)
- dat += "Record List:
"
- for(var/datum/data/record/R in data_core.general)
- dat += text("[]: []
", src, R, R.fields["id"], R.fields["name"])
- //Foreach goto(136)
- dat += text("
Back", src)
- if(3.0)
- dat += text("Records Maintenance
\nBackup To Disk
\nUpload From disk
\nDelete All Records
\n
\nBack", src, src, src, src)
- if(4.0)
- dat += "Security Record
"
- if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
- dat += text("Name: [] ID: []
\nSex: []
\nAge: []
\nRank: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src, src.active1.fields["name"], src, src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["rank"], src, src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
- else
- dat += "General Record Lost!
"
- if ((istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)))
- dat += text("
\nSecurity Data
\nCriminal Status: []
\n
\nMinor Crimes: []
\nDetails: []
\n
\nMajor Crimes: []
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src, src.active2.fields["criminal"], src, src.active2.fields["mi_crim"], src, src.active2.fields["mi_crim_d"], src, src.active2.fields["ma_crim"], src, src.active2.fields["ma_crim_d"], src, src.active2.fields["notes"])
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- dat += text("[]
Delete Entry
", src.active2.fields[text("com_[]", counter)], src, counter)
- counter++
- dat += text("Add Entry
", src)
- dat += text("Delete Record (Security Only)
", src)
- else
- dat += "Security Record Lost!
"
- dat += text("New Record
", src)
- dat += text("\nDelete Record (ALL)
\nPrint Record
\nBack
", src, src, src)
- else
- else
- dat += text("{Log In}", src)
- user << browse(text("Security Records[]", dat), "window=secure_rec")
- return
-
-/obj/machinery/computer/secure_data/Topic(href, href_list)
- ..()
- if(stat & (NOPOWER|BROKEN) )
- return
- if (!( data_core.general.Find(src.active1) ))
- src.active1 = null
- if (!( data_core.security.Find(src.active2) ))
- src.active2 = null
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["temp"])
- src.temp = null
- if (href_list["scan"])
- if (src.scan)
- src.scan.loc = src.loc
- src.scan = null
- else
- var/obj/item/I = usr.equipped()
- if (istype(I, /obj/item/weapon/card/id))
- usr.drop_item()
- I.loc = src
- src.scan = I
- else
- if (href_list["logout"])
- src.authenticated = null
- src.screen = null
- src.active1 = null
- src.active2 = null
- else
- if (href_list["login"])
- if (istype(src.scan, /obj/item/weapon/card/id))
- src.active1 = null
- src.active2 = null
- var/list/L = list( "Security Officer", "Forensic Technician", "Prison Warden", "Head of Personnel", "Captain" )
- if (L.Find(src.scan.assignment))
- src.authenticated = src.scan.registered
- src.rank = src.scan.assignment
- src.screen = 1
- if (src.authenticated)
- if (href_list["list"])
- src.screen = 2
- src.active1 = null
- src.active2 = null
- else
- if (href_list["rec_m"])
- src.screen = 3
- src.active1 = null
- src.active2 = null
- else
- if (href_list["del_all"])
- src.temp = text("Are you sure you wish to delete all records?
\n\tYes
\n\tNo
", src, src)
- else
- if (href_list["del_all2"])
- for(var/datum/data/record/R in data_core.security)
- //R = null
- del(R)
- //Foreach goto(497)
- src.temp = "All records deleted."
- else
- if (href_list["main"])
- src.screen = 1
- src.active1 = null
- src.active2 = null
- else
- if (href_list["field"])
- var/a1 = src.active1
- var/a2 = src.active2
- switch(href_list["field"])
- if("name")
- if (istype(src.active1, /datum/data/record))
- var/t1 = input("Please input name:", "Secure. records", src.active1.fields["name"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["name"] = t1
- if("id")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please input id:", "Secure. records", src.active1.fields["id"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["id"] = t1
- if("fingerprint")
- if (istype(src.active1, /datum/data/record))
- var/t1 = input("Please input fingerprint hash:", "Secure. records", src.active1.fields["fingerprint"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["fingerprint"] = t1
- if("sex")
- if (istype(src.active1, /datum/data/record))
- if (src.active1.fields["sex"] == "Male")
- src.active1.fields["sex"] = "Female"
- else
- src.active1.fields["sex"] = "Male"
- if("age")
- if (istype(src.active1, /datum/data/record))
- var/t1 = input("Please input age:", "Secure. records", src.active1.fields["age"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active1 != a1))
- return
- src.active1.fields["age"] = t1
- if("mi_crim")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please input minor disabilities list:", "Secure. records", src.active2.fields["mi_crim"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["mi_crim"] = t1
- if("mi_crim_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize minor dis.:", "Secure. records", src.active2.fields["mi_crim_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["mi_crim_d"] = t1
- if("ma_crim")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please input major diabilities list:", "Secure. records", src.active2.fields["ma_crim"], null) as text
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["ma_crim"] = t1
- if("ma_crim_d")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize major dis.:", "Secure. records", src.active2.fields["ma_crim_d"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["ma_crim_d"] = t1
- if("notes")
- if (istype(src.active2, /datum/data/record))
- var/t1 = input("Please summarize notes:", "Secure. records", src.active2.fields["notes"], null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- src.active2.fields["notes"] = t1
- if("criminal")
- if (istype(src.active2, /datum/data/record))
- src.temp = text("Criminal Status:
\n\tNone
\n\t*Arrest*
\n\tIncarcerated
\n\tParolled
\n\tReleased
", src, src, src, src, src)
- if("rank")
- var/list/L = list( "Head of Personnel", "Captain" )
- if ((istype(src.active1, /datum/data/record) && L.Find(src.rank)))
- src.temp = text("Rank:
\nAssistants:
\nResearch Assistant
\nStaff Assistant
\nMedical Assistant
\nTechnical Assistant
\nTechnicians:
\nForensic Technician
\nResearch Technician
\nStation Technician
\nAtmospheric Technician
\nEngineer (Engine Technician)\nResearchers:
\nMedical Researcher
\nToxin Researcher
\nOfficers:
\nMedical Doctor
\nSecurity Officer
\nHigher Officers:
\nHead of Research
\nHead of Personnel
\nCaptain
", src, src, src, src, src, src, src, src, src, src, src, src, src, src, src, src)
- else
- else
- if (href_list["rank"])
- var/list/L = list( "Head of Personnel", "Captain" )
- if ((src.active1 && L.Find(src.rank)))
- switch(href_list["rank"])
- if("res_assist")
- src.active1.fields["rank"] = "Research Assistant"
- if("staff_assist")
- src.active1.fields["rank"] = "Staff Assistant"
- if("med_assist")
- src.active1.fields["rank"] = "Medical Assistant"
- if("tech_assist")
- src.active1.fields["rank"] = "Technical Assistant"
- if("foren_tech")
- src.active1.fields["rank"] = "Forensic Technician"
- if("res_tech")
- src.active1.fields["rank"] = "Research Technician"
- if("stat_tech")
- src.active1.fields["rank"] = "Station Technician"
- if("atmo_tech")
- src.active1.fields["rank"] = "Atmospheric Technician"
- if("engineer")
- src.active1.fields["rank"] = "Engineer"
- if("med_res")
- src.active1.fields["rank"] = "Medical Researcher"
- if("tox_res")
- src.active1.fields["rank"] = "Toxin Researcher"
- if("med_doc")
- src.active1.fields["rank"] = "Medical Doctor"
- if("secure_off")
- src.active1.fields["rank"] = "Security Officer"
- if("hoperson")
- src.active1.fields["rank"] = "Head of Research"
- if("horesearch")
- src.active1.fields["rank"] = "Head of Personnel"
- if("captain")
- src.active1.fields["rank"] = "Captain"
-
- else
- if (href_list["criminal2"])
- if (src.active2)
- switch(href_list["criminal2"])
- if("none")
- src.active2.fields["criminal"] = "None"
- if("arrest")
- src.active2.fields["criminal"] = "*Arrest*"
- if("incarcerated")
- src.active2.fields["criminal"] = "Incarcerated"
- if("parolled")
- src.active2.fields["criminal"] = "Parolled"
- if("released")
- src.active2.fields["criminal"] = "Released"
-
- else
- if (href_list["del_r"])
- if (src.active2)
- src.temp = text("Are you sure you wish to delete the record (Security Portion Only)?
\n\tYes
\n\tNo
", src, src)
- else
- if (href_list["del_r2"])
- if (src.active2)
- //src.active2 = null
- del(src.active2)
- else
- if (href_list["dela_r"])
- if (src.active1)
- src.temp = text("Are you sure you wish to delete the record (ALL)?
\n\tYes
\n\tNo
", src, src)
- else
- if (href_list["dela_r2"])
- for(var/datum/data/record/R in data_core.medical)
- if ((R.fields["name"] == src.active1.fields["name"] || R.fields["id"] == src.active1.fields["id"]))
- //R = null
- del(R)
- else
- //Foreach continue //goto(2405)
- if (src.active2)
- //src.active2 = null
- del(src.active2)
- if (src.active1)
- //src.active1 = null
- del(src.active1)
- else
- if (href_list["d_rec"])
- var/datum/data/record/R = locate(href_list["d_rec"])
- var/S = locate(href_list["d_rec"])
- if (!( data_core.general.Find(R) ))
- src.temp = "Record Not Found!"
- return
- for(var/datum/data/record/E in data_core.security)
- if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
- S = E
- else
- //Foreach continue //goto(2614)
- src.active1 = R
- src.active2 = S
- src.screen = 4
- else
- if (href_list["new_r"])
- var/datum/data/record/G = new /datum/data/record( )
- G.fields["name"] = "New Record"
- G.fields["id"] = text("[]", add_zero(num2hex(rand(1, 1.6777215E7)), 6))
- G.fields["rank"] = "Unassigned"
- G.fields["sex"] = "Male"
- G.fields["age"] = "Unknown"
- G.fields["fingerprint"] = "Unknown"
- G.fields["p_stat"] = "Active"
- G.fields["m_stat"] = "Stable"
- data_core.general += G
- src.active1 = G
- src.active2 = null
- else
- if (href_list["new"])
- if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) )))
- var/datum/data/record/R = new /datum/data/record( )
- R.fields["name"] = src.active1.fields["name"]
- R.fields["id"] = src.active1.fields["id"]
- R.name = text("Security Record #[]", R.fields["id"])
- R.fields["criminal"] = "None"
- R.fields["mi_crim"] = "None"
- R.fields["mi_crim_d"] = "No minor crime convictions."
- R.fields["ma_crim"] = "None"
- R.fields["ma_crim_d"] = "No minor crime convictions."
- R.fields["notes"] = "No notes."
- data_core.security += R
- src.active2 = R
- src.screen = 4
- else
- if (href_list["add_c"])
- if (!( istype(src.active2, /datum/data/record) ))
- return
- var/a2 = src.active2
- var/t1 = input("Add Comment:", "Secure. records", null, null) as message
- if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || get_dist(src, usr) > 1 || src.active2 != a2))
- return
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- counter++
- src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2053
[]", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1)
- else
- if (href_list["del_c"])
- if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])]))
- src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted"
- else
- if (href_list["search_f"])
- var/t1 = input("Search String: (Fingerprint)", "Secure. records", null, null) as text
- if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
- return
- src.active1 = null
- src.active2 = null
- t1 = lowertext(t1)
- for(var/datum/data/record/R in data_core.general)
- if (lowertext(R.fields["fingerprint"]) == t1)
- src.active1 = R
- else
- //Foreach continue //goto(3414)
- if (!( src.active1 ))
- src.temp = text("Could not locate record [].", t1)
- else
- for(var/datum/data/record/E in data_core.security)
- if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
- src.active2 = E
- else
- //Foreach continue //goto(3502)
- src.screen = 4
- else
- if (href_list["search"])
- var/t1 = input("Search String: (Name or ID)", "Secure. records", null, null) as text
- if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || get_dist(src, usr) > 1))
- return
- src.active1 = null
- src.active2 = null
- t1 = lowertext(t1)
- for(var/datum/data/record/R in data_core.general)
- if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
- src.active1 = R
- else
- //Foreach continue //goto(3708)
- if (!( src.active1 ))
- src.temp = text("Could not locate record [].", t1)
- else
- for(var/datum/data/record/E in data_core.security)
- if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
- src.active2 = E
- else
- //Foreach continue //goto(3813)
- src.screen = 4
- else
- if (href_list["print_p"])
- if (!( src.printing ))
- src.printing = 1
- sleep(50)
- var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.loc )
- P.info = "Security Record
"
- if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)))
- P.info += text("Name: [] ID: []
\nSex: []
\nAge: []
\nFingerprint: []
\nPhysical Status: []
\nMental Status: []
", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"])
- else
- P.info += "General Record Lost!
"
- if ((istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)))
- P.info += text("
\nSecurity Data
\nCriminal Status: []
\n
\nMinor Crimes: []
\nDetails: []
\n
\nMajor Crimes: []
\nDetails: []
\n
\nImportant Notes:
\n\t[]
\n
\nComments/Log
", src.active2.fields["criminal"], src.active2.fields["mi_crim"], src.active2.fields["mi_crim_d"], src.active2.fields["ma_crim"], src.active2.fields["ma_crim_d"], src.active2.fields["notes"])
- var/counter = 1
- while(src.active2.fields[text("com_[]", counter)])
- P.info += text("[]
", src.active2.fields[text("com_[]", counter)])
- counter++
- else
- P.info += "Security Record Lost!
"
- P.info += ""
- P.name = "paper- 'Security Record'"
- src.printing = null
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(4247)
- return
-
-/obj/machinery/computer/sleep_console/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- //SN src = null
- del(src)
- return
- else
- return
-
-/obj/machinery/computer/sleep_console/New()
-
- ..()
- spawn( 5 )
- src.connected = locate(/obj/machinery/sleeper, get_step(src, WEST))
- return
- return
-
-/obj/machinery/computer/sleep_console/attack_paw(mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/sleep_console/attack_hand(mob/user as mob)
-
- if (src.connected)
- var/mob/occupant = src.connected.occupant
- var/dat = "Occupant Statistics:
"
- if (occupant)
- var/t1
- switch(occupant.stat)
- if(0.0)
- t1 = "Conscious"
- if(1.0)
- t1 = "Unconscious"
- if(2.0)
- t1 = "*dead*"
- else
- dat += text("[]\tHealth %: [] ([])
", (occupant.health > 50 ? "" : ""), occupant.health, t1)
- dat += text("[]\t-Respiratory Damage %: []
", (occupant.oxyloss < 60 ? "" : ""), occupant.oxyloss)
- dat += text("[]\t-Toxin Content %: []
", (occupant.toxloss < 60 ? "" : ""), occupant.toxloss)
- dat += text("[]\t-Burn Severity %: []
", (occupant.fireloss < 60 ? "" : ""), occupant.fireloss)
- dat += text("
Paralysis Summary %: [] ([] seconds left!)
", occupant.paralysis, round(occupant.paralysis / 4))
- dat += text("
Refresh
Inject Rejuvenators", src, src)
- else
- dat += "The sleeper is empty."
- dat += text("
Close", user)
- user << browse(dat, "window=sleeper;size=400x500")
- return
-
-/obj/machinery/computer/sleep_console/Topic(href, href_list)
- ..()
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["rejuv"])
- if (src.connected)
- src.connected.inject(usr)
- if (href_list["refresh"])
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(123)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/sleep_console/process()
-
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(18)
- return
-
-/obj/machinery/computer/sleep_console/power_change()
- // no change - sleeper works without power
-
-/obj/machinery/freezer/attack_paw(mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/freezer/attack_hand(mob/user as mob)
-
- user.machine = src
-
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- var/d1
- if (locate(/obj/item/weapon/flasks, src))
- var/counter = 1
-
- for(var/obj/item/weapon/flasks/F in src)
- d1 += text("Flask []: [] / [] / []
", src, counter, counter, F.oxygen, F.plasma, F.coolant)
- counter++
- //Foreach goto(78)
- d1 += "Key: Oxygen / Plasma / Coolant
"
- else
- d1 = "No flasks!"
- var/t1 = null
- switch(src.t_flags)
- if(0.0)
- t1 = text("Oxygen-No Plasma-No", src, src)
- if(1.0)
- t1 = text("Oxygen-Yes Plasma-No", src, src)
- if(2.0)
- t1 = text("Oxygen-No Plasma-Yes", src, src)
- if(3.0)
- t1 = text("Oxygen-Yes Plasma-Yes", src, src)
- else
- var/t2 = null
- if (src.status)
- t2 = text("Cooling-[] Stop", src.c_used, src)
- else
- t2 = text("Cool Stopped", src)
- var/dat = text("
\n\t\tTemperature: []
\n\t\tTransfer Status: []
\n\t\t Chemicals Used: []
\n\t\tFreezer status: []
\n\t\t - - [] + +
\n
\n\t[]
\n
\n
\n\tClose
\n\t", src.temperature-T0C, (src.transfer ? text("Transfering Stop", src) : text("Transfer Stopped", src)), t1, t2, src, src, src.c_used, src, src, d1, user)
- user << browse(dat, "window=freezer;size=400x500")
- else
- var/d1 = null
- if (locate(/obj/item/weapon/flasks, src))
- var/counter = 1
- for(var/obj/item/weapon/flasks/F in src)
- d1 += text("[] []: []
", src, counter, stars("Flask"), counter, stars(text("[] / [] / []", F.oxygen, F.plasma, F.coolant)))
- counter++
- //Foreach goto(380)
- d1 += "Key: Oxygen / Plasma / Coolant
"
- else
- d1 = "No flasks!"
- var/t1 = null
- switch(src.t_flags)
- if(0.0)
- t1 = text("[] []", src, stars("Oxygen-No"), src, stars("Plasma-No"))
- if(1.0)
- t1 = text("[] []", src, stars("Oxygen-Yes"), src, stars("Plasma-No"))
- if(2.0)
- t1 = text("[] []", src, stars("Oxygen-No"), src, stars("Plasma-Yes"))
- if(3.0)
- t1 = text("[] []", src, stars("Oxygen-Yes"), src, stars("Plasma-Yes"))
- else
- var/t2 = null
- if (src.status)
- t2 = text("Cooling-[] []", src.c_used, src, stars("Stop"))
- else
- t2 = text("Cool []", src, stars("Stopped"))
- var/dat = text("
\n\t\t[]: []
\n\t\t[]: []
\n\t\t []: []
\n\t\t[]: []
\n\t\t - - [] + +
\n
\n\t[]
\n
\n
\n\tClose\n\t", stars("Temperature"), src.temperature-T0C, stars("Transfer Status"), (src.transfer ? text("Transfering Stop", src) : text("Transfer Stopped", src)), stars("Chemicals Used"), t1, stars("Freezer status"), t2, src, src, src.c_used, src, src, d1, user)
- user << browse(dat, "window=freezer;size=400x500")
- return
-
-/obj/machinery/freezer/Topic(href, href_list)
- ..()
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["cp"])
- var/cp = text2num(href_list["cp"])
- src.c_used += cp
- src.c_used = min(max(round(src.c_used), 0), 10)
- if (href_list["oxygen"])
- var/t1 = text2num(href_list["oxygen"])
- if (t1)
- src.t_flags |= 1
- else
- src.t_flags &= 65534
- if (href_list["plasma"])
- var/t1 = text2num(href_list["plasma"])
- if (t1)
- src.t_flags |= 2
- else
- src.t_flags &= 65533
- if (href_list["cool"])
- src.status = text2num(href_list["cool"])
- src.icon_state = text("freezer_[]", src.status)
- if (href_list["transfer"])
- src.transfer = text2num(href_list["transfer"])
- if (href_list["flask"])
- var/t1 = text2num(href_list["flask"])
- if (t1 <= src.contents.len)
- var/obj/F = src.contents[t1]
- F.loc = src.loc
- src.rebuild_overlay()
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/freezer/power_change()
- ..()
- if(stat & NOPOWER)
- icon_state = "freezer_0"
- else
- src.icon_state = "freezer_[status]"
-
-/obj/machinery/freezer/process()
-
- if(stat & NOPOWER)
- return
-
- use_power(50)
-
- var/obj/item/weapon/flasks/F1
- var/obj/item/weapon/flasks/F2
- var/obj/item/weapon/flasks/F3
- if (src.contents.len >= 3)
- F3 = src.contents[3]
- if (src.contents.len >= 2)
- F2 = src.contents[2]
- if (src.contents.len >= 1)
- F1 = src.contents[1]
- var/u_cool = 0
- if (src.status)
- u_cool = src.c_used
- if ((F2 && F2.coolant))
- if (F2.coolant >= u_cool)
- F2.coolant -= u_cool
- else
- u_cool = F2.coolant
- F2.coolant = 0
- else
- if ((F1 && F1.coolant))
- if (F1.coolant >= u_cool)
- F1.coolant -= u_cool
- else
- u_cool = F1.coolant
- F1.coolant = 0
- else
- if ((F3 && F3.coolant))
- if (F3.coolant >= u_cool)
- F3.coolant -= u_cool
- else
- u_cool = F3.coolant
- F3.coolant = 0
- else
- u_cool = 0
- if (u_cool)
- src.temperature = max((-100.0+T0C), src.temperature - (u_cool * 5) )
- use_power(200)
-
- src.temperature = min(src.temperature + 5, 20+T0C)
- if (src.transfer)
- var/u_oxy = 0
- var/u_pla = 0
- if (src.t_flags & 1)
- u_oxy = 1
- if ((F1 && F1.oxygen))
- if (F1.oxygen >= u_oxy)
- F1.oxygen -= u_oxy
- else
- u_oxy = F1.oxygen
- F1.oxygen = 0
- else
- if ((F2 && F2.oxygen))
- if (F2.oxygen >= u_oxy)
- F2.oxygen -= u_oxy
- else
- u_oxy = F2.oxygen
- F2.oxygen = 0
- else
- if ((F3 && F3.oxygen))
- if (F3.oxygen >= u_oxy)
- F3.oxygen -= u_oxy
- else
- u_oxy = F3.oxygen
- F3.oxygen = 0
- else
- u_oxy = 0
- if (src.t_flags & 2)
- u_pla = 1
- if ((F3 && F3.plasma))
- if (F3.plasma >= u_pla)
- F3.plasma -= u_pla
- else
- u_pla = F3.plasma
- F3.plasma = 0
- else
- if ((F2 && F2.plasma))
- if (F2.plasma >= u_pla)
- F2.plasma -= u_pla
- else
- u_pla = F2.plasma
- F2.plasma = 0
- else
- if ((F1 && F1.plasma))
- if (F1.plasma >= u_pla)
- F1.plasma -= u_pla
- else
- u_pla = F1.plasma
- F1.plasma = 0
- else
- u_pla = 0
- if ( (u_oxy + u_pla) > 0)
- ngas.oxygen += u_oxy
- ngas.plasma += u_pla
- ngas.temperature = src.temperature
- spawn( 1 )
- if (src.line_out)
-
- if(vnode)
- var/delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.tot_gas() / capmult)
- calc_delta( src, gas, ngas, vnode, delta_gt)
- else
- leak_to_turf()
-
- //src.line_out.receive_gas(G, src)
- return
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(809)
- return
-
-/obj/machinery/freezer/gas_flow()
-
- gas.replace_by(ngas)
-
-
-/obj/machinery/freezer/proc/leak_to_turf()
-
- var/turf/T = get_step(src, EAST)
-
- if(T.density)
- T = src.loc
- if(T.density)
- return
-
- flow_to_turf(gas, ngas, T)
-
-/*
-/obj/machinery/freezer/orient_pipe(P as obj)
-
- if (!( src.line_out ))
- src.line_out = P
- else
- return 0
- return 1
- return
-*/
-/obj/machinery/freezer/New()
-
- ..()
- var/obj/overlay/O1 = new /obj/overlay( )
- O1.icon = 'Cryogenic2.dmi'
- O1.icon_state = "canister connector_0"
- O1.pixel_y = -16.0
- src.overlays += O1
- src.connector = O1
- new /obj/item/weapon/flasks/oxygen( src )
- new /obj/item/weapon/flasks/coolant( src )
- new /obj/item/weapon/flasks/plasma( src )
- rebuild_overlay()
-
- gas = new/obj/substance/gas()
- ngas = new/obj/substance/gas()
-
- gasflowlist += src
- /*spawn( 50 )
- for(var/obj/machinery/M in orange(src, 1))
- if ((M.level == src.level && src.p_dir & get_dir(src, M) && M.p_dir & get_dir(M, src)))
- if (!( src.line_out ))
- src.line_out = M
- //Foreach goto(117)
- return*/
- return
-
-/obj/machinery/freezer/buildnodes()
-
- var/turf/T = src.loc
-
- line_out = get_machine(level, T, p_dir )
-
- if(line_out) vnode = line_out.getline()
-
- return
-
-
-/obj/machinery/freezer/get_gas_val(from)
- return gas.tot_gas()
-
-/obj/machinery/freezer/get_gas(from)
- return gas
-
-
-/obj/machinery/freezer/attackby(obj/item/weapon/flasks/F as obj, mob/user as mob)
-
- if (!( istype(F, /obj/item/weapon/flasks) ))
- return
- if (src.contents.len >= 3)
- user << "\blue All slots are full!"
- return
- else
- user.drop_item()
- F.loc = src
- src.rebuild_overlay()
- return
-
-/obj/machinery/freezer/proc/rebuild_overlay()
- for(var/x in src.overlays)
- src.overlays -= x
- //Foreach goto(17)
- src.overlays += src.connector
- var/counter = 0
- for(var/obj/item/weapon/flasks/F in src.contents)
- var/obj/overlay/O = new /obj/overlay( )
- O.icon = F.icon
- O.icon_state = F.icon_state
- O.pixel_y = -17.0
- O.pixel_x = counter * 12
- src.overlays += O
- counter++
- if (counter >= 3)
- return
- //Foreach goto(64)
- return
-
-/obj/machinery/sleeper/allow_drop()
-
- return 0
- return
-
-/obj/machinery/sleeper/process()
-
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(18)
- return
-
-/obj/machinery/sleeper/ex_act(severity)
-
- switch(severity)
- if(1.0)
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(31)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(104)
- //SN src = null
- del(src)
- return
- else
- return
-
-/obj/machinery/sleeper/blob_act()
-
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- del(src)
-
-/obj/machinery/sleeper/verb/eject()
- set src in oview(1)
-
- if (usr.stat != 0)
- return
- src.go_out()
- add_fingerprint(usr)
- return
-
-/obj/machinery/sleeper/verb/move_inside()
- set src in oview(1)
-
- if (usr.stat != 0)
- return
- if (src.occupant)
- usr << "\blue The sleeper is already occupied!"
- return
- if (usr.abiotic())
- usr << "Subject may not have abiotic items on."
- return
- usr.pulling = null
- usr.client.perspective = EYE_PERSPECTIVE
- usr.client.eye = src
- usr.loc = src
- src.occupant = usr
- src.icon_state = "sleeper_1"
- for(var/obj/O in src)
- //O = null
- del(O)
- //Foreach goto(124)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/sleeper/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
-
- if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
- return
- if (src.occupant)
- user << "\blue The sleeper is already occupied!"
- return
- if (G.affecting.abiotic())
- user << "Subject may not have abiotic items on."
- return
- var/mob/M = G.affecting
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- M.loc = src
- src.occupant = M
- src.icon_state = "sleeper_1"
- for(var/obj/O in src)
- O.loc = src.loc
- //Foreach goto(154)
- src.add_fingerprint(user)
- //G = null
- del(G)
- return
-
-/obj/machinery/sleeper/proc/go_out()
-
- if (!( src.occupant ))
- return
- for(var/obj/O in src)
- O.loc = src.loc
- //Foreach goto(26)
- if (src.occupant.client)
- src.occupant.client.eye = src.occupant.client.mob
- src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.loc = src.loc
- src.occupant = null
- src.icon_state = "sleeper_0"
- return
-
-/obj/machinery/sleeper/proc/inject(mob/user as mob)
-
- if (src.occupant)
- if (src.occupant.rejuv < 60)
- src.occupant.rejuv = 60
- user << text("Occupant now has [] units of rejuvenation in his/her bloodstream.", src.occupant.rejuv)
- else
- user << "No occupant!"
- return
-
-/obj/machinery/sleeper/proc/check(mob/user as mob)
-
- if (src.occupant)
- user << text("\blue Occupant ([]) Statistics:", src.occupant)
- var/t1
- switch(src.occupant.stat)
- if(0.0)
- t1 = "Conscious"
- if(1.0)
- t1 = "Unconscious"
- if(2.0)
- t1 = "*dead*"
- else
- user << text("[]\t Health %: [] ([])", (src.occupant.health > 50 ? "\blue " : "\red "), src.occupant.health, t1)
- user << text("[]\t -Respiratory Damage %: []", (src.occupant.oxyloss < 60 ? "\blue " : "\red "), src.occupant.oxyloss)
- user << text("[]\t -Toxin Content %: []", (src.occupant.toxloss < 60 ? "\blue " : "\red "), src.occupant.toxloss)
- user << text("[]\t -Burn Severity %: []", (src.occupant.fireloss < 60 ? "\blue " : "\red "), src.occupant.fireloss)
- user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
- user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
- else
- user << "\blue There is no one inside!"
- return
-
-/obj/machinery/sleeper/ex_act(severity)
-
- switch(severity)
- if(1.0)
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(35)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(108)
- //SN src = null
- del(src)
- return
- if(3.0)
- if (prob(25))
- for(var/atom/movable/A as mob|obj in src)
- A.loc = src.loc
- ex_act(severity)
- //Foreach goto(181)
- //SN src = null
- del(src)
- return
- else
- return
-
-/obj/machinery/sleeper/alter_health(mob/M as mob)
-
- if (M.health > 0)
- if (M.oxyloss >= 10)
- var/amount = max(0.15, 1)
- M.oxyloss -= amount
- else
- M.oxyloss = 0
- M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
- M.paralysis -= 4
- M.weakened -= 4
- M.stunned -= 4
- if (M.paralysis <= 1)
- M.paralysis = 3
- if (M.weakened <= 1)
- M.weakened = 3
- if (M.stunned <= 1)
- M.stunned = 3
- if (M.rejuv < 3)
- M.rejuv = 4
- return
-
-/obj/machinery/cryo_cell/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(54)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/cryo_cell/blob_act()
- for(var/x in src.verbs)
- src.verbs -= x
- src.icon_state = "broken"
- src.density = 0
-/*
-/obj/machinery/cryo_cell/orient_pipe(P as obj)
-
- if (!( src.line_in ))
- src.line_in = P
- else
- return 0
- return 1
- return
-*/
-/obj/machinery/cryo_cell/allow_drop()
-
- return 0
- return
-
-/obj/machinery/cryo_cell/New()
-
- ..()
- src.layer = 5
- O1 = new /obj/overlay( )
- O1.icon = 'Cryogenic2.dmi'
- O1.icon_state = "cellconsole"
- O1.pixel_y = -32.0
- O1.layer = 4
-
- O2 = new /obj/overlay( )
- O2.icon = 'Cryogenic2.dmi'
- O2.icon_state = "cellbottom"
- O2.pixel_y = -32.0
- src.pixel_y = 32
-
- add_overlays()
-
- src.gas = new /obj/substance/gas( null )
- gas.temperature = T20C
- src.ngas = new /obj/substance/gas (null)
- ngas.temperature = T20C
-
- gasflowlist += src
-
-/obj/machinery/cryo_cell/proc/add_overlays()
- src.overlays = list(O1, O2)
-
-/obj/machinery/cryo_cell/power_change()
- ..()
- if(stat & NOPOWER)
- icon_state = "celltop-p"
- O1.icon_state="cellconsole-p"
- O2.icon_state="cellbottom-p"
- else
- icon_state = "celltop[ occupant ? "_1" : ""]"
- O1.icon_state ="cellconsole"
- O2.icon_state ="cellbottom"
-
- add_overlays()
-
-/obj/machinery/cryo_cell/process()
-
- if(vnode)
- var/delta_gt = FLOWFRAC * ( vnode.get_gas_val(src) - gas.tot_gas() / capmult)
- calc_delta( src, gas, ngas, vnode, delta_gt)
- else
- leak_to_turf()
-
-
- if(stat & NOPOWER)
- return
- use_power(500)
-
-
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
-
-/obj/machinery/cryo_cell/proc/leak_to_turf()
-
- var/turf/T = get_step(src, WEST)
-
- if(T.density)
- T = src.loc
- if(T.density)
- return
-
- flow_to_turf(gas, ngas, T)
-
-
-/obj/machinery/cryo_cell/buildnodes()
-
- var/turf/T = src.loc
-
- line_in = get_machine(level, T, p_dir )
-
- if(line_in) vnode = line_in.getline()
-
- return
-
-
-/obj/machinery/cryo_cell/get_gas_val(from)
- return gas.tot_gas()
-
-/obj/machinery/cryo_cell/get_gas(from)
- return gas
-
-/obj/machinery/cryo_cell/gas_flow()
- gas.replace_by(ngas)
-
-/obj/machinery/cryo_cell/verb/move_eject()
- set src in oview(1)
-
- if (usr.stat != 0)
- return
- src.go_out()
- add_fingerprint(usr)
- return
-
-/obj/machinery/cryo_cell/verb/move_inside()
- set src in oview(1)
-
- if (usr.stat != 0 || stat & NOPOWER)
- return
- if (src.occupant)
- usr << "\blue The cell is already occupied!"
- return
- if (usr.abiotic())
- usr << "Subject may not have abiotic items on."
- return
- usr.pulling = null
- usr.client.perspective = EYE_PERSPECTIVE
- usr.client.eye = src
- usr.loc = src
- src.occupant = usr
- src.icon_state = "celltop_1"
- for(var/obj/O in src)
- O.loc = src.loc
- //Foreach goto(124)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/cryo_cell/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
-
- if (stat & NOPOWER) return
-
- if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) )))
- return
- if (src.occupant)
- user << "\blue The cell is already occupied!"
- return
- if (G.affecting.abiotic())
- user << "Subject may not have abiotic items on."
- return
- var/mob/M = G.affecting
- if (M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- M.loc = src
- src.occupant = M
- src.icon_state = "celltop_1"
- for(var/obj/O in src)
- //O = null
- del(O)
- //Foreach goto(154)
- src.add_fingerprint(user)
- //G = null
- del(G)
- return
-
-/obj/machinery/cryo_cell/attack_paw(mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/cryo_cell/attack_hand(mob/user as mob)
-
- if(stat & NOPOWER)
- return
-
- user.machine = src
- if (istype(user, /mob/human))
- var/dat = " System Statistics:
"
- if (src.gas.temperature > T0C)
- dat += text("\tTemperature (°C): [] (MUST be below 0, add coolant to mixture)
", round(src.gas.temperature-T0C, 0.1))
- else
- dat += text("\tTemperature (°C): []
", round(src.gas.temperature-T0C, 0.1))
- if (src.gas.plasma < 1)
- dat += text("\tPlasma Units: [] (Add plasma to mixture!)
", round(src.gas.plasma, 0.1))
- else
- dat += text("\tPlasma Units: []
", round(src.gas.plasma, 0.1))
- if (src.gas.oxygen < 1)
- dat += text("\tOxygen Units: [] (Add oxygen to mixture!)
", round(src.gas.oxygen, 0.1))
- else
- dat += text("\tOxygen Units: []
", round(src.gas.oxygen, 0.1))
- if (src.occupant)
- dat += "Occupant Statistics:
"
- var/t1
- switch(src.occupant.stat)
- if(0.0)
- t1 = "Conscious"
- if(1.0)
- t1 = "Unconscious"
- if(2.0)
- t1 = "*dead*"
- else
- dat += text("[]\tHealth %: [] ([])
", (src.occupant.health > 50 ? "" : ""), src.occupant.health, t1)
- dat += text("[]\t-Respiratory Damage %: []
", (src.occupant.oxyloss < 60 ? "" : ""), src.occupant.oxyloss)
- dat += text("[]\t-Toxin Content %: []
", (src.occupant.toxloss < 60 ? "" : ""), src.occupant.toxloss)
- dat += text("[]\t-Burn Severity %: []", (src.occupant.fireloss < 60 ? "" : ""), src.occupant.fireloss)
- dat += text("
Close", user)
- user << browse(dat, "window=cryo;size=400x500")
- else
- var/dat = text(" []
", stars("System Statistics:"))
- if (src.gas.temperature > T0C)
- dat += text("\t[]
", stars(text("Temperature (C): [] (MUST be below 0, add coolant to mixture)", round(src.gas.temperature-T0C, 0.1))))
- else
- dat += text("\t[]
", stars(text("Temperature(C): []", round(src.gas.temperature-T0C, 0.1))))
- if (src.gas.plasma < 1)
- dat += text("\t[]
", stars(text("Plasma Units: [] (Add plasma to mixture!)", round(src.gas.plasma, 0.1))))
- else
- dat += text("\t[]
", stars(text("Plasma Units: []", round(src.gas.plasma, 0.1))))
- if (src.gas.oxygen < 1)
- dat += text("\t[]
", stars(text("Oxygen Units: [] (Add oxygen to mixture!)", round(src.gas.oxygen, 0.1))))
- else
- dat += text("\t[]
", stars(text("Oxygen Units: []", round(src.gas.oxygen, 0.1))))
- if (src.occupant)
- dat += "Occupant Statistics:
"
- var/t1 = null
- switch(src.occupant.stat)
- if(0.0)
- t1 = "Conscious"
- if(1.0)
- t1 = "Unconscious"
- if(2.0)
- t1 = "*dead*"
- else
- dat += text("[]\t[]
", (src.occupant.health > 50 ? "" : ""), stars(text("Health %: [] ([])", src.occupant.health, t1)))
- dat += text("[]\t[]
", (src.occupant.oxyloss < 60 ? "" : ""), stars(text("-Respiratory Damage %: []", src.occupant.oxyloss)))
- dat += text("[]\t[]
", (src.occupant.toxloss < 60 ? "" : ""), stars(text("-Toxin Content %: []", src.occupant.toxloss)))
- dat += text("[]\t[]", (src.occupant.fireloss < 60 ? "" : ""), stars(text("-Burn Severity %: []", src.occupant.fireloss)))
- dat += text("
Close", user)
- user << browse(dat, "window=cryo;size=400x500")
- return
-
-/obj/machinery/cryo_cell/proc/go_out()
-
- if (!( src.occupant ))
- return
- for(var/obj/O in src)
- O.loc = src.loc
- //Foreach goto(26)
- if (src.occupant.client)
- src.occupant.client.eye = src.occupant.client.mob
- src.occupant.client.perspective = MOB_PERSPECTIVE
- src.occupant.loc = src.loc
- src.occupant = null
- src.icon_state = "celltop"
- return
-
-/obj/machinery/cryo_cell/relaymove(mob/user as mob)
-
- if (user.stat)
- return
- src.go_out()
- return
-
-/obj/machinery/cryo_cell/alter_health(mob/M as mob)
-
- if(stat & NOPOWER)
- return
-
- if (M.health < 0)
- if ((src.gas.temperature > T0C || src.gas.plasma < 1))
- return
- if (M.stat == 2)
- return
- if (src.gas.oxygen >= 1)
- src.ngas.oxygen--
- if (M.oxyloss >= 10)
- var/amount = max(0.15, 2)
- M.oxyloss -= amount
- else
- M.oxyloss = 0
- M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
- if ((src.gas.temperature < T0C && src.gas.plasma >= 1))
- src.ngas.plasma--
- if (M.toxloss > 5)
- var/amount = max(0.1, 2)
- M.toxloss -= amount
- else
- M.toxloss = 0
- M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
- if (istype(M, /mob/human))
- var/mob/human/H = M
- var/ok = 0
- for(var/organ in H.organs)
- var/obj/item/weapon/organ/external/affecting = H.organs[text("[]", organ)]
- ok += affecting.heal_damage(5, 5)
- //Foreach goto(267)
- if (ok)
- H.UpdateDamageIcon()
- else
- H.UpdateDamage()
- else
- if (M.fireloss > 15)
- var/amount = max(0.3, 2)
- M.fireloss -= amount
- else
- M.fireloss = 0
- if (M.bruteloss > 10)
- var/amount = max(0.3, 2)
- M.bruteloss -= amount
- else
- M.bruteloss = 0
- M.health = 100 - M.oxyloss - M.toxloss - M.fireloss - M.bruteloss
- M.paralysis += 5
- if (src.gas.temperature < (60+T0C))
- src.gas.temperature = min(src.gas.temperature + 1, 60+T0C)
- for(var/mob/E in viewers(1, src))
- if ((E.client && E.machine == src))
- src.attack_hand(E)
- //Foreach goto(489)
-
- return
- return
-
-
-/*
-/obj/machinery/cryo_cell/receive_gas(S as obj, source as obj)
-
- if (!( istype(S, /obj/substance/gas) ))
- //S = null
- del(S)
- return
- else
- src.gas.merge_into(S)
- //S = null
- //del(S) // ****************************************** removed
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(74)
- return
-*/
/obj/item/weapon/flasks/examine()
set src in oview(1)
diff --git a/main-src/Code/demo.dm b/main-src/Code/demo.dm
index 711ab98..a5a9286 100644
--- a/main-src/Code/demo.dm
+++ b/main-src/Code/demo.dm
@@ -210,12 +210,14 @@
T.oxygen += src.gas.oxygen * src.gas.temperature / 25.0
T.n2 += src.gas.n2 * src.gas.temperature / 25.0
T.sl_gas += src.gas.sl_gas * src.gas.temperature / 25.0
+ T.co2 += src.gas.co2 * src.gas.temperature / 25.0
T.res_vars()
src.gas.plasma = 0
src.gas.oxygen = 0
src.gas.n2 = 0
src.gas.sl_gas = 0
+ src.gas.co2 = 0
var/temp = src.gas.temperature
spawn(10)
diff --git a/main-src/Code/demo2.dm b/main-src/Code/demo2.dm
deleted file mode 100644
index fbdd560..0000000
--- a/main-src/Code/demo2.dm
+++ /dev/null
@@ -1,109 +0,0 @@
-
-/obj/machinery/computer/atmosphere/proc/returnarea()
-
- return
-
-/obj/machinery/computer/atmosphere/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- stat |= BROKEN
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- stat |= BROKEN
- else
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/New()
- ..()
-
- spawn(5)
- src.area = src.loc.loc
-
- if(otherarea)
- src.area = locate(text2path("/area/[otherarea]"))
-
-/obj/machinery/computer/atmosphere/siphonswitch/returnarea()
-
- return area.contents
-
-
-/obj/machinery/computer/atmosphere/siphonswitch/verb/siphon_all()
- set src in oview(1)
- if(stat & NOPOWER) return
- if (usr.stat)
- return
- usr << "Starting all siphon systems."
- for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
- S.reset(1, 0)
- //Foreach goto(39)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/verb/stop_all()
- set src in oview(1)
- if(stat & NOPOWER) return
- if (usr.stat)
- return
- usr << "Stopping all siphon systems."
- for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
- S.reset(0, 0)
- //Foreach goto(39)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/verb/auto_on()
- set src in oview(1)
- if(stat & NOPOWER) return
- if (usr.stat)
- return
- usr << "Starting automatic air control systems."
- for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
- S.reset(0, 1)
- //Foreach goto(39)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/verb/release_scrubbers()
- set src in oview(1)
-
- if(stat & NOPOWER) return
- if (usr.stat)
- return
- usr << "Releasing all scrubber toxins."
- for(var/obj/machinery/atmoalter/siphs/scrubbers/S in src.returnarea())
- S.reset(-1.0, 0)
- //Foreach goto(39)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/verb/release_all()
-
- if(stat & NOPOWER) return
- if (usr.stat)
- return
- usr << "Releasing all stored air."
- for(var/obj/machinery/atmoalter/siphs/S in src.returnarea())
- S.reset(-1.0, 0)
- //Foreach goto(37)
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/atmosphere/siphonswitch/mastersiphonswitch/returnarea()
-
- return world
- return
-
diff --git a/main-src/Code/engine.dm b/main-src/Code/engine.dm
index 4a82927..22926c7 100644
--- a/main-src/Code/engine.dm
+++ b/main-src/Code/engine.dm
@@ -1,133 +1,5 @@
#define ENGINE_EJECT_Z 6
-/obj/machinery/computer/engine/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/computer/engine/New()
-
- if (!( engine_eject_control ))
- engine_eject_control = new /datum/engine_eject( )
- ..()
-
- spawn(5)
- for(var/obj/machinery/gas_sensor/G in machines)
- if(G.id == src.id)
- gs = G
- break
- return
-
-/obj/machinery/computer/engine/attackby(var/obj/O, mob/user)
- return src.attack_hand(user)
-
-/obj/machinery/computer/engine/attack_paw(var/mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/computer/engine/attack_hand(var/mob/user as mob)
-
- if(stat & (NOPOWER|BROKEN) )
- return
-
- user.machine = src
- var/dat
- if (src.temp)
- dat = "[src.temp]
Clear Screen"
- else
- if (engine_eject_control.status == 0)
-
- dat = "Engine Gas Monitor
"
- if(gs)
- dat += "[gs.sense_string()]"
-
- else
- dat += "No sensor found."
-
-
- dat += "
Engine Ejection Module
\nStatus: Docked
\n
\nCountdown: [engine_eject_control.timeleft]/60 \[Reset\]
\n
\nEject Engine
\n
\nClose"
- else
- if (engine_eject_control.status == 1)
- dat = text("Engine Ejection Module
\nStatus: Ejecting
\n
\nCountdown: []/60 \[Reset\]
\n
\nStop Ejection
\n
\nClose", engine_eject_control.timeleft, src, user)
- else
- dat = text("Engine Ejection Module
\nStatus: Ejected
\n
\nCountdown: N/60 \[Reset\]
\n
\nEngine Ejected!
\n
\nClose", user)
- user << browse(dat, "window=computer;size=400x500")
- return
-
-/obj/machinery/computer/engine/process()
-
- if(stat & (NOPOWER|BROKEN) )
- return
- use_power(250)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(18)
- return
-
-/obj/machinery/computer/engine/Topic(href, href_list)
- ..()
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.stat || usr.restrained()))
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
-
- if (href_list["eject"])
- if (engine_eject_control.status == 0)
- src.temp = "Eject Engine?
\[Swipe ID to initiate eject sequence\]
Cancel"
-
- else if (href_list["eject2"])
- var/obj/item/weapon/card/id/I = usr.equipped()
- if (istype(I))
- if(I.check_access(access,allowed))
- if (engine_eject_control.status == 0)
- engine_eject_control.ejectstart()
- src.temp = null
- else
- usr << "\red Access Denied."
- else if (href_list["stop"])
- if (engine_eject_control.status > 0)
- src.temp = text("Stop Ejection?
Yes
No", src, src)
-
- else if (href_list["stop2"])
- if (engine_eject_control.status > 0)
- engine_eject_control.stopcount()
- src.temp = null
-
- else if (href_list["reset"])
- if (engine_eject_control.status == 0)
- engine_eject_control.resetcount()
-
- else if (href_list["temp"])
- src.temp = null
-
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(351)
- return
diff --git a/main-src/Code/globals.dm b/main-src/Code/globals.dm
index 40ee5a8..d16c77f 100644
--- a/main-src/Code/globals.dm
+++ b/main-src/Code/globals.dm
@@ -6,6 +6,10 @@
Added remote APC control the power_monitor
Fixed a bug where APCs would continue to draw power for cell charging even when the breaker was off.
+ Added CO2 to gasbomb proc (plasmatank/proc/release())
+
+ Moved computer objects ex_act() to base type (since all are identical)
+
(Since H9.5)
diff --git a/main-src/Code/instructions.dm b/main-src/Code/instructions.dm
index 5e763fd..5230642 100644
--- a/main-src/Code/instructions.dm
+++ b/main-src/Code/instructions.dm
@@ -1,99 +1,4 @@
-/obj/machinery/computer/hologram_comp/New()
-
- ..()
- spawn( 10 )
- src.projector = locate(/obj/machinery/hologram_proj, get_step(src.loc, NORTH))
- return
- return
-
-/obj/machinery/computer/hologram_comp/DblClick()
-
- if (get_dist(src, usr) > 1)
- return 0
- src.show_console(usr)
- return
-
-/obj/machinery/computer/hologram_comp/proc/render()
-
- var/icon/I = new /icon( 'human.dmi', "male" )
- if (src.lumens >= 0)
- I.Blend(rgb(src.lumens, src.lumens, src.lumens), 0)
- else
- I.Blend(rgb(- src.lumens, -src.lumens, -src.lumens), 1)
- I.Blend(new /icon( 'human.dmi', "mouth" ), 3)
- var/icon/U = new /icon( 'human.dmi', "diaper" )
- U.Blend(U, 3)
- U = new /icon( 'mob.dmi', "hair_a" )
- U.Blend(rgb(src.h_r, src.h_g, src.h_b), 0)
- I.Blend(U, 3)
- src.projector.projection.icon = I
- return
-
-/obj/machinery/computer/hologram_comp/proc/show_console(var/mob/user as mob)
-
- var/dat
- user.machine = src
- if (src.temp)
- dat = text("[]
Clear", src.temp, src)
- else
- dat = text("Hologram Status:
\nPower: []
\nHologram Control:
\nColor Luminosity: []/220 \[Reset\]
\nLighten: 1 10
\nDarken: 1 10
\n
\nHair Color: ([],[],[]) \[Reset\]
\nRed (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\nGreen (0-255): \[0\] -10 -1 [] 1 10 \[255\]
\nBlue (0-255): \[0\] -10 -1 [] 1 10 \[255\]
", src, (src.projector.projection ? "On" : "Off"), -src.lumens + 35, src, src, src, src, src, src.h_r, src.h_g, src.h_b, src, src, src, src, src.h_r, src, src, src, src, src, src, src.h_g, src, src, src, src, src, src, src.h_b, src, src, src)
- user << browse(dat, "window=hologram_console")
- return
-
-/obj/machinery/computer/hologram_comp/Topic(href, href_list)
- ..()
- if (get_dist(src, usr) <= 1)
- flick("holo_console1", src)
- if (href_list["power"])
- if (src.projector.projection)
- src.projector.icon_state = "hologram0"
- //src.projector.projection = null
- del(src.projector.projection)
- else
- src.projector.projection = new /obj/projection( src.projector.loc )
- src.projector.projection.icon = 'human.dmi'
- src.projector.projection.icon_state = "male"
- src.projector.icon_state = "hologram1"
- src.render()
- else
- if (href_list["h_r"])
- if (src.projector.projection)
- src.h_r += text2num(href_list["h_r"])
- src.h_r = min(max(src.h_r, 0), 255)
- render()
- else
- if (href_list["h_g"])
- if (src.projector.projection)
- src.h_g += text2num(href_list["h_g"])
- src.h_g = min(max(src.h_g, 0), 255)
- render()
- else
- if (href_list["h_b"])
- if (src.projector.projection)
- src.h_b += text2num(href_list["h_b"])
- src.h_b = min(max(src.h_b, 0), 255)
- render()
- else
- if (href_list["light"])
- if (src.projector.projection)
- src.lumens += text2num(href_list["light"])
- src.lumens = min(max(src.lumens, -185.0), 35)
- render()
- else
- if (href_list["reset"])
- if (src.projector.projection)
- src.lumens = 0
- render()
- else
- if (href_list["temp"])
- src.temp = null
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.show_console(M)
- //Foreach goto(446)
- return
-
/obj/begin/verb/ready()
set src in usr.loc
diff --git a/main-src/Code/shuttle.dm b/main-src/Code/shuttle.dm
index fff10b2..be88e8d 100644
--- a/main-src/Code/shuttle.dm
+++ b/main-src/Code/shuttle.dm
@@ -1,205 +1,4 @@
-/obj/machinery/computer/prison_shuttle/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/computer/prison_shuttle/verb/take_off()
- set src in oview(1)
-
- if ((usr.stat || usr.restrained()))
- return
- src.add_fingerprint(usr)
- if (prison_entered)
- var/A = locate(/area/shuttle)
- for(var/turf/T in A)
- if (T.z == 1)
- for(var/atom/movable/AM as mob|obj in T)
- AM.z = 8
- //Foreach goto(96)
- var/turf/U = locate(T.x, T.y, 8)
- U.oxygen = T.oxygen
- U.oldoxy = T.oldoxy
- U.tmpoxy = T.tmpoxy
- U.poison = T.poison
- U.oldpoison = T.oldpoison
- U.tmppoison = T.tmppoison
- U.co2 = T.co2
- U.oldco2 = T.oldco2
- U.tmpco2 = T.tmpco2
- //T = null
- del(T)
- //Foreach goto(62)
- prison_entered = null
- else
- if (!( prison_entered ))
- if (ticker.shuttle_location != 1)
- var/A = locate(/area/shuttle_prison)
- for(var/turf/T in A)
- if (T.z == 8)
- for(var/atom/movable/AM as mob|obj in T)
- AM.z = 1
- //Foreach goto(346)
- var/turf/U = locate(T.x, T.y, 1)
- U.oxygen = T.oxygen
- U.oldoxy = T.oldoxy
- U.tmpoxy = T.tmpoxy
- U.poison = T.poison
- U.oldpoison = T.oldpoison
- U.tmppoison = T.tmppoison
- U.co2 = T.co2
- U.oldco2 = T.oldco2
- U.tmpco2 = T.tmpco2
- //T = null
- del(T)
- //Foreach goto(312)
- prison_entered = 1
- else
- usr << "\blue There is an obstructing shuttle!"
- return
- return
-
-/obj/machinery/computer/prison_shuttle/verb/restabalize()
- set src in oview(1)
-
- viewers(null, null) << "\red Restabalizing prison shuttle atmosphere!"
- var/A = locate(/area/shuttle_prison)
- for(var/obj/move/T in A)
- T.firelevel = 0
- T.oxygen = O2STANDARD
- T.oldoxy = O2STANDARD
- T.tmpoxy = O2STANDARD
- T.poison = 0
- T.oldpoison = 0
- T.tmppoison = 0
- T.co2 = 0
- T.oldco2 = 0
- T.tmpco2 = 0
- T.sl_gas = 0
- T.osl_gas = 0
- T.tsl_gas = 0
- T.n2 = N2STANDARD
- T.on2 = N2STANDARD
- T.tn2 = N2STANDARD
- T.temp = T20C
- T.otemp = T20C
- T.ttemp = T20C
- //Foreach goto(40)
- viewers(null, null) << "\red Prison shuttle Restabalized!"
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/shuttle/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/computer/shuttle/verb/restabalize()
- set src in oview(1)
-
- world << "\red Restabalizing shuttle atmosphere!"
- var/A = locate(/area/shuttle)
- for(var/obj/move/T in A)
- T.firelevel = 0
- T.oxygen = O2STANDARD
- T.oldoxy = O2STANDARD
- T.tmpoxy = O2STANDARD
- T.poison = 0
- T.oldpoison = 0
- T.tmppoison = 0
- T.co2 = 0
- T.oldco2 = 0
- T.tmpco2 = 0
- T.sl_gas = 0
- T.osl_gas = 0
- T.tsl_gas = 0
- T.n2 = N2STANDARD
- T.on2 = N2STANDARD
- T.tn2 = N2STANDARD
- T.temp = T20C
- T.otemp = T20C
- T.ttemp = T20C
- //Foreach goto(35)
- world << "\red Shuttle Restabalized!"
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/shuttle/verb/hijack()
- set src in oview(1)
-
- if ((!( ticker ) || ticker.shuttle_location != shuttle_z))
- return
- if (usr != ticker.killer)
- return
- world << "\blue Alert: The shuttle is has been hijacked prematurely by the traitor!"
- ticker.timing = 0
- ticker.check_win()
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/shuttle/attackby(var/obj/item/weapon/card/id/W as obj, var/mob/user as mob)
-
- if ((!( istype(W, /obj/item/weapon/card/id) ) || !( ticker ) || ticker.shuttle_location == shuttle_z || !( user )))
- return
- if (!W.check_access(access, allowed))
- user << text("The access level ([]) of [] card is not high enough. ", W.access_level, W.registered)
- return
- 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")
- switch(choice)
- if("Authorize")
- src.authorized -= W.registered
- src.authorized += W.registered
- if (src.auth_need - src.authorized.len > 0)
- world << text("\blue Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
- else
- world << "\blue Alert: Shuttle launch time shortened to 10 seconds!"
- ticker.timeleft = 100
- //src.authorized = null
- del(src.authorized)
- src.authorized = list( )
- if("Repeal")
- src.authorized -= W.registered
- 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
- return
/obj/shut_controller/proc/rotate(direct)
diff --git a/main-src/Code/weap_sat.dm b/main-src/Code/weap_sat.dm
index 943a756..de6e035 100644
--- a/main-src/Code/weap_sat.dm
+++ b/main-src/Code/weap_sat.dm
@@ -91,101 +91,6 @@
return T
return
-/obj/machinery/computer/data/ex_act(severity)
-
- switch(severity)
- if(1.0)
- //SN src = null
- del(src)
- return
- if(2.0)
- if (prob(50))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(58)
- src.icon_state = "broken"
- if(3.0)
- if (prob(25))
- for(var/x in src.verbs)
- src.verbs -= x
- //Foreach goto(109)
- src.icon_state = "broken"
- else
- return
-
-/obj/machinery/computer/data/weapon/log/New()
-
- ..()
- src.topics["Super-heater"] = "This turns a can of semi-liquid plasma into a super-heated ball of plasma."
- src.topics["Amplifier"] = "This increases the intensity of a laser."
- src.topics["Class 11 Laser"] = "This creates a very slow laser that is capable of penetrating most objects."
- src.topics["Plasma Energizer"] = "This combines super-heated plasma with a laser beam."
- src.topics["Generator"] = "This controls the entire power grid."
- src.topics["Mirror"] = "this can reflect LOW power lasers. HIGH power goes through it!"
- src.topics["Targetting Prism"] = "This focuses a laser coming from any direction forward."
- return
-
-/obj/machinery/computer/data/weapon/log/display()
- set src in oview(1)
-
- usr << "Research Log:"
- ..()
- return
-
-/obj/machinery/computer/data/weapon/info/New()
-
- ..()
- src.topics["LOG(001)"] = "System: Deployment successful"
- src.topics["LOG(002)"] = "System: Safe orbit at inclination .003 established"
- src.topics["LOG(003)"] = "CenCom: Attempting test fire...ALERT(001)"
- src.topics["ALERT(001)"] = "System: Cannot attempt test fire"
- src.topics["LOG(004)"] = "System: Airlock accessed..."
- src.topics["LOG(005)"] = "System: System successfully reset...Generator engaged"
- src.topics["LOG(006)"] = "Physical: Super-heater (W005) added to power grid"
- src.topics["LOG(007)"] = "Physical: Amplifier (W007) added to power grid"
- src.topics["LOG(008)"] = "Physical: Plasma Energizer (W006) added to power grid"
- src.topics["LOG(009)"] = "Physical: Laser (W004) added to power grid"
- src.topics["LOG(010)"] = "Physical: Laser test firing"
- src.topics["LOG(011)"] = "Physical: Plasma added to Super-heater"
- src.topics["LOG(012)"] = "Physical: Orient N12.525,E22.124"
- src.topics["LOG(013)"] = "System: Location N12.525,E22.124"
- src.topics["LOG(014)"] = "Physical: Test fire...successful"
- src.topics["LOG(015)"] = "Physical: Airlock accessed..."
- src.topics["LOG(016)"] = "******: Disable locater systems"
- src.topics["LOG(017)"] = "System: Locater Beacon-Disengaged,CenCom link-Cut...ALERT(002)"
- src.topics["ALERT(002)"] = "System: Cannot seem to establish contact with Central Command"
- src.topics["LOG(018)"] = "******: Shutting down all systems...ALERT(003)"
- src.topics["ALERT(003)"] = "System: Power grid failure-Activating back-up power...ALERT(004)"
- src.topics["ALERT(004)"] = "System: Engine failure...All systems deactivated."
- return
-
-/obj/machinery/computer/data/weapon/info/display()
- set src in oview(1)
-
- usr << "Research Information:"
- ..()
- return
-
-/obj/machinery/computer/data/verb/display()
- set src in oview(1)
-
- for(var/x in src.topics)
- usr << text("[], \...", x)
- //Foreach goto(19)
- usr << ""
- src.add_fingerprint(usr)
- return
-
-/obj/machinery/computer/data/verb/read(topic as text)
- set src in oview(1)
-
- if (src.topics[text("[]", topic)])
- usr << text("[]\n\t []", topic, src.topics[text("[]", topic)])
- else
- usr << text("Unable to find- []", topic)
- src.add_fingerprint(usr)
- return
-
/obj/machinery/teleport/hub/Bumped(M as mob|obj)
spawn( 0 )
diff --git a/main-src/Code/weapons.dm b/main-src/Code/weapons.dm
index c564c71..1a5c9ea 100644
--- a/main-src/Code/weapons.dm
+++ b/main-src/Code/weapons.dm
@@ -1,180 +1,4 @@
-/obj/machinery/nuclearbomb/New()
-
- if (nuke_code)
- src.r_code = text("[]", nuke_code)
- ..()
- return
-
-/obj/machinery/nuclearbomb/process()
-
- if (src.timing)
- src.timeleft--
- if (src.timeleft <= 0)
- explode()
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(46)
- return
-
-/obj/machinery/nuclearbomb/attack_paw(mob/user as mob)
-
- return src.attack_hand(user)
- return
-
-/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
-
- if (src.extended)
- user.machine = src
- var/dat = text("Nuclear Fission Explosive
\nAuth. Disk: []
", src, (src.auth ? "++++++++++" : "----------"))
- if (src.auth)
- if (src.yes_code)
- dat += text("\nStatus: []-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.timing ? "Func/Set" : "Functional"), (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src, src, src, src.timeleft, src, src, (src.safety ? "On" : "Off"), src, (src.anchored ? "Engaged" : "Off"), src)
- else
- dat += text("\nStatus: Auth. S2-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\n[] Safety: Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
- else
- if (src.timing)
- dat += text("\nStatus: Set-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
- else
- dat += text("\nStatus: Auth. S1-[]
\nTimer: []
\n
\nTimer: [] Toggle
\nTime: - - [] + +
\n
\nSafety: [] Toggle
\nAnchor: [] Toggle
\n", (src.safety ? "Safe" : "Engaged"), src.timeleft, (src.timing ? "On" : "Off"), src.timeleft, (src.safety ? "On" : "Off"), (src.anchored ? "Engaged" : "Off"))
- var/message = "AUTH"
- if (src.auth)
- message = text("[]", src.code)
- if (src.yes_code)
- message = "*****"
- dat += text("
\n>[]
\n1-2-3
\n4-5-6
\n7-8-9
\nR-0-E
\n", message, src, src, src, src, src, src, src, src, src, src, src, src)
- user << browse(dat, "window=nuclearbomb;size=300x400")
- else
- src.anchored = 1
- flick("nuclearbombc", src)
- src.icon_state = "nuclearbomb1"
- src.extended = 1
- return
-
-/obj/machinery/nuclearbomb/Topic(href, href_list)
- ..()
- if (usr.stat || usr.restrained())
- return
- if ((!( istype(usr, /mob/human) ) && (!( ticker ) || (ticker && ticker.mode != "monkey"))))
- usr << "\red You don't have the dexterity to do this!"
- return
- if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 && istype(src.loc, /turf))))
- usr.machine = src
- if (href_list["auth"])
- if (src.auth)
- src.auth.loc = src.loc
- src.yes_code = 0
- src.auth = null
- else
- var/obj/item/I = usr.equipped()
- if (istype(I, /obj/item/weapon/disk/nuclear))
- usr.drop_item()
- I.loc = src
- src.auth = I
- if (src.auth)
- if (href_list["type"])
- if (href_list["type"] == "E")
- if (src.code == src.r_code)
- src.yes_code = 1
- src.code = null
- else
- src.code = "ERROR"
- else
- if (href_list["type"] == "R")
- src.yes_code = 0
- src.code = null
- else
- src.code += text("[]", href_list["type"])
- if (length(src.code) > 5)
- src.code = "ERROR"
- if (src.yes_code)
- if (href_list["time"])
- var/time = text2num(href_list["time"])
- src.timeleft += time
- src.timeleft = min(max(round(src.timeleft), 5), 600)
- if (href_list["timer"])
- if (src.timing == -1.0)
- return
- src.timing = !( src.timing )
- if (src.timing)
- src.icon_state = "nuclearbomb2"
- else
- src.icon_state = "nuclearbomb1"
- if (href_list["safety"])
- src.safety = !( src.safety )
- if (href_list["anchor"])
- src.anchored = !( src.anchored )
- src.add_fingerprint(usr)
- for(var/mob/M in viewers(1, src))
- if ((M.client && M.machine == src))
- src.attack_hand(M)
- //Foreach goto(511)
- else
- usr << browse(null, "window=nuclearbomb")
- return
- return
-
-/obj/machinery/nuclearbomb/ex_act()
-
- if (src.timing == -1.0)
- return
- else
- return ..()
- return
-
-
-/obj/machinery/nuclearbomb/blob_act()
-
- if (src.timing == -1.0)
- return
- else
- return ..()
- return
-
-/obj/machinery/nuclearbomb/proc/explode()
-
- if (src.safety)
- src.timing = 0
- return
- src.timing = -1.0
- src.yes_code = 0
- src.icon_state = "nuclearbomb3"
- sleep(20)
- var/turf/T = src.loc
- while(!( istype(T, /turf) ))
- T = T.loc
- var/min = 50
- var/med = 250
- var/max = 500
- var/sw = locate(1, 1, T.z)
- var/ne = locate(world.maxx, world.maxy, T.z)
-
- defer_powernet_rebuild = 1
-
- for(var/turf/U in block(sw, ne))
- var/zone = 4
- if ((U.y <= T.y + max && U.y >= T.y - max && U.x <= T.x + max && U.x >= T.x - max))
- zone = 3
- if ((U.y <= T.y + med && U.y >= T.y - med && U.x <= T.x + med && U.x >= T.x - med))
- zone = 2
- if ((U.y <= T.y + min && U.y >= T.y - min && U.x <= T.x + min && U.x >= T.x - min))
- zone = 1
- for(var/atom/A in U)
- A.ex_act(zone)
- //Foreach goto(404)
- U.ex_act(zone)
- U.buildlinks()
- //Foreach goto(148)
-
-
- defer_powernet_rebuild = 0
- makepowernets()
- ticker.nuclear(src.z)
- //SN src = null
- del(src)
- return
- return
/obj/item/weapon/infra_sensor/New()
diff --git a/main-src/Icons/Icons.dmi b/main-src/Icons/Icons.dmi
index 3ea19fb..5f65e72 100644
Binary files a/main-src/Icons/Icons.dmi and b/main-src/Icons/Icons.dmi differ
diff --git a/main-src/spacestation13.dme b/main-src/spacestation13.dme
index c64e112..367035d 100644
--- a/main-src/spacestation13.dme
+++ b/main-src/spacestation13.dme
@@ -5,7 +5,7 @@
// BEGIN_INTERNALS
/*
FILE: Code\!atoms.dm
-DIR: Code Code\Machinery Code\Machinery\Atmoalter Code\Machinery\Door Code\Machinery\Power
+DIR: Code Code\Machinery Code\Machinery\Atmoalter Code\Machinery\Computer Code\Machinery\Door Code\Machinery\Power
MAP_ICON_TYPE: 0
AUTO_FILE_DIR: ON
*/
@@ -15,6 +15,7 @@ AUTO_FILE_DIR: ON
#define FILE_DIR "Code"
#define FILE_DIR "Code/Machinery"
#define FILE_DIR "Code/Machinery/Atmoalter"
+#define FILE_DIR "Code/Machinery/Computer"
#define FILE_DIR "Code/Machinery/Door"
#define FILE_DIR "Code/Machinery/Power"
#define FILE_DIR "Icons"
@@ -31,7 +32,6 @@ AUTO_FILE_DIR: ON
#include "Code\aaaDefines.dm"
#include "Code\airtunnel.dm"
#include "Code\areas.dm"
-#include "Code\atmo_control.dm"
#include "Code\blob.dm"
#include "Code\cell_process.dm"
#include "Code\cellautomata.dm"
@@ -41,7 +41,6 @@ AUTO_FILE_DIR: ON
#include "Code\cryo.dm"
#include "Code\datumvars.dm"
#include "Code\demo.dm"
-#include "Code\demo2.dm"
#include "Code\dna.dm"
#include "Code\engine.dm"
#include "Code\globals.dm"
@@ -73,9 +72,11 @@ AUTO_FILE_DIR: ON
#include "Code\Machinery\cell_charger.dm"
#include "Code\Machinery\circulator.dm"
#include "Code\Machinery\connector.dm"
+#include "Code\Machinery\cryocell.dm"
#include "Code\Machinery\dispenser.dm"
#include "Code\Machinery\door_control.dm"
#include "Code\Machinery\firealarm.dm"
+#include "Code\Machinery\freezer.dm"
#include "Code\Machinery\gas_sensor.dm"
#include "Code\Machinery\igniter.dm"
#include "Code\Machinery\injector.dm"
@@ -84,16 +85,35 @@ AUTO_FILE_DIR: ON
#include "Code\Machinery\light_switch.dm"
#include "Code\Machinery\manifold.dm"
#include "Code\Machinery\meter.dm"
+#include "Code\Machinery\nuclearbomb.dm"
#include "Code\Machinery\pipeline.dm"
#include "Code\Machinery\pipes.dm"
+#include "Code\Machinery\pod.dm"
#include "Code\Machinery\recharger.dm"
+#include "Code\Machinery\recon.dm"
#include "Code\Machinery\sec_lock.dm"
+#include "Code\Machinery\shuttle.dm"
+#include "Code\Machinery\sleeper.dm"
#include "Code\Machinery\valve.dm"
#include "Code\Machinery\vent.dm"
#include "Code\Machinery\Atmoalter\_atmoalter.dm"
#include "Code\Machinery\Atmoalter\canister.dm"
#include "Code\Machinery\Atmoalter\heater.dm"
#include "Code\Machinery\Atmoalter\siphs.dm"
+#include "Code\Machinery\Computer\_computer.dm"
+#include "Code\Machinery\Computer\airtunnel.dm"
+#include "Code\Machinery\Computer\atmosphere.dm"
+#include "Code\Machinery\Computer\card.dm"
+#include "Code\Machinery\Computer\communications.dm"
+#include "Code\Machinery\Computer\data.dm"
+#include "Code\Machinery\Computer\engine.dm"
+#include "Code\Machinery\Computer\hologram.dm"
+#include "Code\Machinery\Computer\med_data.dm"
+#include "Code\Machinery\Computer\pod.dm"
+#include "Code\Machinery\Computer\prision_shuttle.dm"
+#include "Code\Machinery\Computer\secure_data.dm"
+#include "Code\Machinery\Computer\shuttle.dm"
+#include "Code\Machinery\Computer\sleeper.dm"
#include "Code\Machinery\Door\_door.dm"
#include "Code\Machinery\Door\airlock.dm"
#include "Code\Machinery\Door\false_wall.dm"