mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[SEMI-MODULAR] Re-implements complete records functionality, my old records on examine PR, implements a exploitables menu, and more! (#9081)
* initial fix (IT DONT WORK AND PROBABLY BREAKS EVERYTHING) * shit's fucking broken. see dev-discuss * bleh * reverts the last commit (i think im new to this) * haha whoops * initial * FIXED IT OH GOD * hopefully removes all references to alt titles * fuck * it would be funny if i stopped fucking it up * migration, initial * STREAMLINED EVERYTHING AAAAAAAAA * organizes da text boxes * adds a few things i changed in the last rendition * edit formating,,,, * i did a oopsie * Update code/datums/datacore.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * fhuujawduj * hahaha... yes! YES! * FIXES. EVERYTHING * fomratting * Update modular_skyrat/modules/records_on_examine/code/modules/mob/verbs/view_exploitables.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * refactors how it works and tidies up code * rogue comment * fixed a potential bug * modularize * readme * i did a FUCKY WUCKY. * merges the suggestion (but with another tiny change) * makes it just a little more obvious * return * erronous comment Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
co-authored by
GoldenAlpharex
parent
3e6ee8ec60
commit
174486a653
@@ -301,7 +301,6 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
|
||||
|
||||
//ADMIN TOOLS
|
||||
|
||||
//Called when using admin tools to give antag status
|
||||
/datum/antagonist/proc/admin_add(datum/mind/new_owner,mob/admin)
|
||||
message_admins("[key_name_admin(admin)] made [key_name_admin(new_owner)] into [name].")
|
||||
@@ -318,8 +317,8 @@ GLOBAL_LIST_EMPTY(antagonists)
|
||||
if(uses_ambitions && owner.my_ambitions.submitted)
|
||||
ambitions_removal()
|
||||
//SKYRAT EDIT ADDITION END
|
||||
on_removal()
|
||||
|
||||
//SKYRAT EDIT CHANGE -- ORIGINALLY CALLED on_removal()
|
||||
owner.remove_antag_datum(src)
|
||||
//gamemode/proc/is_mode_antag(antagonist/A) => TRUE/FALSE
|
||||
|
||||
/**
|
||||
|
||||
@@ -424,13 +424,17 @@
|
||||
. += "<a href='?src=[REF(src)];hud=m;p_stat=1'>\[[health_r]\]</a>"
|
||||
health_r = R.fields["m_stat"]
|
||||
. += "<a href='?src=[REF(src)];hud=m;m_stat=1'>\[[health_r]\]</a>"
|
||||
R = find_record("name", perpname, GLOB.data_core.medical)
|
||||
if(R)
|
||||
var/datum/data/record/M = find_record("name", perpname, GLOB.data_core.medical) //SKYRAT EDIT CHANGE - EXAMINE RECORDS - VAR WAS ORIGINALLY R
|
||||
if(M)
|
||||
. += "<a href='?src=[REF(src)];hud=m;evaluation=1'>\[Medical evaluation\]</a><br>"
|
||||
. += "<a href='?src=[REF(src)];hud=m;quirk=1'>\[See quirks\]</a>"
|
||||
//SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
|
||||
. += "<a href='?src=[REF(src)];hud=m;medrecords=1'>\[View medical records\]</a>"
|
||||
. += "<a href='?src=[REF(src)];hud=m;genrecords=1'>\[View general records\]</a>"
|
||||
var/medical_records_empty = (length(M.fields["past_records"]) < 2)
|
||||
if (!(medical_records_empty))
|
||||
. += "<a href='?src=[REF(src)];hud=m;medrecords=1'>\[View medical records\]</a>"
|
||||
var/general_records_empty = (length(R.fields["past_records"]) < 2)
|
||||
if (!(general_records_empty))
|
||||
. += "<a href='?src=[REF(src)];hud=m;genrecords=1'>\[View general records\]</a>"
|
||||
//SKYRAT EDIT END
|
||||
|
||||
if(HAS_TRAIT(user, TRAIT_SECURITY_HUD))
|
||||
@@ -438,18 +442,24 @@
|
||||
//|| !user.canmove || user.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at.
|
||||
var/criminal = "None"
|
||||
|
||||
R = find_record("name", perpname, GLOB.data_core.security)
|
||||
if(R)
|
||||
criminal = R.fields["criminal"]
|
||||
var/datum/data/record/S = find_record("name", perpname, GLOB.data_core.security) //SKYRAT EDIT CHANGE - EXAMINE RECORDS - VAR WAS ORIGINALLY R
|
||||
if(S)
|
||||
criminal = S.fields["criminal"]
|
||||
|
||||
. += "<span class='deptradio'>Criminal status:</span> <a href='?src=[REF(src)];hud=s;status=1'>\[[criminal]\]</a>"
|
||||
. += jointext(list("<span class='deptradio'>Security record:</span> <a href='?src=[REF(src)];hud=s;viewsec=1'>\[View security records\]</a>", //SKYRAT EDIT CHANGE - EXAMINE RECORDS (changed viewsec)
|
||||
. += jointext(list("<span class='deptradio'>Misc. security record:</span> <a href='?src=[REF(src)];hud=s;view=1'>\[View security records\]</a>", //SKYRAT EDIT CHANGE - EXAMINE RECORDS - Security record > Misc. security record
|
||||
"<a href='?src=[REF(src)];hud=s;add_citation=1'>\[Add citation\]</a>",
|
||||
"<a href='?src=[REF(src)];hud=s;add_crime=1'>\[Add crime\]</a>",
|
||||
"<a href='?src=[REF(src)];hud=s;view_comment=1'>\[View comment log\]</a>",
|
||||
"<a href='?src=[REF(src)];hud=s;add_comment=1'>\[Add comment\]</a>"), "")
|
||||
|
||||
. += jointext(list("<span class='deptradio'>General record:</span> <a href='?src=[REF(src)];hud=s;genrecords=1'>\[View general records\]</a>"), "") //SKYRAT EDIT ADDITION - EXAMINE RECORDS
|
||||
// SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
|
||||
var/general_records_empty = (length(R.fields["past_records"]) < 2)
|
||||
if (!(general_records_empty))
|
||||
. += jointext(list("<span class='deptradio'>General record:</span> <a href='?src=[REF(src)];hud=s;genrecords=1'>\[View general records\]</a>"), "")
|
||||
var/security_records_empty = (length(S.fields["past_records"]) < 2)
|
||||
if (!(security_records_empty))
|
||||
. += jointext(list("<span class='deptradio'>Security record:</span> <a href='?src=[REF(src)];hud=s;secrecords=1'>\[View security records\]</a>"), "")
|
||||
// SKYRAT EDIT ADDITION END
|
||||
else if(isobserver(user))
|
||||
. += "<span class='info'><b>Traits:</b> [get_quirk_string(FALSE, CAT_QUIRK_ALL)]</span>"
|
||||
//SKYRAT EDIT ADDITION BEGIN - GUNPOINT
|
||||
@@ -484,6 +494,15 @@
|
||||
//. += "*---------*</span>" SKYRAT EDIT REMOVAL
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
|
||||
//SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
|
||||
var/datum/data/record/is_in_world = find_record("name", perpname, GLOB.data_core.general) //apparantly golden is okay with offstation roles having no records, FYI
|
||||
var/exploitables_empty = (length(is_in_world.fields["exploitable_records"]) < 2)
|
||||
for(var/datum/antagonist/antag_datum in user?.mind?.antag_datums)
|
||||
if ((is_special_character(user)) && is_in_world && (antag_datum.view_exploitables) && !exploitables_empty)
|
||||
. += "<a href='?src=[REF(src)];exprecords=1'>\[View exploitable info\]</a>"
|
||||
break
|
||||
//SKYRAT EDIT END
|
||||
|
||||
/mob/living/proc/status_effect_examines(pronoun_replacement) //You can include this in any mob's examine() to show the examine texts of status effects!
|
||||
var/list/dat = list()
|
||||
if(!pronoun_replacement)
|
||||
|
||||
@@ -209,8 +209,8 @@
|
||||
to_chat(usr, "<span class='notice ml-1'>Detected physiological traits:</span>\n<span class='notice ml-2'>[quirkstring]</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice ml-1'>No physiological traits found.</span>")
|
||||
if(href_list["medrecords"])
|
||||
//SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
|
||||
if(href_list["medrecords"])
|
||||
to_chat(usr, "<b>Medical Record:</b> [med_record.fields["past_records"]]")
|
||||
if(href_list["genrecords"])
|
||||
to_chat(usr, "<b>General Record:</b> [general_record.fields["past_records"]]")
|
||||
@@ -260,7 +260,7 @@
|
||||
sec_hud_set_security_status()
|
||||
return
|
||||
|
||||
if(href_list["viewsec"]) //SKYRAT EDIT CHANGE - EXAMINE RECORDS
|
||||
if(href_list["view"])
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
|
||||
@@ -275,7 +275,6 @@
|
||||
to_chat(usr, "Added by [c.author] at [c.time]")
|
||||
to_chat(usr, "----------")
|
||||
to_chat(usr, "<b>Notes:</b> [sec_record.fields["notes"]]") //SKYRAT EDIT CHANGE - EXAMINE RECORDS
|
||||
to_chat(usr, "<b>Security Record:</b> [sec_record.fields["past_records"]]") //SKYRAT EDIT ADDITION - EXAMINE RECORDS
|
||||
return
|
||||
|
||||
//SKYRAT EDIT ADDITION BEGIN - EXAMINE RECORDS
|
||||
@@ -285,6 +284,13 @@
|
||||
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
|
||||
return
|
||||
to_chat(usr, "<b>General Record:</b> [general_record.fields["past_records"]]")
|
||||
|
||||
if(href_list["secrecords"])
|
||||
if(!H.canUseHUD())
|
||||
return
|
||||
if(!HAS_TRAIT(H, TRAIT_SECURITY_HUD))
|
||||
return
|
||||
to_chat(usr, "<b>Security Record:</b> [sec_record.fields["past_records"]]")
|
||||
//SKYRAT EDIT END
|
||||
|
||||
if(href_list["add_citation"])
|
||||
@@ -379,9 +385,9 @@
|
||||
//SKYRAT EDIT ADDITION BEGIN - VIEW RECORDS
|
||||
if (is_special_character(usr))
|
||||
var/perpname = get_face_name(get_id_name(""))
|
||||
var/datum/data/record/EXP = find_record("name", perpname, GLOB.data_core.locked)
|
||||
var/datum/data/record/EXP = find_record("name", perpname, GLOB.data_core.general)
|
||||
if(href_list["exprecords"])
|
||||
to_chat(usr, "<b>Exploitable information:</b> [EXP.fields["exp_records"]]")
|
||||
to_chat(usr, "<b>Exploitable information:</b> [EXP.fields["exploitable_records"]]")
|
||||
//SKYRAT EDIT END
|
||||
|
||||
..() //end of this massive fucking chain. TODO: make the hud chain not spooky. - Yeah, great job doing that.
|
||||
|
||||
Reference in New Issue
Block a user