mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Adds NanoUI for multiple computers.
This commit is contained in:
@@ -8,13 +8,17 @@
|
||||
icon = 'icons/obj/Cryogenic2.dmi'
|
||||
icon_state = "body_scanner_0"
|
||||
density = 1
|
||||
dir = 8
|
||||
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 )
|
||||
@@ -34,72 +38,12 @@
|
||||
component_parts += new /obj/item/stack/material/glass/reinforced(src, 2)
|
||||
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))
|
||||
@@ -109,42 +53,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)
|
||||
@@ -154,10 +152,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)
|
||||
@@ -167,10 +161,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)
|
||||
@@ -180,32 +170,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)
|
||||
@@ -218,67 +183,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)
|
||||
@@ -311,205 +221,355 @@
|
||||
src.attack_hand(user)
|
||||
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
|
||||
|
||||
/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/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
|
||||
return
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_ai(user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_ghost(user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/attack_hand(user as mob)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if (panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
|
||||
if(!src.connected)
|
||||
findscanner()
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/body_scanconsole/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
var/data[0]
|
||||
|
||||
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)
|
||||
for(var/datum/reagent/R in H.reagents)
|
||||
reagentData[++reagentData.len] = list("name" = R.name, "amount" = R.volume)
|
||||
|
||||
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
|
||||
organData["desc"] = I.desc
|
||||
organData["germ_level"] = I.germ_level
|
||||
organData["damage"] = I.damage
|
||||
|
||||
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, 600)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (href_list["print"])
|
||||
if (!src.connected)
|
||||
usr << "\icon[src]<span class='warning'>Error: No body scanner connected.</span>"
|
||||
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())
|
||||
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/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/generate_printing_text()
|
||||
var/dat = ""
|
||||
|
||||
|
||||
/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"
|
||||
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"])
|
||||
|
||||
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>")
|
||||
|
||||
if(occ["borer_present"])
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<br>"
|
||||
|
||||
dat += text("[]\tBlood Level %: [] ([] units)</FONT><BR>", ("<font color='[occ["blood_amount"] > 80 ? "blue" : "red"]'>"), occ["blood_amount"], occ["blood_amount"])
|
||||
|
||||
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"])
|
||||
|
||||
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 occ["external_organs"])
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/robot = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/lung_ruptured = ""
|
||||
|
||||
dat += "<tr>"
|
||||
|
||||
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]:"
|
||||
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:"
|
||||
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:"
|
||||
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
|
||||
unknown_body++
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
t1 = "*dead*"
|
||||
dat += "[occupant.health > 50 ? "<font color='blue'>" : "<font color='red'>"]\tHealth %: [occupant.health], ([t1])</font><br>"
|
||||
|
||||
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>"
|
||||
if(occupant.virus2.len)
|
||||
dat += "<font color='red'>Viral pathogen detected in blood stream.</font><BR>"
|
||||
|
||||
var/extra_font = null
|
||||
extra_font = (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\t-Brute Damage %: [occupant.getBruteLoss()]</font><br>"
|
||||
|
||||
extra_font = (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\t-Respiratory Damage %: [occupant.getOxyLoss()]</font><br>"
|
||||
|
||||
extra_font = (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\t-Toxin Content %: [occupant.getToxLoss()]</font><br>"
|
||||
|
||||
extra_font = (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\t-Burn Severity %: [occupant.getFireLoss()]</font><br>"
|
||||
|
||||
extra_font = (occupant.radiation < 10 ?"<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\tRadiation Level %: [occupant.radiation]</font><br>"
|
||||
|
||||
extra_font = (occupant.getCloneLoss() < 1 ?"<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\tGenetic Tissue Damage %: [occupant.getCloneLoss()]<br>"
|
||||
|
||||
extra_font = (occupant.getBrainLoss() < 1 ?"<font color='blue'>" : "<font color='red'>")
|
||||
dat += "[extra_font]\tApprox. Brain Damage %: [occupant.getBrainLoss()]<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 = (blood_volume > 448 ? "<font color='blue'>" : "<font color='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 = i.desc
|
||||
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.status & 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, 400, 500)
|
||||
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,40 @@ 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
|
||||
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["tanks"] = 1
|
||||
|
||||
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>"
|
||||
|
||||
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/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, 400, 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
|
||||
@@ -222,17 +201,13 @@ Max Output Pressure: [output_pressure] kPa<BR>"}
|
||||
return 1
|
||||
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
var/change = 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"])
|
||||
var/change = 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 +248,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 +262,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, 400, 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
|
||||
@@ -341,17 +314,13 @@ Min Core Pressure: [pressure_limit] kPa<BR>"}
|
||||
return 1
|
||||
|
||||
if(href_list["adj_pressure"])
|
||||
var/change = text2num(href_list["adj_pressure"])
|
||||
var/change = 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"])
|
||||
var/change = 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 +361,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 +403,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, 400, 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)
|
||||
@@ -103,81 +103,79 @@
|
||||
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["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, 500)
|
||||
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 +191,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 +210,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
|
||||
temp = "[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()
|
||||
temp = "[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))
|
||||
temp = "[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
|
||||
temp = "[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 +273,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,53 @@
|
||||
|
||||
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("record" = R, "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
|
||||
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("active_record" = active_record, "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
|
||||
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, 300)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
ui.set_auto_update(5)
|
||||
|
||||
/obj/machinery/computer/cloning/Topic(href, href_list)
|
||||
if(..())
|
||||
@@ -205,98 +159,80 @@
|
||||
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["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 = locate(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"])
|
||||
@@ -340,11 +276,10 @@
|
||||
temp = "Error: Data corruption."
|
||||
|
||||
else if (href_list["menu"])
|
||||
src.menu = text2num(href_list["menu"])
|
||||
menu = href_list["menu"]
|
||||
|
||||
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 +316,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 +337,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
|
||||
|
||||
@@ -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>"
|
||||
@@ -213,6 +223,4 @@
|
||||
pass.reason = reason
|
||||
pass.name = "guest pass #[number]"
|
||||
else
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
updateUsrDialog()
|
||||
return
|
||||
usr << "<span class='warning'>Cannot issue pass without issuing ID.</span>"
|
||||
@@ -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,7 +32,7 @@
|
||||
if(vendmode == 1 && I)
|
||||
scan_id(I, W)
|
||||
vendmode = 0
|
||||
if(vendmode == 3 && I)
|
||||
if(vendmode == 2 && I)
|
||||
if(reimburse_id(I, W))
|
||||
vendmode = 0
|
||||
if(vendmode == 0)
|
||||
@@ -44,84 +42,48 @@
|
||||
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>"
|
||||
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, 500)
|
||||
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 +108,7 @@
|
||||
if ("super_add")
|
||||
power = 2
|
||||
|
||||
if ("single_rem" || "dual_rem")
|
||||
if ("cardreader_rem")
|
||||
cardreader = 0
|
||||
if ("floppy_rem")
|
||||
floppy = 0
|
||||
@@ -154,9 +116,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 +130,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 +214,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, 500)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
//ui.set_auto_update(5)
|
||||
|
||||
/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()
|
||||
|
||||
@@ -41,54 +41,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, 400, 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"])
|
||||
@@ -108,7 +91,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)
|
||||
@@ -140,7 +122,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))
|
||||
|
||||
@@ -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, 400, 500)
|
||||
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))
|
||||
|
||||
279
nano/templates/adv_med.tmpl
Normal file
279
nano/templates/adv_med.tmpl
Normal file
@@ -0,0 +1,279 @@
|
||||
<!--
|
||||
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}}
|
||||
Alive
|
||||
{{else data.occupant.stat==1}}
|
||||
Critical
|
||||
{{else}}
|
||||
Dead
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{:helper.link('Print', 'document', {'print_p' : 1, 'name' : data.occupant.name})}}
|
||||
<div class="item">
|
||||
<h4><b>Damage:</b></h4>
|
||||
<div class="itemLabelWide">
|
||||
Brute:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.bruteLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Burn:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.fireLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Oxygen:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.oxyLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Toxins:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.toxLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Brain:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.brainLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Radiation Level:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.radLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Genetic:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.cloneLoss}}
|
||||
</div><br>
|
||||
<div class="itemLabelWide">
|
||||
Paralysis:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.paralysis}}% ({{:data.occupant.paralysisSeconds}} seconds left!)
|
||||
</div><br>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">
|
||||
Body Temperature:
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.bodyTempC}}°C, {{:data.occupant.bodyTempF}}°F
|
||||
</div>
|
||||
</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}}
|
||||
<span class="bad">Pupils unresponsive.</span><br>
|
||||
{{/if}}
|
||||
{{if data.occupant.nearsighted}}
|
||||
<span class="bad">Retinal Misalignment Detected</span>
|
||||
{{/if}}
|
||||
<br>
|
||||
<div class="item">
|
||||
<b>Blood</b>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">
|
||||
Volume
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.blood.volume}}
|
||||
</div>
|
||||
<div class="itemLabelWide">
|
||||
Percent
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:data.occupant.blood.percent}}%
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="item">
|
||||
<b>Reagents</b>
|
||||
</div>
|
||||
<div class="item">
|
||||
{{for data.occupant.reagents}}
|
||||
<div class="itemLabelWide">
|
||||
{{:value.name}}
|
||||
</div>
|
||||
<div class="itemContentMedium">
|
||||
{{:value.amount}}
|
||||
</div>
|
||||
{{/for}}
|
||||
</div>
|
||||
<br>
|
||||
<b>External Organs</b>
|
||||
<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><br>
|
||||
{{for value.implants :impValue:impindex}}
|
||||
<div class="itemContentNarrow">
|
||||
{{:impValue.known ? impValue.name : "Unknown"}}
|
||||
</div><br>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div><br>
|
||||
{{/for}}
|
||||
</div>
|
||||
<b>Internal Organs</b>
|
||||
<div class="itemGroup">
|
||||
{{for data.occupant.intOrgan}}
|
||||
<div class="item">
|
||||
<div class="itemLabelWide">
|
||||
<b>{{:value.name}}</b>
|
||||
</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}}
|
||||
26
nano/templates/arcade_battle.tmpl
Normal file
26
nano/templates/arcade_battle.tmpl
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
Interface for battle arcade machines
|
||||
See: code/game/machinery/computer/arcade.dm
|
||||
-->
|
||||
|
||||
<h3 style='text-align: center;'>{{:data.enemyName}}</h3>
|
||||
|
||||
<h5 style='text-align: center;'>{{:data.temp}}</h5>
|
||||
<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}}
|
||||
218
nano/templates/atmo_control.tmpl
Normal file
218
nano/templates/atmo_control.tmpl
Normal file
@@ -0,0 +1,218 @@
|
||||
<!--
|
||||
Interface for air control computers
|
||||
See: code/game/machinery/atmo_control.dm
|
||||
-->
|
||||
{{if data.sensors}}
|
||||
{{for data.sensors}}
|
||||
{{if value.sensor_data}}
|
||||
<div class='item'>
|
||||
{{:value.long_name}}
|
||||
{{if value.sensor_data.pressure}}
|
||||
<div class='itemLabel'><b>Pressure</b>: </div>
|
||||
{{:value.sensor_data.pressure}} kPa
|
||||
{{/if}}
|
||||
{{if value.sensor_data.temperature}}
|
||||
<div class='itemLabel'><b>Temperature</b>: </div>
|
||||
{{:value.sensor_data.temperature}} kPa
|
||||
{{/if}}
|
||||
{{if value.sensor_data.oxygen || value.sensor_data.nitrogen || value.sensor_data.carbon_dioxide || value.sensor_data.phoron}}
|
||||
<div class='itemLabel'><b>Gas Composition</b>: </div>
|
||||
{{if value.sensor_data.oxygen}}
|
||||
{{:value.sensor_data.pressure}} % O2
|
||||
{{/if}}
|
||||
{{if value.sensor_data.nitrogen}}
|
||||
{{:value.sensor_data.pressure}} % N
|
||||
{{/if}}
|
||||
{{if value.sensor_data.carbon_dioxide}}
|
||||
{{:value.sensor_data.pressure}} % CO2
|
||||
{{/if}}
|
||||
{{if value.sensor_data.phoron}}
|
||||
{{:value.sensor_data.pressure}} % TX
|
||||
{{/if}}
|
||||
{{/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'>
|
||||
{{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>
|
||||
{{:helper.link('Refresh', null, {'in_refresh_status' : 1})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Flow Rate Limit:</div>
|
||||
<div class='itemContent'>{{:data.input_info.volume_rate}} L/s</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Command:</div>
|
||||
{{:helper.link('Toggle Power', null, {'in_toggle_injector' : 1})}}
|
||||
{{:helper.link('Set Flow Rate', null, {'in_set_flowrate' : 1})}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find input port</div>
|
||||
{{:helper.link('Search', null, {'in_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Flow Rate Limit:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{:helper.link('-', null, {'adj_input_flow_rate' : -100})}}
|
||||
{{:helper.link('-', null, {'adj_input_flow_rate' : -10})}}
|
||||
{{:helper.link('-', null, {'adj_input_flow_rate' : -1})}}
|
||||
{{:helper.link('-', null, {'adj_input_flow_rate' : -0.1})}}
|
||||
<div style="float: left; width: 80px; text-align: center;"> {{:data.input_flow_setting}} L/s </div>
|
||||
{{:helper.link('+', null, {'adj_input_flow_rate' : 0.1})}}
|
||||
{{:helper.link('+', null, {'adj_input_flow_rate' : 1})}}
|
||||
{{:helper.link('+', null, {'adj_input_flow_rate' : 10})}}
|
||||
{{:helper.link('+', null, {'adj_input_flow_rate' : 100})}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if data.output_info}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
{{if data.tanks}}
|
||||
<b>Output</b>:
|
||||
{{else data.core}}
|
||||
<b>Core Outpump</b>:
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{if data.input_info.power}}
|
||||
Open
|
||||
{{else}}
|
||||
On Hold
|
||||
{{/if}}
|
||||
</div>
|
||||
{{:helper.link('Refresh', null, {'out_refresh_status' : 1})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{if data.tanks}}
|
||||
<div class='itemLabel'>Max Output Pressure:</div>
|
||||
<div class='itemContent'>{{:data.output_info.output_pressure}} kPa</div>
|
||||
{{else data.core}}
|
||||
<div class='itemLabel'>Min Core Pressure:</div>
|
||||
<div class='itemContent'>{{:data.output_info.pressure_limit}} kPa</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Command:</div>
|
||||
{{:helper.link('Toggle Power', null, {'out_toggle_power' : 1})}}
|
||||
{{:helper.link('Set Pressure', null, {'out_set_pressure' : 1})}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find output port</div>
|
||||
{{:helper.link('Search', null, {'out_refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class='item'>
|
||||
{{if data.tanks}}
|
||||
<div class='itemLabel'>
|
||||
Max Output Pressure Set:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{:helper.link('-', null, {'adj_pressure' : -1000})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -100})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -10})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -1})}}
|
||||
<div style="float: left; width: 80px; text-align: center;"> {{:data.pressure_setting}} kPa </div>
|
||||
{{:helper.link('+', null, {'adj_pressure' : 1})}}
|
||||
{{:helper.link('+', null, {'adj_pressure' : 10})}}
|
||||
{{:helper.link('+', null, {'adj_pressure' : 100})}}
|
||||
{{:helper.link('+', null, {'adj_pressure' : 1000})}}
|
||||
</div>
|
||||
{{else data.core}}
|
||||
<div class='itemLabel'>
|
||||
Min Core Pressure Set:
|
||||
</div>
|
||||
<div class='itemContent'>
|
||||
{{:helper.link('-', null, {'adj_pressure' : -100})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -50})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -10})}}
|
||||
{{:helper.link('-', null, {'adj_pressure' : -1})}}
|
||||
<div style="float: left; width: 80px; text-align: center;"> {{:data.pressure_setting}} kPa </div>
|
||||
{{:helper.link('+', null, {'adj_pressure' : 1})}}
|
||||
{{:helper.link('+', null, {'adj_pressure' : 10})}}
|
||||
{{:helper.link('+', null, {'adj_pressure' : 50})}}
|
||||
{{:helper.link('+', null, {'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>
|
||||
{{:helper.link('Refresh', null, {'refresh_status' : 1})}}
|
||||
</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', null, {'toggle_automation' : 1})}}
|
||||
<div class='itemContent'>Injector Controls Locked Out</div>
|
||||
{{else}}
|
||||
{{:helper.link('Disengaged', null, {'toggle_automation' : 1})}}
|
||||
<div class='itemLabel'>Injector:</div>
|
||||
{{:helper.link('Toggle Power', null, {'toggle_injector' : 1})}}
|
||||
{{:helper.link('Inject (1 Cycle)', null, {'injection' : 1})}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class='item'>
|
||||
<div class='bad'>ERROR: Can not find device</div>
|
||||
{{:helper.link('Search', null, {'refresh_status' : 1})}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
205
nano/templates/chem_master.tmpl
Normal file
205
nano/templates/chem_master.tmpl
Normal file
@@ -0,0 +1,205 @@
|
||||
<!--
|
||||
Interface for
|
||||
See: code/game/.dm
|
||||
-->/obj/machinery/chem_master/attackby(var/obj/item/weapon/B as obj, var/mob/user as mob)
|
||||
|
||||
if(beaker)
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
if (href_list["analyze"])
|
||||
var/dat = ""
|
||||
if(!condi)
|
||||
if(href_list["name"] == "Blood")
|
||||
var/datum/reagent/blood/G
|
||||
for(var/datum/reagent/F in R.reagent_list)
|
||||
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
|
||||
|
||||
else if (href_list["add"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["add"]
|
||||
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
|
||||
R.trans_id_to(src, id, amount)
|
||||
|
||||
else if (href_list["addcustom"])
|
||||
|
||||
var/id = href_list["addcustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = Clamp(useramount, 0, 200)
|
||||
src.Topic(null, list("amount" = "[useramount]", "add" = "[id]"))
|
||||
|
||||
else if (href_list["remove"])
|
||||
|
||||
if(href_list["amount"])
|
||||
var/id = href_list["remove"]
|
||||
var/amount = Clamp((text2num(href_list["amount"])), 0, 200)
|
||||
if(mode)
|
||||
reagents.trans_id_to(beaker, id, amount)
|
||||
else
|
||||
reagents.remove_reagent(id, amount)
|
||||
|
||||
|
||||
else if (href_list["removecustom"])
|
||||
|
||||
var/id = href_list["removecustom"]
|
||||
useramount = input("Select the amount to transfer.", 30, useramount) as num
|
||||
useramount = Clamp(useramount, 0, 200)
|
||||
src.Topic(null, list("amount" = "[useramount]", "remove" = "[id]"))
|
||||
|
||||
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
|
||||
beaker = null
|
||||
reagents.clear_reagents()
|
||||
icon_state = "mixer0"
|
||||
else if (href_list["createpill"] || href_list["createpill_multiple"])
|
||||
var/count = 1
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return
|
||||
|
||||
if (href_list["createpill_multiple"])
|
||||
count = input("Select the number of pills to make.", "Max [max_pill_count]", pillamount) as num
|
||||
count = Clamp(count, 1, max_pill_count)
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return
|
||||
|
||||
var/amount_per_pill = reagents.total_volume/count
|
||||
if (amount_per_pill > 60) amount_per_pill = 60
|
||||
|
||||
var/name = sanitizeSafe(input(usr,"Name:","Name your pill!","[reagents.get_master_reagent_name()] ([amount_per_pill] units)"), MAX_NAME_LEN)
|
||||
|
||||
if(reagents.total_volume/count < 1) //Sanity checking.
|
||||
return
|
||||
while (count--)
|
||||
var/obj/item/weapon/reagent_containers/pill/P = new/obj/item/weapon/reagent_containers/pill(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
P.name = "[name] pill"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
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)
|
||||
P.loc = loaded_pill_bottle
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if (href_list["createbottle"])
|
||||
if(!condi)
|
||||
var/name = sanitizeSafe(input(usr,"Name:","Name your bottle!",reagents.get_master_reagent_name()), MAX_NAME_LEN)
|
||||
var/obj/item/weapon/reagent_containers/glass/bottle/P = new/obj/item/weapon/reagent_containers/glass/bottle(src.loc)
|
||||
if(!name) name = reagents.get_master_reagent_name()
|
||||
P.name = "[name] bottle"
|
||||
P.pixel_x = rand(-7, 7) //random position
|
||||
P.pixel_y = rand(-7, 7)
|
||||
P.icon_state = 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
|
||||
|
||||
|
||||
{{:helper.link(data.beaker ? 'Eject Beaker and Clear Buffer' : 'Please insert beaker', 'eject', {'eject' : 1}), data.beaker ? null : 'linkOff'}}
|
||||
{{:helper.link(data.pillBottle ? 'Eject Pill Bottle' : 'Please insert beaker', 'eject', {'ejectp' : 1}), data.pillBottle ? null : 'linkOff'}}
|
||||
{{:data.pillBottleTotal}} / {{:data.pillBottleMax}}
|
||||
|
||||
{{if data.beakerReagent}}
|
||||
Add to buffer:
|
||||
{{for data.beakerReagent}}
|
||||
{{:value.name}} , {{:value.volume}} Units -
|
||||
{{:helper.link('Analyze', 'signal-diag', {'analyze' : 1, '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})}}
|
||||
|
||||
if(!beaker) data.beaker
|
||||
if(src.loaded_pill_bottle) data.pillBottle
|
||||
[[loaded_pill_bottle.contents.len]/[loaded_pill_bottle.storage_slots]\] data.pillBottleTotal data.pillBottleMax
|
||||
|
||||
var/datum/reagents/R = beaker:reagents
|
||||
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
|
||||
115
nano/templates/cloning.tmpl
Normal file
115
nano/templates/cloning.tmpl
Normal file
@@ -0,0 +1,115 @@
|
||||
<!--
|
||||
Interface for cloning computers machines
|
||||
See: code/game/machinery/computer/cloning.dm
|
||||
-->
|
||||
|
||||
{{:data.temp}}
|
||||
|
||||
{{if data.menu == 1}}
|
||||
<!-- Modules -->
|
||||
<h3>Modules</h3>
|
||||
{{if data.scanner}}
|
||||
DNA scanner found. <!-- Green -->
|
||||
{{else}}
|
||||
DNA scanner not found. <!-- Red -->
|
||||
{{/if}}
|
||||
|
||||
{{if data.podsLen > 0}}
|
||||
{{:data.podsLen}} cloning vat\s found. <!-- Green -->
|
||||
{{else}}
|
||||
No cloning vats found. <!-- Red -->
|
||||
{{/if}}
|
||||
|
||||
<!-- Scanner -->
|
||||
<h3>Scanner Functions</h3>
|
||||
|
||||
{{if data.loading}}
|
||||
<b>Scanning...</b>
|
||||
{{else}}
|
||||
<b>{{:data.scantemp}}</b>
|
||||
{{/if}}
|
||||
|
||||
{{if data.scanner}}
|
||||
{{if data.occupant}}
|
||||
<!-- if(scantemp == "Scanner unoccupied") scantemp = "" // Stupid check to remove the text -->
|
||||
{{:helper.link('Scan - ' + {{:data.occupant}}, 'play', {'scan' : 1})}}
|
||||
{{else}}
|
||||
Scanner unoccupied
|
||||
{{/if}}
|
||||
|
||||
{{if data.locked}}
|
||||
{{:helper.link('Unlock', 'locked', {'lock' : 1}, null, 'redButton')}}
|
||||
{{else}}
|
||||
{{:helper.link('Lock', 'unlocked', {'lock' : 1})}}
|
||||
{{/if}}
|
||||
|
||||
{{else}}
|
||||
No scanner connected!
|
||||
{{/if}}
|
||||
|
||||
{{if data.podsLen}}
|
||||
{{for data.pods}}
|
||||
{{:value.pod}} biomass: <i>{{:value.biomass}}</i>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
<!-- Database -->
|
||||
<h3>Database Functions</h3>
|
||||
|
||||
{{:helper.link('View Records', 'list', {'menu' : 2})}}
|
||||
|
||||
{{:helper.link('Eject Disk', 'eject', {'disk' : 'eject'}, data.diskette ? null : 'linkOff')}}
|
||||
|
||||
{{else data.menu == 2}}
|
||||
<h3>Current records</h3>
|
||||
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
|
||||
{{for data.records}}
|
||||
<li>{{:helper.link(value.name, 'document', {'view_rec' : value.record})}}</li>
|
||||
{{/for}}
|
||||
|
||||
{{else data.menu == 3}}
|
||||
<h3>Selected Record</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 2})}}
|
||||
|
||||
{{if activeRecord}}
|
||||
{{:helper.link('Delete Record', 'trash', {'del_rec' : 1}, null, 'redButton')}}
|
||||
<b>Name:</b> {{:data.activeRecord.real_name}}
|
||||
|
||||
<!--
|
||||
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}}
|
||||
Unable to locate implant. <<Red
|
||||
-->
|
||||
|
||||
{{:helper.link('Load from disk', 'transfer-e-w', {'disk' : 'load'}, data.disk ? null : 'linkOff')}}
|
||||
|
||||
Save: {{: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')}}
|
||||
|
||||
<b>UI:</b> {{:data.activeRecord.ui}}
|
||||
<b>SE:</b> {{:data.activeRecord.se}}
|
||||
|
||||
{{:helper.link('Clone', 'play', {'clone' : data.activeRecord.active_record}, data.podsLen ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
ERROR: Record not found. <!-- Red -->
|
||||
{{/if}}
|
||||
|
||||
{{else data.menu == 4}}
|
||||
{{:data.temp}}
|
||||
|
||||
<h3>Confirm Record Deletion</h3>
|
||||
|
||||
<b>Scan card to confirm.</b>
|
||||
|
||||
{{:helper.link('Cancel', 'cancel', {'menu' : 3})}}
|
||||
|
||||
{{/if}}
|
||||
32
nano/templates/fax.tmpl
Normal file
32
nano/templates/fax.tmpl
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
Interface for fax machines
|
||||
See: code/modules/paperwork/faxmachine.dm
|
||||
-->
|
||||
|
||||
Confirm Identity: {{:helper.link(data.scanName, 'check', {'scan' : 1})}}
|
||||
{{if data.authenticated}}
|
||||
{{:helper.link('Log Out', 'eject', {'logout' : 1}, null, 'linkDanger')}}
|
||||
<hr>
|
||||
<b>Logged in to:</b> {{:data.bossName}} Quantum Entanglement Network
|
||||
{{if data.copyItem}}
|
||||
{{:helper.link('Remove Item', 'eject', {'remove' : 1})}}
|
||||
{{if data.cooldown}}
|
||||
<b>Transmitter arrays realigning. Please stand by.</b>
|
||||
{{else}}
|
||||
{{:helper.link('Send', 'signal-diag', {'send' : 1})}}
|
||||
<b>Currently sending:</b> {{:data.copyItemName}}
|
||||
<b>Sending to:</b> {{:helper.link(data.destination, 'tag', {'dept' : 1})}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
Please insert paper to send via secure connection.
|
||||
{{if data.cooldown}}
|
||||
<b>Transmitter arrays realigning. Please stand by.</b>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:helper.link('Log In', 'person', {'auth' : 1})}}
|
||||
Proper authentication is required to use this device.
|
||||
{{if data.copyItem}}
|
||||
{{:helper.link('Remove Item', 'eject', {'remove' : 1})}}
|
||||
{{/if}}
|
||||
{{/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, '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}}
|
||||
33
nano/templates/holodeck.tmpl
Normal file
33
nano/templates/holodeck.tmpl
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Interface for holodeck computers
|
||||
See: code/modules/holodeck/HolodeckControl.dm
|
||||
-->
|
||||
|
||||
Current Loaded Programs:
|
||||
{{for data.supportedPrograms}}
|
||||
{{:helper.link(value.name, data.currentProgram == value.program ? 'check' : 'clear', {'program' : value.program}, data.currentProgram == value.program ? 'linkOn' : null)}}
|
||||
{{/for}}
|
||||
Please ensure that only holographic weapons are used in the holodeck if a combat simulation has been loaded.
|
||||
{{if data.isSilicon}}
|
||||
{{if data.safetyDisabled}}
|
||||
{{if data.emagged}}
|
||||
<span class='bad'><b>ERROR</b></span>: Cannot re-enable Safety Protocols.
|
||||
{{else}}
|
||||
{{:helper.link('Re-Enable Safety Protocols?', 'help', {'AIoverride' : 1}, null, 'linkOn')}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:helper.link('Re-Enable Safety Protocols?', 'help', {'AIoverride' : 1}, null, 'linkDanger')}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.safetyDisabled}}
|
||||
{{for data.restrictedPrograms}}
|
||||
{{:helper.link('Begin ' + value.name, data.currentProgram == value.program ? 'check' : 'clear', {'program' : value.program}, data.currentProgram == value.program ? 'linkOn' : null)}}
|
||||
Ensure the holodeck is empty before testing.
|
||||
{{/for}}
|
||||
Safety Protocols are <span class='bad'>DISABLED</span>
|
||||
{{else}}
|
||||
Safety Protocols are <span class='good'>ENABLED</span>
|
||||
{{/if}}
|
||||
|
||||
{{:helper.link(data.gravity ? 'On ' : 'Off', data.gravity ? 'check' : 'clear', {'gravity' : 1}, null, data.gravity ? 'linkOn' : linkDanger')}}
|
||||
175
nano/templates/laptop_vendor.tmpl
Normal file
175
nano/templates/laptop_vendor.tmpl
Normal file
@@ -0,0 +1,175 @@
|
||||
<!--
|
||||
Interface for laptop vending machines
|
||||
See: code/game/machinery/computer3/lapvend.dm
|
||||
-->
|
||||
|
||||
{{if data.mode == 0}}
|
||||
<div class='item'>
|
||||
<div class='itemContent'>
|
||||
<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>
|
||||
</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}}
|
||||
75
nano/templates/operating.tmpl
Normal file
75
nano/templates/operating.tmpl
Normal file
@@ -0,0 +1,75 @@
|
||||
<!--
|
||||
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>
|
||||
{{:data.victim.real_name}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Age:
|
||||
</div>
|
||||
{{:data.victim.age}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Blood Type:
|
||||
</div>
|
||||
{{:data.victim.b_type}}
|
||||
</div>
|
||||
<hr>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Health:
|
||||
</div>
|
||||
{{:data.victim.health}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Brute Damage:
|
||||
</div>
|
||||
{{:data.victim.brute}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Toxins Damage:
|
||||
</div>
|
||||
{{:data.victim.tox}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Fire Damage:
|
||||
</div>
|
||||
{{:data.victim.burn}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Suffocation Damage:
|
||||
</div>
|
||||
{{:data.victim.oxy}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Patient Status:
|
||||
</div>
|
||||
{{:data.victim.stat}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>
|
||||
Heartbeat Rate:
|
||||
</div>
|
||||
{{:data.victim.pulse}}
|
||||
</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='itemLabelNarrow'>
|
||||
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: 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}}
|
||||
{{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