Several detective fixes. 3 hour tape recorder.

This commit is contained in:
SkyMarshal
2012-02-02 21:41:30 -07:00
parent a2237a10dc
commit 4290c35af8
8 changed files with 30 additions and 23 deletions

View File

@@ -175,7 +175,7 @@ obj/machinery/computer/forensic_scanning
usr << "\red Invalid Object Rejected." usr << "\red Invalid Object Rejected."
if("database") if("database")
canclear = 1 canclear = 1
if(!misc && !files) if((!misc || !misc.len) && (!files || !files.len))
temp = "Database is empty." temp = "Database is empty."
else else
if(files && files.len) if(files && files.len)
@@ -626,7 +626,7 @@ obj/machinery/computer/forensic_scanning
return return
proc/delete_record(var/location) proc/delete_record(var/location)
if(misc) if(misc && misc.len)
for(var/i = location, i < misc.len, i++) for(var/i = location, i < misc.len, i++)
misc[i] = misc[i+i] misc[i] = misc[i+i]
misc.len-- misc.len--

View File

@@ -92,11 +92,10 @@
if(src.fingerprintslast != H.key) if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key) src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key src.fingerprintslast = H.key
return 0
if (H.dna.uni_identity) if (H.dna.uni_identity)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex)) if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0 return 0
else if(H.gloves) else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0 return 0
if(src.fingerprintslast != H.key) if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key) src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)

View File

@@ -1028,6 +1028,8 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/attackby(C as obj, mob/user as mob) /obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
//world << text("airlock attackby src [] obj [] mob []", src, C, user) //world << text("airlock attackby src [] obj [] mob []", src, C, user)
if(istype(C, /obj/item/device/detective_scanner))
return
if (!istype(usr, /mob/living/silicon)) if (!istype(usr, /mob/living/silicon))
if (src.isElectrified()) if (src.isElectrified())
if(src.shock(user, 75)) if(src.shock(user, 75))

View File

@@ -129,6 +129,8 @@
return 1 return 1
/obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob) /obj/machinery/door/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/detective_scanner))
return ..()
if (src.operating) if (src.operating)
return return
src.add_fingerprint(user) src.add_fingerprint(user)

View File

@@ -178,7 +178,7 @@
for (var/mob/M in world) for (var/mob/M in world)
if (M.client && M.client.holder && (M.client.holder.level != -3)) if (M.client && M.client.holder && (M.client.holder.level != -3))
M << "\red [user.name]//[user.ckey] has gibbed [src.occupant.name]//[src.occupant.ckey]" M << "\red [user.name]/[user.ckey] has gibbed [src.occupant.name]/[src.occupant.ckey]"
src.occupant.death(1) src.occupant.death(1)
src.occupant.ghostize() src.occupant.ghostize()
del(src.occupant) del(src.occupant)
@@ -188,13 +188,13 @@
var/iterator = 0 var/iterator = 0
for (var/i=1 to allmeat.len) for (var/i=1 to allmeat.len)
var/obj/item/meatslab = allmeat[i] var/obj/item/meatslab = allmeat[i]
var/turf/Tx = locate(src.x - i - iterator, src.y, src.z) var/turf/Tx = locate(src.x - i + iterator, src.y, src.z)
if(Tx.density) if(Tx.density)
iterator += 1 iterator += 1
Tx = locate(src.x - i - iterator, src.y, src.z) Tx = locate(src.x - i + iterator, src.y, src.z)
meatslab.loc = src.loc meatslab.loc = src.loc
meatslab.throw_at(Tx,i,3) meatslab.throw_at(Tx,i,3)
if (!Tx.density) if (!Tx.density)
new /obj/effect/decal/cleanable/blood/gibs(Tx,i - iterator) new /obj/effect/decal/cleanable/blood/gibs(Tx,i + iterator)
src.operating = 0 src.operating = 0
update_icon() update_icon()

View File

@@ -132,6 +132,8 @@ MASS SPECTROMETER
return return
afterattack(atom/A as obj|turf|area, mob/user as mob) afterattack(atom/A as obj|turf|area, mob/user as mob)
if(!(locate(A) in oview(1,user)))
return
if(src.loc != user) if(src.loc != user)
return 0 return 0
src.add_fingerprint(user) src.add_fingerprint(user)

View File

@@ -23,18 +23,18 @@
var/ending = copytext(msg, length(msg)) var/ending = copytext(msg, length(msg))
src.timestamp+= src.timerecorded src.timestamp+= src.timerecorded
if (M.stuttering) if (M.stuttering)
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] stammers, \"[msg]\"" src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] stammers, \"[msg]\""
return return
if (M.getBrainLoss() >= 60) if (M.getBrainLoss() >= 60)
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] gibbers, \"[msg]\"" src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] gibbers, \"[msg]\""
return return
if (ending == "?") if (ending == "?")
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] asks, \"[msg]\"" src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] asks, \"[msg]\""
return return
else if (ending == "!") else if (ending == "!")
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] exclaims, \"[msg]\"" src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] exclaims, \"[msg]\""
return return
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] [M.name] says, \"[msg]\"" src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] [M.name] says, \"[msg]\""
return return
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -69,12 +69,12 @@
usr << "\red The tape recorder makes a scratchy noise." usr << "\red The tape recorder makes a scratchy noise."
return return
src.icon_state = "taperecorderrecording" src.icon_state = "taperecorderrecording"
if(src.timerecorded < 3600 && src.playing == 0) if(src.timerecorded < 10800 && src.playing == 0)
usr << "\blue Recording started." usr << "\blue Recording started."
src.recording = 1 src.recording = 1
src.timestamp+= src.timerecorded src.timestamp+= src.timerecorded
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started." src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started."
for(src.timerecorded, src.timerecorded<3600) for(src.timerecorded, src.timerecorded<10800)
if(src.recording == 0) if(src.recording == 0)
break break
src.timerecorded++ src.timerecorded++
@@ -96,7 +96,7 @@
if (src.recording == 1) if (src.recording == 1)
src.recording = 0 src.recording = 0
src.timestamp+= src.timerecorded src.timestamp+= src.timerecorded
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped." src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped."
usr << "\blue Recording stopped." usr << "\blue Recording stopped."
src.icon_state = "taperecorderidle" src.icon_state = "taperecorderidle"
return return
@@ -149,7 +149,7 @@
src.playing = 1 src.playing = 1
src.icon_state = "taperecorderplaying" src.icon_state = "taperecorderplaying"
usr << "\blue Playing started." usr << "\blue Playing started."
for(var/i=1,src.timerecorded<3600,sleep(10 * (src.playsleepseconds) )) for(var/i=1,src.timerecorded<10800,sleep(10 * (src.playsleepseconds) ))
if (src.playing == 0) if (src.playing == 0)
break break
if (src.storedinfo.len < i) if (src.storedinfo.len < i)
@@ -219,12 +219,12 @@
usr << "\red The tape recorder makes a scratchy noise." usr << "\red The tape recorder makes a scratchy noise."
return return
src.icon_state = "taperecorderrecording" src.icon_state = "taperecorderrecording"
if(src.timerecorded < 3600 && src.playing == 0) if(src.timerecorded < 10800 && src.playing == 0)
usr << "\blue Recording started." usr << "\blue Recording started."
src.recording = 1 src.recording = 1
src.timestamp+= src.timerecorded src.timestamp+= src.timerecorded
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording started." src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording started."
for(src.timerecorded, src.timerecorded<3600) for(src.timerecorded, src.timerecorded<10800)
if(src.recording == 0) if(src.recording == 0)
break break
src.timerecorded++ src.timerecorded++
@@ -241,7 +241,7 @@
if (src.recording == 1) if (src.recording == 1)
src.recording = 0 src.recording = 0
src.timestamp+= src.timerecorded src.timestamp+= src.timerecorded
src.storedinfo += "\[[time2text(src.timerecorded*10,"mm:ss")]\] Recording stopped." src.storedinfo += "\[[time2text(src.timerecorded*10,"hh:mm:ss")]\] Recording stopped."
usr << "\blue Recording stopped." usr << "\blue Recording stopped."
src.icon_state = "taperecorderidle" src.icon_state = "taperecorderidle"
return return

View File

@@ -195,6 +195,8 @@
return return
/obj/item/attackby(obj/item/W as obj, mob/user as mob) /obj/item/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/device/detective_scanner))
return
if (istype(W, /obj/item/weapon/packageWrap)) if (istype(W, /obj/item/weapon/packageWrap))
var/location = get_turf(src.loc) var/location = get_turf(src.loc)
if(istype(src,/obj/item/weapon/storage) && istype(src.loc, /mob)) //Put it into the bag if(istype(src,/obj/item/weapon/storage) && istype(src.loc, /mob)) //Put it into the bag
@@ -439,7 +441,7 @@ mob/proc/flash_weak_pain()
else else
M.take_organ_damage(7) M.take_organ_damage(7)
M.eye_blurry += rand(3,4) M.eye_blurry += rand(3,4)
M.eye_stat += rand(2,4) M.eye_stat += rand(5,9)
if (M.eye_stat >= 10) if (M.eye_stat >= 10)
M.eye_blurry += 15+(0.1*M.eye_blurry) M.eye_blurry += 15+(0.1*M.eye_blurry)
M.disabilities |= 1 M.disabilities |= 1