From 0f3e77bf7c0c618656c73257a0306d1f8b9ca449 Mon Sep 17 00:00:00 2001 From: Ren Erthilo Date: Tue, 1 May 2012 20:59:08 +0100 Subject: [PATCH] TG: Merged Doohl's ticklag thing and the pre-existing one because we don't need two. All admins that should be able to delete can now do so again. gave the adminverb procs a much needed spring-clean. Added some missing returns. moved comments around. Made the verblists more legible. Revision: r3403 Author: elly1...@rocketmail.com --- code/modules/admin/admin_verbs.dm | 15 ++++------- code/modules/admin/verbs/ticklag.dm | 39 +++++++++++++++++------------ 2 files changed, 28 insertions(+), 26 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 01aaaa8f4f5..8003709e898 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -50,12 +50,9 @@ if ("Trial Admin") holder.level = 3 if(holder.state == 2) // if observing - // Debug verbs += /client/proc/debug_variables verbs += /client/proc/cmd_modify_ticker_variables - // Admin helpers verbs += /client/proc/toggle_view_range - // Admin game intrusion verbs += /client/proc/Getmob verbs += /client/proc/Getkey verbs += /client/proc/sendmob @@ -74,12 +71,9 @@ holder.level = 2 if(holder.state == 2) // if observing deadchat = 1 - // Settings verbs += /obj/admins/proc/toggleaban //abandon mob verbs += /client/proc/deadchat //toggles deadchat - // Admin helpers verbs += /client/proc/cmd_admin_check_contents - // Admin game intrusion verbs += /client/proc/Jump verbs += /client/proc/jumptokey verbs += /client/proc/jumptomob @@ -185,6 +179,8 @@ deadchat = 1 seeprayers = 1 + verbs += /obj/admins/proc/view_txt_log + verbs += /obj/admins/proc/view_atk_log verbs += /obj/admins/proc/toggleaban //abandon mob verbs += /obj/admins/proc/show_traitor_panel verbs += /client/proc/cmd_admin_remove_plasma @@ -231,14 +227,12 @@ //verbs += /proc/togglebuildmode --Merged with view variables //verbs += /client/proc/cmd_modify_object_variables --Merged with view variables verbs += /client/proc/togglebuildmodeself - verbs += /client/proc/toggleadminhelpsound + else return //Game Admin if (holder.level >= 5) verbs += /obj/admins/proc/spawn_atom - verbs += /obj/admins/proc/view_txt_log - verbs += /obj/admins/proc/view_atk_log verbs += /client/proc/cmd_admin_list_open_jobs verbs += /client/proc/cmd_admin_direct_narrate verbs += /client/proc/colorooc @@ -388,7 +382,8 @@ verbs -= /client/proc/cmd_admin_create_centcom_report verbs -= /client/proc/deadchat //toggles deadchat verbs -= /client/proc/cmd_admin_mute - verbs -= /client/proc/cmd_admin_pm + verbs -= /client/proc/cmd_admin_pm_context + verbs -= /client/proc/cmd_admin_pm_panel verbs -= /client/proc/cmd_admin_say verbs -= /client/proc/cmd_admin_subtle_message verbs -= /client/proc/warn diff --git a/code/modules/admin/verbs/ticklag.dm b/code/modules/admin/verbs/ticklag.dm index 59c59ba4b5e..9f6fddd8328 100644 --- a/code/modules/admin/verbs/ticklag.dm +++ b/code/modules/admin/verbs/ticklag.dm @@ -1,20 +1,27 @@ -/client/proc/ticklag(number as num) +//Merged Doohl's and the existing ticklag as they both had good elements about them ~Carn + +/client/proc/ticklag() set category = "Debug" - set name = "Ticklag" - set desc = "Ticklag" - set hidden = 1 + set name = "Set Ticklag" + set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9" if(Debug2) if(src.holder) - if(!src.mob) - return - if(src.holder.rank in list("Game Admin", "Game Master")) - world.tick_lag = number - log_admin("[key_name(src.mob)] set tick_lag to [number]") - message_admins("[key_name_admin(usr)] modified world's tick_lag to [number]") - else - alert("Fuck off, no crashing dis server") - return - else - alert("Debugging is disabled") - return + if(!src.mob) return + if(src.holder.rank in list("Game Admin", "Game Master")) + var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null + //I've used ticks of 2 before to help with serious singulo lags + if(newtick && newtick <= 2 && newtick > 0) + log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0) + message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0) + world.tick_lag = newtick + //feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made." + return + + src << "\red Error: ticklag(): You are not authorised to use this. Game Admins and higher only." + return + else + src << "\red Error: ticklag(): You must first enable Debugging mode." + return \ No newline at end of file