From 3660e9e234bf7ad8f774fb512f5a80dcb794b4e6 Mon Sep 17 00:00:00 2001 From: Repede Date: Sun, 26 Nov 2023 19:39:12 -0500 Subject: [PATCH] EventTest --- code/modules/admin/admin.dm | 15 +++------------ code/modules/admin/topic.dm | 2 +- code/modules/admin/verbs/adminhelp.dm | 2 +- code/modules/admin/verbs/debug.dm | 2 +- 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 8fdc8edc13..1f20811a26 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -219,18 +219,12 @@ var/global/floorIsLava = 0 /datum/admins/proc/PlayerNotes() set category = "Admin" set name = "Player Notes" - if (!istype(src,/datum/admins)) - src = usr.client.holder - if (!istype(src,/datum/admins)) - to_chat(usr, "Error: you are not an admin!") + if (!check_rights(R_ADMIN|R_MOD)) //YW Edit, make sure you have admin or mod rights to mess with player notes return PlayerNotesPage(1) /datum/admins/proc/PlayerNotesFilter() - if (!istype(src,/datum/admins)) - src = usr.client.holder - if (!istype(src,/datum/admins)) - to_chat(usr, "Error: you are not an admin!") + if (!check_rights(R_ADMIN|R_MOD)) //YW Edit, make sure you have admin or mod rights to mess with player notes return var/filter = tgui_input_text(usr, "Filter string (case-insensitive regex)", "Player notes filter") PlayerNotesPage(1, filter) @@ -259,10 +253,7 @@ var/global/floorIsLava = 0 /datum/admins/proc/show_player_info(var/key as text) set category = "Admin" set name = "Show Player Info" - if (!istype(src,/datum/admins)) - src = usr.client.holder - if (!istype(src,/datum/admins)) - to_chat(usr, "Error: you are not an admin!") + if (!check_rights(R_ADMIN|R_MOD)) //YW Edit, make sure you have admin or mod rights to mess with player notes return var/datum/tgui_module/player_notes_info/A = new(src) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 77a0649221..6fb5dfd430 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -30,7 +30,7 @@ return if(href_list["ahelp"]) - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT)) + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG)) // YW Edit: Remove ahelp viewing from event permissions return var/ahelp_ref = href_list["ahelp"] diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 30dc872bb9..a6f44dfa2f 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -628,7 +628,7 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) set name = "Show Ticket List" set category = "Admin" - if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT, TRUE)) + if(!check_rights(R_ADMIN|R_MOD|R_DEBUG, TRUE)) //YW Edit: Remove Ticket permissions from Event Makers return var/browse_to diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 10b4bc7cc9..1a2d54b181 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -639,7 +639,7 @@ set name = "Change Weather" set desc = "Changes the current weather." - if(!check_rights(R_DEBUG)) + if(!check_rights(R_DEBUG|R_EVENT)) //YW Edit: Event Makers can change weather return var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify the weather on?", "Change Weather", SSplanets.planets)