mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
[MIRROR] Refactors crew records (#72725) + Medical/Security records now use the max/min age. [MDB IGNORE] (#19078)
* Medical/Security records now use the max/min age. * merge conflict * Refactors crew records (#72725) I have attempted or otherwise started this project at least 4 times. I am sick of it being on my calendar. The code needs it. I need it. - This makes crew records a proper datum rather than assigning properties record.fields. - General, medical, and security records are merged. - Did some slight refactoring here and there for things that looked obvious. - Wanted states are now defined (and you can suspect someone through sechud) - pAI (unrelated but annoying) had some poorly named exported types that i made more specific - Job icons are moved back to the JS side (I wanted to get icons for initial rank without passing trim) <details> <summary>previews</summary> Editable fields & security console  Medical records  Look and feel of the more current version  </details> TGUI'd some of the worst UIs in the game. Creating new records is made much simpler. Manifest_inject is made readable. Probably bug fixes 🆑 refactor: Crew records have been refactored. refactor: Medical records -> TGUI refactor: Security records -> TGUI refactor: Warrants console -> TGUI qol: Players are now alerted when their fines are paid off. qol: Cleaned up sec hud examination text. qol: Adding and deleting crimes is easier. qol: Writing crimes in the console sets players to arrest. qol: You can now mark someone as a suspect through sec hud. /🆑 Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> * I've got something that now actually works Just got to incorporate the records into what players can actually see. * Turns out that client has already been transferred after all * Adds the past records in the TGUI records (they're kinda ugly but it works, so y'know) * Whoops * Hate you too sometimes Prettier * Fixes ghost roles using LITERAL records, which caused problems * Fixes the leaks caused by ghost roles not getting their name right because of the stupid freaking special() proc * I hate list operations man they're so stupid * Fixes the stars on the crew manifest! --------- Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com> Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com> Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
co-authored by
MrMelbert
NamelessFairy
KathrinBailey
Jeremiah
GoldenAlpharex
parent
2667046efd
commit
1f753d5d4c
@@ -133,7 +133,7 @@
|
||||
// Eject the ID being modified.
|
||||
if("PRG_ejectmodid")
|
||||
if(inserted_auth_card)
|
||||
GLOB.data_core.manifest_modify(inserted_auth_card.registered_name, inserted_auth_card.assignment, inserted_auth_card.get_trim_assignment())
|
||||
GLOB.manifest.modify(inserted_auth_card.registered_name, inserted_auth_card.assignment, inserted_auth_card.get_trim_assignment())
|
||||
return computer.RemoveID(usr)
|
||||
else
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/datum/computer_file/program/crew_manifest/ui_static_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
data["manifest"] = GLOB.data_core.get_manifest()
|
||||
data["manifest"] = GLOB.manifest.get_manifest()
|
||||
return data
|
||||
|
||||
/datum/computer_file/program/crew_manifest/ui_act(action, params, datum/tgui/ui)
|
||||
@@ -26,7 +26,7 @@
|
||||
if(computer) //This option should never be called if there is no printer
|
||||
var/contents = {"<h4>Crew Manifest</h4>
|
||||
<br>
|
||||
[GLOB.data_core ? GLOB.data_core.get_manifest_html(0) : ""]
|
||||
[GLOB.manifest ? GLOB.manifest.get_html(0) : ""]
|
||||
"}
|
||||
if(!computer.print_text(contents,text("crew manifest ([])", station_time_timestamp())))
|
||||
to_chat(usr, span_notice("Printer is out of paper."))
|
||||
|
||||
@@ -35,32 +35,27 @@
|
||||
|
||||
switch(mode)
|
||||
if("security")
|
||||
for(var/datum/data/record/person in GLOB.data_core.general)
|
||||
var/datum/data/record/security_person = find_record("id", person.fields["id"], GLOB.data_core.security)
|
||||
for(var/datum/record/crew/person in GLOB.manifest.general)
|
||||
var/list/current_record = list()
|
||||
|
||||
if(security_person)
|
||||
current_record["wanted"] = security_person.fields["criminal"]
|
||||
|
||||
current_record["id"] = person.fields["id"]
|
||||
current_record["name"] = person.fields["name"]
|
||||
current_record["rank"] = person.fields["rank"]
|
||||
current_record["gender"] = person.fields["gender"]
|
||||
current_record["age"] = person.fields["age"]
|
||||
current_record["species"] = person.fields["species"]
|
||||
current_record["fingerprint"] = person.fields["fingerprint"]
|
||||
current_record["age"] = person.age
|
||||
current_record["fingerprint"] = person.fingerprint
|
||||
current_record["gender"] = person.gender
|
||||
current_record["name"] = person.name
|
||||
current_record["rank"] = person.rank
|
||||
current_record["species"] = person.species
|
||||
current_record["wanted"] = person.wanted_status
|
||||
|
||||
all_records += list(current_record)
|
||||
if("medical")
|
||||
for(var/datum/data/record/person in GLOB.data_core.medical)
|
||||
for(var/datum/record/crew/person in GLOB.manifest.general)
|
||||
var/list/current_record = list()
|
||||
|
||||
current_record["name"] = person.fields["name"]
|
||||
current_record["bloodtype"] = person.fields["blood_type"]
|
||||
current_record["mi_dis"] = person.fields["mi_dis"]
|
||||
current_record["ma_dis"] = person.fields["ma_dis"]
|
||||
current_record["notes"] = person.fields["notes"]
|
||||
current_record["cnotes"] = person.fields["notes_d"]
|
||||
current_record["bloodtype"] = person.blood_type
|
||||
current_record["ma_dis"] = person.major_disabilities_desc
|
||||
current_record["minor_disabilities"] = person.minor_disabilities_desc
|
||||
current_record["name"] = person.name
|
||||
current_record["notes"] = person.medical_notes
|
||||
|
||||
all_records += list(current_record)
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
if(!computer || !computer.computer_id_slot)
|
||||
return
|
||||
if(id_card)
|
||||
GLOB.data_core.manifest_modify(id_card.registered_name, id_card.assignment, id_card.get_trim_assignment())
|
||||
GLOB.manifest.modify(id_card.registered_name, id_card.assignment, id_card.get_trim_assignment())
|
||||
computer.RemoveID(usr)
|
||||
else
|
||||
playsound(get_turf(ui_host()) , 'sound/machines/buzz-sigh.ogg', 25, FALSE)
|
||||
|
||||
Reference in New Issue
Block a user