mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-29 03:21:42 +00:00
Medical records searching now works with DNA and not just name/id.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3323 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -378,23 +378,23 @@
|
||||
src.active2.fields[text("com_[]", href_list["del_c"])] = "<B>Deleted</B>"
|
||||
|
||||
if (href_list["search"])
|
||||
var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text
|
||||
var/t1 = input("Search String: (Name, DNA, or ID)", "Med. records", null, null) as text
|
||||
if ((!( t1 ) || usr.stat || !( src.authenticated ) || usr.restrained() || ((!in_range(src, usr)) && (!istype(usr, /mob/living/silicon)))))
|
||||
return
|
||||
src.active1 = null
|
||||
src.active2 = null
|
||||
t1 = lowertext(t1)
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"])))
|
||||
src.active1 = R
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])))
|
||||
src.active2 = R
|
||||
else
|
||||
//Foreach continue //goto(3229)
|
||||
if (!( src.active1 ))
|
||||
if (!( src.active2 ))
|
||||
src.temp = text("Could not locate record [].", t1)
|
||||
else
|
||||
for(var/datum/data/record/E in data_core.medical)
|
||||
if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"]))
|
||||
src.active2 = E
|
||||
for(var/datum/data/record/E in data_core.general)
|
||||
if ((E.fields["name"] == src.active2.fields["name"] || E.fields["id"] == src.active2.fields["id"]))
|
||||
src.active1 = E
|
||||
else
|
||||
//Foreach continue //goto(3334)
|
||||
src.screen = 4
|
||||
|
||||
@@ -91,6 +91,13 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">18 March 2012</h2>
|
||||
<h3 class="author">Quarxink updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">The medical record computers can finally search for DNA and not just name and ID.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">14 March 2012</h2>
|
||||
|
||||
Reference in New Issue
Block a user