From 80ed72e1dd71dafde810868a92ceff6258c552da Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Tue, 20 Sep 2011 21:24:07 +0000 Subject: [PATCH] Admin verbs updated some more: Give spell, make space ninja, godmode, build mode and gib are no longer verbs. They have been moved to the view variables panel. Attack log was removed as a verb. Please use the view variables panel to see the attack log. screenshot: http://www.kamletos.si/admin_verbs.PNG In addition "explosion", "em pulse", "gib", "make space ninja" and "give spell" now have confirmation boxes or the ability to cancel Okay, so if there are any requests for verbs to be restored (keyboard-admins) please contact me and we'll arrange something. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2237 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/datumvars.dm | 71 ++++++++++++++++++++++- code/game/gamemodes/events/space_ninja.dm | 4 ++ code/modules/admin/admin_verbs.dm | 29 ++++----- code/modules/admin/verbs/randomverbs.dm | 21 +++++-- code/modules/mob/living/living.dm | 3 +- 5 files changed, 105 insertions(+), 23 deletions(-) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index c2bebad7104..e47fc5c7a75 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -101,10 +101,18 @@ client body += "" - - body += "" if(ismob(D)) body += "" + + body += "" + + if(ismob(D)) + body += "" + body += "" + body += "" + body += "" + body += "" + body += "" if(isobj(D) || ismob(D) || isturf(D)) body += "" body += "" @@ -277,6 +285,65 @@ client return src.holder.show_player_panel(MOB) href_list["datumrefresh"] = href_list["mob_player_panel"] + else if (href_list["give_spell"]) + if(!href_list["give_spell"]) + return + var/mob/MOB = locate(href_list["give_spell"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + src.give_spell(MOB) + href_list["datumrefresh"] = href_list["give_spell"] + else if (href_list["ninja"]) + if(!href_list["ninja"]) + return + var/mob/MOB = locate(href_list["ninja"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + src.cmd_admin_ninjafy(MOB) + href_list["datumrefresh"] = href_list["ninja"] + else if (href_list["godmode"]) + if(!href_list["godmode"]) + return + var/mob/MOB = locate(href_list["godmode"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + src.cmd_admin_godmode(MOB) + href_list["datumrefresh"] = href_list["godmode"] + else if (href_list["gib"]) + if(!href_list["gib"]) + return + var/mob/MOB = locate(href_list["gib"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + src.cmd_admin_gib(MOB) + else if (href_list["build_mode"]) + if(!href_list["build_mode"]) + return + var/mob/MOB = locate(href_list["build_mode"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + togglebuildmode(MOB) + href_list["datumrefresh"] = href_list["build_mode"] else if (href_list["explode"]) if(!href_list["explode"]) return diff --git a/code/game/gamemodes/events/space_ninja.dm b/code/game/gamemodes/events/space_ninja.dm index f22c6eafba0..0142bed3f63 100644 --- a/code/game/gamemodes/events/space_ninja.dm +++ b/code/game/gamemodes/events/space_ninja.dm @@ -358,6 +358,10 @@ As such, it's hard-coded for now. No reason for it not to be, really. if(!toggle_space_ninja) alert("Space Ninjas spawning is disabled.") return + + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + if(confirm != "Yes") return + if(ishuman(M)) log_admin("[key_name(src)] turned [M.key] into a Space Ninja.") spawn(10) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1b2f76df939..851308d1615 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -93,7 +93,7 @@ verbs += /obj/admins/proc/toggleaban //abandon mob verbs += /client/proc/deadchat //toggles deadchat // Admin helpers - verbs += /client/proc/cmd_admin_attack_log + //verbs += /client/proc/cmd_admin_attack_log //Use view variables verbs += /client/proc/cmd_admin_check_contents // Admin game intrusion verbs += /client/proc/Jump @@ -152,8 +152,8 @@ verbs += /obj/admins/proc/spawn_atom verbs += /client/proc/check_words verbs += /client/proc/drop_bomb - verbs += /client/proc/give_spell - verbs += /client/proc/cmd_admin_ninjafy + //verbs += /client/proc/give_spell --moved to view variables + //verbs += /client/proc/cmd_admin_ninjafy --now in view vars verbs += /client/proc/cmd_admin_grantfullaccess //verbs += /client/proc/cmd_admin_explosion --now in view vars //verbs += /client/proc/cmd_admin_emp --now in view vars @@ -181,11 +181,11 @@ verbs += /client/proc/jumptoturf verbs += /client/proc/cmd_admin_add_freeform_ai_law verbs += /client/proc/cmd_admin_add_random_ai_law - verbs += /client/proc/cmd_admin_godmode + //verbs += /client/proc/cmd_admin_godmode --now in view variables verbs += /client/proc/cmd_admin_rejuvenate - verbs += /client/proc/cmd_admin_gib + //verbs += /client/proc/cmd_admin_gib --View vars menu verbs += /client/proc/cmd_admin_delete - verbs += /proc/togglebuildmode + //verbs += /proc/togglebuildmode --now in view vars verbs += /client/proc/togglebuildmodeself verbs += /client/proc/hide_most_verbs @@ -211,7 +211,7 @@ if (holder.level >= 1)//Temp Admin******************************************************************** - verbs += /client/proc/cmd_admin_attack_log + //verbs += /client/proc/cmd_admin_attack_log //use view variables verbs += /client/proc/cmd_admin_check_contents verbs += /obj/admins/proc/delay //game start delay verbs += /obj/admins/proc/immreboot //immediate reboot @@ -288,8 +288,8 @@ verbs -= /obj/admins/proc/spawn_atom verbs -= /client/proc/check_words verbs -= /client/proc/drop_bomb - verbs -= /client/proc/give_spell - verbs -= /client/proc/cmd_admin_ninjafy + //verbs -= /client/proc/give_spell --moved to view variables + //verbs -= /client/proc/cmd_admin_ninjafy --now in view vars verbs -= /client/proc/cmd_admin_grantfullaccess //verbs -= /client/proc/cmd_admin_explosion --now in view vars //verbs -= /client/proc/cmd_admin_emp --now in view vars @@ -314,11 +314,11 @@ verbs -= /client/proc/jumptoturf verbs -= /client/proc/cmd_admin_add_freeform_ai_law verbs -= /client/proc/cmd_admin_add_random_ai_law - verbs -= /client/proc/cmd_admin_godmode + //verbs -= /client/proc/cmd_admin_godmode --now in view variables verbs -= /client/proc/cmd_admin_rejuvenate - verbs -= /client/proc/cmd_admin_gib + //verbs -= /client/proc/cmd_admin_gib --view vars menu verbs -= /client/proc/cmd_admin_delete - verbs -= /proc/togglebuildmode + //verbs -= /proc/togglebuildmode --now in view vars verbs -= /client/proc/togglebuildmodeself verbs -= /client/proc/cmd_admin_remove_plasma verbs -= /client/proc/admin_call_shuttle @@ -333,7 +333,7 @@ verbs -= /client/proc/secrets verbs -= /client/proc/play_sound verbs -= /client/proc/stealth - verbs -= /client/proc/cmd_admin_attack_log + //verbs -= /client/proc/cmd_admin_attack_log //use view variables verbs -= /client/proc/cmd_admin_check_contents verbs -= /obj/admins/proc/delay //game start delay verbs -= /obj/admins/proc/immreboot //immediate reboot @@ -550,7 +550,8 @@ set category = "Fun" set name = "Give Spell" set desc = "Gives a spell to a mob." - var/obj/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") in spells + var/obj/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in spells + if(!S) return T.spell_list += new S /client/proc/make_sound(var/obj/O in world) // -- TLE diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 4026b178577..6ffaf828dba 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -562,10 +562,14 @@ Traitors and the like can also be revived with the previous role mostly intact. src << "Only administrators may use this command." return - var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num - var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num - var/light = input("Range of light impact. -1 to none", text("Input")) as num - var/flash = input("Range of flash. -1 to none", text("Input")) as num + var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null + if(devastation == null) return + var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null + if(heavy == null) return + var/light = input("Range of light impact. -1 to none", text("Input")) as num|null + if(light == null) return + var/flash = input("Range of flash. -1 to none", text("Input")) as num|null + if(flash == null) return if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1)) if ((devastation > 20) || (heavy > 20) || (light > 20)) @@ -588,8 +592,10 @@ Traitors and the like can also be revived with the previous role mostly intact. src << "Only administrators may use this command." return - var/heavy = input("Range of heavy pulse.", text("Input")) as num - var/light = input("Range of light pulse.", text("Input")) as num + var/heavy = input("Range of heavy pulse.", text("Input")) as num|null + if(heavy == null) return + var/light = input("Range of light pulse.", text("Input")) as num|null + if(light == null) return if (heavy || light) @@ -609,6 +615,9 @@ Traitors and the like can also be revived with the previous role mostly intact. src << "Only administrators may use this command." return + var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") + if(confirm != "Yes") return + if(usr.key != M.key && M.client) log_admin("[key_name(usr)] has gibbed [key_name(M)]") message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index a18812b5a5d..52e968ddbf0 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -151,8 +151,9 @@ // world << "[src] ~ [src.bodytemperature] ~ [temperature]" return temperature +/mob/proc/get_contents() -/mob/living/proc/get_contents() +/mob/living/get_contents() var/list/L = list() L += src.contents for(var/obj/item/weapon/storage/S in src.contents)