You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
1.6 KiB

  1. /atom/proc/investigate_log(message, subject)
  2. if(!message || !subject)
  3. return
  4. var/F = file("[GLOB.log_directory]/[subject].html")
  5. WRITE_FILE(F, "[time_stamp()] [REF(src)] ([x],[y],[z]) || [src] [message]<br>")
  6. /client/proc/investigate_show()
  7. set name = "Investigate"
  8. set category = "Admin - Game"
  9. if(!holder)
  10. return
  11. var/list/investigates = list(INVESTIGATE_RESEARCH, INVESTIGATE_EXONET, INVESTIGATE_PORTAL, INVESTIGATE_SINGULO, INVESTIGATE_WIRES, INVESTIGATE_TELESCI, INVESTIGATE_GRAVITY, INVESTIGATE_RECORDS, INVESTIGATE_CARGO, INVESTIGATE_SUPERMATTER, INVESTIGATE_ATMOS, INVESTIGATE_EXPERIMENTOR, INVESTIGATE_BOTANY, INVESTIGATE_HALLUCINATIONS, INVESTIGATE_RADIATION, INVESTIGATE_NANITES, INVESTIGATE_PRESENTS)
  12. var/list/logs_present = list("notes, memos, watchlist")
  13. var/list/logs_missing = list("---")
  14. for(var/subject in investigates)
  15. var/temp_file = file("[GLOB.log_directory]/[subject].html")
  16. if(fexists(temp_file))
  17. logs_present += subject
  18. else
  19. logs_missing += "[subject] (empty)"
  20. var/list/combined = sortList(logs_present) + sortList(logs_missing)
  21. var/selected = input("Investigate what?", "Investigate") as null|anything in combined
  22. if(!(selected in combined) || selected == "---")
  23. return
  24. selected = replacetext(selected, " (empty)", "")
  25. if(selected == "notes, memos, watchlist" && check_rights(R_ADMIN))
  26. browse_messages()
  27. return
  28. var/F = file("[GLOB.log_directory]/[selected].html")
  29. if(!fexists(F))
  30. to_chat(src, "<span class='danger'>No [selected] logfile was found.</span>", confidential = TRUE)
  31. return
  32. src << browse(F,"window=investigate[selected];size=800x300")