mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
@@ -9,13 +9,23 @@
|
||||
icon_state = "body_scanner_0"
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/body_scanner
|
||||
|
||||
use_power = 1
|
||||
idle_power_usage = 60
|
||||
active_power_usage = 10000 //10 kW. It's a big all-body scanner.
|
||||
|
||||
light_color = "#00FF00"
|
||||
|
||||
/obj/machinery/bodyscanner/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
var/obj/machinery/body_scanconsole/C = locate(/obj/machinery/body_scanconsole) in range(2,src)
|
||||
if(C)
|
||||
C.connected = src
|
||||
|
||||
/obj/machinery/bodyscanner/map/New()
|
||||
..()
|
||||
circuit = new circuit(src)
|
||||
component_parts = list()
|
||||
@@ -23,81 +33,14 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/stack/material/glass/reinforced(src, 2)
|
||||
|
||||
spawn( 5 )
|
||||
var/obj/machinery/body_scanconsole/C = locate(/obj/machinery/body_scanconsole) in range(2,src)
|
||||
if(C)
|
||||
C.connected = src
|
||||
return
|
||||
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/bodyscanner/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
src.go_out()
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/verb/eject()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Eject Body Scanner"
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/verb/move_inside()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Enter Body Scanner"
|
||||
|
||||
if (usr.stat != 0)
|
||||
return
|
||||
if (src.occupant)
|
||||
usr << "<span class='warning'>The scanner is already occupied!</span>"
|
||||
return
|
||||
if (usr.abiotic())
|
||||
usr << "<span class='warning'>The subject cannot have abiotic items on.</span>"
|
||||
return
|
||||
usr.pulling = null
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
usr.loc = src
|
||||
src.occupant = usr
|
||||
update_use_power(2)
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
//O = null
|
||||
if(O in component_parts)
|
||||
continue
|
||||
if(O == circuit)
|
||||
continue
|
||||
qdel(O)
|
||||
//Foreach goto(124)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/proc/go_out()
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
return
|
||||
for(var/obj/O in src)
|
||||
if(O in component_parts)
|
||||
continue
|
||||
if(O == circuit)
|
||||
continue
|
||||
O.loc = src.loc
|
||||
//Foreach goto(30)
|
||||
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
|
||||
update_use_power(1)
|
||||
src.icon_state = "body_scanner_0"
|
||||
return
|
||||
/obj/machinery/bodyscanner/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
set_light(2)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/bodyscanner/attackby(var/obj/item/G, user as mob)
|
||||
if(default_deconstruction_screwdriver(user, G))
|
||||
@@ -107,42 +50,96 @@
|
||||
|
||||
if(istype(G, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/H = G
|
||||
if(!(ismob(H.affecting)))
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
if (src.occupant)
|
||||
user << "<span class='warning'>The scanner is already occupied!</span>"
|
||||
if(!ismob(H.affecting))
|
||||
return
|
||||
if (H.affecting.abiotic())
|
||||
user << "<span class='warning'>Subject cannot have abiotic items on.</span>"
|
||||
if(occupant)
|
||||
user << "<span class='notice'>The scanner is already occupied!</span>"
|
||||
return
|
||||
for(var/mob/living/carbon/slime/M in range(1, H.affecting))
|
||||
if(M.Victim == H.affecting)
|
||||
user << "<span class='danger'>[H.affecting.name] has a fucking slime attached to them, deal with that first.</span>"
|
||||
return
|
||||
var/mob/M = H.affecting
|
||||
if (M.client)
|
||||
M.client.perspective = EYE_PERSPECTIVE
|
||||
M.client.eye = src
|
||||
M.loc = src
|
||||
src.occupant = M
|
||||
update_use_power(2)
|
||||
src.icon_state = "body_scanner_1"
|
||||
for(var/obj/O in src)
|
||||
if(O in component_parts)
|
||||
continue
|
||||
if(O == circuit)
|
||||
continue
|
||||
O.loc = src.loc
|
||||
//Foreach goto(154)
|
||||
src.add_fingerprint(user)
|
||||
//G = null
|
||||
if(M.abiotic())
|
||||
user << "<span class='notice'>Subject cannot have abiotic items on.</span>"
|
||||
return
|
||||
M.forceMove(src)
|
||||
occupant = M
|
||||
icon_state = "body_scanner_1"
|
||||
add_fingerprint(user)
|
||||
qdel(G)
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop_T(mob/living/carbon/O, mob/user as mob)
|
||||
if(!istype(O))
|
||||
return 0 //not a mob
|
||||
if(user.incapacitated())
|
||||
return 0 //user shouldn't be doing things
|
||||
if(O.anchored)
|
||||
return 0 //mob is anchored???
|
||||
if(get_dist(user, src) > 1 || get_dist(user, O) > 1)
|
||||
return 0 //doesn't use adjacent() to allow for non-cardinal (fuck my life)
|
||||
if(!ishuman(user) && !isrobot(user))
|
||||
return 0 //not a borg or human
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return 0 //panel open
|
||||
if(occupant)
|
||||
user << "<span class='notice'>\The [src] is already occupied.</span>"
|
||||
return 0 //occupied
|
||||
|
||||
if(O.buckled)
|
||||
return 0
|
||||
if(O.abiotic())
|
||||
user << "<span class='notice'>Subject cannot have abiotic items on.</span>"
|
||||
return 0
|
||||
for(var/mob/living/carbon/slime/M in range(1, O))
|
||||
if(M.Victim == O)
|
||||
user << "<span class='danger'>[O] has a fucking slime attached to them, deal with that first.</span>"
|
||||
return 0
|
||||
|
||||
if(O == user)
|
||||
visible_message("[user] climbs into \the [src].")
|
||||
else
|
||||
visible_message("[user] puts [O] into the body scanner.")
|
||||
|
||||
O.forceMove(src)
|
||||
occupant = O
|
||||
icon_state = "body_scanner_1"
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/machinery/bodyscanner/relaymove(mob/user as mob)
|
||||
if(user.incapacitated())
|
||||
return 0 //maybe they should be able to get out with cuffs, but whatever
|
||||
go_out()
|
||||
|
||||
/obj/machinery/bodyscanner/verb/eject()
|
||||
set src in oview(1)
|
||||
set category = "Object"
|
||||
set name = "Eject Body Scanner"
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
go_out()
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/bodyscanner/proc/go_out()
|
||||
if ((!( src.occupant ) || src.locked))
|
||||
return
|
||||
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 = "body_scanner_0"
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
if(A in component_parts)
|
||||
continue
|
||||
if(A == circuit)
|
||||
continue
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(35)
|
||||
@@ -152,10 +149,6 @@
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
if(A in component_parts)
|
||||
continue
|
||||
if(A == circuit)
|
||||
continue
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(108)
|
||||
@@ -165,10 +158,6 @@
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
if(A in component_parts)
|
||||
continue
|
||||
if(A == circuit)
|
||||
continue
|
||||
A.loc = src.loc
|
||||
ex_act(severity)
|
||||
//Foreach goto(181)
|
||||
@@ -178,32 +167,7 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/machinery/body_scanconsole/power_change()
|
||||
..()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "body_scannerconsole-p"
|
||||
else
|
||||
if (stat & NOPOWER)
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "body_scannerconsole-p"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
//Body Scan Console
|
||||
/obj/machinery/body_scanconsole
|
||||
var/obj/machinery/bodyscanner/connected
|
||||
var/known_implants = list(/obj/item/weapon/implant/chem, /obj/item/weapon/implant/death_alarm, /obj/item/weapon/implant/loyalty, /obj/item/weapon/implant/tracking)
|
||||
@@ -216,67 +180,12 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
circuit = /obj/item/weapon/circuitboard/scanner_console
|
||||
var/printing = null
|
||||
var/printing_text = null
|
||||
|
||||
/obj/machinery/body_scanconsole/New()
|
||||
..()
|
||||
spawn( 5 )
|
||||
src.connected = locate(/obj/machinery/bodyscanner) in range(2,src)
|
||||
return
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
/obj/machinery/body_scanconsole/process() //not really used right now
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
//use_power(250) // power stuff
|
||||
|
||||
// var/mob/M //occupant
|
||||
// if (!( src.status )) //remove this
|
||||
// return
|
||||
// if ((src.connected && src.connected.occupant)) //connected & occupant ok
|
||||
// M = src.connected.occupant
|
||||
// else
|
||||
// if (istype(M, /mob))
|
||||
// //do stuff
|
||||
// else
|
||||
/// src.temphtml = "Process terminated due to lack of occupant in scanning chamber."
|
||||
// src.status = null
|
||||
// src.updateDialog()
|
||||
// return
|
||||
|
||||
*/
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_ai(user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(!connected || (connected.stat & (NOPOWER|BROKEN)))
|
||||
user << "<span class='warning'>This console is not connected to a functioning body scanner.</span>"
|
||||
return
|
||||
if(!ishuman(connected.occupant))
|
||||
user << "<span class='warning'>This device can only scan compatible lifeforms.</span>"
|
||||
return
|
||||
|
||||
var/dat
|
||||
if (src.delete && src.temphtml) //Window in buffer but its just simple message, so nothing
|
||||
src.delete = src.delete
|
||||
else if (!src.delete && src.temphtml) //Window in buffer - its a menu, dont add clear message
|
||||
dat = text("[]<BR><BR><A href='?src=\ref[];clear=1'>Main Menu</A>", src.temphtml, src)
|
||||
else
|
||||
if (src.connected) //Is something connected?
|
||||
dat = format_occupant_data(src.connected.get_occupant_data())
|
||||
dat += "<HR><A href='?src=\ref[src];print=1'>Print</A><BR>"
|
||||
else
|
||||
dat = "<span class='warning'>Error: No Body Scanner connected.</span>"
|
||||
|
||||
dat += text("<BR><A href='?src=\ref[];mach_close=scanconsole'>Close</A>", user)
|
||||
user << browse(dat, "window=scanconsole;size=430x600")
|
||||
return
|
||||
findscanner()
|
||||
|
||||
/obj/machinery/body_scanconsole/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && circuit)
|
||||
@@ -309,206 +218,365 @@
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
/obj/machinery/body_scanconsole/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
/obj/machinery/body_scanconsole/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "body_scannerconsole-p"
|
||||
else if(powered() && !panel_open)
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "body_scannerconsole-p"
|
||||
stat |= NOPOWER
|
||||
|
||||
if (href_list["print"])
|
||||
if (!src.connected)
|
||||
usr << "\icon[src]<span class='warning'>Error: No body scanner connected.</span>"
|
||||
/obj/machinery/body_scanconsole/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
var/mob/living/carbon/human/occupant = src.connected.occupant
|
||||
if (!src.connected.occupant)
|
||||
usr << "\icon[src]<span class='warning'>The body scanner is empty.</span>"
|
||||
return
|
||||
if (!istype(occupant,/mob/living/carbon/human))
|
||||
usr << "\icon[src]<span class='warning'>The body scanner cannot scan that lifeform.</span>"
|
||||
return
|
||||
var/obj/item/weapon/paper/R = new(src.loc)
|
||||
R.name = "Body scan report"
|
||||
R.info = format_occupant_data(src.connected.get_occupant_data())
|
||||
|
||||
|
||||
/obj/machinery/bodyscanner/proc/get_occupant_data()
|
||||
if (!occupant || !istype(occupant, /mob/living/carbon/human))
|
||||
return
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
var/list/occupant_data = list(
|
||||
"stationtime" = worldtime2text(),
|
||||
"stat" = H.stat,
|
||||
"health" = round(H.health/H.maxHealth)*100,
|
||||
"virus_present" = H.virus2.len,
|
||||
"bruteloss" = H.getBruteLoss(),
|
||||
"fireloss" = H.getFireLoss(),
|
||||
"oxyloss" = H.getOxyLoss(),
|
||||
"toxloss" = H.getToxLoss(),
|
||||
"rads" = H.radiation,
|
||||
"cloneloss" = H.getCloneLoss(),
|
||||
"brainloss" = H.getBrainLoss(),
|
||||
"paralysis" = H.paralysis,
|
||||
"bodytemp" = H.bodytemperature,
|
||||
"borer_present" = H.has_brain_worms(),
|
||||
"inaprovaline_amount" = H.reagents.get_reagent_amount("inaprovaline"),
|
||||
"dexalin_amount" = H.reagents.get_reagent_amount("dexalin"),
|
||||
"stoxin_amount" = H.reagents.get_reagent_amount("stoxin"),
|
||||
"bicaridine_amount" = H.reagents.get_reagent_amount("bicaridine"),
|
||||
"dermaline_amount" = H.reagents.get_reagent_amount("dermaline"),
|
||||
"blood_amount" = round((H.vessel.get_reagent_amount("blood") / H.species.blood_volume)*100),
|
||||
"disabilities" = H.sdisabilities,
|
||||
"lung_ruptured" = H.is_lung_ruptured(),
|
||||
"external_organs" = H.organs.Copy(),
|
||||
"internal_organs" = H.internal_organs.Copy(),
|
||||
"species_organs" = H.species.has_organ //Just pass a reference for this, it shouldn't ever be modified outside of the datum.
|
||||
)
|
||||
return occupant_data
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/format_occupant_data(var/list/occ)
|
||||
var/dat = "<font color='blue'><b>Scan performed at [occ["stationtime"]]</b></font><br>"
|
||||
dat += "<font color='blue'><b>Occupant Statistics:</b></font><br>"
|
||||
var/aux
|
||||
switch (occ["stat"])
|
||||
if(0)
|
||||
aux = "Conscious"
|
||||
if(1)
|
||||
aux = "Unconscious"
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
else
|
||||
aux = "Dead"
|
||||
dat += text("[]\tHealth %: [] ([])</font><br>", ("<font color='[occ["health"] > 50 ? "blue" : "red"]>"), occ["health"], aux)
|
||||
if (occ["virus_present"])
|
||||
dat += "<font color='red'>Viral pathogen detected in blood stream.</font><br>"
|
||||
dat += text("[]\t-Brute Damage %: []</font><br>", ("<font color='[occ["bruteloss"] < 60 ? "blue" : "red"]'>"), occ["bruteloss"])
|
||||
dat += text("[]\t-Respiratory Damage %: []</font><br>", ("<font color='[occ["oxyloss"] < 60 ? "blue'" : "red"]'>"), occ["oxyloss"])
|
||||
dat += text("[]\t-Toxin Content %: []</font><br>", ("<font color='[occ["toxloss"] < 60 ? "blue" : "red"]'>"), occ["toxloss"])
|
||||
dat += text("[]\t-Burn Severity %: []</font><br><br>", ("<font color='[occ["fireloss"] < 60 ? "blue" : "red"]'>"), occ["fireloss"])
|
||||
return
|
||||
|
||||
dat += text("[]\tRadiation Level %: []</font><br>", ("<font color='[occ["rads"] < 10 ? "blue" : "red"]'>"), occ["rads"])
|
||||
dat += text("[]\tGenetic Tissue Damage %: []</font><br>", ("<font color='[occ["cloneloss"] < 1 ? "blue" : "red"]'>"), occ["cloneloss"])
|
||||
dat += text("[]\tApprox. Brain Damage %: []</font><br>", ("<font color='[occ["brainloss"] < 1 ? "blue" : "red"]'>"), occ["brainloss"])
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<br>", occ["paralysis"], round(occ["paralysis"] / 4))
|
||||
dat += text("Body Temperature: [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)<br><HR>")
|
||||
/obj/machinery/body_scanconsole/proc/findscanner()
|
||||
spawn( 5 )
|
||||
var/obj/machinery/bodyscanner/bodyscannernew = null
|
||||
// Loop through every direction
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
// Try to find a scanner in that direction
|
||||
bodyscannernew = locate(/obj/machinery/bodyscanner, get_step(src, dir))
|
||||
src.connected = bodyscannernew
|
||||
return
|
||||
|
||||
if(occ["borer_present"])
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<br>"
|
||||
/obj/machinery/body_scanconsole/attack_ai(user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
dat += text("[]\tBlood Level %: [] ([] units)</FONT><BR>", ("<font color='[occ["blood_amount"] > 80 ? "blue" : "red"]'>"), occ["blood_amount"], occ["blood_amount"])
|
||||
/obj/machinery/body_scanconsole/attack_ghost(user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
dat += text("Inaprovaline: [] units<BR>", occ["inaprovaline_amount"])
|
||||
dat += text("Soporific: [] units<BR>", occ["stoxin_amount"])
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", ("<font color='[occ["dermaline_amount"] < 30 ? "black" : "red"]'>"), occ["dermaline_amount"])
|
||||
dat += text("[]\tBicaridine: [] units</font><BR>", ("<font color='[occ["bicaridine_amount"] < 30 ? "black" : "red"]'>"), occ["bicaridine_amount"])
|
||||
dat += text("[]\tDexalin: [] units</font><BR>", ("<font color='[occ["dexalin_amount"] < 30 ? "black" : "red"]'>"), occ["dexalin_amount"])
|
||||
/obj/machinery/body_scanconsole/attack_hand(user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
dat += "<HR><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Damage</th>"
|
||||
dat += "<th>Brute Damage</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
if (panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
|
||||
for(var/obj/item/organ/external/e in occ["external_organs"])
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/robot = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
if(!src.connected)
|
||||
findscanner()
|
||||
|
||||
dat += "<tr>"
|
||||
ui_interact(user)
|
||||
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
internal_bleeding = "<br>Internal bleeding"
|
||||
break
|
||||
if(istype(e, /obj/item/organ/external/chest) && occ["lung_ruptured"])
|
||||
lung_ruptured = "Lung ruptured:"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted:"
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
bled = "Bleeding:"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]:"
|
||||
switch(e.robotic)
|
||||
if(ORGAN_ROBOT) robot = "Prosthetic:"
|
||||
if(ORGAN_ASSISTED) robot = "Augmented:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
if(e.rejecting)
|
||||
infected += "(being rejected)"
|
||||
if (e.implants.len)
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
data["connected"] = connected ? 1 : 0
|
||||
|
||||
if(connected)
|
||||
data["occupied"] = connected.occupant ? 1 : 0
|
||||
|
||||
var/occupantData[0]
|
||||
if(connected.occupant && ishuman(connected.occupant))
|
||||
var/mob/living/carbon/human/H = connected.occupant
|
||||
occupantData["name"] = H.name
|
||||
occupantData["stat"] = H.stat
|
||||
occupantData["health"] = H.health
|
||||
|
||||
occupantData["hasVirus"] = H.virus2.len
|
||||
|
||||
occupantData["bruteLoss"] = H.getBruteLoss()
|
||||
occupantData["oxyLoss"] = H.getOxyLoss()
|
||||
occupantData["toxLoss"] = H.getToxLoss()
|
||||
occupantData["fireLoss"] = H.getFireLoss()
|
||||
|
||||
occupantData["radLoss"] = H.radiation
|
||||
occupantData["cloneLoss"] = H.getCloneLoss()
|
||||
occupantData["brainLoss"] = H.getBrainLoss()
|
||||
occupantData["paralysis"] = H.paralysis
|
||||
occupantData["paralysisSeconds"] = round(H.paralysis / 4)
|
||||
occupantData["bodyTempC"] = H.bodytemperature-T0C
|
||||
occupantData["bodyTempF"] = (((H.bodytemperature-T0C) * 1.8) + 32)
|
||||
|
||||
occupantData["hasBorer"] = H.has_brain_worms()
|
||||
|
||||
var/bloodData[0]
|
||||
if(H.vessel)
|
||||
var/blood_volume = round(H.vessel.get_reagent_amount("blood"))
|
||||
bloodData["volume"] = blood_volume
|
||||
bloodData["percent"] = round(((blood_volume / 560)*100))
|
||||
|
||||
occupantData["blood"] = bloodData
|
||||
|
||||
var/reagentData[0]
|
||||
if(H.reagents.reagent_list.len >= 1)
|
||||
for(var/datum/reagent/R in H.reagents.reagent_list)
|
||||
reagentData[++reagentData.len] = list("name" = R.name, "amount" = R.volume)
|
||||
else
|
||||
reagentData = null
|
||||
|
||||
occupantData["reagents"] = reagentData
|
||||
|
||||
var/extOrganData[0]
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
var/organData[0]
|
||||
organData["name"] = E.name
|
||||
organData["open"] = E.open
|
||||
organData["germ_level"] = E.germ_level
|
||||
organData["bruteLoss"] = E.brute_dam
|
||||
organData["fireLoss"] = E.burn_dam
|
||||
|
||||
var/implantData[0]
|
||||
for(var/obj/I in E.implants)
|
||||
var/implantSubData[0]
|
||||
implantSubData["name"] = I.name
|
||||
if(is_type_in_list(I, known_implants))
|
||||
implantSubData["known"] = 1
|
||||
|
||||
implantData.Add(list(implantSubData))
|
||||
|
||||
organData["implants"] = implantData
|
||||
organData["implants_len"] = implantData.len
|
||||
|
||||
var/organStatus[0]
|
||||
if(E.status & ORGAN_DESTROYED)
|
||||
organStatus["destroyed"] = 1
|
||||
if(E.status & ORGAN_BROKEN)
|
||||
organStatus["broken"] = E.broken_description
|
||||
if(E.status & ORGAN_ROBOT)
|
||||
organStatus["robotic"] = 1
|
||||
if(E.status & ORGAN_SPLINTED)
|
||||
organStatus["splinted"] = 1
|
||||
if(E.status & ORGAN_BLEEDING)
|
||||
organStatus["bleeding"] = 1
|
||||
|
||||
organData["status"] = organStatus
|
||||
|
||||
if(istype(E, /obj/item/organ/external/chest) && H.is_lung_ruptured())
|
||||
organData["lungRuptured"] = 1
|
||||
|
||||
for(var/datum/wound/W in E.wounds)
|
||||
if(W.internal)
|
||||
organData["internalBleeding"] = 1
|
||||
break
|
||||
|
||||
extOrganData.Add(list(organData))
|
||||
|
||||
occupantData["extOrgan"] = extOrganData
|
||||
|
||||
var/intOrganData[0]
|
||||
for(var/obj/item/organ/I in H.internal_organs)
|
||||
var/organData[0]
|
||||
organData["name"] = I.name
|
||||
if(I.status & ORGAN_ASSISTED)
|
||||
organData["desc"] = "Assisted"
|
||||
else if(I.robotic >= ORGAN_ROBOT)
|
||||
organData["desc"] = "Mechanical"
|
||||
else
|
||||
unknown_body++
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
organData["desc"] = null
|
||||
organData["germ_level"] = I.germ_level
|
||||
organData["damage"] = I.damage
|
||||
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!e.is_stump())
|
||||
dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
intOrganData.Add(list(organData))
|
||||
|
||||
occupantData["intOrgan"] = intOrganData
|
||||
|
||||
occupantData["blind"] = (H.sdisabilities & BLIND)
|
||||
occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED)
|
||||
|
||||
data["occupant"] = occupantData
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "adv_med.tmpl", "Body Scanner", 690, 800)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (href_list["print_p"])
|
||||
generate_printing_text()
|
||||
|
||||
if (!(printing) && printing_text)
|
||||
printing = 1
|
||||
visible_message("<span class='notice'>\The [src] rattles and prints out a sheet of paper.</span>")
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
|
||||
P.info = "<CENTER><B>Body Scan - [href_list["name"]]</B></CENTER><BR>"
|
||||
P.info += "<b>Time of scan:</b> [worldtime2text(world.time)]<br><br>"
|
||||
P.info += "[printing_text]"
|
||||
P.info += "<br><br><b>Notes:</b><br>"
|
||||
P.name = "Body Scan - [href_list["name"]]"
|
||||
printing = null
|
||||
printing_text = null
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/generate_printing_text()
|
||||
var/dat = ""
|
||||
|
||||
if(connected)
|
||||
var/mob/living/carbon/human/occupant = connected.occupant
|
||||
dat = "<font color='blue'><b>Occupant Statistics:</b></font><br>" //Blah obvious
|
||||
if(istype(occupant)) //is there REALLY someone in there?
|
||||
var/t1
|
||||
switch(occupant.stat) // obvious, see what their status is
|
||||
if(0)
|
||||
t1 = "Conscious"
|
||||
if(1)
|
||||
t1 = "Unconscious"
|
||||
else
|
||||
t1 = "*dead*"
|
||||
dat += "<font color=[occupant.health > 50 ? "blue" : "red"]>\tHealth %: [occupant.health], ([t1])</font><br>"
|
||||
|
||||
if(occupant.virus2.len)
|
||||
dat += "<font color='red'>Viral pathogen detected in blood stream.</font><BR>"
|
||||
|
||||
var/extra_font = null
|
||||
extra_font = "<font color=[occupant.getBruteLoss() < 60 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\t-Brute Damage %: [occupant.getBruteLoss()]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.getOxyLoss() < 60 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\t-Respiratory Damage %: [occupant.getOxyLoss()]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.getToxLoss() < 60 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\t-Toxin Content %: [occupant.getToxLoss()]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.getFireLoss() < 60 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\t-Burn Severity %: [occupant.getFireLoss()]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.radiation < 10 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\tRadiation Level %: [occupant.radiation]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.getCloneLoss() < 1 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\tGenetic Tissue Damage %: [occupant.getCloneLoss()]</font><br>"
|
||||
|
||||
extra_font = "<font color=[occupant.getBrainLoss() < 1 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\tApprox. Brain Damage %: [occupant.getBrainLoss()]</font><br>"
|
||||
|
||||
dat += "Paralysis Summary %: [occupant.paralysis] ([round(occupant.paralysis / 4)] seconds left!)<br>"
|
||||
dat += "Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)<br>"
|
||||
|
||||
dat += "<hr>"
|
||||
|
||||
if(occupant.has_brain_worms())
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<br>"
|
||||
|
||||
if(occupant.vessel)
|
||||
var/blood_volume = round(occupant.vessel.get_reagent_amount("blood"))
|
||||
var/blood_percent = blood_volume / 560
|
||||
blood_percent *= 100
|
||||
|
||||
extra_font = "<font color=[blood_volume > 448 ? "blue" : "red"]>"
|
||||
dat += "[extra_font]\tBlood Level %: [blood_percent] ([blood_volume] units)</font><br>"
|
||||
|
||||
if(occupant.reagents)
|
||||
for(var/datum/reagent/R in occupant.reagents)
|
||||
dat += "Reagent: [R.name], Amount: [R.volume]<br>"
|
||||
|
||||
dat += "<hr><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Damage</th>"
|
||||
dat += "<th>Brute Damage</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/obj/item/organ/external/e in occupant.organs)
|
||||
dat += "<tr>"
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/robot = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
for(var/datum/wound/W in e.wounds) if(W.internal)
|
||||
internal_bleeding = "<br>Internal bleeding"
|
||||
break
|
||||
if(istype(e, /obj/item/organ/external/chest) && occupant.is_lung_ruptured())
|
||||
lung_ruptured = "Lung ruptured:"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted:"
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
bled = "Bleeding:"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]:"
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
robot = "Prosthetic:"
|
||||
if(e.open)
|
||||
open = "Open:"
|
||||
switch (e.germ_level)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
infected = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infected = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infected = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infected = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infected = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
infected = "Acute Infection++:"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
infected = "Septic:"
|
||||
|
||||
var/unknown_body = 0
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unknown_body++
|
||||
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
if(!AN && !open && !infected & !imp)
|
||||
AN = "None:"
|
||||
if(!(e.status & ORGAN_DESTROYED))
|
||||
dat += "<td>[e.name]</td><td>[e.burn_dam]</td><td>[e.brute_dam]</td><td>[robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]</td>"
|
||||
else
|
||||
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not Found</td>"
|
||||
dat += "</tr>"
|
||||
for(var/obj/item/organ/i in occupant.internal_organs)
|
||||
var/mech = ""
|
||||
if(i.status & ORGAN_ASSISTED)
|
||||
mech = "Assisted:"
|
||||
if(i.robotic >= ORGAN_ROBOT)
|
||||
mech = "Mechanical:"
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
if(occupant.sdisabilities & BLIND)
|
||||
dat += "<font color='red'>Cataracts detected.</font><BR>"
|
||||
if(occupant.disabilities & NEARSIGHTED)
|
||||
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
|
||||
else
|
||||
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not [e.is_stump() ? "Found" : "Attached Completely"]</td>"
|
||||
dat += "</tr>"
|
||||
dat += "\The [src] is empty."
|
||||
else
|
||||
dat = "<font color='red'> Error: No Body Scanner connected.</font>"
|
||||
|
||||
for(var/obj/item/organ/i in occ["internal_organs"])
|
||||
|
||||
var/mech = ""
|
||||
if(i.status & ORGAN_ASSISTED)
|
||||
mech = "Assisted:"
|
||||
if(i.robotic >= ORGAN_ROBOT)
|
||||
mech = "Mechanical:"
|
||||
|
||||
var/infection = "None"
|
||||
switch (i.germ_level)
|
||||
if (1 to INFECTION_LEVEL_ONE + 200)
|
||||
infection = "Mild Infection:"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
infection = "Mild Infection+:"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
infection = "Mild Infection++:"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
infection = "Acute Infection:"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
infection = "Acute Infection+:"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFINITY)
|
||||
infection = "Acute Infection++:"
|
||||
if(i.rejecting)
|
||||
infection += "(being rejected)"
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
|
||||
var/list/species_organs = occ["species_organs"]
|
||||
for(var/organ_name in species_organs)
|
||||
if(!locate(species_organs[organ_name]) in occ["internal_organs"])
|
||||
dat += text("<font color='red'>No [organ_name] detected.</font><BR>")
|
||||
|
||||
if(occ["sdisabilities"] & BLIND)
|
||||
dat += text("<font color='red'>Cataracts detected.</font><BR>")
|
||||
if(occ["sdisabilities"] & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
return dat
|
||||
printing_text = dat
|
||||
@@ -94,13 +94,8 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
/obj/machinery/computer/general_air_control/attack_hand(mob/user)
|
||||
if(..(user))
|
||||
return
|
||||
user << browse(return_text(),"window=computer")
|
||||
user.set_machine(src)
|
||||
onclose(user, "computer")
|
||||
|
||||
/obj/machinery/computer/general_air_control/process()
|
||||
..()
|
||||
src.updateUsrDialog()
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -110,43 +105,27 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
|
||||
sensor_information[id_tag] = signal.data
|
||||
|
||||
/obj/machinery/computer/general_air_control/proc/return_text()
|
||||
var/sensor_data
|
||||
/obj/machinery/computer/general_air_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
var/sensors_ui[0]
|
||||
if(sensors.len)
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/data = sensor_information[id_tag]
|
||||
var/sensor_part = "<B>[long_name]</B>:<BR>"
|
||||
|
||||
if(data)
|
||||
if(data["pressure"])
|
||||
sensor_part += " <B>Pressure:</B> [data["pressure"]] kPa<BR>"
|
||||
if(data["temperature"])
|
||||
sensor_part += " <B>Temperature:</B> [data["temperature"]] K<BR>"
|
||||
if(data["oxygen"]||data["phoron"]||data["nitrogen"]||data["carbon_dioxide"])
|
||||
sensor_part += " <B>Gas Composition :</B>"
|
||||
if(data["oxygen"])
|
||||
sensor_part += "[data["oxygen"]]% O2; "
|
||||
if(data["nitrogen"])
|
||||
sensor_part += "[data["nitrogen"]]% N; "
|
||||
if(data["carbon_dioxide"])
|
||||
sensor_part += "[data["carbon_dioxide"]]% CO2; "
|
||||
if(data["phoron"])
|
||||
sensor_part += "[data["phoron"]]% TX; "
|
||||
sensor_part += "<HR>"
|
||||
|
||||
else
|
||||
sensor_part = "<FONT color='red'>[long_name] can not be found!</FONT><BR>"
|
||||
|
||||
sensor_data += sensor_part
|
||||
|
||||
var/list/sensor_data = sensor_information[id_tag]
|
||||
sensors_ui[++sensors_ui.len] = list("long_name" = long_name, "sensor_data" = sensor_data)
|
||||
else
|
||||
sensor_data = "No sensors connected."
|
||||
sensors_ui = null
|
||||
|
||||
var/output = {"<B>[name]</B><HR>
|
||||
<B>Sensor Data:</B><HR><HR>[sensor_data]"}
|
||||
data["sensors"] = sensors_ui
|
||||
|
||||
return output
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 525, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/general_air_control/proc/set_frequency(new_frequency)
|
||||
radio_controller.remove_object(src, frequency)
|
||||
@@ -156,7 +135,6 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
/obj/machinery/computer/general_air_control/initialize()
|
||||
set_frequency(frequency)
|
||||
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
|
||||
@@ -171,39 +149,41 @@ obj/machinery/computer/general_air_control/Destroy()
|
||||
var/pressure_setting = ONE_ATMOSPHERE * 45
|
||||
circuit = /obj/item/weapon/circuitboard/air_management/tank_control
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/return_text()
|
||||
var/output = ..()
|
||||
//if(signal.data)
|
||||
// input_info = signal.data // Attempting to fix intake control -- TLE
|
||||
|
||||
output += "<B>Tank Control System</B><BR><BR>"
|
||||
if(input_info)
|
||||
var/power = (input_info["power"])
|
||||
var/volume_rate = round(input_info["volume_rate"], 0.1)
|
||||
output += "<B>Input</B>: [power?("Injecting"):("On Hold")] <A href='?src=\ref[src];in_refresh_status=1'>Refresh</A><BR>Flow Rate Limit: [volume_rate] L/s<BR>"
|
||||
output += "Command: <A href='?src=\ref[src];in_toggle_injector=1'>Toggle Power</A> <A href='?src=\ref[src];in_set_flowrate=1'>Set Flow Rate</A><BR>"
|
||||
|
||||
var/list/data = list()
|
||||
var/sensors_ui[0]
|
||||
if(sensors.len)
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/sensor_data = sensor_information[id_tag]
|
||||
sensors_ui[++sensors_ui.len] = list("long_name" = long_name, "sensor_data" = sensor_data)
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find input port</FONT> <A href='?src=\ref[src];in_refresh_status=1'>Search</A><BR>"
|
||||
sensors_ui = null
|
||||
|
||||
output += "Flow Rate Limit: <A href='?src=\ref[src];adj_input_flow_rate=-100'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-10'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-1'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-0.1'>-</A> [round(input_flow_setting, 0.1)] L/s <A href='?src=\ref[src];adj_input_flow_rate=0.1'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=1'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=10'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=100'>+</A><BR>"
|
||||
data["sensors"] = sensors_ui
|
||||
data["tanks"] = 1
|
||||
|
||||
output += "<BR>"
|
||||
if(input_info)
|
||||
data["input_info"] = list("power" = input_info["power"], "volume_rate" = round(input_info["volume_rate"], 0.1))
|
||||
else
|
||||
data["input_info"] = null
|
||||
|
||||
if(output_info)
|
||||
var/power = (output_info["power"])
|
||||
var/output_pressure = output_info["internal"]
|
||||
output += {"<B>Output</B>: [power?("Open"):("On Hold")] <A href='?src=\ref[src];out_refresh_status=1'>Refresh</A><BR>
|
||||
Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
output += "Command: <A href='?src=\ref[src];out_toggle_power=1'>Toggle Power</A> <A href='?src=\ref[src];out_set_pressure=1'>Set Pressure</A><BR>"
|
||||
|
||||
data["output_info"] = list("power" = output_info["power"], "output_pressure" = output_info["internal"])
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find output port</FONT> <A href='?src=\ref[src];out_refresh_status=1'>Search</A><BR>"
|
||||
data["output_info"] = null
|
||||
|
||||
output += "Max Output Pressure Set: <A href='?src=\ref[src];adj_pressure=-1000'>-</A> <A href='?src=\ref[src];adj_pressure=-100'>-</A> <A href='?src=\ref[src];adj_pressure=-10'>-</A> <A href='?src=\ref[src];adj_pressure=-1'>-</A> [pressure_setting] kPa <A href='?src=\ref[src];adj_pressure=1'>+</A> <A href='?src=\ref[src];adj_pressure=10'>+</A> <A href='?src=\ref[src];adj_pressure=100'>+</A> <A href='?src=\ref[src];adj_pressure=1000'>+</A><BR>"
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
return output
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 660, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/general_air_control/large_tank_control/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -224,15 +204,11 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
pressure_setting = between(0, pressure_setting + change, 50*ONE_ATMOSPHERE)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["adj_input_flow_rate"])
|
||||
var/change = text2num(href_list["adj_input_flow_rate"])
|
||||
input_flow_setting = between(0, input_flow_setting + change, ATMOS_DEFAULT_VOLUME_PUMP + 500) //default flow rate limit for air injectors
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(!radio_connection)
|
||||
@@ -273,9 +249,6 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
signal.data["sigtype"]="command"
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
spawn(5)
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/general_air_control/supermatter_core
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
|
||||
@@ -290,39 +263,40 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
var/pressure_setting = 100
|
||||
circuit = /obj/item/weapon/circuitboard/air_management/supermatter_core
|
||||
|
||||
/obj/machinery/computer/general_air_control/supermatter_core/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
/obj/machinery/computer/general_air_control/supermatter_core/return_text()
|
||||
var/output = ..()
|
||||
//if(signal.data)
|
||||
// input_info = signal.data // Attempting to fix intake control -- TLE
|
||||
var/list/data = list()
|
||||
var/sensors_ui[0]
|
||||
if(sensors.len)
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/sensor_data = sensor_information[id_tag]
|
||||
sensors_ui[++sensors_ui.len] = list("long_name" = long_name, "sensor_data" = sensor_data)
|
||||
else
|
||||
sensors_ui = null
|
||||
|
||||
data["sensors"] = sensors_ui
|
||||
data["core"] = 1
|
||||
|
||||
output += "<B>Core Cooling Control System</B><BR><BR>"
|
||||
if(input_info)
|
||||
var/power = (input_info["power"])
|
||||
var/volume_rate = round(input_info["volume_rate"], 0.1)
|
||||
output += "<B>Coolant Input</B>: [power?("Injecting"):("On Hold")] <A href='?src=\ref[src];in_refresh_status=1'>Refresh</A><BR>Flow Rate Limit: [volume_rate] L/s<BR>"
|
||||
output += "Command: <A href='?src=\ref[src];in_toggle_injector=1'>Toggle Power</A> <A href='?src=\ref[src];in_set_flowrate=1'>Set Flow Rate</A><BR>"
|
||||
|
||||
data["input_info"] = list("power" = input_info["power"], "volume_rate" = round(input_info["volume_rate"], 0.1))
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find input port</FONT> <A href='?src=\ref[src];in_refresh_status=1'>Search</A><BR>"
|
||||
|
||||
output += "Flow Rate Limit: <A href='?src=\ref[src];adj_input_flow_rate=-100'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-10'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-1'>-</A> <A href='?src=\ref[src];adj_input_flow_rate=-0.1'>-</A> [round(input_flow_setting, 0.1)] L/s <A href='?src=\ref[src];adj_input_flow_rate=0.1'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=1'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=10'>+</A> <A href='?src=\ref[src];adj_input_flow_rate=100'>+</A><BR>"
|
||||
|
||||
output += "<BR>"
|
||||
|
||||
data["input_info"] = null
|
||||
if(output_info)
|
||||
var/power = (output_info["power"])
|
||||
var/pressure_limit = output_info["external"]
|
||||
output += {"<B>Core Outpump</B>: [power?("Open"):("On Hold")] <A href='?src=\ref[src];out_refresh_status=1'>Refresh</A><BR>
|
||||
Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
output += "Command: <A href='?src=\ref[src];out_toggle_power=1'>Toggle Power</A> <A href='?src=\ref[src];out_set_pressure=1'>Set Pressure</A><BR>"
|
||||
|
||||
data["output_info"] = list("power" = output_info["power"], "pressure_limit" = output_info["external"])
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find output port</FONT> <A href='?src=\ref[src];out_refresh_status=1'>Search</A><BR>"
|
||||
data["output_info"] = null
|
||||
|
||||
output += "Min Core Pressure Set: <A href='?src=\ref[src];adj_pressure=-100'>-</A> <A href='?src=\ref[src];adj_pressure=-50'>-</A> <A href='?src=\ref[src];adj_pressure=-10'>-</A> <A href='?src=\ref[src];adj_pressure=-1'>-</A> [pressure_setting] kPa <A href='?src=\ref[src];adj_pressure=1'>+</A> <A href='?src=\ref[src];adj_pressure=10'>+</A> <A href='?src=\ref[src];adj_pressure=50'>+</A> <A href='?src=\ref[src];adj_pressure=100'>+</A><BR>"
|
||||
data["input_flow_setting"] = round(input_flow_setting, 0.1)
|
||||
data["pressure_setting"] = pressure_setting
|
||||
|
||||
return output
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/general_air_control/supermatter_core/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
@@ -343,15 +317,11 @@ Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
pressure_setting = between(0, pressure_setting + change, 10*ONE_ATMOSPHERE)
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(href_list["adj_input_flow_rate"])
|
||||
var/change = text2num(href_list["adj_input_flow_rate"])
|
||||
input_flow_setting = between(0, input_flow_setting + change, ATMOS_DEFAULT_VOLUME_PUMP + 500) //default flow rate limit for air injectors
|
||||
spawn(1)
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
if(!radio_connection)
|
||||
@@ -392,9 +362,6 @@ Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
signal.data["sigtype"]="command"
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
|
||||
spawn(5)
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/computer/general_air_control/fuel_injection
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_screen = "alert:0"
|
||||
@@ -437,27 +404,34 @@ Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/general_air_control/fuel_injection/return_text()
|
||||
var/output = ..()
|
||||
|
||||
output += "<B>Fuel Injection System</B><BR>"
|
||||
if(device_info)
|
||||
var/power = device_info["power"]
|
||||
var/volume_rate = device_info["volume_rate"]
|
||||
output += {"Status: [power?("Injecting"):("On Hold")] <A href='?src=\ref[src];refresh_status=1'>Refresh</A><BR>
|
||||
Rate: [volume_rate] L/sec<BR>"}
|
||||
|
||||
if(automation)
|
||||
output += "Automated Fuel Injection: <A href='?src=\ref[src];toggle_automation=1'>Engaged</A><BR>"
|
||||
output += "Injector Controls Locked Out<BR>"
|
||||
else
|
||||
output += "Automated Fuel Injection: <A href='?src=\ref[src];toggle_automation=1'>Disengaged</A><BR>"
|
||||
output += "Injector: <A href='?src=\ref[src];toggle_injector=1'>Toggle Power</A> <A href='?src=\ref[src];injection=1'>Inject (1 Cycle)</A><BR>"
|
||||
/obj/machinery/computer/general_air_control/fuel_injection/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
var/sensors_ui[0]
|
||||
if(sensors.len)
|
||||
for(var/id_tag in sensors)
|
||||
var/long_name = sensors[id_tag]
|
||||
var/list/sensor_data = sensor_information[id_tag]
|
||||
sensors_ui[++sensors_ui.len] = list("long_name" = long_name, "sensor_data" = sensor_data)
|
||||
else
|
||||
output += "<FONT color='red'>ERROR: Can not find device</FONT> <A href='?src=\ref[src];refresh_status=1'>Search</A><BR>"
|
||||
sensors_ui = null
|
||||
|
||||
return output
|
||||
data["sensors"] = sensors_ui
|
||||
data["fuel"] = 1
|
||||
data["automation"] = automation
|
||||
|
||||
if(device_info)
|
||||
data["device_info"] = list("power" = device_info["power"], "volume_rate" = device_info["volume_rate"])
|
||||
else
|
||||
data["device_info"] = null
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmo_control.tmpl", src.name, 650, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/general_air_control/fuel_injection/receive_signal(datum/signal/signal)
|
||||
if(!signal || signal.encryption) return
|
||||
|
||||
@@ -22,62 +22,51 @@
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=op")
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
* Display the NanoUI window for the operating computer.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/computer/operating/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Operating Computer</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
dat += "<A HREF='?src=\ref[user];mach_close=op'>Close</A><br><br>" //| <A HREF='?src=\ref[user];update=1'>Update</A>"
|
||||
if(src.table && (src.table.check_victim()))
|
||||
src.victim = src.table.victim
|
||||
dat += {"
|
||||
<B>Patient Information:</B><BR>
|
||||
<BR>
|
||||
<B>Name:</B> [src.victim.real_name]<BR>
|
||||
<B>Age:</B> [src.victim.age]<BR>
|
||||
<B>Blood Type:</B> [src.victim.b_type]<BR>
|
||||
<BR>
|
||||
<B>Health:</B> [src.victim.health]<BR>
|
||||
<B>Brute Damage:</B> [src.victim.getBruteLoss()]<BR>
|
||||
<B>Toxins Damage:</B> [src.victim.getToxLoss()]<BR>
|
||||
<B>Fire Damage:</B> [src.victim.getFireLoss()]<BR>
|
||||
<B>Suffocation Damage:</B> [src.victim.getOxyLoss()]<BR>
|
||||
<B>Patient Status:</B> [src.victim.stat ? "Non-Responsive" : "Stable"]<BR>
|
||||
<B>Heartbeat rate:</B> [victim.get_pulse(GETPULSE_TOOL)]<BR>
|
||||
"}
|
||||
else
|
||||
src.victim = null
|
||||
dat += {"
|
||||
<B>Patient Information:</B><BR>
|
||||
<BR>
|
||||
<B>No Patient Detected</B>
|
||||
"}
|
||||
user << browse(dat, "window=op")
|
||||
onclose(user, "op")
|
||||
|
||||
var/list/data = list()
|
||||
var/list/victim_ui = list()
|
||||
|
||||
if(table && (table.check_victim()))
|
||||
victim = table.victim
|
||||
|
||||
victim_ui = list("real_name" = victim.real_name, "age" = victim.age, "b_type" = victim.b_type, "health" = victim.health,
|
||||
"brute" = victim.getBruteLoss(), "tox" = src.victim.getToxLoss(), "burn" = victim.getFireLoss(), "oxy" = victim.getOxyLoss(),
|
||||
"stat" = (victim.stat ? "Non-Responsive" : "Stable"), "pulse" = victim.get_pulse(GETPULSE_TOOL))
|
||||
else
|
||||
victim = null
|
||||
victim_ui = null
|
||||
|
||||
data["table"] = table
|
||||
data["victim"] = victim_ui
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "operating.tmpl", src.name, 380, 400)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/operating/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/process()
|
||||
if(..())
|
||||
src.updateDialog()
|
||||
src.add_fingerprint(usr)
|
||||
nanomanager.update_uis(src)
|
||||
@@ -53,7 +53,7 @@
|
||||
prize.loc = src.loc
|
||||
|
||||
/obj/machinery/computer/arcade/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/emp_act(severity)
|
||||
@@ -84,6 +84,7 @@
|
||||
circuit = /obj/item/weapon/circuitboard/arcade/battle
|
||||
var/enemy_name = "Space Villian"
|
||||
var/temp = "Winners don't use space drugs" //Temporary message, for attack messages, etc
|
||||
var/enemy_action = ""
|
||||
var/player_hp = 30 //Player health/attack points
|
||||
var/player_mp = 10
|
||||
var/enemy_hp = 45 //Enemy health/attack points
|
||||
@@ -103,81 +104,80 @@
|
||||
name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Cuban ", "the Evil ", "the Dread King ", "the Space ", "Lord ", "the Great ", "Duke ", "General ")
|
||||
name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon", "Uhangoid", "Vhakoid", "Peteoid", "slime", "Griefer", "ERPer", "Lizard Man", "Unicorn", "Bloopers")
|
||||
|
||||
src.enemy_name = replacetext((name_part1 + name_part2), "the ", "")
|
||||
src.name = (name_action + name_part1 + name_part2)
|
||||
enemy_name = replacetext((name_part1 + name_part2), "the ", "")
|
||||
name = (name_action + name_part1 + name_part2)
|
||||
|
||||
|
||||
/obj/machinery/computer/arcade/battle/attack_hand(mob/user as mob)
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = "<a href='byond://?src=\ref[src];close=1'>Close</a>"
|
||||
dat += "<center><h4>[src.enemy_name]</h4></center>"
|
||||
ui_interact(user)
|
||||
|
||||
dat += "<br><center><h3>[src.temp]</h3></center>"
|
||||
dat += "<br><center>Health: [src.player_hp] | Magic: [src.player_mp] | Enemy Health: [src.enemy_hp]</center>"
|
||||
/**
|
||||
* Display the NanoUI window for the arcade machine.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/computer/arcade/battle/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
dat += "<center><b>"
|
||||
if (src.gameover)
|
||||
dat += "<a href='byond://?src=\ref[src];newgame=1'>New Game</a>"
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];attack=1'>Attack</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];heal=1'>Heal</a> | "
|
||||
dat += "<a href='byond://?src=\ref[src];charge=1'>Recharge Power</a>"
|
||||
var/list/data = list()
|
||||
data["temp"] = temp
|
||||
data["enemyAction"] = enemy_action
|
||||
data["enemyName"] = enemy_name
|
||||
data["playerHP"] = player_hp
|
||||
data["playerMP"] = player_mp
|
||||
data["enemyHP"] = enemy_hp
|
||||
data["gameOver"] = gameover
|
||||
|
||||
dat += "</b></center>"
|
||||
|
||||
user << browse(dat, "window=arcade")
|
||||
onclose(user, "arcade")
|
||||
return
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "arcade_battle.tmpl", src.name, 400, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
//ui.set_auto_update(2)
|
||||
|
||||
/obj/machinery/computer/arcade/battle/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (!src.blocked && !src.gameover)
|
||||
if (!blocked && !gameover)
|
||||
if (href_list["attack"])
|
||||
src.blocked = 1
|
||||
blocked = 1
|
||||
var/attackamt = rand(2,6)
|
||||
src.temp = "You attack for [attackamt] damage!"
|
||||
src.updateUsrDialog()
|
||||
temp = "You attack for [attackamt] damage!"
|
||||
if(turtle > 0)
|
||||
turtle--
|
||||
|
||||
sleep(10)
|
||||
src.enemy_hp -= attackamt
|
||||
src.arcade_action()
|
||||
enemy_hp -= attackamt
|
||||
arcade_action()
|
||||
|
||||
else if (href_list["heal"])
|
||||
src.blocked = 1
|
||||
blocked = 1
|
||||
var/pointamt = rand(1,3)
|
||||
var/healamt = rand(6,8)
|
||||
src.temp = "You use [pointamt] magic to heal for [healamt] damage!"
|
||||
src.updateUsrDialog()
|
||||
temp = "You use [pointamt] magic to heal for [healamt] damage!"
|
||||
turtle++
|
||||
|
||||
sleep(10)
|
||||
src.player_mp -= pointamt
|
||||
src.player_hp += healamt
|
||||
src.blocked = 1
|
||||
src.updateUsrDialog()
|
||||
src.arcade_action()
|
||||
player_mp -= pointamt
|
||||
player_hp += healamt
|
||||
blocked = 1
|
||||
arcade_action()
|
||||
|
||||
else if (href_list["charge"])
|
||||
src.blocked = 1
|
||||
blocked = 1
|
||||
var/chargeamt = rand(4,7)
|
||||
src.temp = "You regain [chargeamt] points"
|
||||
src.player_mp += chargeamt
|
||||
temp = "You regain [chargeamt] points"
|
||||
player_mp += chargeamt
|
||||
if(turtle > 0)
|
||||
turtle--
|
||||
|
||||
src.updateUsrDialog()
|
||||
sleep(10)
|
||||
src.arcade_action()
|
||||
arcade_action()
|
||||
|
||||
if (href_list["close"])
|
||||
usr.unset_machine()
|
||||
usr << browse(null, "window=arcade")
|
||||
|
||||
else if (href_list["newgame"]) //Reset everything
|
||||
temp = "New Round"
|
||||
@@ -193,14 +193,14 @@
|
||||
emagged = 0
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/battle/proc/arcade_action()
|
||||
if ((src.enemy_mp <= 0) || (src.enemy_hp <= 0))
|
||||
if ((enemy_mp <= 0) || (enemy_hp <= 0))
|
||||
if(!gameover)
|
||||
src.gameover = 1
|
||||
src.temp = "[src.enemy_name] has fallen! Rejoice!"
|
||||
gameover = 1
|
||||
temp = "[enemy_name] has fallen! Rejoice!"
|
||||
|
||||
if(emagged)
|
||||
feedback_inc("arcade_win_emagged")
|
||||
@@ -212,53 +212,52 @@
|
||||
emagged = 0
|
||||
else if(!contents.len)
|
||||
feedback_inc("arcade_win_normal")
|
||||
src.prizevend()
|
||||
prizevend()
|
||||
|
||||
else
|
||||
feedback_inc("arcade_win_normal")
|
||||
src.prizevend()
|
||||
prizevend()
|
||||
|
||||
else if (emagged && (turtle >= 4))
|
||||
var/boomamt = rand(5,10)
|
||||
src.temp = "[src.enemy_name] throws a bomb, exploding you for [boomamt] damage!"
|
||||
src.player_hp -= boomamt
|
||||
enemy_action = "[enemy_name] throws a bomb, exploding you for [boomamt] damage!"
|
||||
player_hp -= boomamt
|
||||
|
||||
else if ((src.enemy_mp <= 5) && (prob(70)))
|
||||
else if ((enemy_mp <= 5) && (prob(70)))
|
||||
var/stealamt = rand(2,3)
|
||||
src.temp = "[src.enemy_name] steals [stealamt] of your power!"
|
||||
src.player_mp -= stealamt
|
||||
src.updateUsrDialog()
|
||||
enemy_action = "[enemy_name] steals [stealamt] of your power!"
|
||||
player_mp -= stealamt
|
||||
|
||||
if (src.player_mp <= 0)
|
||||
src.gameover = 1
|
||||
if (player_mp <= 0)
|
||||
gameover = 1
|
||||
sleep(10)
|
||||
src.temp = "You have been drained! GAME OVER"
|
||||
temp = "You have been drained! GAME OVER"
|
||||
if(emagged)
|
||||
feedback_inc("arcade_loss_mana_emagged")
|
||||
usr.gib()
|
||||
else
|
||||
feedback_inc("arcade_loss_mana_normal")
|
||||
|
||||
else if ((src.enemy_hp <= 10) && (src.enemy_mp > 4))
|
||||
src.temp = "[src.enemy_name] heals for 4 health!"
|
||||
src.enemy_hp += 4
|
||||
src.enemy_mp -= 4
|
||||
else if ((enemy_hp <= 10) && (enemy_mp > 4))
|
||||
enemy_action = "[enemy_name] heals for 4 health!"
|
||||
enemy_hp += 4
|
||||
enemy_mp -= 4
|
||||
|
||||
else
|
||||
var/attackamt = rand(3,6)
|
||||
src.temp = "[src.enemy_name] attacks for [attackamt] damage!"
|
||||
src.player_hp -= attackamt
|
||||
enemy_action = "[enemy_name] attacks for [attackamt] damage!"
|
||||
player_hp -= attackamt
|
||||
|
||||
if ((src.player_mp <= 0) || (src.player_hp <= 0))
|
||||
src.gameover = 1
|
||||
src.temp = "You have been crushed! GAME OVER"
|
||||
if ((player_mp <= 0) || (player_hp <= 0))
|
||||
gameover = 1
|
||||
temp = "You have been crushed! GAME OVER"
|
||||
if(emagged)
|
||||
feedback_inc("arcade_loss_hp_emagged")
|
||||
usr.gib()
|
||||
else
|
||||
feedback_inc("arcade_loss_hp_normal")
|
||||
|
||||
src.blocked = 0
|
||||
blocked = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -276,7 +275,6 @@
|
||||
enemy_name = "Cuban Pete"
|
||||
name = "Outbomb Cuban Pete"
|
||||
|
||||
src.updateUsrDialog()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||
var/loading = 0 // Nice loading text
|
||||
|
||||
|
||||
/obj/machinery/computer/cloning/initialize()
|
||||
..()
|
||||
updatemodules()
|
||||
@@ -25,7 +26,7 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
src.scanner = findscanner()
|
||||
scanner = findscanner()
|
||||
releasecloner()
|
||||
findcloner()
|
||||
|
||||
@@ -63,12 +64,12 @@
|
||||
|
||||
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
|
||||
if (!src.diskette)
|
||||
if (!diskette)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
src.diskette = W
|
||||
diskette = W
|
||||
user << "You insert [W]."
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
return
|
||||
else if(istype(W, /obj/item/device/multitool))
|
||||
var/obj/item/device/multitool/M = W
|
||||
@@ -78,6 +79,15 @@
|
||||
P.connected = src
|
||||
P.name = "[initial(P.name)] #[pods.len]"
|
||||
user << "<span class='notice'>You connect [P] to [src].</span>"
|
||||
|
||||
else if (menu == 4 && (istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)))
|
||||
if(check_access(W))
|
||||
records.Remove(active_record)
|
||||
qdel(active_record)
|
||||
temp = "Record deleted."
|
||||
menu = 2
|
||||
else
|
||||
temp = "Access Denied."
|
||||
else
|
||||
..()
|
||||
return
|
||||
@@ -94,109 +104,55 @@
|
||||
|
||||
updatemodules()
|
||||
|
||||
var/dat = "<h3>Cloning System Control</h3>"
|
||||
dat += "<font size=-1><a href='byond://?src=\ref[src];refresh=1'>Refresh</a></font>"
|
||||
ui_interact(user)
|
||||
|
||||
dat += "<br><tt>[temp]</tt><br>"
|
||||
/obj/machinery/computer/cloning/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
switch(src.menu)
|
||||
if(1)
|
||||
// Modules
|
||||
dat += "<h4>Modules</h4>"
|
||||
//dat += "<a href='byond://?src=\ref[src];relmodules=1'>Reload Modules</a>"
|
||||
if (isnull(src.scanner))
|
||||
dat += " <font color=red>DNA scanner not found.</font><br>"
|
||||
else
|
||||
dat += " <font color=green>DNA scanner found.</font><br>"
|
||||
if (pods.len)
|
||||
dat += " <font color=green>[pods.len] cloning vat\s found.</font><br>"
|
||||
else
|
||||
dat += " <font color=red>No cloning vats found.</font><br>"
|
||||
var/data[0]
|
||||
|
||||
// Scanner
|
||||
dat += "<h4>Scanner Functions</h4>"
|
||||
var/records_list_ui[0]
|
||||
for(var/datum/dna2/record/R in records)
|
||||
records_list_ui[++records_list_ui.len] = list("ckey" = R.ckey, "name" = R.dna.real_name)
|
||||
|
||||
if(loading)
|
||||
dat += "<b>Scanning...</b><br>"
|
||||
else
|
||||
dat += "<b>[scantemp]</b><br>"
|
||||
var/pods_list_ui[0]
|
||||
for(var/obj/machinery/clonepod/pod in pods)
|
||||
pods_list_ui[++pods_list_ui.len] = list("pod" = pod, "biomass" = pod.biomass)
|
||||
|
||||
if (isnull(src.scanner))
|
||||
dat += "No scanner connected!<br>"
|
||||
else
|
||||
if (src.scanner.occupant)
|
||||
if(scantemp == "Scanner unoccupied") scantemp = "" // Stupid check to remove the text
|
||||
if(pods)
|
||||
data["pods"] = pods_list_ui
|
||||
else
|
||||
data["pods"] = null
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];scan=1'>Scan - [src.scanner.occupant]</a><br>"
|
||||
else
|
||||
scantemp = "Scanner unoccupied"
|
||||
if(records)
|
||||
data["records"] = records_list_ui
|
||||
else
|
||||
data["records"] = null
|
||||
|
||||
dat += "Lock status: <a href='byond://?src=\ref[src];lock=1'>[src.scanner.locked ? "Locked" : "Unlocked"]</a><br>"
|
||||
if(active_record)
|
||||
data["activeRecord"] = list("ckey" = active_record.ckey, "real_name" = active_record.dna.real_name, \
|
||||
"ui" = active_record.dna.uni_identity, "se" = active_record.dna.struc_enzymes)
|
||||
else
|
||||
data["activeRecord"] = null
|
||||
|
||||
if (pods.len)
|
||||
for (var/obj/machinery/clonepod/pod in pods)
|
||||
dat += "[pod] biomass: <i>[pod.biomass]</i><br>"
|
||||
data["menu"] = menu
|
||||
data["connected"] = scanner
|
||||
data["podsLen"] = pods.len
|
||||
data["loading"] = loading
|
||||
if(!scanner.occupant)
|
||||
scantemp = ""
|
||||
data["scantemp"] = scantemp
|
||||
data["occupant"] = scanner.occupant
|
||||
data["locked"] = scanner.locked
|
||||
data["diskette"] = diskette
|
||||
data["temp"] = temp
|
||||
|
||||
// Database
|
||||
dat += "<h4>Database Functions</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=2'>View Records</a><br>"
|
||||
if (src.diskette)
|
||||
dat += "<a href='byond://?src=\ref[src];disk=eject'>Eject Disk</a>"
|
||||
|
||||
|
||||
if(2)
|
||||
dat += "<h4>Current records</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=1'>Back</a><br><br>"
|
||||
for(var/datum/dna2/record/R in src.records)
|
||||
dat += "<li><a href='byond://?src=\ref[src];view_rec=\ref[R]'>[R.dna.real_name]</a></li>"
|
||||
|
||||
if(3)
|
||||
dat += "<h4>Selected Record</h4>"
|
||||
dat += "<a href='byond://?src=\ref[src];menu=2'>Back</a><br>"
|
||||
|
||||
if (!src.active_record)
|
||||
dat += "<font color=red>ERROR: Record not found.</font>"
|
||||
else
|
||||
dat += {"<br><font size=1><a href='byond://?src=\ref[src];del_rec=1'>Delete Record</a></font><br>
|
||||
<b>Name:</b> [src.active_record.dna.real_name]<br>"}
|
||||
var/obj/item/weapon/implant/health/H = null
|
||||
if(src.active_record.implant)
|
||||
H=locate(src.active_record.implant)
|
||||
|
||||
if ((H) && (istype(H)))
|
||||
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>"
|
||||
else
|
||||
dat += "<font color=red>Unable to locate implant.</font><br>"
|
||||
|
||||
if (!isnull(src.diskette))
|
||||
dat += "<a href='byond://?src=\ref[src];disk=load'>Load from disk.</a>"
|
||||
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=ue'>UI + UE</a>"
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=ui'>UI</a>"
|
||||
dat += " | Save: <a href='byond://?src=\ref[src];save_disk=se'>SE</a>"
|
||||
dat += "<br>"
|
||||
else
|
||||
dat += "<br>" //Keeping a line empty for appearances I guess.
|
||||
|
||||
dat += {"<b>UI:</b> [src.active_record.dna.uni_identity]<br>
|
||||
<b>SE:</b> [src.active_record.dna.struc_enzymes]<br><br>"}
|
||||
|
||||
if(pods.len)
|
||||
dat += {"<a href='byond://?src=\ref[src];clone=\ref[src.active_record]'>Clone</a><br>"}
|
||||
|
||||
if(4)
|
||||
if (!src.active_record)
|
||||
src.menu = 2
|
||||
dat = "[src.temp]<br>"
|
||||
dat += "<h4>Confirm Record Deletion</h4>"
|
||||
|
||||
dat += "<b><a href='byond://?src=\ref[src];del_rec=1'>Scan card to confirm.</a></b><br>"
|
||||
dat += "<b><a href='byond://?src=\ref[src];menu=3'>No</a></b>"
|
||||
|
||||
|
||||
user << browse(dat, "window=cloning")
|
||||
onclose(user, "cloning")
|
||||
return
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "cloning.tmpl", src.name, 400, 450)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/cloning/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -205,101 +161,87 @@
|
||||
if(loading)
|
||||
return
|
||||
|
||||
if ((href_list["scan"]) && (!isnull(src.scanner)))
|
||||
if ((href_list["scan"]) && (!isnull(scanner)))
|
||||
scantemp = ""
|
||||
|
||||
loading = 1
|
||||
src.updateUsrDialog()
|
||||
|
||||
spawn(20)
|
||||
src.scan_mob(src.scanner.occupant)
|
||||
scan_mob(scanner.occupant)
|
||||
|
||||
loading = 0
|
||||
src.updateUsrDialog()
|
||||
|
||||
|
||||
//No locking an open scanner.
|
||||
else if ((href_list["lock"]) && (!isnull(src.scanner)))
|
||||
if ((!src.scanner.locked) && (src.scanner.occupant))
|
||||
src.scanner.locked = 1
|
||||
else if ((href_list["lock"]) && (!isnull(scanner)))
|
||||
if ((!scanner.locked) && (scanner.occupant))
|
||||
scanner.locked = 1
|
||||
else
|
||||
src.scanner.locked = 0
|
||||
scanner.locked = 0
|
||||
|
||||
else if ((href_list["eject"]) && (!isnull(scanner)))
|
||||
if ((!scanner.locked) && (scanner.occupant))
|
||||
scanner.eject_occupant()
|
||||
|
||||
else if (href_list["view_rec"])
|
||||
src.active_record = locate(href_list["view_rec"])
|
||||
if(istype(src.active_record,/datum/dna2/record))
|
||||
if ((isnull(src.active_record.ckey)))
|
||||
qdel(src.active_record)
|
||||
src.temp = "ERROR: Record Corrupt"
|
||||
active_record = find_record(href_list["view_rec"])
|
||||
if(istype(active_record,/datum/dna2/record))
|
||||
if ((isnull(active_record.ckey)))
|
||||
qdel(active_record)
|
||||
temp = "ERROR: Record Corrupt"
|
||||
else
|
||||
src.menu = 3
|
||||
menu = 3
|
||||
else
|
||||
src.active_record = null
|
||||
src.temp = "Record missing."
|
||||
active_record = null
|
||||
temp = "Record missing."
|
||||
|
||||
else if (href_list["del_rec"])
|
||||
if ((!src.active_record) || (src.menu < 3))
|
||||
if ((!active_record) || (menu < 3))
|
||||
return
|
||||
if (src.menu == 3) //If we are viewing a record, confirm deletion
|
||||
src.temp = "Delete record?"
|
||||
src.menu = 4
|
||||
|
||||
else if (src.menu == 4)
|
||||
var/obj/item/weapon/card/id/C = usr.get_active_hand()
|
||||
if (istype(C)||istype(C, /obj/item/device/pda))
|
||||
if(src.check_access(C))
|
||||
src.records.Remove(src.active_record)
|
||||
qdel(src.active_record)
|
||||
src.temp = "Record deleted."
|
||||
src.menu = 2
|
||||
else
|
||||
src.temp = "Access Denied."
|
||||
if (menu == 3) //If we are viewing a record, confirm deletion
|
||||
temp = "Delete record?"
|
||||
menu = 4
|
||||
|
||||
else if (href_list["disk"]) //Load or eject.
|
||||
switch(href_list["disk"])
|
||||
if("load")
|
||||
if ((isnull(src.diskette)) || isnull(src.diskette.buf))
|
||||
src.temp = "Load error."
|
||||
src.updateUsrDialog()
|
||||
if ((isnull(diskette)) || isnull(diskette.buf))
|
||||
temp = "Load error."
|
||||
return
|
||||
if (isnull(src.active_record))
|
||||
src.temp = "Record error."
|
||||
src.menu = 1
|
||||
src.updateUsrDialog()
|
||||
if (isnull(active_record))
|
||||
temp = "Record error."
|
||||
menu = 1
|
||||
return
|
||||
|
||||
src.active_record = src.diskette.buf
|
||||
active_record = diskette.buf
|
||||
|
||||
src.temp = "Load successful."
|
||||
temp = "Load successful."
|
||||
if("eject")
|
||||
if (!isnull(src.diskette))
|
||||
src.diskette.loc = src.loc
|
||||
src.diskette = null
|
||||
if (!isnull(diskette))
|
||||
diskette.loc = loc
|
||||
diskette = null
|
||||
|
||||
else if (href_list["save_disk"]) //Save to disk!
|
||||
if ((isnull(src.diskette)) || (src.diskette.read_only) || (isnull(src.active_record)))
|
||||
src.temp = "Save error."
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
if ((isnull(diskette)) || (diskette.read_only) || (isnull(active_record)))
|
||||
temp = "Save error."
|
||||
|
||||
// DNA2 makes things a little simpler.
|
||||
src.diskette.buf=src.active_record
|
||||
src.diskette.buf.types=0
|
||||
diskette.buf = active_record
|
||||
diskette.buf.types = 0
|
||||
switch(href_list["save_disk"]) //Save as Ui/Ui+Ue/Se
|
||||
if("ui")
|
||||
src.diskette.buf.types=DNA2_BUF_UI
|
||||
diskette.buf.types = DNA2_BUF_UI
|
||||
if("ue")
|
||||
src.diskette.buf.types=DNA2_BUF_UI|DNA2_BUF_UE
|
||||
diskette.buf.types = DNA2_BUF_UI | DNA2_BUF_UE
|
||||
if("se")
|
||||
src.diskette.buf.types=DNA2_BUF_SE
|
||||
src.diskette.name = "data disk - '[src.active_record.dna.real_name]'"
|
||||
src.temp = "Save \[[href_list["save_disk"]]\] successful."
|
||||
diskette.buf.types = DNA2_BUF_SE
|
||||
diskette.name = "data disk - '[active_record.dna.real_name]'"
|
||||
temp = "Save \[[href_list["save_disk"]]\] successful."
|
||||
|
||||
else if (href_list["refresh"])
|
||||
src.updateUsrDialog()
|
||||
updateUsrDialog()
|
||||
|
||||
else if (href_list["clone"])
|
||||
var/datum/dna2/record/C = locate(href_list["clone"])
|
||||
var/datum/dna2/record/C = find_record(href_list["clone"])
|
||||
//Look for that player! They better be dead!
|
||||
if(istype(C))
|
||||
//Can't clone without someone to clone. Or a pod. Or if the pod is busy. Or full of gibs.
|
||||
@@ -340,11 +282,12 @@
|
||||
temp = "Error: Data corruption."
|
||||
|
||||
else if (href_list["menu"])
|
||||
src.menu = text2num(href_list["menu"])
|
||||
menu = href_list["menu"]
|
||||
temp = ""
|
||||
scantemp = ""
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
/obj/machinery/computer/cloning/proc/scan_mob(mob/living/carbon/human/subject as mob)
|
||||
if ((isnull(subject)) || (!(ishuman(subject))) || (!subject.dna))
|
||||
@@ -381,13 +324,13 @@
|
||||
subject.dna.check_integrity()
|
||||
|
||||
var/datum/dna2/record/R = new /datum/dna2/record()
|
||||
R.dna=subject.dna
|
||||
R.dna = subject.dna
|
||||
R.ckey = subject.ckey
|
||||
R.id= copytext(md5(subject.real_name), 2, 6)
|
||||
R.name=R.dna.real_name
|
||||
R.types=DNA2_BUF_UI|DNA2_BUF_UE|DNA2_BUF_SE
|
||||
R.languages=subject.languages
|
||||
R.flavor=subject.flavor_texts.Copy()
|
||||
R.id = copytext(md5(subject.real_name), 2, 6)
|
||||
R.name = R.dna.real_name
|
||||
R.types = DNA2_BUF_UI|DNA2_BUF_UE|DNA2_BUF_SE
|
||||
R.languages = subject.languages
|
||||
R.flavor = subject.flavor_texts.Copy()
|
||||
|
||||
//Add an implant if needed
|
||||
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
|
||||
@@ -402,13 +345,13 @@
|
||||
if (!isnull(subject.mind)) //Save that mind so traitors can continue traitoring after cloning.
|
||||
R.mind = "\ref[subject.mind]"
|
||||
|
||||
src.records += R
|
||||
records += R
|
||||
scantemp = "Subject successfully scanned."
|
||||
|
||||
//Find a specific record by key.
|
||||
/obj/machinery/computer/cloning/proc/find_record(var/find_key)
|
||||
var/selected_record = null
|
||||
for(var/datum/dna2/record/R in src.records)
|
||||
for(var/datum/dna2/record/R in records)
|
||||
if (R.ckey == find_key)
|
||||
selected_record = R
|
||||
break
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(!giver && user.unEquip(I))
|
||||
I.forceMove(src)
|
||||
giver = I
|
||||
updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
else if(giver)
|
||||
user << "<span class='warning'>There is already ID card inside.</span>"
|
||||
return
|
||||
@@ -102,40 +102,51 @@
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
if (mode == 1) //Logs
|
||||
dat += "<h3>Activity log</h3><br>"
|
||||
for (var/entry in internal_log)
|
||||
dat += "[entry]<br><hr>"
|
||||
dat += "<a href='?src=\ref[src];action=print'>Print</a><br>"
|
||||
dat += "<a href='?src=\ref[src];mode=0'>Back</a><br>"
|
||||
else
|
||||
dat += "<h3>Guest pass terminal #[uid]</h3><br>"
|
||||
dat += "<a href='?src=\ref[src];mode=1'>View activity log</a><br><br>"
|
||||
dat += "Issuing ID: <a href='?src=\ref[src];action=id'>[giver]</a><br>"
|
||||
dat += "Issued to: <a href='?src=\ref[src];choice=giv_name'>[giv_name]</a><br>"
|
||||
dat += "Reason: <a href='?src=\ref[src];choice=reason'>[reason]</a><br>"
|
||||
dat += "Duration (minutes): <a href='?src=\ref[src];choice=duration'>[duration] m</a><br>"
|
||||
dat += "Access to areas:<br>"
|
||||
if (giver && giver.access)
|
||||
for (var/A in giver.access)
|
||||
var/area = get_access_desc(A)
|
||||
if (A in accesses)
|
||||
area = "<b>[area]</b>"
|
||||
dat += "<a href='?src=\ref[src];choice=access;access=[A]'>[area]</a><br>"
|
||||
dat += "<br><a href='?src=\ref[src];action=issue'>Issue pass</a><br>"
|
||||
ui_interact(user)
|
||||
|
||||
user << browse(dat, "window=guestpass;size=400x520")
|
||||
onclose(user, "guestpass")
|
||||
/**
|
||||
* Display the NanoUI window for the guest pass console.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/computer/guestpass/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
|
||||
var/area_list[0]
|
||||
|
||||
if (giver && giver.access)
|
||||
data["access"] = giver.access
|
||||
for (var/A in giver.access)
|
||||
if(A in accesses)
|
||||
area_list[++area_list.len] = list("area" = A, "area_name" = get_access_desc(A), "on" = 1)
|
||||
else
|
||||
area_list[++area_list.len] = list("area" = A, "area_name" = get_access_desc(A), "on" = null)
|
||||
|
||||
data["giver"] = giver
|
||||
data["giveName"] = giv_name
|
||||
data["reason"] = reason
|
||||
data["duration"] = duration
|
||||
data["area"] = area_list
|
||||
data["mode"] = mode
|
||||
data["log"] = internal_log
|
||||
data["uid"] = uid
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "guest_pass.tmpl", src.name, 400, 520)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
//ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/guestpass/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
usr.set_machine(src)
|
||||
if (href_list["mode"])
|
||||
mode = text2num(href_list["mode"])
|
||||
mode = href_list["mode"]
|
||||
|
||||
if (href_list["choice"])
|
||||
switch(href_list["choice"])
|
||||
@@ -182,7 +193,6 @@
|
||||
if (istype(I, /obj/item/weapon/card/id) && usr.unEquip(I))
|
||||
I.loc = src
|
||||
giver = I
|
||||
updateUsrDialog()
|
||||
|
||||
if ("print")
|
||||
var/dat = "<h3>Activity log of guest pass terminal #[uid]</h3><br>"
|
||||
@@ -214,5 +224,6 @@
|
||||
pass.name = "guest pass #[number]"
|
||||
else
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
nanomanager.update_uis(src)
|
||||
@@ -6,12 +6,10 @@
|
||||
layer = 2.9
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/datum/browser/popup = null
|
||||
var/obj/machinery/computer3/laptop/vended/newlap = null
|
||||
var/obj/item/device/laptop/relap = null
|
||||
var/vendmode = 0
|
||||
|
||||
|
||||
var/cardreader = 0
|
||||
var/floppy = 0
|
||||
var/radionet = 0
|
||||
@@ -34,9 +32,11 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
if(vendmode == 3 && I)
|
||||
nanomanager.update_uis(src)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
nanomanager.update_uis(src)
|
||||
if(vendmode == 0)
|
||||
if(istype(W, /obj/item/device/laptop))
|
||||
var/obj/item/device/laptop/L = W
|
||||
@@ -44,84 +44,49 @@
|
||||
calc_reimburse(L)
|
||||
usr.drop_item()
|
||||
L.loc = src
|
||||
vendmode = 3
|
||||
vendmode = 2
|
||||
usr << "<span class='notice'>You slot your [L.name] into \The [src.name]</span>"
|
||||
nanomanager.update_uis(src)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/lapvend/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
* Display the NanoUI window for the vending machine.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/lapvend/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
var/vendorname = (src.name) //import the machine's name
|
||||
var/dat = "<TT><center><b>[vendorname]</b></center><hr /><br>" //display the name, and added a horizontal rule
|
||||
if(vendmode == 0)
|
||||
dat += "<center><b>Please choose your laptop customization options</b></center><br>"
|
||||
dat += "<center>Your comptuer will automatically be loaded with any programs you can use after the transaction is complete.</center>"
|
||||
dat += "<center><b>Some programs will require additional components to be installed!</center></b><hr /><br>"
|
||||
dat += "<center><b>HDD (Required)</b> : Added</center><br>"
|
||||
dat += "<center><b>Card Reader</b> : <A href='?src=\ref[src];choice=single_add'>Single (50)</a> | <A href='?src=\ref[src];choice=dual_add'>Dual (125)</a></center><br>"
|
||||
dat += "<center><b>Floppy Drive</b>: <A href='?src=\ref[src];choice=floppy_add'>Add (50)</a></center><br>"
|
||||
dat += "<center><b>Radio Network card</b> <A href='?src=\ref[src];choice=radio_add'>Add (50)</a></center><br>"
|
||||
dat += "<center><b>Camera Card</b> <A href='?src=\ref[src];choice=camnet_add'>Add (100)</a></center><br>"
|
||||
dat += "<center><b> Network card</b> <A href='?src=\ref[src];choice=area_add'>Area (75)</a> <A href='?src=\ref[src];choice=prox_add'>Adjacent (50)</a><A href='?src=\ref[src];choice=cable_add'>Powernet (25)</a></center><br>"
|
||||
dat += "<hr /><center> Power source upgrade</center> <A href='?src=\ref[src];choice=high_add'>Extended (175)</a> <A href='?src=\ref[src];choice=super_add'>Unreal (250)</a>"
|
||||
|
||||
if(vendmode == 0 || vendmode == 1)
|
||||
dat += "<hr /><br><center>Cart</center><br>"
|
||||
dat += "<b>Total: [total()]</b><br>"
|
||||
if(cardreader == 1)
|
||||
dat += "<A href='?src=\ref[src];choice=single_rem'>Card Reader: (single) (50)</a><br>"
|
||||
else if (cardreader == 2)
|
||||
dat += "<A href='?src=\ref[src];choice=dual_rem'>Card Reader: (double) (125)</a><br>"
|
||||
else
|
||||
dat += "Card Reader: None<br>"
|
||||
if(floppy == 0)
|
||||
dat += "Floppy Drive: None<br>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];choice=floppy_rem'>Floppy Drive: Added (50)</a><br>"
|
||||
if(radionet == 1)
|
||||
dat += "<A href='?src=\ref[src];choice=radio_rem'>Radio Card: Added (50)</a><br>"
|
||||
else
|
||||
dat += "Radio Card: None<br>"
|
||||
if(camera == 1)
|
||||
dat += "<A href='?src=\ref[src];choice=camnet_rem'>Camera Card: Added (100)</a><br>"
|
||||
else
|
||||
dat += "Camera Card: None<br>"
|
||||
if(network == 1)
|
||||
dat += "<A href='?src=\ref[src];choice=area_rem'>Network card: Area (75)</a><br>"
|
||||
else if(network == 2)
|
||||
dat += "<A href='?src=\ref[src];choice=prox_rem'>Network card: Adjacent (50)</a><br>"
|
||||
else if(network == 3)
|
||||
dat += "<A href='?src=\ref[src];choice=cable_rem'>Network card: Powernet (25)</a><br>"
|
||||
else
|
||||
dat += "Network card: None"
|
||||
if (power == 0)
|
||||
dat += "Power source: Regular"
|
||||
else if (power == 1)
|
||||
dat += "<A href='?src=\ref[src];choice=high_rem'>Power source: Extended (175)</a><br>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];choice=super_rem'>Power source: Unreal (250)</a><br>"
|
||||
|
||||
if(vendmode == 0)
|
||||
dat += "<br><A href='?src=\ref[src];choice=vend'>Vend Laptop</a>"
|
||||
|
||||
if(vendmode == 1)
|
||||
dat += "Please swipe your card and enter your PIN to complete the transaction"
|
||||
|
||||
if(vendmode == 3)
|
||||
dat += "Please swipe your card and enter your PIN to be finish returning your computer<br>"
|
||||
dat += "<a href='?src=\ref[src];choice=cancel'>Cancel</a>"
|
||||
|
||||
|
||||
|
||||
|
||||
popup = new(user, "lapvend", name, 450, 500)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
var/list/data = list()
|
||||
data["mode"] = vendmode
|
||||
data["cardreader"] = cardreader
|
||||
data["floppy"] = floppy
|
||||
data["radionet"] = radionet
|
||||
data["camera"] = camera
|
||||
data["network"] = network
|
||||
data["power"] = power
|
||||
data["total"] = total()
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "laptop_vendor.tmpl", src.name, 480, 425)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
//ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/lapvend/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
switch(href_list["choice"])
|
||||
@@ -146,7 +111,7 @@
|
||||
if ("super_add")
|
||||
power = 2
|
||||
|
||||
if ("single_rem" || "dual_rem")
|
||||
if ("cardreader_rem")
|
||||
cardreader = 0
|
||||
if ("floppy_rem")
|
||||
floppy = 0
|
||||
@@ -154,9 +119,9 @@
|
||||
radionet = 0
|
||||
if ("camnet_rem")
|
||||
camera = 0
|
||||
if ("area_rem" || "prox_rem" || "cable_rem")
|
||||
if ("network_rem")
|
||||
network = 0
|
||||
if ("high_rem" || "super_rem")
|
||||
if ("power_rem")
|
||||
power = 0
|
||||
|
||||
if("vend")
|
||||
@@ -168,9 +133,8 @@
|
||||
relap = null
|
||||
vendmode = 0
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/lapvend/proc/vend()
|
||||
if(cardreader > 0)
|
||||
@@ -253,7 +217,6 @@
|
||||
|
||||
choose_progs(C)
|
||||
vend()
|
||||
popup.close()
|
||||
newlap.close_laptop()
|
||||
newlap = null
|
||||
cardreader = 0
|
||||
|
||||
@@ -30,62 +30,60 @@
|
||||
"Snow Field" = "snowfield", \
|
||||
"Theatre" = "theatre", \
|
||||
"Meeting Hall" = "meetinghall", \
|
||||
"Courtroom" = "courtroom" \
|
||||
"Courtroom" = "courtroom", \
|
||||
"Turn Off" = "turnoff" \
|
||||
)
|
||||
var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp")
|
||||
var/current_program = "turnoff"
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob)
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
dat += "<B>Holodeck Control System</B><BR>"
|
||||
dat += "<HR>Current Loaded Programs:<BR>"
|
||||
for(var/prog in supported_programs)
|
||||
dat += "<A href='?src=\ref[src];program=[supported_programs[prog]]'>([prog])</A><BR>"
|
||||
ui_interact(user)
|
||||
|
||||
dat += "<BR>"
|
||||
dat += "<A href='?src=\ref[src];program=turnoff'>(Turn Off)</A><BR>"
|
||||
/**
|
||||
* Display the NanoUI window for the Holodeck Computer.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/computer/HolodeckControl/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
dat += "<BR>"
|
||||
dat += "Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.<BR>"
|
||||
var/list/data = list()
|
||||
var/program_list[0]
|
||||
var/restricted_program_list[0]
|
||||
|
||||
for(var/P in supported_programs)
|
||||
program_list[++program_list.len] = list("name" = P, "program" = supported_programs[P])
|
||||
|
||||
for(var/P in restricted_programs)
|
||||
restricted_program_list[++restricted_program_list.len] = list("name" = P, "program" = restricted_programs[P])
|
||||
|
||||
data["supportedPrograms"] = program_list
|
||||
data["restrictedPrograms"] = restricted_program_list
|
||||
data["currentProgram"] = current_program
|
||||
if(issilicon(user))
|
||||
dat += "<BR>"
|
||||
if(safety_disabled)
|
||||
if (emagged)
|
||||
dat += "<font color=red><b>ERROR</b>: Cannot re-enable Safety Protocols.</font><BR>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=green>Re-Enable Safety Protocols?</font>)</A><BR>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];AIoverride=1'>(<font color=red>Override Safety Protocols?</font>)</A><BR>"
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(safety_disabled)
|
||||
for(var/prog in restricted_programs)
|
||||
dat += "<A href='?src=\ref[src];program=[restricted_programs[prog]]'>(<font color=red>Begin [prog]</font>)</A><BR>"
|
||||
dat += "Ensure the holodeck is empty before testing.<BR>"
|
||||
dat += "<BR>"
|
||||
dat += "Safety Protocols are <font color=red> DISABLED </font><BR>"
|
||||
data["isSilicon"] = 1
|
||||
else
|
||||
dat += "Safety Protocols are <font color=green> ENABLED </font><BR>"
|
||||
|
||||
data["isSilicon"] = null
|
||||
data["safetyDisabled"] = safety_disabled
|
||||
data["emagged"] = emagged
|
||||
if(linkedholodeck.has_gravity)
|
||||
dat += "Gravity is <A href='?src=\ref[src];gravity=1'><font color=green>(ON)</font></A><BR>"
|
||||
data["gravity"] = 1
|
||||
else
|
||||
dat += "Gravity is <A href='?src=\ref[src];gravity=1'><font color=blue>(OFF)</font></A><BR>"
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
|
||||
return
|
||||
data["gravity"] = null
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "holodeck.tmpl", src.name, 400, 550)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(20)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -97,6 +95,7 @@
|
||||
var/prog = href_list["program"]
|
||||
if(prog in holodeck_programs)
|
||||
loadProgram(holodeck_programs[prog])
|
||||
current_program = href_list["program"]
|
||||
|
||||
else if(href_list["AIoverride"])
|
||||
if(!issilicon(usr))
|
||||
@@ -118,8 +117,8 @@
|
||||
toggleGravity(linkedholodeck)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
@@ -132,7 +131,6 @@
|
||||
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call [company_name] maintenance and do not use the simulator."
|
||||
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
|
||||
return 1
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/proc/update_projections()
|
||||
|
||||
@@ -32,54 +32,37 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "Fax Machine<BR>"
|
||||
ui_interact(user)
|
||||
|
||||
var/scan_name
|
||||
/**
|
||||
* Display the NanoUI window for the fax machine.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/photocopier/faxmachine/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
if(scan)
|
||||
scan_name = scan.name
|
||||
data["scanName"] = scan.name
|
||||
else
|
||||
scan_name = "--------"
|
||||
|
||||
dat += "Confirm Identity: <a href='byond://?src=\ref[src];scan=1'>[scan_name]</a><br>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<a href='byond://?src=\ref[src];logout=1'>{Log Out}</a>"
|
||||
data["scanName"] = null
|
||||
data["bossName"] = boss_name
|
||||
data["authenticated"] = authenticated
|
||||
data["copyItem"] = copyitem
|
||||
if(copyitem)
|
||||
data["copyItemName"] = copyitem.name
|
||||
else
|
||||
dat += "<a href='byond://?src=\ref[src];auth=1'>{Log In}</a>"
|
||||
data["copyItemName"] = null
|
||||
data["cooldown"] = sendcooldown
|
||||
data["destination"] = destination
|
||||
|
||||
dat += "<hr>"
|
||||
|
||||
if(authenticated)
|
||||
dat += "<b>Logged in to:</b> [boss_name] Quantum Entanglement Network<br><br>"
|
||||
|
||||
if(copyitem)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Item</a><br><br>"
|
||||
|
||||
if(sendcooldown)
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
|
||||
else
|
||||
|
||||
dat += "<a href='byond://?src=\ref[src];send=1'>Send</a><br>"
|
||||
dat += "<b>Currently sending:</b> [copyitem.name]<br>"
|
||||
dat += "<b>Sending to:</b> <a href='byond://?src=\ref[src];dept=1'>[destination]</a><br>"
|
||||
|
||||
else
|
||||
if(sendcooldown)
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
dat += "<b>Transmitter arrays realigning. Please stand by.</b><br>"
|
||||
else
|
||||
dat += "Please insert paper to send via secure connection.<br><br>"
|
||||
|
||||
else
|
||||
dat += "Proper authentication is required to use this device.<br><br>"
|
||||
|
||||
if(copyitem)
|
||||
dat += "<a href ='byond://?src=\ref[src];remove=1'>Remove Item</a><br>"
|
||||
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "fax.tmpl", src.name, 500, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(10) //this machine is so unimportant let's not have it update that often.
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/Topic(href, href_list)
|
||||
if(href_list["send"])
|
||||
@@ -99,7 +82,6 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
usr.put_in_hands(copyitem)
|
||||
usr << "<span class='notice'>You take \the [copyitem] out of \the [src].</span>"
|
||||
copyitem = null
|
||||
updateUsrDialog()
|
||||
|
||||
if(href_list["scan"])
|
||||
if (scan)
|
||||
@@ -131,7 +113,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
if(href_list["logout"])
|
||||
authenticated = 0
|
||||
|
||||
updateUsrDialog()
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/faxmachine/proc/sendfax(var/destination)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
@@ -216,4 +198,4 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
C << 'sound/effects/printer.ogg'
|
||||
C << 'sound/effects/printer.ogg'
|
||||
|
||||
@@ -30,24 +30,32 @@
|
||||
/obj/machinery/photocopier/attack_hand(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
|
||||
var/dat = "Photocopier<BR><BR>"
|
||||
if(copyitem)
|
||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Item</a><BR>"
|
||||
if(toner)
|
||||
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
|
||||
dat += "Printing: [copies] copies."
|
||||
dat += "<a href='byond://?src=\ref[src];min=1'>-</a> "
|
||||
dat += "<a href='byond://?src=\ref[src];add=1'>+</a><BR><BR>"
|
||||
else if(toner)
|
||||
dat += "Please insert something to copy.<BR><BR>"
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
* Display the NanoUI window for the photocopier.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/photocopier/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
data["copyItem"] = copyitem
|
||||
data["toner"] = toner
|
||||
data["copies"] = copies
|
||||
data["maxCopies"] = maxcopies
|
||||
if(istype(user,/mob/living/silicon))
|
||||
dat += "<a href='byond://?src=\ref[src];aipic=1'>Print photo from database</a><BR><BR>"
|
||||
dat += "Current toner level: [toner]"
|
||||
if(!toner)
|
||||
dat +="<BR>Please insert a new toner cartridge!"
|
||||
user << browse(dat, "window=copier")
|
||||
onclose(user, "copier")
|
||||
return
|
||||
data["isSilicon"] = 1
|
||||
else
|
||||
data["isSilicon"] = null
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "photocopier.tmpl", src.name, 300, 250)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(10)
|
||||
|
||||
/obj/machinery/photocopier/Topic(href, href_list)
|
||||
if(href_list["copy"])
|
||||
@@ -72,22 +80,18 @@
|
||||
break
|
||||
|
||||
use_power(active_power_usage)
|
||||
updateUsrDialog()
|
||||
else if(href_list["remove"])
|
||||
if(copyitem)
|
||||
copyitem.loc = usr.loc
|
||||
usr.put_in_hands(copyitem)
|
||||
usr << "<span class='notice'>You take \the [copyitem] out of \the [src].</span>"
|
||||
copyitem = null
|
||||
updateUsrDialog()
|
||||
else if(href_list["min"])
|
||||
if(copies > 1)
|
||||
copies--
|
||||
updateUsrDialog()
|
||||
else if(href_list["add"])
|
||||
if(copies < maxcopies)
|
||||
copies++
|
||||
updateUsrDialog()
|
||||
else if(href_list["aipic"])
|
||||
if(!istype(usr,/mob/living/silicon)) return
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
@@ -109,7 +113,8 @@
|
||||
p.desc += " - Copied by [tempAI.name]"
|
||||
toner -= 5
|
||||
sleep(15)
|
||||
updateUsrDialog()
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/photocopier/attackby(obj/item/O as obj, mob/user as mob)
|
||||
if(istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo) || istype(O, /obj/item/weapon/paper_bundle))
|
||||
@@ -119,7 +124,6 @@
|
||||
O.loc = src
|
||||
user << "<span class='notice'>You insert \the [O] into \the [src].</span>"
|
||||
flick(insert_anim, src)
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||
else if(istype(O, /obj/item/device/toner))
|
||||
@@ -129,7 +133,6 @@
|
||||
var/obj/item/device/toner/T = O
|
||||
toner += T.toner_amount
|
||||
qdel(O)
|
||||
updateUsrDialog()
|
||||
else
|
||||
user << "<span class='notice'>This cartridge is not yet ready for replacement! Use up the rest of the toner.</span>"
|
||||
else if(istype(O, /obj/item/weapon/wrench))
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
#define LIQUID 2
|
||||
#define GAS 3
|
||||
|
||||
#define BOTTLE_SPRITES list("bottle-1", "bottle-2", "bottle-3", "bottle-4") //list of available bottle sprites
|
||||
#define REAGENTS_PER_SHEET 20
|
||||
|
||||
|
||||
@@ -23,10 +22,11 @@
|
||||
var/condi = 0
|
||||
var/useramount = 15 // Last used amount
|
||||
var/pillamount = 10
|
||||
var/bottlesprite = "bottle-1" //yes, strings
|
||||
var/pillsprite = "1"
|
||||
var/client/has_sprites = list()
|
||||
var/bottlesprite = 1
|
||||
var/pillsprite = 1
|
||||
var/max_pill_count = 20
|
||||
var/tab = "home"
|
||||
var/analyze_data[0]
|
||||
flags = OPENCONTAINER
|
||||
|
||||
/obj/machinery/chem_master/New()
|
||||
@@ -56,7 +56,6 @@
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the beaker to the machine!"
|
||||
src.updateUsrDialog()
|
||||
icon_state = "mixer1"
|
||||
|
||||
else if(istype(B, /obj/item/weapon/storage/pill_bottle))
|
||||
@@ -69,9 +68,74 @@
|
||||
user.drop_item()
|
||||
B.loc = src
|
||||
user << "You add the pill bottle into the dispenser slot!"
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
ui_interact(user)
|
||||
|
||||
/**
|
||||
* Display the NanoUI window for the chem master.
|
||||
*
|
||||
* See NanoUI documentation for details.
|
||||
*/
|
||||
/obj/machinery/chem_master/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
user.set_machine(src)
|
||||
|
||||
var/list/data = list()
|
||||
data["tab"] = tab
|
||||
data["condi"] = condi
|
||||
|
||||
if(loaded_pill_bottle)
|
||||
data["pillBottle"] = list("total" = loaded_pill_bottle.contents.len, "max" = loaded_pill_bottle.max_storage_space)
|
||||
else
|
||||
data["pillBottle"] = null
|
||||
|
||||
if(beaker)
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
var/ui_reagent_beaker_list[0]
|
||||
for(var/datum/reagent/G in R.reagent_list)
|
||||
ui_reagent_beaker_list[++ui_reagent_beaker_list.len] = list("name" = G.name, "volume" = G.volume, "description" = G.description, "id" = G.id)
|
||||
|
||||
data["beaker"] = list("total_volume" = R.total_volume, "reagent_list" = ui_reagent_beaker_list)
|
||||
else
|
||||
data["beaker"] = null
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/ui_reagent_list[0]
|
||||
for(var/datum/reagent/N in reagents.reagent_list)
|
||||
ui_reagent_list[++ui_reagent_list.len] = list("name" = N.name, "volume" = N.volume, "description" = N.description, "id" = N.id)
|
||||
|
||||
data["reagents"] = list("total_volume" = reagents.total_volume, "reagent_list" = ui_reagent_list)
|
||||
else
|
||||
data["reagents"] = null
|
||||
|
||||
data["mode"] = mode
|
||||
|
||||
if(analyze_data)
|
||||
data["analyzeData"] = list("name" = analyze_data["name"], "desc" = analyze_data["desc"], "blood_type" = analyze_data["blood_type"], "blood_DNA" = analyze_data["blood_DNA"])
|
||||
else
|
||||
data["analyzeData"] = null
|
||||
|
||||
data["pillSprite"] = pillsprite
|
||||
data["bottleSprite"] = bottlesprite
|
||||
|
||||
var/P[20] //how many pill sprites there are. Sprites are taken from chemical.dmi and can be found in nano/images/pill.png
|
||||
for(var/i = 1 to P.len)
|
||||
P[i] = i
|
||||
data["pillSpritesAmount"] = P
|
||||
|
||||
data["bottleSpritesAmount"] = list(1, 2, 3, 4) //how many bottle sprites there are. Sprites are taken from chemical.dmi and can be found in nano/images/pill.png
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "chem_master.tmpl", src.name, 575, 400)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/chem_master/Topic(href, href_list)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(usr.stat || usr.restrained()) return
|
||||
@@ -80,20 +144,19 @@
|
||||
src.add_fingerprint(usr)
|
||||
usr.set_machine(src)
|
||||
|
||||
if(href_list["tab_select"])
|
||||
tab = href_list["tab_select"]
|
||||
|
||||
if (href_list["ejectp"])
|
||||
if(loaded_pill_bottle)
|
||||
loaded_pill_bottle.loc = src.loc
|
||||
loaded_pill_bottle = null
|
||||
else if(href_list["close"])
|
||||
usr << browse(null, "window=chemmaster")
|
||||
usr.unset_machine()
|
||||
return
|
||||
|
||||
if(beaker)
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
if (href_list["analyze"])
|
||||
var/dat = ""
|
||||
if (tab == "analyze")
|
||||
analyze_data["name"] = href_list["name"]
|
||||
analyze_data["desc"] = href_list["desc"]
|
||||
if(!condi)
|
||||
if(href_list["name"] == "Blood")
|
||||
var/datum/reagent/blood/G
|
||||
@@ -101,16 +164,9 @@
|
||||
if(F.name == href_list["name"])
|
||||
G = F
|
||||
break
|
||||
var/A = G.name
|
||||
var/B = G.data["blood_type"]
|
||||
var/C = G.data["blood_DNA"]
|
||||
dat += "<TITLE>Chemmaster 3000</TITLE>Chemical infos:<BR><BR>Name:<BR>[A]<BR><BR>Description:<BR>Blood Type: [B]<br>DNA: [C]<BR><BR><BR><A href='?src=\ref[src];main=1'>(Back)</A>"
|
||||
else
|
||||
dat += "<TITLE>Chemmaster 3000</TITLE>Chemical infos:<BR><BR>Name:<BR>[href_list["name"]]<BR><BR>Description:<BR>[href_list["desc"]]<BR><BR><BR><A href='?src=\ref[src];main=1'>(Back)</A>"
|
||||
else
|
||||
dat += "<TITLE>Condimaster 3000</TITLE>Condiment infos:<BR><BR>Name:<BR>[href_list["name"]]<BR><BR>Description:<BR>[href_list["desc"]]<BR><BR><BR><A href='?src=\ref[src];main=1'>(Back)</A>"
|
||||
usr << browse(dat, "window=chem_master;size=575x400")
|
||||
return
|
||||
analyze_data["name"] = G.name
|
||||
analyze_data["blood_type"] = G.data["blood_type"]
|
||||
analyze_data["blood_DNA"] = G.data["blood_DNA"]
|
||||
|
||||
else if (href_list["add"])
|
||||
|
||||
@@ -147,9 +203,6 @@
|
||||
else if (href_list["toggle"])
|
||||
mode = !mode
|
||||
|
||||
else if (href_list["main"])
|
||||
attack_hand(usr)
|
||||
return
|
||||
else if (href_list["eject"])
|
||||
if(beaker)
|
||||
beaker:loc = src.loc
|
||||
@@ -185,9 +238,8 @@
|
||||
P.icon_state = "pill"+pillsprite
|
||||
reagents.trans_to_obj(P,amount_per_pill)
|
||||
if(src.loaded_pill_bottle)
|
||||
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.storage_slots)
|
||||
if(loaded_pill_bottle.contents.len < loaded_pill_bottle.max_storage_space)
|
||||
P.loc = loaded_pill_bottle
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if (href_list["createbottle"])
|
||||
if(!condi)
|
||||
@@ -197,106 +249,23 @@
|
||||
P.name = "[name] bottle"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = bottlesprite
|
||||
P.icon_state = "bottle"+bottlesprite
|
||||
reagents.trans_to_obj(P,60)
|
||||
P.update_icon()
|
||||
else
|
||||
var/obj/item/weapon/reagent_containers/food/condiment/P = new/obj/item/weapon/reagent_containers/food/condiment(src.loc)
|
||||
reagents.trans_to_obj(P,50)
|
||||
else if(href_list["change_pill"])
|
||||
#define MAX_PILL_SPRITE 20 //max icon state of the pill sprites
|
||||
var/dat = "<table>"
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&pill_sprite=[i]\"><img src=\"pill[i].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
else if(href_list["change_bottle"])
|
||||
var/dat = "<table>"
|
||||
for(var/sprite in BOTTLE_SPRITES)
|
||||
dat += "<tr><td><a href=\"?src=\ref[src]&bottle_sprite=[sprite]\"><img src=\"[sprite].png\" /></a></td></tr>"
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=chem_master")
|
||||
return
|
||||
|
||||
else if(href_list["pill_sprite"])
|
||||
pillsprite = href_list["pill_sprite"]
|
||||
else if(href_list["bottle_sprite"])
|
||||
bottlesprite = href_list["bottle_sprite"]
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
nanomanager.update_uis(src)
|
||||
|
||||
/obj/machinery/chem_master/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/chem_master/attack_hand(mob/user as mob)
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
user.set_machine(src)
|
||||
if(!(user.client in has_sprites))
|
||||
spawn()
|
||||
has_sprites += user.client
|
||||
for(var/i = 1 to MAX_PILL_SPRITE)
|
||||
usr << browse_rsc(icon('icons/obj/chemical.dmi', "pill" + num2text(i)), "pill[i].png")
|
||||
for(var/sprite in BOTTLE_SPRITES)
|
||||
usr << browse_rsc(icon('icons/obj/chemical.dmi', sprite), "[sprite].png")
|
||||
var/dat = ""
|
||||
if(!beaker)
|
||||
dat = "Please insert beaker.<BR>"
|
||||
if(src.loaded_pill_bottle)
|
||||
dat += "<A href='?src=\ref[src];ejectp=1'>Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.storage_slots]\]</A><BR><BR>"
|
||||
else
|
||||
dat += "No pill bottle inserted.<BR><BR>"
|
||||
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
||||
else
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
dat += "<A href='?src=\ref[src];eject=1'>Eject beaker and Clear Buffer</A><BR>"
|
||||
if(src.loaded_pill_bottle)
|
||||
dat += "<A href='?src=\ref[src];ejectp=1'>Eject Pill Bottle \[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.storage_slots]\]</A><BR><BR>"
|
||||
else
|
||||
dat += "No pill bottle inserted.<BR><BR>"
|
||||
if(!R.total_volume)
|
||||
dat += "Beaker is empty."
|
||||
else
|
||||
dat += "Add to buffer:<BR>"
|
||||
for(var/datum/reagent/G in R.reagent_list)
|
||||
dat += "[G.name] , [G.volume] Units - "
|
||||
dat += "<A href='?src=\ref[src];analyze=1;desc=[G.description];name=[G.name]'>(Analyze)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=1'>(1)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=5'>(5)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=10'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=30'>(30)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=60'>(60)</A> "
|
||||
dat += "<A href='?src=\ref[src];add=[G.id];amount=[G.volume]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];addcustom=[G.id]'>(Custom)</A><BR>"
|
||||
|
||||
dat += "<HR>Transfer to <A href='?src=\ref[src];toggle=1'>[(!mode ? "disposal" : "beaker")]:</A><BR>"
|
||||
if(reagents.total_volume)
|
||||
for(var/datum/reagent/N in reagents.reagent_list)
|
||||
dat += "[N.name] , [N.volume] Units - "
|
||||
dat += "<A href='?src=\ref[src];analyze=1;desc=[N.description];name=[N.name]'>(Analyze)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=1'>(1)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=5'>(5)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=10'>(10)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=30'>(30)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=60'>(60)</A> "
|
||||
dat += "<A href='?src=\ref[src];remove=[N.id];amount=[N.volume]'>(All)</A> "
|
||||
dat += "<A href='?src=\ref[src];removecustom=[N.id]'>(Custom)</A><BR>"
|
||||
else
|
||||
dat += "Empty<BR>"
|
||||
if(!condi)
|
||||
dat += "<HR><BR><A href='?src=\ref[src];createpill=1'>Create pill (60 units max)</A><a href=\"?src=\ref[src]&change_pill=1\"><img src=\"pill[pillsprite].png\" /></a><BR>"
|
||||
dat += "<A href='?src=\ref[src];createpill_multiple=1'>Create multiple pills</A><BR>"
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (60 units max)<a href=\"?src=\ref[src]&change_bottle=1\"><img src=\"[bottlesprite].png\" /></A>"
|
||||
else
|
||||
dat += "<A href='?src=\ref[src];createbottle=1'>Create bottle (50 units max)</A>"
|
||||
if(!condi)
|
||||
user << browse("<TITLE>Chemmaster 3000</TITLE>Chemmaster menu:<BR><BR>[dat]", "window=chem_master;size=575x400")
|
||||
else
|
||||
user << browse("<TITLE>Condimaster 3000</TITLE>Condimaster menu:<BR><BR>[dat]", "window=chem_master;size=575x400")
|
||||
onclose(user, "chem_master")
|
||||
return
|
||||
|
||||
/obj/machinery/chem_master/condimaster
|
||||
name = "CondiMaster 3000"
|
||||
condi = 1
|
||||
|
||||
37
html/changelogs/Sin4_UIs.yml
Normal file
37
html/changelogs/Sin4_UIs.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Sin4
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- rscadd: "Added NanoUI for Advanced Body Scanners, Arcade, Atmospherics Control Computer, Chemmaster, Cloning Console, Fax Machines, Guestpass Console, Holodeck Computer, Laptop Vendors, Operating Computer, and Photocopiers."
|
||||
- bugfix: "Fixes chemmaster not putting pills in pill bottles."
|
||||
@@ -245,6 +245,32 @@
|
||||
.uiIcon16.icon-note64 { background-image: url(uiIcons64.png); background-position: -64px -64px; width: 64px; height: 64px; }
|
||||
.uiIcon16.icon-close64 { background-image: url(uiIcons64.png); background-position: -128px -64px; width: 64px; height: 64px; }
|
||||
|
||||
.uiIcon16.icon-pill { background-image: url(pills32.png); width: 32px; height: 32px;}
|
||||
.uiIcon16.icon-pill.pill1 { background-position: 0 0; }
|
||||
.uiIcon16.icon-pill.pill2 { background-position: -32px 0; }
|
||||
.uiIcon16.icon-pill.pill3 { background-position: -64px 0; }
|
||||
.uiIcon16.icon-pill.pill4 { background-position: -96px 0; }
|
||||
.uiIcon16.icon-pill.pill5 { background-position: -128px 0; }
|
||||
.uiIcon16.icon-pill.pill6 { background-position: 0 -32px; }
|
||||
.uiIcon16.icon-pill.pill7 { background-position: -32px -32px; }
|
||||
.uiIcon16.icon-pill.pill8 { background-position: -64px -32px; }
|
||||
.uiIcon16.icon-pill.pill9 { background-position: -96px -32px; }
|
||||
.uiIcon16.icon-pill.pill10 { background-position: -128px -32px; }
|
||||
.uiIcon16.icon-pill.pill11 { background-position: 0 -64px; }
|
||||
.uiIcon16.icon-pill.pill12 { background-position: -32px -64px; }
|
||||
.uiIcon16.icon-pill.pill13 { background-position: -64px -64px; }
|
||||
.uiIcon16.icon-pill.pill14 { background-position: -96px -64px; }
|
||||
.uiIcon16.icon-pill.pill15 { background-position: -128px -64px; }
|
||||
.uiIcon16.icon-pill.pill16 { background-position: 0 -96px; }
|
||||
.uiIcon16.icon-pill.pill17 { background-position: -32px -96px; }
|
||||
.uiIcon16.icon-pill.pill18 { background-position: -64px -96px; }
|
||||
.uiIcon16.icon-pill.pill19 { background-position: -96px -96px; }
|
||||
.uiIcon16.icon-pill.pill20 { background-position: -128px -96px; }
|
||||
.uiIcon16.icon-pill.bottle1 { background-position: 0 -128px; }
|
||||
.uiIcon16.icon-pill.bottle2 { background-position: -32px -128px; }
|
||||
.uiIcon16.icon-pill.bottle3 { background-position: -64px -128px; }
|
||||
.uiIcon16.icon-pill.bottle4 { background-position: -96px -128px; }
|
||||
|
||||
.mapIcon16 {
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
|
||||
@@ -45,6 +45,19 @@ hr {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.link32 {
|
||||
float: left;
|
||||
min-width: 15px;
|
||||
max-width: 31px;
|
||||
height: 31px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
background: #40628a;
|
||||
border: 1px solid #161616;
|
||||
margin: 0 2px 2px 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.hasIcon {
|
||||
padding: 0px 4px 4px 0px;
|
||||
}
|
||||
@@ -249,7 +262,7 @@ div.notice {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.itemContentNarrow, .itemContent {
|
||||
.itemContentNarrow, .itemContent, .itemContentWide, .itemContentSmall, .itemContentMedium {
|
||||
float: left;
|
||||
}
|
||||
|
||||
@@ -287,17 +300,14 @@ div.notice {
|
||||
}
|
||||
|
||||
.itemContentWide {
|
||||
float: left;
|
||||
width: 79%;
|
||||
}
|
||||
|
||||
.itemContentSmall {
|
||||
float: left;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.itemContentMedium {
|
||||
float: left;
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
@@ -649,7 +659,7 @@ th.misc {
|
||||
}
|
||||
|
||||
.oxyloss {
|
||||
color: blue;
|
||||
color: #4444FF;
|
||||
}
|
||||
|
||||
/* 75px width used in power monitoring console buttons */
|
||||
|
||||
BIN
nano/images/pills32.png
Normal file
BIN
nano/images/pills32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
244
nano/templates/adv_med.tmpl
Normal file
244
nano/templates/adv_med.tmpl
Normal file
@@ -0,0 +1,244 @@
|
||||
<!--
|
||||
Title: Body Scanner UI
|
||||
Used In File(s): \code\game\machinery\adv_med.dm
|
||||
-->
|
||||
{{if !data.occupied}}
|
||||
<h3>No occupant detected.</h3>
|
||||
{{else}}
|
||||
<h4><b>Occupant Data:</b></h4>
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
Name:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:data.occupant.name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
Health:
|
||||
</div>
|
||||
{{:helper.displayBar(data.occupant.health, 0, 100, (data.occupant.health >= 50) ? 'good' : (data.occupant.health >= 25) ? 'average' : 'bad')}}
|
||||
<div class="itemContent" style="width: 60px">
|
||||
{{:helper.round(data.occupant.health*10)/10}}%
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
Status:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.occupant.stat==0}}
|
||||
Stable
|
||||
{{else data.occupant.stat==1}}
|
||||
Non-Responsive
|
||||
{{else}}
|
||||
Dead
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{:helper.link('Print', 'document', {'print_p' : 1, 'name' : data.occupant.name})}}
|
||||
<h4><b>Damage:</b></h4>
|
||||
<table class='item'>
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 10%;'>Brute:</td>
|
||||
<td class='itemContent brute' style='width: 10%;'>{{:data.occupant.bruteLoss}}</td>
|
||||
<td class='itemLabel' style='width: 15%;'>Brain:</td>
|
||||
<td class='itemContent' style='width: 15%;'>{{:data.occupant.brainLoss}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 10%;'>Burn:</td>
|
||||
<td class='itemContent burn' style='width: 10%;'>{{:data.occupant.fireLoss}}</td>
|
||||
<td class='itemLabel' style='width: 15%;'>Radiation:</td>
|
||||
<td class='itemContent' style='width: 15%;'>{{:data.occupant.radLoss}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 10%;'>Oxygen:</td>
|
||||
<td class='itemContent oxyloss' style='width: 10%;'>{{:data.occupant.oxyLoss}}</td>
|
||||
<td class='itemLabel' style='width: 15%;'>Genetic:</td>
|
||||
<td class='itemContent' style='width: 15%;'>{{:data.occupant.cloneLoss}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 10%;'>Toxins:</td>
|
||||
<td class='itemContent toxin' style='width: 10%;'>{{:data.occupant.toxLoss}}</td>
|
||||
<td class='itemLabel' style='width: 15%;'>Paralysis:</td>
|
||||
<td class='itemContent' style='width: 20%;'>{{:data.occupant.paralysis}}% ({{:data.occupant.paralysisSeconds}} seconds left!)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='itemLabelNarrow'>Body Temperature:</td>
|
||||
<td class="itemContentMedium">{{:helper.round(data.occupant.bodyTempC*10)/10}}°C, {{:helper.round(data.occupant.bodyTempF*10)/10}}°F</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{{if data.occupant.hasVirus}}
|
||||
<div class="notice">
|
||||
Viral pathogen detected in blood stream.
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if data.occupant.hasBorer}}
|
||||
<div class="notice">
|
||||
Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if data.occupant.blind}}
|
||||
<div class="item bad">Pupils unresponsive.</div>
|
||||
{{/if}}
|
||||
{{if data.occupant.nearsighted}}
|
||||
<div class="item bad">Retinal Misalignment Detected</div>
|
||||
{{/if}}
|
||||
<h4><b>Blood</b></h4>
|
||||
<table class="item">
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 10%;'>Volume:</td>
|
||||
<td class='itemContent' style='width: 10%;'>{{:data.occupant.blood.volume}}</td>
|
||||
<td class='itemLabel' style='width: 10%;'>Percent:</td>
|
||||
<td class='itemContent' style='width: 10%;'>{{:data.occupant.blood.percent}}%</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>Reagents</h4>
|
||||
{{if data.occupant.reagents}}
|
||||
<table class='item'>
|
||||
{{for data.occupant.reagents}}
|
||||
<tr>
|
||||
<td class='itemLabel' style='width: 20%;'>{{:value.name}}:</td>
|
||||
<td class='itemContent' style='width: 10%;'>{{:value.amount}}</td>
|
||||
</tr>
|
||||
{{/for}}
|
||||
</table>
|
||||
{{else}}
|
||||
<div class='item'>No reagents detected.</div>
|
||||
{{/if}}
|
||||
<h4><b>External Organs</b></h4>
|
||||
<div class="itemGroup">
|
||||
{{for data.occupant.extOrgan}}
|
||||
<div class="item">
|
||||
{{if value.status.destroyed}}
|
||||
<div class="itemLabelWide">
|
||||
<b>{{:value.name}}</b><span class="bad"> - DESTROYED</span>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
<b>{{:value.name}}</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{if value.status.broken}}
|
||||
{{:value.status.broken}}
|
||||
{{else value.status.splinted}}
|
||||
Splinted
|
||||
{{else value.status.robotic}}
|
||||
Robotic
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="itemLabelWide">
|
||||
Brute/Burn
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{:value.bruteLoss}}/{{:value.fireLoss}}
|
||||
</div>
|
||||
<div class="itemLabelWide">
|
||||
Injuries
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{if !value.status.bleeding}}
|
||||
{{if !value.status.internalBleeding}}
|
||||
No Injuries Detected
|
||||
{{else}}
|
||||
<span class="bad">Internal Bleeding Detected</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{if value.status.internalBleeding}}
|
||||
<div class='notice'>Internal Bleeding Detected. External Bleeding Detected.</div>
|
||||
{{else}}
|
||||
<span class="average">External Bleeding Detected</span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{if value.germ_level > 100}}
|
||||
<div class="itemLabelWide">
|
||||
Infection
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{if value.germ_level < 300}}
|
||||
Mild Infection
|
||||
{{else value.germ_level < 400}}
|
||||
Mild Infection+
|
||||
{{else value.germ_level < 500}}
|
||||
Mild Infection++
|
||||
{{else value.germ_level < 700}}
|
||||
Acute Infection
|
||||
{{else value.germ_level < 800}}
|
||||
Acute Infection+
|
||||
{{else value.germ_level < 900}}
|
||||
Acute Infection++
|
||||
{{else value.germ_level >= 900}}
|
||||
Septic
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if value.open}}
|
||||
<div class="itemLabelWider">
|
||||
Operation Status
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
Open Incision
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if value.implants_len}}
|
||||
<div class="itemLabelWide">
|
||||
Implants
|
||||
</div>
|
||||
{{for value.implants :impValue:impindex}}
|
||||
<div class="itemContentNarrow">
|
||||
{{:impValue.known ? impValue.name : "Unknown"}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/for}}
|
||||
</div>
|
||||
<h4><b>Internal Organs</b></h4>
|
||||
<div class="itemGroup">
|
||||
{{for data.occupant.intOrgan}}
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">
|
||||
<b>{{:value.name}}</b>
|
||||
</div>
|
||||
<div class='itemContentNarrow'>
|
||||
{{:value.desc != null ? value.desc : ""}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
{{if value.germ_level > 100}}
|
||||
<div class="itemLabel">
|
||||
Infection
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{if value.germ_level < 300}}
|
||||
Mild Infection
|
||||
{{else value.germ_level < 400}}
|
||||
Mild Infection+
|
||||
{{else value.germ_level < 500}}
|
||||
Mild Infection++
|
||||
{{else value.germ_level < 700}}
|
||||
Acute Infection
|
||||
{{else value.germ_level < 800}}
|
||||
Acute Infection+
|
||||
{{else value.germ_level < 900}}
|
||||
Acute Infection++
|
||||
{{else value.germ_level >= 900}}
|
||||
Septic
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="itemLabelWide">
|
||||
Damage
|
||||
</div>
|
||||
<div class="itemContentNarrow">
|
||||
{{:value.damage}}
|
||||
</div>
|
||||
</div>
|
||||
{{/for}}
|
||||
</div>
|
||||
{{/if}}
|
||||
30
nano/templates/arcade_battle.tmpl
Normal file
30
nano/templates/arcade_battle.tmpl
Normal file
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
Interface for battle arcade machines
|
||||
See: code/game/machinery/computer/arcade.dm
|
||||
-->
|
||||
|
||||
<h3 style='text-align: center;'>{{:data.enemyName}}</h3>
|
||||
{{if data.gameOver}}
|
||||
<h5 style='text-align: center;'>{{:data.temp}}</h5>
|
||||
{{else}}
|
||||
<h5 style='text-align: center;'>{{:data.temp}}</h5>
|
||||
<h5 style='text-align: center;'>{{:data.enemyAction}}</h5>
|
||||
{{/if}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: auto; margin-right: 5px;'>Health:</div>
|
||||
<div class='itemContent' style='width: auto; margin-right: 15px;'><b>{{:data.playerHP}}</b></div>
|
||||
<div class='itemLabel' style='width: auto; margin-right: 5px;'>Magic:</div>
|
||||
<div class='itemContent' style='width: auto; margin-right: 15px;'><b>{{:data.playerMP}}</b></div>
|
||||
<div class='itemLabel' style='width: auto; margin-right: 5px;'>Enemy Health:</div>
|
||||
<div class='itemContent' style='width: auto; margin-right: 15px;'><b>{{:data.enemyHP}}</b></div>
|
||||
</div>
|
||||
|
||||
{{if data.gameOver}}
|
||||
<div class='item'>{{:helper.link('New Game', null, {'newgame' : 1})}}</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
{{:helper.link('Attack', null, {'attack' : 1})}}
|
||||
{{:helper.link('Heal', null, {'heal' : 1})}}
|
||||
{{:helper.link('Recharge Power', null, {'charge' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
224
nano/templates/atmo_control.tmpl
Normal file
224
nano/templates/atmo_control.tmpl
Normal file
@@ -0,0 +1,224 @@
|
||||
<!--
|
||||
Interface for air control computers
|
||||
See: code/game/machinery/atmo_control.dm
|
||||
-->
|
||||
{{if data.sensors}}
|
||||
{{for data.sensors}}
|
||||
{{if value.sensor_data}}
|
||||
<div class='itemGroup'>
|
||||
<div class='item'><b>{{:value.long_name}}</b></div>
|
||||
{{if value.sensor_data.pressure}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 24%;'>Pressure:</div>
|
||||
<div class='itemContentNarrow'>{{:value.sensor_data.pressure}} kPa</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if value.sensor_data.temperature}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 24%;'>Temperature:</div>
|
||||
<div class='itemContentNarrow'>{{:value.sensor_data.temperature}} kPa</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if value.sensor_data.oxygen || value.sensor_data.nitrogen || value.sensor_data.carbon_dioxide || value.sensor_data.phoron}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 24%;'>Gas Composition:</div>
|
||||
{{if value.sensor_data.oxygen}}
|
||||
<div class='itemContent' style='width: 19%;'>{{:value.sensor_data.pressure}}% O2</div>
|
||||
{{/if}}
|
||||
{{if value.sensor_data.nitrogen}}
|
||||
<div class='itemContent' style='width: 19%;'>{{:value.sensor_data.pressure}}% N</div>
|
||||
{{/if}}
|
||||
{{if value.sensor_data.carbon_dioxide}}
|
||||
<div class='itemContent' style='width: 19%;'>{{:value.sensor_data.pressure}}% CO2</div>
|
||||
{{/if}}
|
||||
{{if value.sensor_data.phoron}}
|
||||
<div class='itemContent' style='width: 19%;'>{{:value.sensor_data.pressure}}% TX</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>{{:value.long_name}} can not be found!</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
No sensors connected.
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if data.tanks || data.core}}
|
||||
<h2>
|
||||
{{if data.tanks}}
|
||||
Tank Control System
|
||||
{{else data.core}}
|
||||
Core Cooling Control System
|
||||
{{/if}}
|
||||
</h2>
|
||||
|
||||
{{if data.input_info}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>
|
||||
{{if data.tanks}}
|
||||
<b>Input</b>:
|
||||
{{else data.core}}
|
||||
<b>Coolant Input</b>:
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{if data.input_info.power}}
|
||||
Injecting
|
||||
{{else}}
|
||||
On Hold
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>Flow Rate Limit:</div>
|
||||
<div class='itemContent'>{{:data.input_info.volume_rate}} L/s</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>Command:</div>
|
||||
{{:helper.link('Toggle Power', 'power', {'in_toggle_injector' : 1})}}
|
||||
{{:helper.link('Set Flow Rate', 'pencil', {'in_set_flowrate' : 1})}}
|
||||
{{:helper.link('Refresh', 'refresh', {'in_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find input port</div>
|
||||
{{:helper.link('Search', 'search', {'in_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>
|
||||
Flow Rate Limit:
|
||||
</div>
|
||||
<div class='itemContent' style='width: 75%;'>
|
||||
{{:helper.link('100', 'minus', {'adj_input_flow_rate' : -100})}}
|
||||
{{:helper.link('10', 'minus', {'adj_input_flow_rate' : -10})}}
|
||||
{{:helper.link('1', 'minus', {'adj_input_flow_rate' : -1})}}
|
||||
{{:helper.link('0.1', 'minus', {'adj_input_flow_rate' : -0.1})}}
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.input_flow_setting}} L/s </div>
|
||||
{{:helper.link('0.1', 'plus', {'adj_input_flow_rate' : 0.1})}}
|
||||
{{:helper.link('1', 'plus', {'adj_input_flow_rate' : 1})}}
|
||||
{{:helper.link('10', 'plus', {'adj_input_flow_rate' : 10})}}
|
||||
{{:helper.link('100', 'plus', {'adj_input_flow_rate' : 100})}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if data.output_info}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>
|
||||
{{if data.tanks}}
|
||||
<b>Output</b>:
|
||||
{{else data.core}}
|
||||
<b>Core Outpump</b>:
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{if data.output_info.power}}
|
||||
Open
|
||||
{{else}}
|
||||
On Hold
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{if data.tanks}}
|
||||
<div class='itemLabel' style='width: 25%;'>Max Output Pressure:</div>
|
||||
<div class='itemContent'>{{:data.output_info.output_pressure}} kPa</div>
|
||||
{{else data.core}}
|
||||
<div class='itemLabel' style='width: 25%;'>Min Core Pressure:</div>
|
||||
<div class='itemContent'>{{:data.output_info.pressure_limit}} kPa</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 25%;'>Command:</div>
|
||||
{{:helper.link('Toggle Power', 'power', {'out_toggle_power' : 1})}}
|
||||
{{:helper.link('Set Pressure', 'pencil', {'out_set_pressure' : 1})}}
|
||||
{{:helper.link('Refresh', 'refresh', {'out_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find output port</div>
|
||||
{{:helper.link('Search', 'search', {'out_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class='item'>
|
||||
{{if data.tanks}}
|
||||
<div class='itemLabel' style='width: 25%;'>
|
||||
Max Output Pressure Set:
|
||||
</div>
|
||||
<div class='itemContent' style='width: 75%;'>
|
||||
{{:helper.link('1000', 'minus', {'adj_pressure' : -1000})}}
|
||||
{{:helper.link('100', 'minus', {'adj_pressure' : -100})}}
|
||||
{{:helper.link('10', 'minus', {'adj_pressure' : -10})}}
|
||||
{{:helper.link('1', 'minus', {'adj_pressure' : -1})}}
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.pressure_setting}} kPa </div>
|
||||
{{:helper.link('1', 'plus', {'adj_pressure' : 1})}}
|
||||
{{:helper.link('10', 'plus', {'adj_pressure' : 10})}}
|
||||
{{:helper.link('100', 'plus', {'adj_pressure' : 100})}}
|
||||
{{:helper.link('1000', 'plus', {'adj_pressure' : 1000})}}
|
||||
</div>
|
||||
{{else data.core}}
|
||||
<div class='itemLabel' style='width: 25%;'>
|
||||
Min Core Pressure Set:
|
||||
</div>
|
||||
<div class='itemContent' style='width: 75%;'>
|
||||
{{:helper.link('100', 'minus', {'adj_pressure' : -100})}}
|
||||
{{:helper.link('50', 'minus', {'adj_pressure' : -50})}}
|
||||
{{:helper.link('10', 'minus', {'adj_pressure' : -10})}}
|
||||
{{:helper.link('1', 'minus', {'adj_pressure' : -1})}}
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.pressure_setting}} kPa </div>
|
||||
{{:helper.link('1', 'plus', {'adj_pressure' : 1})}}
|
||||
{{:helper.link('10', 'plus', {'adj_pressure' : 10})}}
|
||||
{{:helper.link('50', 'plus', {'adj_pressure' : 50})}}
|
||||
{{:helper.link('100', 'plus', {'adj_pressure' : 100})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{if data.fuel}}
|
||||
<h2>Fuel Injection System</h2>
|
||||
|
||||
{{if data.device_info}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Status</b>:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{if data.device_info.power}}
|
||||
Injecting
|
||||
{{else}}
|
||||
On Hold
|
||||
{{/if}}
|
||||
<div class='floatRight'>{{:helper.link('Refresh', 'refresh', {'refresh_status' : 1})}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Rate:</div>
|
||||
<div class='itemContent'>{{:data.device_info.volume_rate}} L/s</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Automated Fuel Injection:</div>
|
||||
{{if data.automation}}
|
||||
{{:helper.link('Engaged', 'check', {'toggle_automation' : 1})}}
|
||||
<div class='itemContent'>Injector Controls Locked Out</div>
|
||||
{{else}}
|
||||
{{:helper.link('Disengaged', 'close', {'toggle_automation' : 1})}}
|
||||
<div class='itemLabel'>Injector:</div>
|
||||
{{:helper.link('Toggle Power', 'power', {'toggle_injector' : 1})}}
|
||||
{{:helper.link('Inject (1 Cycle)', 'syringe', {'injection' : 1})}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find device</div>
|
||||
{{:helper.link('Search', 'search', {'refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
116
nano/templates/chem_master.tmpl
Normal file
116
nano/templates/chem_master.tmpl
Normal file
@@ -0,0 +1,116 @@
|
||||
<!--
|
||||
Interface for chem master
|
||||
See: code/modules/reagents/Chemistry-Machinery.dm
|
||||
-->
|
||||
{{if data.tab == 'home'}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>{{:helper.link(data.pillBottle ? 'Eject Pill Bottle' : 'No pill bottle inserted', 'eject', {'ejectp' : 1}, data.pillBottle ? null : 'linkOff')}}</div>
|
||||
|
||||
{{if data.pillBottle}}
|
||||
<div class='itemContent'>{{:data.pillBottle.total}} / {{:data.pillBottle.max}}</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>{{:helper.link(data.beaker ? 'Eject Beaker and Clear Buffer' : 'Please insert beaker', 'eject', {'eject' : 1}, data.beaker ? null : 'linkOff')}}</div>
|
||||
|
||||
{{if data.beaker}}
|
||||
{{if data.beaker.total_volume}}
|
||||
Add to buffer:
|
||||
{{for data.beaker.reagent_list}}
|
||||
<div class='item'>
|
||||
<div class='itemLabelNarrow'>{{:value.name}}</div>
|
||||
<div class='itemContent'>{{:value.volume}} Units</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:helper.link('Analyze', 'signal-diag', {'tab_select' : 'analyze', 'desc' : value.description, 'name' : value.name})}}
|
||||
{{:helper.link('1', 'plus', {'add' : value.id, 'amount' : 1})}}
|
||||
{{:helper.link('5', 'plus', {'add' : value.id, 'amount' : 5})}}
|
||||
{{:helper.link('10', 'plus', {'add' : value.id, 'amount' : 10})}}
|
||||
{{:helper.link('30', 'plus', {'add' : value.id, 'amount' : 30})}}
|
||||
{{:helper.link('60', 'plus', {'add' : value.id, 'amount' : 60})}}
|
||||
{{:helper.link('All', 'plus', {'add' : value.id, 'amount' : value.volume})}}
|
||||
{{:helper.link('Custom', 'plus', {'addcustom' : value.id})}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{else}}
|
||||
Beaker is empty.
|
||||
{{/if}}
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabelNarrow'>Transfer to</div>
|
||||
{{:helper.link(!data.mode ? 'disposal' : 'beaker', null, {'toggle' : 1})}}
|
||||
</div>
|
||||
{{if data.reagents}}
|
||||
{{if data.reagents.total_volume}}
|
||||
{{for data.reagents.reagent_list}}
|
||||
<div class='item'>
|
||||
<div class='itemLabelNarrow'>{{:value.name}}</div>
|
||||
<div class='itemContent'>{{:value.volume}} Units</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:helper.link('Analyze', 'signal-diag', {'tab_select' : 'analyze', 'desc' : value.description, 'name' : value.name})}}
|
||||
{{:helper.link('1', 'minus', {'remove' : value.id, 'amount' : 1})}}
|
||||
{{:helper.link('5', 'minus', {'remove' : value.id, 'amount' : 5})}}
|
||||
{{:helper.link('10', 'minus', {'remove' : value.id, 'amount' : 10})}}
|
||||
{{:helper.link('30', 'minus', {'remove' : value.id, 'amount' : 30})}}
|
||||
{{:helper.link('60', 'minus', {'remove' : value.id, 'amount' : 60})}}
|
||||
{{:helper.link('All', 'minus', {'remove' : value.id, 'amount' : value.volume})}}
|
||||
{{:helper.link('Custom', 'minus', {'removecustom' : value.id})}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
Empty
|
||||
{{/if}}
|
||||
{{if !data.condi}}
|
||||
<hr>
|
||||
<div class='item'>
|
||||
{{:helper.link('Create pill (60 units max)', null, {'createpill' : 1})}}
|
||||
{{:helper.link('Create multiple pills', null, {'createpill_multiple' : 1})}}
|
||||
{{:helper.link('Create bottle (60 units max)', null, {'createbottle' : 1})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:helper.link('', 'pill pill' + data.pillSprite, {'tab_select' : 'pill'}, null, 'link32')}}
|
||||
{{:helper.link('', 'pill bottle' + data.bottleSprite, {'tab_select' : 'bottle'}, null, 'link32')}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{else data.tab == 'analyze'}}
|
||||
{{if !data.condi}}
|
||||
<h3>Chemical Info:</h3>
|
||||
{{else}}
|
||||
<h3>Condiment Info:</h3>
|
||||
{{/if}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.analyzeData.name}}</div>
|
||||
</div>
|
||||
{{if data.analyzeData.name == 'Blood'}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Blood Type:</div>
|
||||
<div class='itemContent'>{{:data.analyzeData.blood_type}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>DNA:</div>
|
||||
<div class='itemContent'>{{:data.analyzeData.blood_DNA}}</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Description:</div>
|
||||
<div class='itemContent'>{{:data.analyzeData.desc}}</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'tab_select' : 'home'})}}
|
||||
|
||||
{{else data.tab == 'pill'}}
|
||||
{{for data.pillSpritesAmount}}
|
||||
{{:helper.link('', 'pill pill' + value, {'pill_sprite' : value}, null, data.pillSprite == value ? 'linkOn link32' : 'link32')}}
|
||||
{{/for}}
|
||||
<div class='item'><br>{{:helper.link('Return', 'arrowreturn-1-w', {'tab_select' : 'home'})}}</div>
|
||||
|
||||
{{else data.tab == 'bottle'}}
|
||||
{{for data.bottleSpritesAmount}}
|
||||
{{:helper.link('', 'pill bottle' + value, {'bottle_sprite' : value}, null, data.bottleSprite == value ? 'linkOn link32' : 'link32')}}
|
||||
{{/for}}
|
||||
<div class='item'><br>{{:helper.link('Return', 'arrowreturn-1-w', {'tab_select' : 'home'})}}</div>
|
||||
{{/if}}
|
||||
104
nano/templates/cloning.tmpl
Normal file
104
nano/templates/cloning.tmpl
Normal file
@@ -0,0 +1,104 @@
|
||||
<!--
|
||||
Interface for cloning computers machines
|
||||
See: code/game/machinery/computer/cloning.dm
|
||||
-->
|
||||
|
||||
<b>{{:data.temp}}</b>
|
||||
|
||||
{{if data.menu == 1}}
|
||||
<!-- Modules -->
|
||||
<h3>Modules</h3>
|
||||
<div class='item'>
|
||||
{{if data.connected}}
|
||||
<span class='good'>DNA scanner found.</span>
|
||||
{{else}}
|
||||
<span class='bad'>DNA scanner not found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{if data.podsLen > 0}}
|
||||
<span class='good'>{{:data.podsLen}} cloning vat\s found.</span>
|
||||
{{else}}
|
||||
<span class='bad'>No cloning vats found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<!-- Scanner -->
|
||||
<h3>Scanner Functions</h3>
|
||||
<div class='item'>
|
||||
{{if data.loading}}
|
||||
<b>Scanning...</b>
|
||||
{{else}}
|
||||
<b>{{:data.scantemp}}</b>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{if data.connected}}
|
||||
<div style='float: left; width: auto; margin-right: 4px;'>
|
||||
{{:helper.link(data.occupant ? 'Scan - ' + data.occupant : 'Scanner unoccupied', 'play', {'scan' : 1}, data.occupant ? null : 'linkOff')}}
|
||||
</div>
|
||||
<div style='float: left; width: auto; margin-right: 4px;'>
|
||||
{{:helper.link(data.locked ? 'Unlock' : 'Lock', data.locked ? 'locked' : 'unlocked', {'lock' : 1}, null, data.locked ? 'redButton' : null)}}
|
||||
</div>
|
||||
<div style='float: left; width: auto; margin-right: 4px;'>
|
||||
{{:helper.link('Eject', 'eject', {'eject' : 1}, data.occupant ? null : 'linkOff')}}
|
||||
</div>
|
||||
{{else}}
|
||||
No scanner connected!
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{if data.podsLen}}
|
||||
{{for data.pods}}
|
||||
<div class='item'>{{:value.pod}}, biomass: <i>{{:value.biomass}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
<!-- Database -->
|
||||
<h3>Database Functions</h3>
|
||||
<div class='item'>
|
||||
{{:helper.link('View Records', 'list', {'menu' : 2})}}
|
||||
{{:helper.link('Eject Disk', 'eject', {'disk' : 'eject'}, data.diskette ? null : 'linkOff')}}
|
||||
</div>
|
||||
|
||||
{{else data.menu == 2}}
|
||||
<h3>Current records</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
<div class='item'>
|
||||
{{for data.records}}
|
||||
{{:helper.link(value.name, 'document', {'view_rec' : value.ckey})}}
|
||||
{{/for}}
|
||||
</div>
|
||||
|
||||
{{else data.menu == 3}}
|
||||
<h3>Selected Record</h3>
|
||||
<div class='item'>{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 2})}}</div>
|
||||
|
||||
{{if data.activeRecord}}
|
||||
{{:helper.link('Delete Record', 'trash', {'del_rec' : 1}, null, 'redButton')}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.activeRecord.real_name}}</div>
|
||||
</div>
|
||||
|
||||
{{:helper.link('Load from disk', 'transfer-e-w', {'disk' : 'load'}, data.disk ? null : 'linkOff')}}
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Save:</div>
|
||||
{{:helper.link('UI + UE', 'disk', {'save_disk' : 'ue'}, data.disk ? null : 'linkOff')}}
|
||||
{{:helper.link('UI', 'disk', {'save_disk' : 'ui'}, data.disk ? null : 'linkOff')}}
|
||||
{{:helper.link('SE', 'disk', {'save_disk' : 'se'}, data.disk ? null : 'linkOff')}}
|
||||
</div>
|
||||
|
||||
{{:helper.link('Clone', 'play', {'clone' : data.activeRecord.ckey}, data.podsLen ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
<div class='item bad'>ERROR: Record not found.</div>
|
||||
{{/if}}
|
||||
|
||||
{{else data.menu == 4}}
|
||||
{{:data.temp}}
|
||||
<h3>Confirm Record Deletion</h3>
|
||||
<div class='item'><b>Scan card to confirm.</b></div>
|
||||
{{:helper.link('Cancel', 'cancel', {'menu' : 3})}}
|
||||
{{/if}}
|
||||
55
nano/templates/fax.tmpl
Normal file
55
nano/templates/fax.tmpl
Normal file
@@ -0,0 +1,55 @@
|
||||
<!--
|
||||
Interface for fax machines
|
||||
See: code/modules/paperwork/faxmachine.dm
|
||||
-->
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Confirm Identity:
|
||||
</div>
|
||||
{{:helper.link(data.scanName ? data.scanName : 'Insert Card', 'check', {'scan' : 1})}}
|
||||
{{if data.authenticated}}
|
||||
{{:helper.link('Log Out', 'eject', {'logout' : 1}, null, 'redButton')}}
|
||||
{{else}}
|
||||
{{:helper.link('Log In', 'person', {'auth' : 1}, data.scanName ? null : 'linkOff')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{if data.authenticated}}
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Logged in to:</b>
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{:data.bossName}} Quantum Entanglement Network
|
||||
</div>
|
||||
</div>
|
||||
{{if data.copyItem}}
|
||||
{{if data.cooldown}}
|
||||
<div class='item'><b>Transmitter arrays realigning. Please stand by.</b></div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Currently sending:</b></div>
|
||||
<div class='itemContent'>{{:data.copyItemName}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Sending to:</b></div>
|
||||
{{:helper.link(data.destination, 'tag', {'dept' : 1})}}
|
||||
</div>
|
||||
<div class='item'>{{:helper.link('Send', 'signal-diag', {'send' : 1})}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class='item'>Please insert paper to send via secure connection.</div>
|
||||
{{if data.cooldown}}
|
||||
<div class='item'><b>Transmitter arrays realigning. Please stand by.</b></div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class='item'>Proper authentication is required to use this device.</div>
|
||||
{{/if}}
|
||||
{{if data.copyItem}}
|
||||
<div class='item'>{{:helper.link('Remove Item', 'eject', {'remove' : 1})}}</div>
|
||||
{{/if}}
|
||||
|
||||
59
nano/templates/guest_pass.tmpl
Normal file
59
nano/templates/guest_pass.tmpl
Normal file
@@ -0,0 +1,59 @@
|
||||
<!--
|
||||
Interface for guest pass
|
||||
See: code/game/machinery/computer/guestpass.dm
|
||||
-->
|
||||
|
||||
{{if data.mode == 1}}
|
||||
<div class='item'>
|
||||
<div class='itemContent'>
|
||||
<b>Activity Log</b>
|
||||
</div>
|
||||
{{:helper.link('Print', 'print', {'print' : 1})}} {{:helper.link('Back', 'arrowreturn-1-w', {'mode' : 0})}}
|
||||
</div>
|
||||
<hr>
|
||||
{{for data.log}}
|
||||
<div class='item'>
|
||||
{{:value}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{else}}
|
||||
<h3>Guest pass terminal #{{:data.uid}}</h3>
|
||||
<div class='item'>
|
||||
{{:helper.link('View activity log', 'list', {'mode' : 1})}} {{:helper.link('Issure Pass', 'eject', {'action' : 'issue'})}}
|
||||
</div>
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide'>
|
||||
Issuing ID:
|
||||
</div>
|
||||
{{:helper.link(data.giver ? data.giver : 'Insert ID', 'person', {'action' : 'id'})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide'>
|
||||
Issued to:
|
||||
</div>
|
||||
{{:helper.link(data.giveName, 'pencil', {'choice' : 'giv_name'})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide'>
|
||||
Reason:
|
||||
</div>
|
||||
{{:helper.link(data.reason, 'pencil', {'choice' : 'reason'})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide'>
|
||||
Duration (minutes):
|
||||
</div>
|
||||
{{:helper.link(data.duration, 'clock', {'choice' : 'duration'})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide'>
|
||||
Access to areas:
|
||||
</div>
|
||||
</div>
|
||||
{{for data.area}}
|
||||
<div class='item'>
|
||||
{{:helper.link(value.area_name, value.on ? 'check' : 'close', {'choice' : 'access', 'access' : value.area}, null, value.on ? 'linkOn' : null)}}
|
||||
</div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
36
nano/templates/holodeck.tmpl
Normal file
36
nano/templates/holodeck.tmpl
Normal file
@@ -0,0 +1,36 @@
|
||||
<!--
|
||||
Interface for holodeck computers
|
||||
See: code/modules/holodeck/HolodeckControl.dm
|
||||
-->
|
||||
|
||||
<h3>Current Loaded Programs:</h3>
|
||||
{{for data.supportedPrograms}}
|
||||
<div class='item'>{{:helper.link(value.name, data.currentProgram == value.program ? 'check' : 'close', {'program' : value.program}, null, data.currentProgram == value.program ? 'linkOn' : null)}}</div>
|
||||
{{/for}}
|
||||
<div class='item'>Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.</div>
|
||||
{{if data.isSilicon}}
|
||||
{{if data.safetyDisabled}}
|
||||
{{if data.emagged}}
|
||||
<div class='item'><span class='bad'><b>ERROR</b></span>: Cannot re-enable Safety Protocols.</div>
|
||||
{{else}}
|
||||
<div class='item'>{{:helper.link('Re-Enable Safety Protocols?', 'help', {'AIoverride' : 1}, null, 'linkOn')}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<div class='item'>{{:helper.link('Re-Enable Safety Protocols?', 'help', {'AIoverride' : 1}, null, 'redButton')}}</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.safetyDisabled}}
|
||||
{{for data.restrictedPrograms}}
|
||||
<div class='item'>{{:helper.link('Begin ' + value.name, data.currentProgram == value.program ? 'check' : 'close', {'program' : value.program}, null, data.currentProgram == value.program ? 'linkOn' : null)}}</div>
|
||||
{{/for}}
|
||||
<div class='item average'>Ensure the holodeck is empty before testing.</div>
|
||||
<div class='item'>Safety Protocols are <span class='bad'>DISABLED</span></div>
|
||||
{{else}}
|
||||
<div class='item'>Safety Protocols are <span class='good'>ENABLED</span></div>
|
||||
{{/if}}
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabelNarrow'>Gravity:</div>
|
||||
{{:helper.link(data.gravity ? 'On ' : 'Off', data.gravity ? 'check' : 'close', {'gravity' : 1}, null, data.gravity ? 'linkOn' : 'redButton')}}
|
||||
</div>
|
||||
173
nano/templates/laptop_vendor.tmpl
Normal file
173
nano/templates/laptop_vendor.tmpl
Normal file
@@ -0,0 +1,173 @@
|
||||
<!--
|
||||
Interface for laptop vending machines
|
||||
See: code/game/machinery/computer3/lapvend.dm
|
||||
-->
|
||||
|
||||
{{if data.mode == 0}}
|
||||
<div class='item'>
|
||||
<b>Please choose your laptop customization options.</b><br>
|
||||
Your comptuer will automatically be loaded with any programs you can use after the transaction is complete.<br>
|
||||
<b>Some programs will require additional components to be installed!</b>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>HDD (Required)</b>: </div>
|
||||
<div class='itemContent'>Added</div>
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Card Reader</b>:
|
||||
</div>
|
||||
{{:helper.link('Single (50)', data.cardreader == 1 ? 'check' : 'plus', {'choice' : 'single_add'}, data.cardreader == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('Dual (125)', data.cardreader == 2 ? 'check' : 'plus', {'choice' : 'dual_add'}, data.cardreader == 2 ? 'selected' : null)}}
|
||||
{{:helper.link('None', 'close', {'choice' : 'cardreader_rem'}, data.cardreader == 0 ? 'redButton' : null)}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Floppy Drive</b>:
|
||||
</div>
|
||||
{{:helper.link('Add (50)', data.floppy == 1 ? 'check' : 'plus', {'choice' : 'floppy_add'}, data.floppy == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('None', 'close', {'choice' : 'floppy_rem'}, data.floppy == 0 ? 'redButton' : null)}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Radio card</b>:
|
||||
</div>
|
||||
{{:helper.link('Add (50)', data.radionet == 1 ? 'check' : 'plus', {'choice' : 'radio_add'}, data.radionet == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('None', 'close', {'choice' : 'radio_rem'}, data.radionet == 0 ? 'redButton' : null)}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Camera Card</b>:
|
||||
</div>
|
||||
{{:helper.link('Add (100)', data.camera == 1 ? 'check' : 'plus', {'choice' : 'camnet_add'}, data.camera == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('None', 'close', {'choice' : 'camnet_rem'}, data.camera == 0 ? 'redButton' : null)}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Network card</b>:
|
||||
</div>
|
||||
<div style='overflow: auto;'>
|
||||
{{:helper.link('Area (75)', data.network == 1 ? 'check' : 'plus', {'choice' : 'area_add'}, data.network == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('Adjacent (50)', data.network == 2 ? 'check' : 'plus', {'choice' : 'prox_add'}, data.network == 2 ? 'selected' : null)}}
|
||||
{{:helper.link('Powernet (25)', data.network == 3 ? 'check' : 'plus', {'choice' : 'cable_add'}, data.network == 3 ? 'selected' : null)}}
|
||||
{{:helper.link('None', 'close', {'choice' : 'network_rem'}, data.network == 0 ? 'redButton' : null)}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
<b>Power Source</b>:
|
||||
</div>
|
||||
{{:helper.link('Extended (175)', data.power == 1 ? 'check' : 'plus', {'choice' : 'high_add'}, data.power == 1 ? 'selected' : null)}}
|
||||
{{:helper.link('Unreal (250)', data.power == 2 ? 'check' : 'plus', {'choice' : 'super_add'}, data.power == 2 ? 'selected' : null)}}
|
||||
{{:helper.link('Default', data.power == 0 ? 'check' : 'plus', {'choice' : 'power_rem'}, data.power == 0 ? 'selected' : null)}}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Total</b>: </div>
|
||||
<div class='itemContentNarrow'>{{:data.total}}</div>
|
||||
{{:helper.link('Vend Laptop', 'cart', {'choice' : 'vend'})}}
|
||||
</div>
|
||||
|
||||
{{else data.mode == 1}}
|
||||
<h2 style='text-align: center;'>Cart</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Total</b>: </div>
|
||||
<div class='itemContent'>{{:data.total}}</div>
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Card Reader</b>: </div>
|
||||
{{if data.cardreader == 1}}
|
||||
{{:helper.link('(single) (50)', 'close', {'choice' : 'cardreader_rem'})}}
|
||||
{{else data.cardreader == 2}}
|
||||
{{:helper.link('(double) (125)', 'close', {'choice' : 'cardreader_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>None</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Floppy Drive</b>: </div>
|
||||
{{if data.floppy == 1}}
|
||||
{{:helper.link('Added (50)', 'close', {'choice' : 'floppy_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>None</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Radio Card</b>: </div>
|
||||
{{if data.radionet == 1}}
|
||||
{{:helper.link('Added (50)', 'close', {'choice' : 'radio_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>None</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Camera Card</b>: </div>
|
||||
{{if data.camera == 1}}
|
||||
{{:helper.link('Added (100)', 'close', {'choice' : 'camnet_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>None</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Network Card</b>: </div>
|
||||
{{if data.network == 1}}
|
||||
{{:helper.link('Area (75)', 'close', {'choice' : 'network_rem'})}}
|
||||
{{else data.network == 2}}
|
||||
{{:helper.link('Adjacent (50)', 'close', {'choice' : 'network_rem'})}}
|
||||
{{else data.network == 3}}
|
||||
{{:helper.link('Powernet (25)', 'close', {'choice' : 'network_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>None</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemLabel'><b>Power Source</b>: </div>
|
||||
{{if data.power == 1}}
|
||||
{{:helper.link('Unreal (250)', 'close', {'choice' : 'power_rem'})}}
|
||||
{{else data.power == 2}}
|
||||
{{:helper.link('Extended (175)', 'close', {'choice' : 'power_rem'})}}
|
||||
{{else}}
|
||||
<div class='itemContent'>Regular</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='item'>
|
||||
<div class='itemContent'>Please swipe your card and enter your PIN to complete the transaction</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
{{:helper.link('Cancel', 'close', {'choice' : 'cancel'}, null, 'redButton')}}
|
||||
|
||||
{{else data.mode == 2}}
|
||||
<div class='item'>
|
||||
Please swipe your card and enter your PIN to finish returning your computer.
|
||||
|
||||
<hr>
|
||||
|
||||
{{:helper.link('Cancel', 'close', {'choice' : 'cancel'}, null, 'redButton')}}
|
||||
</div>
|
||||
{{/if}}
|
||||
47
nano/templates/operating.tmpl
Normal file
47
nano/templates/operating.tmpl
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
Interface for operating computer
|
||||
See: code/game/machinery/computer/operating.dm
|
||||
-->
|
||||
|
||||
{{if data.table}}
|
||||
<h4>Patient Information:</h4>
|
||||
{{if data.victim}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.victim.real_name}}</div>
|
||||
|
||||
<div class='itemLabel'>Age:</div>
|
||||
<div class='itemContent'>{{:data.victim.age}}</div>
|
||||
|
||||
<div class='itemLabel'>Blood Type:</div>
|
||||
<div class='itemContent'>{{:data.victim.b_type}}</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabelWide' style='color: #98B0C3;'>Health:</div>
|
||||
<div class='itemContentNarrow'>{{:data.victim.health}}</div>
|
||||
|
||||
<div class='itemLabelWide' style='color: #98B0C3;'>Brute Damage:</div>
|
||||
<div class='itemContentNarrow brute'>{{:data.victim.brute}}</div>
|
||||
|
||||
<div class='itemLabelWide' style='color: #98B0C3;'>Toxins Damage:</div>
|
||||
<div class='itemContentNarrow toxin'>{{:data.victim.tox}}</div>
|
||||
|
||||
<div class='itemLabelWide' style='color: #98B0C3;'>Fire Damage:</div>
|
||||
<div class='itemContentNarrow burn'>{{:data.victim.burn}}</div>
|
||||
|
||||
<div class='itemLabelWide' style='color: #98B0C3;'>Suffocation Damage:</div>
|
||||
<div class='itemContentNarrow oxyloss'>{{:data.victim.oxy}}</div>
|
||||
|
||||
<div class='itemLabelWide'>Patient Status:</div>
|
||||
<div class='itemContentNarrow'>{{:data.victim.stat}}</div>
|
||||
|
||||
<div class='itemLabelWide'>Heartbeat Rate:</div>
|
||||
<div class='itemContentNarrow'>{{:data.victim.pulse}}</div>
|
||||
</div>
|
||||
{{else}}
|
||||
No Patient Detected
|
||||
{{/if}}
|
||||
{{else}}
|
||||
No Table Detected
|
||||
{{/if}}
|
||||
47
nano/templates/photocopier.tmpl
Normal file
47
nano/templates/photocopier.tmpl
Normal file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
Interface for photocopiers
|
||||
See: code/modules/paperwork/photocopier.dm
|
||||
-->
|
||||
|
||||
{{if data.copyItem}}
|
||||
<div class='item'>
|
||||
{{:helper.link('Remove Item', 'eject', {'remove' : 1})}}
|
||||
{{if data.toner}}
|
||||
{{:helper.link('Copy', 'copy', {'copy' : 1})}}</div>
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Printing:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
<div style='clear: both; padding-top: 4px;'>
|
||||
{{:helper.link('-', null, {'min' : 1}, data.copies == 1 ? 'linkOff' : null)}}
|
||||
<div style='float: left; width: 40px; text-align: center;'>{{:data.copies}}</div>
|
||||
{{:helper.link('+', null, {'add' : 1}, data.copies == data.maxCopies ? 'linkOff' : null)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 50%'>Current toner level:</div>
|
||||
<div class='itemContentNarrow'><b>{{:data.toner}}</b>u</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<span class='average'>Please insert a new toner cartridge!</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{else data.toner}}
|
||||
<h3>Please insert something to copy.</h3>
|
||||
{{if data.isSilicon}}
|
||||
{{:helper.link('Print photo from database', 'image', {'aipic' : 1})}}
|
||||
{{/if}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel' style='width: 40%'>Current toner level:</div>
|
||||
<div class='itemContentNarrow'><b>{{:data.toner}}</b>u</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<span class='average'>Please insert a new toner cartridge!</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user