mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Merge pull request #14099 from Kyep/skills_rework
Replaces skills computer with skills HUD glasses
This commit is contained in:
@@ -58669,9 +58669,6 @@
|
||||
/area/blueshield)
|
||||
"cce" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_one_access = null
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
dir = 2;
|
||||
icon_state = "bcarpet05"
|
||||
@@ -59610,9 +59607,6 @@
|
||||
/area/ntrep)
|
||||
"cdK" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_access_txt = "57"
|
||||
},
|
||||
/turf/simulated/floor/carpet,
|
||||
/area/ntrep)
|
||||
"cdL" = (
|
||||
|
||||
@@ -57433,9 +57433,6 @@
|
||||
})
|
||||
"bVc" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_access_txt = "57"
|
||||
},
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
|
||||
/turf/simulated/floor/carpet,
|
||||
/area/ntrep)
|
||||
@@ -58264,9 +58261,6 @@
|
||||
/area/blueshield)
|
||||
"bWI" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_one_access = null
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
icon_state = "bcarpet05"
|
||||
},
|
||||
|
||||
@@ -27418,7 +27418,6 @@
|
||||
/area/storage/primary)
|
||||
"aZf" = (
|
||||
/obj/structure/table/reinforced,
|
||||
/obj/machinery/computer/skills,
|
||||
/turf/simulated/floor/plasteel{
|
||||
icon_state = "red"
|
||||
},
|
||||
@@ -51699,9 +51698,6 @@
|
||||
pixel_x = 0;
|
||||
pixel_y = 32
|
||||
},
|
||||
/obj/machinery/computer/skills{
|
||||
req_access_txt = "57"
|
||||
},
|
||||
/turf/simulated/floor/plasteel,
|
||||
/area/crew_quarters/heads)
|
||||
"bTd" = (
|
||||
@@ -61609,9 +61605,6 @@
|
||||
/area/ntrep)
|
||||
"cjf" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_access_txt = "57"
|
||||
},
|
||||
/turf/simulated/floor/carpet,
|
||||
/area/ntrep)
|
||||
"cjg" = (
|
||||
@@ -66287,9 +66280,6 @@
|
||||
/area/blueshield)
|
||||
"cqJ" = (
|
||||
/obj/structure/table/wood,
|
||||
/obj/machinery/computer/skills{
|
||||
req_one_access = null
|
||||
},
|
||||
/turf/simulated/floor/plasteel{
|
||||
icon_state = "bcarpet05"
|
||||
},
|
||||
|
||||
@@ -33,7 +33,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
|
||||
shoes = /obj/item/clothing/shoes/brown
|
||||
head = /obj/item/clothing/head/caphat
|
||||
l_ear = /obj/item/radio/headset/heads/captain/alt
|
||||
glasses = /obj/item/clothing/glasses/sunglasses
|
||||
glasses = /obj/item/clothing/glasses/hud/skills/sunglasses
|
||||
id = /obj/item/card/id/gold
|
||||
pda = /obj/item/pda/captain
|
||||
backpack_contents = list(
|
||||
@@ -89,6 +89,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
|
||||
uniform = /obj/item/clothing/under/rank/head_of_personnel
|
||||
shoes = /obj/item/clothing/shoes/brown
|
||||
head = /obj/item/clothing/head/hopcap
|
||||
glasses = /obj/item/clothing/glasses/hud/skills/sunglasses
|
||||
l_ear = /obj/item/radio/headset/heads/hop
|
||||
id = /obj/item/card/id/silver
|
||||
pda = /obj/item/pda/heads/hop
|
||||
@@ -134,6 +135,7 @@ GLOBAL_DATUM_INIT(captain_announcement, /datum/announcement/minor, new(do_newsca
|
||||
uniform = /obj/item/clothing/under/rank/ntrep
|
||||
suit = /obj/item/clothing/suit/storage/ntrep
|
||||
shoes = /obj/item/clothing/shoes/centcom
|
||||
glasses = /obj/item/clothing/glasses/hud/skills/sunglasses
|
||||
l_ear = /obj/item/radio/headset/heads/ntrep
|
||||
id = /obj/item/card/id/nanotrasen
|
||||
l_pocket = /obj/item/lighter/zippo/nt_rep
|
||||
|
||||
@@ -159,9 +159,6 @@
|
||||
name = "Circuit board (Security Records)"
|
||||
build_path = /obj/machinery/computer/secure_data
|
||||
origin_tech = "programming=2;combat=2"
|
||||
/obj/item/circuitboard/skills
|
||||
name = "Circuit board (Employment Records)"
|
||||
build_path = /obj/machinery/computer/skills
|
||||
/obj/item/circuitboard/stationalert_engineering
|
||||
name = "Circuit Board (Station Alert Console (Engineering))"
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
|
||||
@@ -1,328 +0,0 @@
|
||||
#define SKILL_DATA_R_LIST 1 // Record list
|
||||
#define SKILL_DATA_MAINT 2 // Records maintenance
|
||||
#define SKILL_DATA_RECORD 3 // Record
|
||||
|
||||
/obj/machinery/computer/skills//TODO:SANITY
|
||||
name = "employment records console"
|
||||
desc = "Used to view personnel's employment records"
|
||||
icon_state = "laptop"
|
||||
icon_keyboard = "laptop_key"
|
||||
icon_screen = "medlaptop"
|
||||
density = 0
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
req_one_access = list(ACCESS_HEADS)
|
||||
circuit = /obj/item/circuitboard/skills
|
||||
var/obj/item/card/id/scan = null
|
||||
var/authenticated = null
|
||||
var/rank = null
|
||||
var/screen = null
|
||||
var/datum/data/record/active1 = null
|
||||
var/temp = null
|
||||
var/printing = null
|
||||
//Sorting Variables
|
||||
var/sortBy = "name"
|
||||
var/order = 1 // -1 = Descending - 1 = Ascending
|
||||
|
||||
/obj/machinery/computer/skills/Destroy()
|
||||
active1 = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/skills/attackby(obj/item/O, mob/user, params)
|
||||
if(istype(O, /obj/item/card/id) && !scan)
|
||||
user.drop_item()
|
||||
O.forceMove(src)
|
||||
scan = O
|
||||
ui_interact(user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
//Someone needs to break down the dat += into chunks instead of long ass lines.
|
||||
/obj/machinery/computer/skills/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
if(is_away_level(z))
|
||||
to_chat(user, "<span class='danger'>Unable to establish a connection</span>: You're too far away from the station!")
|
||||
return
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/skills/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "skills_data.tmpl", name, 800, 380)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/skills/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
|
||||
var/data[0]
|
||||
data["temp"] = temp
|
||||
data["scan"] = scan ? scan.name : null
|
||||
data["authenticated"] = authenticated
|
||||
data["screen"] = screen
|
||||
if(authenticated)
|
||||
switch(screen)
|
||||
if(SKILL_DATA_R_LIST)
|
||||
if(!isnull(GLOB.data_core.general))
|
||||
for(var/datum/data/record/R in sortRecord(GLOB.data_core.general, sortBy, order))
|
||||
data["records"] += list(list("ref" = "\ref[R]", "id" = R.fields["id"], "name" = R.fields["name"], "rank" = R.fields["rank"], "fingerprint" = R.fields["fingerprint"]))
|
||||
if(SKILL_DATA_RECORD)
|
||||
var/list/general = list()
|
||||
data["general"] = general
|
||||
if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))
|
||||
var/list/fields = list()
|
||||
general["fields"] = fields
|
||||
fields[++fields.len] = list("field" = "Name:", "value" = active1.fields["name"], "name" = "name")
|
||||
fields[++fields.len] = list("field" = "ID:", "value" = active1.fields["id"], "name" = "id")
|
||||
fields[++fields.len] = list("field" = "Sex:", "value" = active1.fields["sex"], "name" = "sex")
|
||||
fields[++fields.len] = list("field" = "Age:", "value" = active1.fields["age"], "name" = "age")
|
||||
fields[++fields.len] = list("field" = "Rank:", "value" = active1.fields["rank"], "name" = "rank")
|
||||
fields[++fields.len] = list("field" = "Fingerprint:", "value" = active1.fields["fingerprint"], "name" = "fingerprint")
|
||||
fields[++fields.len] = list("field" = "Physical Status:", "value" = active1.fields["p_stat"])
|
||||
fields[++fields.len] = list("field" = "Mental Status:", "value" = active1.fields["m_stat"])
|
||||
general["notes"] = active1.fields["notes"]
|
||||
var/list/photos = list()
|
||||
general["photos"] = photos
|
||||
photos[++photos.len] = list("photo" = active1.fields["photo-south"])
|
||||
photos[++photos.len] = list("photo" = active1.fields["photo-west"])
|
||||
general["has_photos"] += (active1.fields["photo-south"] || active1.fields["photo-west"] ? 1 : 0)
|
||||
general["empty"] = 0
|
||||
else
|
||||
general["empty"] = 1
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/skills/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if(!GLOB.data_core.general.Find(active1))
|
||||
active1 = null
|
||||
|
||||
if(href_list["temp"])
|
||||
temp = null
|
||||
|
||||
if(href_list["temp_action"])
|
||||
var/temp_list = splittext(href_list["temp_action"], "=")
|
||||
switch(temp_list[1])
|
||||
if("del_all2")
|
||||
if(GLOB.PDA_Manifest && GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
qdel(R)
|
||||
setTemp("<h3>All employment records deleted.</h3>")
|
||||
if("del_rg2")
|
||||
if(active1)
|
||||
if(GLOB.PDA_Manifest && GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in GLOB.data_core.medical)
|
||||
if(R.fields["name"] == active1.fields["name"] && R.fields["id"] == active1.fields["id"])
|
||||
qdel(R)
|
||||
QDEL_NULL(active1)
|
||||
screen = SKILL_DATA_R_LIST
|
||||
if("rank")
|
||||
if(active1)
|
||||
if(GLOB.PDA_Manifest && GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
active1.fields["rank"] = temp_list[2]
|
||||
if(temp_list[2] in GLOB.joblist)
|
||||
active1.fields["real_rank"] = temp_list[2]
|
||||
|
||||
if(href_list["scan"])
|
||||
if(scan)
|
||||
scan.forceMove(loc)
|
||||
if(ishuman(usr) && !usr.get_active_hand())
|
||||
usr.put_in_hands(scan)
|
||||
scan = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
usr.drop_item()
|
||||
I.forceMove(src)
|
||||
scan = I
|
||||
|
||||
if(href_list["login"])
|
||||
if(isAI(usr))
|
||||
authenticated = usr.name
|
||||
rank = "AI"
|
||||
else if(isrobot(usr))
|
||||
authenticated = usr.name
|
||||
var/mob/living/silicon/robot/R = usr
|
||||
rank = "[R.modtype] [R.braintype]"
|
||||
else if(istype(scan, /obj/item/card/id))
|
||||
if(check_access(scan))
|
||||
authenticated = scan.registered_name
|
||||
rank = scan.assignment
|
||||
|
||||
if(authenticated)
|
||||
active1 = null
|
||||
screen = SKILL_DATA_R_LIST
|
||||
|
||||
if(authenticated)
|
||||
var/incapable = (usr.stat || usr.restrained() || (!in_range(src, usr) && !issilicon(usr)))
|
||||
if(href_list["logout"])
|
||||
authenticated = null
|
||||
screen = null
|
||||
active1 = null
|
||||
|
||||
else if(href_list["sort"])
|
||||
// Reverse the order if clicked twice
|
||||
if(sortBy == href_list["sort"])
|
||||
if(order == 1)
|
||||
order = -1
|
||||
else
|
||||
order = 1
|
||||
else
|
||||
sortBy = href_list["sort"]
|
||||
order = initial(order)
|
||||
|
||||
else if(href_list["screen"])
|
||||
screen = text2num(href_list["screen"])
|
||||
if(screen < 1)
|
||||
screen = SKILL_DATA_R_LIST
|
||||
|
||||
active1 = null
|
||||
|
||||
else if(href_list["d_rec"])
|
||||
var/datum/data/record/R = locate(href_list["d_rec"])
|
||||
if(!GLOB.data_core.general.Find(R))
|
||||
setTemp("<h3><span class='bad'>Record not found!</span></h3>")
|
||||
return 1
|
||||
active1 = R
|
||||
screen = SKILL_DATA_RECORD
|
||||
|
||||
else if(href_list["del_all"])
|
||||
var/list/buttons = list()
|
||||
buttons[++buttons.len] = list("name" = "Yes", "icon" = "check", "val" = "del_all2=1", "status" = null)
|
||||
buttons[++buttons.len] = list("name" = "No", "icon" = "times", "val" = null, "status" = null)
|
||||
setTemp("<h3>Are you sure you wish to delete all employment records?</h3>", buttons)
|
||||
|
||||
else if(href_list["del_rg"])
|
||||
if(active1)
|
||||
var/list/buttons = list()
|
||||
buttons[++buttons.len] = list("name" = "Yes", "icon" = "check", "val" = "del_rg2=1", "status" = null)
|
||||
buttons[++buttons.len] = list("name" = "No", "icon" = "times", "val" = null, "status" = null)
|
||||
setTemp("<h3>Are you sure you wish to delete the record (ALL)?</h3>", buttons)
|
||||
|
||||
else if(href_list["new_g"])
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
var/datum/data/record/G = new /datum/data/record()
|
||||
G.fields["name"] = "New Record"
|
||||
G.fields["id"] = "[add_zero(num2hex(rand(1, 1.6777215E7)), 6)]"
|
||||
G.fields["rank"] = "Unassigned"
|
||||
G.fields["real_rank"] = "Unassigned"
|
||||
G.fields["sex"] = "Male"
|
||||
G.fields["age"] = "Unknown"
|
||||
G.fields["fingerprint"] = "Unknown"
|
||||
G.fields["p_stat"] = "Active"
|
||||
G.fields["m_stat"] = "Stable"
|
||||
G.fields["species"] = "Human"
|
||||
GLOB.data_core.general += G
|
||||
active1 = G
|
||||
|
||||
else if(href_list["print_r"])
|
||||
if(!printing)
|
||||
printing = 1
|
||||
playsound(loc, "sound/goonstation/machines/printer_dotmatrix.ogg", 50, 1)
|
||||
sleep(50)
|
||||
var/obj/item/paper/P = new /obj/item/paper(loc)
|
||||
P.info = "<CENTER><B>Employment Record</B></CENTER><BR>"
|
||||
if(istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))
|
||||
P.info += {"Name: [active1.fields["name"]] ID: [active1.fields["id"]]
|
||||
<BR>\nSex: [active1.fields["sex"]]
|
||||
<BR>\nAge: [active1.fields["age"]]
|
||||
<BR>\nFingerprint: [active1.fields["fingerprint"]]
|
||||
<BR>\nPhysical Status: [active1.fields["p_stat"]]
|
||||
<BR>\nMental Status: [active1.fields["m_stat"]]
|
||||
<BR>\nEmployment/Skills Summary:[active1.fields["notes"]]<BR>"}
|
||||
else
|
||||
P.info += "<B>General Record Lost!</B><BR>"
|
||||
P.info += "</TT>"
|
||||
P.name = "paper - 'Employment Record: [active1.fields["name"]]'"
|
||||
printing = 0
|
||||
|
||||
if(href_list["field"])
|
||||
if(incapable)
|
||||
return 1
|
||||
var/a1 = active1
|
||||
switch(href_list["field"])
|
||||
if("name")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = reject_bad_name(clean_input("Please input name:", "Secure. records", active1.fields["name"], null))
|
||||
if(!t1 || !length(trim(t1)) || incapable || active1 != a1)
|
||||
return 1
|
||||
active1.fields["name"] = t1
|
||||
if("id")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(trim(sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || incapable || active1 != a1)
|
||||
return 1
|
||||
active1.fields["id"] = t1
|
||||
if("fingerprint")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(trim(sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || incapable || active1 != a1)
|
||||
return 1
|
||||
active1.fields["fingerprint"] = t1
|
||||
if("sex")
|
||||
if(istype(active1, /datum/data/record))
|
||||
if(active1.fields["sex"] == "Male")
|
||||
active1.fields["sex"] = "Female"
|
||||
else
|
||||
active1.fields["sex"] = "Male"
|
||||
if("age")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = input("Please input age:", "Secure. records", active1.fields["age"], null) as num
|
||||
if(!t1 || incapable || active1 != a1)
|
||||
return 1
|
||||
active1.fields["age"] = t1
|
||||
if("rank")
|
||||
var/list/L = list("Head of Personnel", "Captain", "AI")
|
||||
//This was so silly before the change. Now it actually works without beating your head against the keyboard. /N
|
||||
if(istype(active1, /datum/data/record) && L.Find(rank))
|
||||
var/list/buttons = list()
|
||||
for(var/rank in GLOB.joblist)
|
||||
buttons[++buttons.len] = list("name" = rank, "icon" = null, "val" = "rank=[rank]", "status" = (active1.fields["rank"] == rank ? "selected" : null))
|
||||
setTemp("<h3>Rank</h3>", buttons)
|
||||
else
|
||||
setTemp("<span class='bad'>You do not have the required rank to do this!</span>")
|
||||
if("species")
|
||||
if(istype(active1, /datum/data/record))
|
||||
var/t1 = copytext(trim(sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || incapable || active1 != a1)
|
||||
return 1
|
||||
active1.fields["species"] = t1
|
||||
return 1
|
||||
|
||||
/obj/machinery/computer/skills/proc/setTemp(text, list/buttons = list())
|
||||
temp = list("text" = text, "buttons" = buttons, "has_buttons" = buttons.len > 0)
|
||||
|
||||
/obj/machinery/computer/skills/emp_act(severity)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
..(severity)
|
||||
return
|
||||
|
||||
for(var/datum/data/record/R in GLOB.data_core.security)
|
||||
if(prob(10/severity))
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
R.fields["name"] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]"
|
||||
if(2)
|
||||
R.fields["sex"] = pick("Male", "Female")
|
||||
if(3)
|
||||
R.fields["age"] = rand(5, 85)
|
||||
if(4)
|
||||
R.fields["criminal"] = pick(SEC_RECORD_STATUS_NONE, SEC_RECORD_STATUS_ARREST, SEC_RECORD_STATUS_INCARCERATED, SEC_RECORD_STATUS_PAROLLED, SEC_RECORD_STATUS_RELEASED)
|
||||
if(5)
|
||||
R.fields["p_stat"] = pick("*Unconcious*", "Active", "Physically Unfit")
|
||||
if(6)
|
||||
R.fields["m_stat"] = pick("*Insane*", "*Unstable*", "*Watch*", "Stable")
|
||||
continue
|
||||
|
||||
else if(prob(1))
|
||||
qdel(R)
|
||||
continue
|
||||
|
||||
..(severity)
|
||||
|
||||
#undef SKILL_DATA_R_LIST
|
||||
#undef SKILL_DATA_MAINT
|
||||
#undef SKILL_DATA_RECORD
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
/obj/structure/closet/secure_closet/hop/New()
|
||||
..()
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/head/hopcap(src)
|
||||
new /obj/item/cartridge/hop(src)
|
||||
new /obj/item/radio/headset/heads/hop(src)
|
||||
@@ -251,7 +251,8 @@
|
||||
new /obj/item/melee/baton/loaded(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/security/sunglasses/read_only(src)
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses
|
||||
new /obj/item/clothing/glasses/hud/health/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/head/beret/centcom/officer(src)
|
||||
new /obj/item/clothing/head/beret/centcom/officer/navy(src)
|
||||
new /obj/item/clothing/suit/armor/vest/blueshield(src)
|
||||
@@ -279,7 +280,7 @@
|
||||
new /obj/item/storage/briefcase(src)
|
||||
new /obj/item/paicard(src)
|
||||
new /obj/item/flash(src)
|
||||
new /obj/item/clothing/glasses/sunglasses(src)
|
||||
new /obj/item/clothing/glasses/hud/skills/sunglasses(src)
|
||||
new /obj/item/clothing/gloves/color/white(src)
|
||||
new /obj/item/clothing/shoes/centcom(src)
|
||||
new /obj/item/clothing/under/lawyer/oldman(src)
|
||||
|
||||
@@ -196,3 +196,17 @@
|
||||
|
||||
/obj/item/clothing/glasses/hud/health/tajblind/attack_self()
|
||||
toggle_veil()
|
||||
|
||||
/obj/item/clothing/glasses/hud/skills
|
||||
name = "Skills HUD"
|
||||
desc = "A heads-up display capable of showing the employment history records of NT crew members."
|
||||
icon_state = "material"
|
||||
item_state = "glasses"
|
||||
|
||||
/obj/item/clothing/glasses/hud/skills/sunglasses
|
||||
name = "Skills HUD Sunglasses"
|
||||
desc = "Sunglasses with a build-in skills HUD, showing the employment history of nearby NT crew members."
|
||||
see_in_dark = 1 // None of these three can be converted to booleans. Do not try it.
|
||||
flash_protect = 1
|
||||
tint = 1
|
||||
prescription_upgradable = TRUE
|
||||
|
||||
@@ -364,6 +364,17 @@
|
||||
msg += "<span class = 'deptradio'>Security records:</span> <a href='?src=[UID()];secrecordComment=`'>\[View comment log\]</a> <a href='?src=[UID()];secrecordadd=`'>\[Add comment\]</a>\n"
|
||||
msg += "<span class = 'deptradio'>Latest entry:</span> [commentLatest]\n"
|
||||
|
||||
if(hasHUD(user, "skills"))
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/skills
|
||||
|
||||
if(perpname)
|
||||
for(var/datum/data/record/E in GLOB.data_core.general)
|
||||
if(E.fields["name"] == perpname)
|
||||
skills = E.fields["notes"]
|
||||
if(skills)
|
||||
msg += "<span class='deptradio'>Employment records:</span> [skills]\n"
|
||||
|
||||
if(hasHUD(user,"medical"))
|
||||
var/perpname = get_visible_name(TRUE)
|
||||
var/medical = "None"
|
||||
@@ -404,8 +415,11 @@
|
||||
return !istype(CIH,/obj/item/organ/internal/cyberimp/eyes/hud/security) && S && S.read_only
|
||||
if("medical")
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(CIH,/obj/item/organ/internal/cyberimp/eyes/hud/medical)
|
||||
if("skills")
|
||||
return istype(H.glasses, /obj/item/clothing/glasses/hud/skills)
|
||||
else
|
||||
return FALSE
|
||||
|
||||
else if(isrobot(M) || isAI(M)) //Stand-in/Stopgap to prevent pAIs from freely altering records, pending a more advanced Records system
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
@@ -420,6 +434,8 @@
|
||||
switch(hudtype)
|
||||
if("security")
|
||||
return TRUE
|
||||
if("skills")
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
else
|
||||
|
||||
@@ -71,6 +71,16 @@
|
||||
build_path = /obj/item/clothing/glasses/hud/security/night
|
||||
category = list("Equipment")
|
||||
|
||||
/datum/design/skills_hud
|
||||
name = "Skills HUD"
|
||||
desc = "A heads-up display that scans the humans in view and shows a summary of their NT employment history."
|
||||
id = "skills_hud"
|
||||
req_tech = list("magnets" = 3, "combat" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 500, MAT_GLASS = 500)
|
||||
build_path = /obj/item/clothing/glasses/hud/skills
|
||||
category = list("Equipment")
|
||||
|
||||
/datum/design/mesons
|
||||
name = "Optical Meson Scanners"
|
||||
desc = "Used for seeing walls, floors, and stuff through anything."
|
||||
|
||||
@@ -1,199 +0,0 @@
|
||||
<!--
|
||||
Title: Employment Records UI
|
||||
Used In File(s): \code\game\machinery\computer\skills.dm
|
||||
-->
|
||||
|
||||
<!--
|
||||
#define SKILL_DATA_R_LIST 1 // Main menu
|
||||
#define SKILL_DATA_MAINT 2 // Record list
|
||||
#define SKILL_DATA_RECORD 3 // Records maintenance
|
||||
-->
|
||||
|
||||
{{if !data.temp && data.screen == 1}}
|
||||
<script type='text/javascript'>
|
||||
var hidden;
|
||||
function updateSearch(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
var filter = filter_text.value.toLowerCase();
|
||||
|
||||
if(hidden != null){
|
||||
hidden.parent("td").parent("tr").show()
|
||||
}
|
||||
|
||||
if(filter == ""){
|
||||
return;
|
||||
} else {
|
||||
hidden = $("#maintable_data").children("tbody").children("tr").children("td").children("input").filter(function(index) {
|
||||
return $(this)[0].value.toLowerCase().indexOf(filter) == -1
|
||||
});
|
||||
hidden.parent("td").parent("tr").hide()
|
||||
}
|
||||
}
|
||||
|
||||
function selectTextField(){
|
||||
var filter_text = document.getElementById('filter');
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
}
|
||||
|
||||
$(window).load(function() {
|
||||
selectTextField();
|
||||
updateSearch();
|
||||
});
|
||||
|
||||
$("#filter").keyup(function() {
|
||||
updateSearch();
|
||||
});
|
||||
</script>
|
||||
{{/if}}
|
||||
<style type="text/css">
|
||||
.infoButton {
|
||||
background: none;
|
||||
border: none;
|
||||
}
|
||||
input[type=text], input[type=submit] {
|
||||
border: 1px solid #161616;
|
||||
background-color: #40628a;
|
||||
color: #FFFFFF;
|
||||
padding: 4px;
|
||||
}
|
||||
input[type=submit]:hover {
|
||||
background-color: #507aac;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="item">
|
||||
<div class="itemLabelNarrow">
|
||||
<b>Confirm Identity:</b>
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.link(data.scan ? data.scan : "----------", 'eject', {'scan' : 1}, null, data.scan ? 'itemContentWide' : 'fixedLeft')}}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
{{if data.authenticated}}
|
||||
{{if data.screen == 1}} <!-- SKILL_DATA_R_LIST -->
|
||||
<div style="text-align: center;">
|
||||
<div style="display: inline-block;">{{:helper.link('New Record', 'plus', {'new_g' : 1})}}</div>
|
||||
</div>
|
||||
<h3><center>Record List</center></h3>
|
||||
<table width='560' align='center' cellspacing='0' cellpadding='5' id='maintable'>
|
||||
<tr id='search_tr'>
|
||||
<td align='center'>
|
||||
<b>Search:</b> <input type='text' id='filter' value='' style='width:300px;'></input>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="statusDisplay" style="overflow: auto;">
|
||||
<span id='maintable_data_archive'>
|
||||
<table style='width: 100%;' id='maintable_data'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{:helper.link('Name', null, {'sort' : 'name'}, null, 'infoButton')}}</th>
|
||||
<th>{{:helper.link('ID', null, {'sort' : 'id'}, null, 'infoButton')}}</th>
|
||||
<th>{{:helper.link('Rank', null, {'sort' : 'rank'}, null, 'infoButton')}}</th>
|
||||
<th>{{:helper.link('Fingerprints', null, {'sort' : 'fingerprint'}, null, 'infoButton')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{for data.records}}
|
||||
<tr>
|
||||
<td><input type='hidden' value='{{:value.name}} {{:value.id}} {{:value.rank}} {{:value.fingerprint}}'></input> {{:helper.link(value.name, 'user', {'d_rec' : value.ref}, null, 'infoButton')}}</td>
|
||||
<td>{{:value.id}}</td>
|
||||
<td>{{:value.rank}}</td>
|
||||
<td>{{:value.fingerprint}}</td>
|
||||
</tr>
|
||||
{{/for}}
|
||||
</tbody>
|
||||
</table>
|
||||
</span>
|
||||
</div>
|
||||
<h3><center>Menu</center></h3>
|
||||
<div class="line">{{:helper.link('Record Maintenance', 'wrench', {'screen' : 2})}}</div>
|
||||
<div class="line">{{:helper.link('Logout', 'lock', {'logout' : 1})}}</div>
|
||||
{{else data.screen == 2}} <!-- SKILL_DATA_MAINT -->
|
||||
<h3>Records Maintenance</h3>
|
||||
<div class="line">{{:helper.link('Backup To Disk', 'download', {'back' : 1}, 'disabled')}}</div>
|
||||
<div class="line">{{:helper.link('Upload From disk', 'upload', {'u_load' : 1}, 'disabled')}}</div>
|
||||
<div class="line">{{:helper.link('Delete All Records', 'trash', {'del_all' : 1})}}</div>
|
||||
<div class="line">{{:helper.link('Back', 'arrow-left', {'screen' : 1})}}</div>
|
||||
{{else data.screen == 3}} <!-- SKILL_DATA_RECORD -->
|
||||
<h3><center>Employment Record</center></h3>
|
||||
<h4><center>General Data</center></h4>
|
||||
{{if data.general.empty}}
|
||||
<span class="bad"><center>General Record Lost!</center></span>
|
||||
{{else}}
|
||||
<div class="statusDisplayRecords">
|
||||
<table style='width:100%'><tr>
|
||||
<td valign='top' style='margin-right: 300px;'>
|
||||
{{for data.general.fields}}
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
{{:value.field}}
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.link(value.value, value.name ? 'pencil' : 'user-times', {'field' : value.name}, value.name ? null : 'disabled')}}
|
||||
</div>
|
||||
</div>
|
||||
{{/for}}
|
||||
</td>
|
||||
<td valign='middle' align='center' style='width: 300px;'>
|
||||
{{if data.general.has_photos}}
|
||||
{{for data.general.photos}}
|
||||
{{if value.photo}}
|
||||
<img src={{:value.photo}} height=96 width=96 border=5>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
|
||||
<h4><center>Employment Data</center></h4>
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
Employment/skills summary:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:data.general.notes ? data.general.notes : 'None'}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
<h3><center>Menu</center></h3>
|
||||
<div class="line">{{:helper.link('Delete Record (All)', 'trash', {'del_rg' : 1})}}</div>
|
||||
<div class="line">{{:helper.link('Print Record', 'print', {'print_r' : 1})}}</div>
|
||||
<div class="line">{{:helper.link('Back', 'arrow-left', {'screen' : 1})}}</div>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
<h3>Menu</h3>
|
||||
{{:helper.link('Login', 'unlock', {'login' : 1})}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.temp}}
|
||||
<div class="mask" style="display: table;">
|
||||
<div class="maskContent" style="margin: 0px; vertical-align: middle; display: table-cell;">
|
||||
{{if data.temp.notice}}
|
||||
<div class="notice"><center>{{:data.temp.text}}</center></div>
|
||||
{{else}}
|
||||
<center>{{:data.temp.text}}</center>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{if data.temp.has_buttons}}
|
||||
<div class="line">
|
||||
<div style="display: inline-block;">
|
||||
<div style="width: 500px; display: flex; display: -webkit-flex; flex-wrap: wrap; -webkit-flex-wrap: wrap; justify-content: center; -webkit-justify-content: center;">
|
||||
{{for data.temp.buttons}}
|
||||
{{:helper.link(value.name, value.icon, {'temp' : 1, 'temp_action' : value.val}, value.status)}}
|
||||
{{/for}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div style="display: inline-block;">
|
||||
<div class="line">{{:helper.link('Clear screen', 'home', {'temp' : 1})}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -732,7 +732,6 @@
|
||||
#include "code\game\machinery\computer\robot.dm"
|
||||
#include "code\game\machinery\computer\salvage_ship.dm"
|
||||
#include "code\game\machinery\computer\security.dm"
|
||||
#include "code\game\machinery\computer\skills.dm"
|
||||
#include "code\game\machinery\computer\sm_monitor.dm"
|
||||
#include "code\game\machinery\computer\specops_shuttle.dm"
|
||||
#include "code\game\machinery\computer\station_alert.dm"
|
||||
|
||||
Reference in New Issue
Block a user