Files
Bubberstation/code/modules/admin/admin_investigate.dm
SpaceLoveSs13 a9ff046352 Administrator Cherrypick (#27405)
* Admin Verb Datums MkIII | Now with functional command bar (#82511)

* Modular stuffs

* Put some admin jump verbs back into the context menu | sorts area jump list again (#82647)

## About The Pull Request

See title.

## Why It's Good For The Game

Some admins wanted all the jump verbs back, aswell as making them not
AGhost you.
Also make the Jump To Area verb use a sorted list again

* Hey what if admins were allowed to use the player panel (#82682)

Re-adds the player panel verb to the verb panel.

* Controller Overview UI (#82739)

* Fixes a minor spelling mistake on the admin panel/verb list (#82747)

## About The Pull Request

Corrects `inisimin` to `invisimin`. This addresses #82728, but only
fixes one of the two issues mentioned

## Why It's Good For The Game

-1 spelling mistake

## Changelog
🆑
spellcheck: 'inisimin' verb corrected to 'invisimin'
/🆑

* Player Panel-age (#82757)

* Admin Forced Mob Rename and Preference Update (#82715)

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: chel <64568243+iliyaxox@users.noreply.github.com>
2024-04-23 20:43:45 +02:00

63 lines
1.8 KiB
Plaintext

/atom/proc/investigate_log(message, subject)
if(!message || !subject)
return
var/F = file("[GLOB.log_directory]/[subject].html")
var/source = "[src]"
if(isliving(src))
var/mob/living/source_mob = src
source += " ([source_mob.ckey ? source_mob.ckey : "*no key*"])"
WRITE_FILE(F, "[time_stamp(format = "YYYY-MM-DD hh:mm:ss")] [REF(src)] ([x],[y],[z]) || [source] [message]<br>")
ADMIN_VERB(investigate_show, R_NONE, "Investigate", "Browse various detailed logs.", ADMIN_CATEGORY_GAME)
var/static/list/investigates = list(
INVESTIGATE_ACCESSCHANGES,
INVESTIGATE_ATMOS,
INVESTIGATE_BOTANY,
INVESTIGATE_CARGO,
INVESTIGATE_CRAFTING,
INVESTIGATE_DEATHS,
INVESTIGATE_ENGINE,
INVESTIGATE_EXPERIMENTOR,
INVESTIGATE_GRAVITY,
INVESTIGATE_HALLUCINATIONS,
INVESTIGATE_HYPERTORUS,
INVESTIGATE_PORTAL,
INVESTIGATE_PRESENTS,
INVESTIGATE_RADIATION,
INVESTIGATE_RECORDS,
INVESTIGATE_RESEARCH,
INVESTIGATE_WIRES,
)
var/list/logs_present = list("notes, memos, watchlist")
var/list/logs_missing = list("---")
for(var/subject in investigates)
var/temp_file = file("[GLOB.log_directory]/[subject].html")
if(fexists(temp_file))
logs_present += subject
else
logs_missing += "[subject] (empty)"
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
var/selected = tgui_input_list(user, "Investigate what?", "Investigation", combined)
if(isnull(selected))
return
if(!(selected in combined) || selected == "---")
return
selected = replacetext(selected, " (empty)", "")
if(selected == "notes, memos, watchlist" && check_rights(R_ADMIN))
browse_messages()
return
var/F = file("[GLOB.log_directory]/[selected].html")
if(!fexists(F))
to_chat(user, span_danger("No [selected] logfile was found."), confidential = TRUE)
return
user << browse(F,"window=investigate[selected];size=800x300")