From c5912b988cefbb4bf7b05b9d8f33a6bca849de8f Mon Sep 17 00:00:00 2001 From: Datraen Date: Sun, 20 Dec 2015 14:19:42 -0500 Subject: [PATCH 1/3] Adds a paralyze button for easy administration. Conflicts: code/modules/admin/admin.dm --- code/modules/admin/admin.dm | 18 +++++++++++++++++- code/modules/admin/admin_verbs.dm | 6 ++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1e1dcf982e0..1988f3d58c7 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1403,5 +1403,21 @@ proc/admin_notice(var/message, var/rights) usr << "Mode has not started." return - message_admins("[key_name(usr)] attempting to force mode autospawn.") + log_and_message_admins("attempting to force mode autospawn.") ticker.mode.process_autoantag() + +/datum/admins/proc/paralyze_mob(mob/living/carbon/human/H as mob) + set category = "Admin" + set name = "Toggle Paralyze" + set desc = "Paralyzes a player. Or unparalyses them." + + var/msg + + if(check_rights(R_ADMIN|R_MOD)) + if (H.paralysis == 0) + H.paralysis = 1000 + msg = "has paralyzed [key_name(H)]." + else + H.paralysis = 0 + msg = "has unparalyzed [key_name(H)]." + log_and_message_admins(msg) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 064f10820d1..54031611497 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -91,7 +91,8 @@ var/list/admin_verbs_admin = list( /client/proc/change_human_appearance_self, /* Allows the human-based mob itself change its basic appearance */ /client/proc/change_security_level, /client/proc/view_chemical_reaction_logs, - /client/proc/makePAI + /client/proc/makePAI, + /datum/admins/proc/paralyze_mob ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, @@ -284,7 +285,8 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/show_player_panel, /client/proc/check_antagonists, /client/proc/jobbans, - /client/proc/cmd_admin_subtle_message /*send an message to somebody as a 'voice in their head'*/ + /client/proc/cmd_admin_subtle_message, /*send an message to somebody as a 'voice in their head'*/ + /datum/admins/proc/paralyze_mob ) var/list/admin_verbs_mentor = list( From 65f68602e7e06c989d293ded7141d4fd950f3fa4 Mon Sep 17 00:00:00 2001 From: Datraen Date: Sun, 20 Dec 2015 14:37:39 -0500 Subject: [PATCH 2/3] Adds a longer timer to paralyze, allows for other mobs to fall under this proc. Conflicts: code/modules/admin/admin.dm --- code/modules/admin/admin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1988f3d58c7..4a435188e35 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1406,7 +1406,7 @@ proc/admin_notice(var/message, var/rights) log_and_message_admins("attempting to force mode autospawn.") ticker.mode.process_autoantag() -/datum/admins/proc/paralyze_mob(mob/living/carbon/human/H as mob) +/datum/admins/proc/paralyze_mob(mob/living/H as mob) set category = "Admin" set name = "Toggle Paralyze" set desc = "Paralyzes a player. Or unparalyses them." @@ -1415,7 +1415,7 @@ proc/admin_notice(var/message, var/rights) if(check_rights(R_ADMIN|R_MOD)) if (H.paralysis == 0) - H.paralysis = 1000 + H.paralysis = 8000 msg = "has paralyzed [key_name(H)]." else H.paralysis = 0 From 70b84d87a6f8b90633338793e487291fffaeb6d5 Mon Sep 17 00:00:00 2001 From: PsiOmegaDelta Date: Wed, 23 Dec 2015 13:01:03 +0100 Subject: [PATCH 3/3] Tweaks permission rights. --- code/modules/admin/admin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 4a435188e35..86e0d31cefd 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1395,7 +1395,7 @@ proc/admin_notice(var/message, var/rights) if (!istype(src,/datum/admins)) src = usr.client.holder - if (!istype(src,/datum/admins)) + if (!istype(src,/datum/admins) || !check_rights(R_ADMIN)) usr << "Error: you are not an admin!" return @@ -1413,7 +1413,7 @@ proc/admin_notice(var/message, var/rights) var/msg - if(check_rights(R_ADMIN|R_MOD)) + if(check_rights(R_ADMIN)) if (H.paralysis == 0) H.paralysis = 8000 msg = "has paralyzed [key_name(H)]."