Revert a few Admin TGUI input things (#7993)

This commit is contained in:
Raeschen
2024-03-17 16:32:44 +01:00
committed by GitHub
parent 90257db99a
commit df2a7a1d8c
3 changed files with 27 additions and 62 deletions

View File

@@ -1,17 +1,9 @@
/client/proc/cmd_admin_check_player_logs(var/mob/living/M) // CHOMPEdit /client/proc/cmd_admin_check_player_logs(mob/living/M as mob in mob_list)
set category = "Admin" set category = "Admin"
set name = "Check Player Attack Logs" set name = "Check Player Attack Logs"
set desc = "Check a player's attack logs." set desc = "Check a player's attack logs."
// CHOMPEdit Begin //Views specific attack logs belonging to one player.
if(M?.client == usr.client)
M = tgui_input_list(usr, "Check a player's attack logs.", "Check Player Attack Logs", mob_list)
if(!M)
return
// CHOMPEdit End
//Views specific attack logs belonging to one player.
var/dat = "<B>[M]'s Attack Log:<HR></B>" var/dat = "<B>[M]'s Attack Log:<HR></B>"
dat += "<b>Viewing attack logs of [M]</b> - (Played by ([key_name(M)]).<br>" dat += "<b>Viewing attack logs of [M]</b> - (Played by ([key_name(M)]).<br>"
if(M.mind) if(M.mind)
@@ -45,19 +37,11 @@
feedback_add_details("admin_verb","PL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","PL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_check_dialogue_logs(var/mob/living/M) // CHOMPEdit /client/proc/cmd_admin_check_dialogue_logs(mob/living/M as mob in mob_list)
set category = "Admin" set category = "Admin"
set name = "Check Player Dialogue Logs" set name = "Check Player Dialogue Logs"
set desc = "Check a player's dialogue logs." set desc = "Check a player's dialogue logs."
// CHOMPEdit Begin
if(M?.client == usr.client)
M = tgui_input_list(usr, "Check a player's dialogue logs.", "Check Player Dialogue Logs", mob_list)
if(!M)
return
// CHOMPEdit End
//Views specific dialogue logs belonging to one player. //Views specific dialogue logs belonging to one player.
var/dat = "<B>[M]'s Dialogue Log:<HR></B>" var/dat = "<B>[M]'s Dialogue Log:<HR></B>"
dat += "<b>Viewing say and emote logs of [M]</b> - (Played by ([key_name(M)]).<br>" dat += "<b>Viewing say and emote logs of [M]</b> - (Played by ([key_name(M)]).<br>"

View File

@@ -742,24 +742,16 @@ Traitors and the like can also be revived with the previous role mostly intact.
else else
return return
/client/proc/cmd_admin_gib() // CHOMPEdit /client/proc/cmd_admin_gib(mob/M as mob in mob_list)
set category = "Special Verbs" set category = "Special Verbs"
set name = "Gib" set name = "Gib"
// CHOMPEdit Begin if(!check_rights(R_ADMIN|R_FUN)) return //VOREStation Edit
if(!check_rights(R_ADMIN|R_FUN))
return //VOREStation Edit
var/mob/M = tgui_input_list(usr, "", "Gib", mob_list)
if(!M)
return
var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No")) var/confirm = tgui_alert(src, "You sure?", "Confirm", list("Yes", "No"))
if(confirm != "Yes") if(confirm != "Yes") return
return
// CHOMPEdit End
//Due to the delay here its easy for something to have happened to the mob //Due to the delay here its easy for something to have happened to the mob
if(!M) return
log_admin("[key_name(usr)] has gibbed [key_name(M)]") log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1) message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
@@ -1039,7 +1031,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1) message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/despawn_player() // CHOMPEdit /client/proc/despawn_player(var/mob/M in living_mob_list)
set name = "Cryo Player" set name = "Cryo Player"
set category = "Admin" set category = "Admin"
set desc = "Removes a player from the round as if they'd cryo'd." set desc = "Removes a player from the round as if they'd cryo'd."
@@ -1048,8 +1040,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN|R_EVENT)) if(!check_rights(R_ADMIN|R_EVENT))
return return
var/mob/M = tgui_input_list(usr, "Removes a player from the round as if they'd cryo'd.", "Cryo Player", living_mob_list) // CHOMPEdit
if(!M) if(!M)
return return

View File

@@ -1,33 +1,24 @@
/client/proc/resize(var/mob/living/L) // CHOMPEdit /client/proc/resize(var/mob/living/L in mob_list)
set name = "Resize" set name = "Resize"
set desc = "Resizes any living mob without any restrictions on size." set desc = "Resizes any living mob without any restrictions on size."
set category = "Fun" set category = "Fun"
if(!check_rights(R_ADMIN|R_FUN|R_VAREDIT))
return
// CHOMPEdit Start var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE)
if(!check_rights(R_ADMIN|R_FUN|R_VAREDIT)) if(!size_multiplier)
return return //cancelled
if(L?.client == usr.client) size_multiplier = clamp(size_multiplier, -50, 50) //VOREStation Edit - being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering.
L = tgui_input_list(usr, "Resizes any living mob without any restrictions on size.", "Resize", mob_list) var/can_be_big = L.has_large_resize_bounds()
var/very_big = is_extreme_size(size_multiplier)
if(!L) if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
return to_chat(src,"<span class='warning'>[L] will lose this size upon moving into an area where this size is not allowed.</span>")
// CHOMPEdit End else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
to_chat(src,"<span class='warning'>[L] will retain this normally unallowed size outside this area.</span>")
var/size_multiplier = tgui_input_number(usr, "Input size multiplier.", "Resize", 1, round_value=FALSE) L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
if(!size_multiplier)
return //cancelled
size_multiplier = clamp(size_multiplier, -50, 50) //VOREStation Edit - being able to make people upside down is fun. Also 1000 is way, WAY too big. Honestly 50 is too big but at least you can see 50 and it doesn't break the rendering. log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].")
var/can_be_big = L.has_large_resize_bounds() feedback_add_details("admin_verb","RESIZE")
var/very_big = is_extreme_size(size_multiplier)
if(very_big && can_be_big) // made an extreme size in an area that allows it, don't assume adminbuse
to_chat(src,"<span class='warning'>[L] will lose this size upon moving into an area where this size is not allowed.</span>")
else if(very_big) // made an extreme size in an area that doesn't allow it, assume adminbuse
to_chat(src,"<span class='warning'>[L] will retain this normally unallowed size outside this area.</span>")
L.resize(size_multiplier, animate = TRUE, uncapped = TRUE, ignore_prefs = TRUE)
log_and_message_admins("has changed [key_name(L)]'s size multiplier to [size_multiplier].")
feedback_add_details("admin_verb","RESIZE")