mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
gives PRRs access to debug logs (#17848)
* PRR access to debug logs * Update code/__HELPERS/_logging.dm Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
@@ -37,7 +37,7 @@ GLOBAL_PROTECT(log_end)
|
||||
rustg_log_write(GLOB.world_game_log, "DEBUG: [text][GLOB.log_end]")
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_DEBUG, 0, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
|
||||
if(check_rights(R_DEBUG | R_VIEWRUNTIMES, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
|
||||
to_chat(C, "DEBUG: [text]")
|
||||
|
||||
/proc/log_game(text)
|
||||
@@ -149,7 +149,7 @@ GLOBAL_PROTECT(log_end)
|
||||
/proc/log_gc(text)
|
||||
rustg_log_write(GLOB.gc_log, "[text][GLOB.log_end]")
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_DEBUG, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
|
||||
if(check_rights(R_DEBUG | R_VIEWRUNTIMES, FALSE, C.mob) && (C.prefs.toggles & PREFTOGGLE_CHAT_DEBUGLOGS))
|
||||
to_chat(C, "GC DEBUG: [text]")
|
||||
#endif
|
||||
|
||||
|
||||
@@ -280,6 +280,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
|
||||
verbs += /client/proc/view_runtimes
|
||||
verbs += /client/proc/cmd_display_del_log
|
||||
verbs += /client/proc/cmd_display_del_log_simple
|
||||
verbs += /client/proc/toggledebuglogs
|
||||
spawn(1) // This setting exposes the profiler for people with R_VIEWRUNTIMES. They must still have it set in cfg/admin.txt
|
||||
control_freak = 0
|
||||
|
||||
@@ -925,7 +926,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
if(!check_rights(R_VIEWRUNTIMES | R_DEBUG))
|
||||
return
|
||||
|
||||
prefs.toggles ^= PREFTOGGLE_CHAT_DEBUGLOGS
|
||||
|
||||
Reference in New Issue
Block a user