From 4b69c9ce80f50aff0d917798b4e6205605e06e5f Mon Sep 17 00:00:00 2001 From: DOOM Date: Fri, 31 May 2024 08:33:23 -0700 Subject: [PATCH] suggested changes --- code/game/machinery/computer/skills.dm | 365 ------------------ code/game/machinery/cryopod.dm | 3 + .../objects/items/circuitboards/computer.dm | 8 - code/modules/cm_marines/overwatch.dm | 2 +- colonialmarines.dme | 1 - 5 files changed, 4 insertions(+), 375 deletions(-) delete mode 100644 code/game/machinery/computer/skills.dm diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm deleted file mode 100644 index 950e68c609d9..000000000000 --- a/code/game/machinery/computer/skills.dm +++ /dev/null @@ -1,365 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 -/* rip it out for now, migrate this later. - -/obj/structure/machinery/computer/skills//TODO:MIGRATE TO TGUI - name = "Employment Records" - desc = "Used to view personnel's employment records" - icon_state = "medlaptop" - req_one_access = list(ACCESS_MARINE_DATABASE) - circuit = /obj/item/circuitboard/computer/skills - var/obj/item/card/id/scan = null - var/authenticated = null - var/rank = null - var/screen = null - var/datum/data/record/active1 = null - var/a_id = null - var/temp = null - var/printing = null - var/can_change_id = 0 - var/list/Perp - var/tempname = null - //Sorting Variables - var/sortBy = "name" - var/order = 1 // -1 = Descending - 1 = Ascending - -/obj/structure/machinery/computer/skills/attackby(obj/item/O as obj, user as mob) - if(istype(O, /obj/item/card/id) && !scan) - if(usr.drop_held_item()) - O.forceMove(src) - scan = O - to_chat(user, "You insert [O].") - ..() - -/obj/structure/machinery/computer/skills/attack_remote(mob/user as mob) - return attack_hand(user) - -//Someone needs to break down the dat += into chunks instead of long ass lines. -/obj/structure/machinery/computer/skills/attack_hand(mob/user as mob) - if(..()) - return - if (src.z > 6) - to_chat(user, SPAN_DANGER("Unable to establish a connection: \black You're too far away from the station!")) - return - var/dat - - if (temp) - dat = "[temp]

Clear Screen" - else - dat = "Confirm Identity: [scan ? scan.name : "----------"]
" - if (authenticated) - switch(screen) - if(1.0) - dat += {" -

"} - dat += "Search Records
" - dat += "New Record
" - dat += {" -

- - - - -
Records:
- - - - - - -"} - if(!isnull(GLOB.data_core.general)) - for(var/general_record_key in GLOB.data_core.general) - var/datum/data/record/R = GLOB.data_core.general[general_record_key] - for(var/datum/data/record/E in GLOB.data_core.security) - dat += "" - dat += "" - dat += "
NameIDRankFingerprints
[R.fields[MOB_NAME]][R.fields[MOB_SHOWN_RANK]]

" - dat += "Record Maintenance

" - dat += "{Log Out}" - if(2.0) - dat += "Records Maintenance
" - dat += "
Delete All Records

Back" - if(3.0) - dat += "
Employment Record

" - if ((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))) - dat += " \ -
\ - Name: [active1.fields[MOB_NAME]]
\ - Sex: [active1.fields[MOB_SEX]]
\n \ - Age: [active1.fields[MOB_AGE]]
\n \ - Rank: [active1.fields[MOB_SHOWN_RANK]]
\n \ - Physical Status: [active1.fields[MOB_HEALTH_STATUS]]
\n \ - Mental Status: [active1.fields[MOB_MENTAL_STATUS]]

\n \ - Employment/skills summary:
[decode(active1.fields[MOB_GENERAL_NOTES])]
Photo:
\ -
" - else - dat += "General Record Lost!
" - dat += "\nDelete Record (ALL)

\nPrint Record
\nBack
" - if(4.0) - if(!Perp.len) - dat += "ERROR. String could not be located.

Back" - else - dat += {" - - "} - dat += "" - dat += {" - -
Search Results for '[tempname]':
- - - - - - - "} - for(var/i=1, i<=Perp.len, i += 2) - var/crimstat = "" - var/datum/data/record/R = Perp[i] - if(istype(Perp[i+1],/datum/data/record/)) - var/datum/data/record/E = Perp[i+1] - crimstat = E.fields["criminal"] - dat += "" - dat += "" - dat += "" - dat += "
NameIDRankFingerprints
[R.fields[MOB_NAME]][R.fields[MOB_SHOWN_RANK]][crimstat]

" - dat += "
Return to index." - else - dat += "{Log In}" - show_browser(user, dat, "Employment Records", "secure_rec", "size=600x400") - onclose(user, "secure_rec") - return - -/*Revised /N -I can't be bothered to look more of the actual code outside of switch but that probably needs revising too. -What a mess.*/ -/obj/structure/machinery/computer/skills/Topic(href, href_list) - if(..()) - return - if (!( GLOB.data_core.general.Find(active1) )) - active1 = null - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf))) || (isRemoteControlling(usr))) - usr.set_interaction(src) - switch(href_list["choice"]) -// SORTING! - if("Sorting") - // Reverse the order if clicked twice - if(sortBy == href_list["sort"]) - if(order == 1) - order = -1 - else - order = 1 - else - // New sorting order! - sortBy = href_list["sort"] - order = initial(order) -//BASIC FUNCTIONS - if("Clear Screen") - temp = null - - if ("Return") - screen = 1 - active1 = null - - if("Confirm Identity") - if (scan) - if(istype(usr,/mob/living/carbon/human) && !usr.get_active_hand()) - usr.put_in_hands(scan) - else - scan.forceMove(get_turf(src)) - scan = null - else - var/obj/item/I = usr.get_active_hand() - if (istype(I, /obj/item/card/id)) - if(usr.drop_held_item()) - I.forceMove(src) - scan = I - - if("Log Out") - authenticated = null - screen = null - active1 = null - - if("Log In") - if (isRemoteControlling(usr)) - src.active1 = null - src.authenticated = usr.name - src.rank = "AI" - src.screen = 1 - else if (istype(scan, /obj/item/card/id)) - active1 = null - if(check_access(scan)) - authenticated = scan.registered_name - rank = scan.paygrade - screen = 1 -//RECORD FUNCTIONS - if("Search Records") - var/t1 = input("Search String: (Partial Name or ID or Fingerprints or Rank)", "Secure. records", null, null) as text - if ((!( t1 ) || usr.stat || !( authenticated ) || usr.is_mob_restrained() || !in_range(src, usr))) - return - Perp = new/list() - t1 = lowertext(t1) - var/list/components = splittext(t1, " ") - if(components.len > 5) - return //Lets not let them search too greedily. - for(var/datum/data/record/R in GLOB.data_core.general) - - var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["rank"] - for(var/i = 1, i<=components.len, i++) - if(findtext(temptext,components[i])) - var/prelist = new/list(2) - prelist[1] = R - Perp += prelist - for(var/i = 1, i<=Perp.len, i+=2) - for(var/datum/data/record/E in GLOB.data_core.security) - var/datum/data/record/R = Perp[i] - if ((E.fields["name"] == R.fields["name"] && E.fields["id"] == R.fields["id"])) - Perp[i+1] = E - tempname = t1 - screen = 4 - - if("Record Maintenance") - screen = 2 - active1 = null - - if ("Browse Record") - var/datum/data/record/R = locate(href_list["d_rec"]) - if (!( GLOB.data_core.general.Find(R) )) - temp = "Record Not Found!" - else - for(var/datum/data/record/E in GLOB.data_core.security) - active1 = R - screen = 3 - - if ("Print Record") - if (!( printing )) - printing = 1 - sleep(50) - var/obj/item/paper/P = new /obj/item/paper( loc ) - P.info = "
Employment Record

" - if ((istype(active1, /datum/data/record) && GLOB.data_core.general.Find(active1))) - P.info += "Name: [active1.fields["name"]] ID: [active1.fields["id"]]
\nSex: [active1.fields["sex"]]
\nAge: [active1.fields["age"]]
\nPhysical Status: [active1.fields["p_stat"]]
\nMental Status: [active1.fields["m_stat"]]
\nEmployment/Skills Summary:
\n[decode(active1.fields["notes"])]
" - P.name = "Employment Record ([active1.fields["name"]])" - else - P.info += "General Record Lost!
" - P.name = "Employment Record (???)" - P.info += "" - - printing = null -//RECORD DELETE - if ("Delete All Records") - temp = "" - temp += "Are you sure you wish to delete all Employment records?
" - temp += "Yes
" - temp += "No" - - if ("Purge All Records") - for(var/datum/data/record/R in GLOB.data_core.security) - GLOB.data_core.security -= R - qdel(R) - temp = "All Employment records deleted." - - if ("Delete Record (ALL)") - if (active1) - temp = "
Are you sure you wish to delete the record (ALL)?
" - temp += "Yes
" - temp += "No" - -//FIELD FUNCTIONS - if ("Edit Field") - var/a1 = active1 - switch(href_list["field"]) - if("name") - if (istype(active1, /datum/data/record)) - var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text) - if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr)))) || active1 != a1) - return - message_admins("[key_name(usr)] has changed the record name of [active1.fields["name"]] to [t1]") - 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 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) - return - active1.fields["id"] = 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 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) - return - active1.fields["age"] = t1 - if("rank") - //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) && GLOB.uscm_highcom_paygrades.Find(rank)) - temp = "
Occupation:
" - temp += "" - else - alert(usr, "You do not have the required rank to do this!") - 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 ) || !( authenticated ) || usr.stat || usr.is_mob_restrained() || (!in_range(src, usr) && (!isRemoteControlling(usr))) || active1 != a1)) - return - active1.fields["species"] = t1 - -//TEMPORARY MENU FUNCTIONS - else//To properly clear as per clear screen. - temp=null - switch(href_list["choice"]) - if ("Change Rank") - if (active1) - active1.fields["rank"] = href_list["rank"] - if(href_list["rank"] in GLOB.joblist) - active1.fields["real_rank"] = href_list["real_rank"] - - if ("Delete Record (ALL) Execute") - if (active1) - for(var/datum/data/record/R as anything in GLOB.data_core.medical) - if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) - GLOB.data_core.medical -= R - qdel(R) - QDEL_NULL(active1) - else - temp = "This function does not appear to be working at the moment. Our apologies." - - add_fingerprint(usr) - updateUsrDialog() - return - -/obj/structure/machinery/computer/skills/emp_act(severity) - . = ..() - if(inoperable()) - return - - for(var/datum/data/record/R in GLOB.data_core.security) - if(prob(10/severity)) - switch(rand(1,6)) - if(1) - R.fields[MOB_NAME] = "[pick(pick(GLOB.first_names_male), pick(GLOB.first_names_female))] [pick(GLOB.last_names)]" - if(2) - R.fields[MOB_SEX] = pick(MOB_STAT_GENDER_LIST) - if(3) - R.fields[MOB_AGE] = rand(5, 85) - if(4) - R.fields[MOB_CRIMINAL_STATUS] = pick(MOB_STAT_CRIME_STATUS_LIST) - if(5) - R.fields[MOB_HEALTH_STATUS] = pick(MOB_STAT_HEALTH_LIST) - if(6) - R.fields[MOB_MENTAL_STATUS] = pick(MOB_STAT_MENTAL_STATUS_LIST) - continue - - else if(prob(1)) - GLOB.data_core.security -= R - qdel(R) - continue -*/ diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index e78e0cf4266e..4b0989cf8968 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -355,6 +355,9 @@ GLOBAL_LIST_INIT(frozen_items, list(SQUAD_MARINE_1 = list(), SQUAD_MARINE_2 = li var/mob/living/carbon/human/cryo_pod = occupant if(cryo_pod.record_id_ref) + GLOB.data_core.medical -= occupant.record_id_ref + GLOB.data_core.general -= occupant.record_id_ref + GLOB.data_core.security -= occupant.record_id_ref qdel(GLOB.data_core.medical[cryo_pod.record_id_ref]) qdel(GLOB.data_core.general[cryo_pod.record_id_ref]) qdel(GLOB.data_core.security[cryo_pod.record_id_ref]) diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm index a01bba92dea9..e78f83d9622d 100644 --- a/code/game/objects/items/circuitboards/computer.dm +++ b/code/game/objects/items/circuitboards/computer.dm @@ -75,18 +75,10 @@ name = "Circuit board (Security Records)" build_path = /obj/structure/machinery/computer/secure_data -/* -/obj/item/circuitboard/computer/skills - name = "Circuit board (Employment Records)" - build_path = /obj/structure/machinery/computer/skills -*/ - /obj/item/circuitboard/computer/stationalert name = "Circuit board (Station Alerts)" build_path = /obj/structure/machinery/computer/station_alert - - /obj/item/circuitboard/computer/air_management name = "Circuit board (Atmospheric Monitor)" build_path = /obj/structure/machinery/computer/general_air_control diff --git a/code/modules/cm_marines/overwatch.dm b/code/modules/cm_marines/overwatch.dm index 1be78289d163..769cc39e7342 100644 --- a/code/modules/cm_marines/overwatch.dm +++ b/code/modules/cm_marines/overwatch.dm @@ -666,7 +666,7 @@ var/insub = "[icon2html(src, usr)] [SPAN_BOLDNOTICE("[wanted_marine] has been reported for insubordination. Logging to enlistment file.")]" if(isRemoteControlling(usr)) - usr << insub + to_chat(usr, insub) else visible_message(insub) to_chat(wanted_marine, "[icon2html(src, wanted_marine)] Overwatch: You've been reported for insubordination by your overwatch officer.") diff --git a/colonialmarines.dme b/colonialmarines.dme index e7f280cd99df..06b204d2c482 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -929,7 +929,6 @@ #include "code\game\machinery\computer\robots_props.dm" #include "code\game\machinery\computer\security.dm" #include "code\game\machinery\computer\sentencing.dm" -#include "code\game\machinery\computer\skills.dm" #include "code\game\machinery\computer\station_alert.dm" #include "code\game\machinery\door_display\door_display.dm" #include "code\game\machinery\doors\airlock.dm"