mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 03:52:52 +00:00
Added multiple string search to security records, fixed some evidence bag bugginess, fixed problem with the stamp remover.
This commit is contained in:
@@ -226,17 +226,21 @@ What a mess.*/
|
||||
screen = 1
|
||||
//RECORD FUNCTIONS
|
||||
if("Search Records")
|
||||
var/t1 = input("Search String: (Partial Name or ID or Fingerprints)", "Secure. records", null, null) as text
|
||||
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.restrained() || !in_range(src, usr)))
|
||||
return
|
||||
Perp = new/list()
|
||||
t1 = lowertext(t1)
|
||||
var/list/components = dd_text2list(t1, " ")
|
||||
if(components.len > 5)
|
||||
return //Lets not let them search too greedily.
|
||||
for(var/datum/data/record/R in data_core.general)
|
||||
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"]
|
||||
if(findtext(temptext,t1))
|
||||
var/prelist = new/list(2)
|
||||
prelist[1] = R
|
||||
Perp += prelist
|
||||
var/temptext = R.fields["name"] + " " + R.fields["id"] + " " + R.fields["fingerprint"] + " " + 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 data_core.security)
|
||||
var/datum/data/record/R = Perp[i]
|
||||
|
||||
@@ -122,7 +122,8 @@ CLIPBOARDS
|
||||
if(istype(P, /obj/item/weapon/stamp))
|
||||
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
|
||||
return
|
||||
src.infoold = src.info
|
||||
if(!src.infoold)
|
||||
src.infoold = src.info
|
||||
src.info += text("<BR><i>This paper has been stamped with the [].</i><BR>", P.name)
|
||||
switch(P.type)
|
||||
if(/obj/item/weapon/stamp/captain)
|
||||
@@ -153,6 +154,7 @@ CLIPBOARDS
|
||||
if ((!in_range(src, usr) && src.loc != user && !( istype(src.loc, /obj/item/weapon/clipboard) ) && src.loc.loc != user && user.equipped() != P))
|
||||
return
|
||||
src.info = src.infoold
|
||||
src.infoold = null
|
||||
for(var/i, i <= stamped.len, i++)
|
||||
switch(stamped[i])
|
||||
if(/obj/item/weapon/stamp/captain)
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
/obj/item/clothing/suit/storage/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.w_class > 2 || src.loc == W )
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
if(src.contents.len >= 2)
|
||||
user << "You have nowhere to place that"
|
||||
return
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
user << "\blue You're a robot. No."
|
||||
return //Robots can't interact with storage items.
|
||||
|
||||
if(istype(W,/obj/item/weapon/evidencebag) && src.loc != user)
|
||||
return
|
||||
|
||||
if(src.loc == W)
|
||||
return //Means the item is already in the storage item
|
||||
|
||||
|
||||
Reference in New Issue
Block a user