Skip to content

Commit

Permalink
Merge branch 'master' into nanomaps_generation
Browse files Browse the repository at this point in the history
  • Loading branch information
izac112 authored Dec 11, 2023
2 parents 100cc86 + bcb180c commit 3936f1e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,16 @@ var/global/floorIsLava = 0
set name = "Player Notes"
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
if (!check_rights(R_ADMIN|R_MOD, 0)) //YW Edit, make sure you have admin or mod rights to mess with player notes
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))
if (!check_rights(R_ADMIN|R_MOD, 0)) //YW Edit, make sure you have admin or mod rights to mess with player notes
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)
Expand Down Expand Up @@ -266,9 +264,8 @@ var/global/floorIsLava = 0
set name = "Show Player Info"
if (!istype(src,/datum/admins))
src = usr.client.holder
if (!istype(src,/datum/admins))
if (!check_rights(R_ADMIN|R_MOD, 0)) //YW Edit, make sure you have admin or mod rights to mess with player notes
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)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/states/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
GLOBAL_DATUM_INIT(tgui_admin_state, /datum/tgui_state/admin_state, new)

/datum/tgui_state/admin_state/can_use_topic(src_object, mob/user)
if(check_rights_for(user.client, R_ADMIN|R_EVENT))
if(check_rights_for(user.client, R_ADMIN|R_MOD|R_EVENT)) //YW Edit, make sure you have admin or mod rights to mess with player notes
return STATUS_INTERACTIVE
return STATUS_CLOSE

0 comments on commit 3936f1e

Please sign in to comment.