From 42db37161ace0d3f1620a36f3581cfc9b8625def Mon Sep 17 00:00:00 2001 From: SophiaMiller Date: Sat, 15 Aug 2015 23:22:06 +0200 Subject: [PATCH 1/4] Reimplementing Admin-Clean command -CURRENTLY NOT ADDED TO THE PERMS, THATS A TO-DO :3 --- baystation12.dme | 1 + baystation12.int | 1 + code/modules/admin/verbs/admin_clean.dm | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 code/modules/admin/verbs/admin_clean.dm diff --git a/baystation12.dme b/baystation12.dme index e0333a2e08787..df8251129707b 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -10,6 +10,7 @@ #define DEBUG // END_PREFERENCES // BEGIN_INCLUDE +#include "admin_clean.dm" #include "code\global.dm" #include "code\hub.dm" #include "code\names.dm" diff --git a/baystation12.int b/baystation12.int index b82874fded5f9..c9a320eedefbd 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,6 +1,7 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +DIR: code code\controllers code\game code\modules code\modules\admin code\modules\admin\verbs AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/modules/admin/verbs/admin_clean.dm b/code/modules/admin/verbs/admin_clean.dm new file mode 100644 index 0000000000000..4cb71c9715c8b --- /dev/null +++ b/code/modules/admin/verbs/admin_clean.dm @@ -0,0 +1,23 @@ +/client/proc/clean() + set category = "Special Verbs" + set name = "Clean" + + + var/i = 0 + for(var/obj/Obj in world) + if(istype(Obj,/obj/effect/decal/cleanable)) + i++ + + if(!i) + usr << "No objects of this type exist" + return + if(alert("There are [i] cleanable objects in the world. Do you still want to delete?",,"Yes", "No") == "Yes") + world << "

Admin [usr.client.holder.fakekey ? "Administrator" : usr.key] is cleaning the station.
Expect some lag

" + sleep 15 + for(var/obj/Obj in world) + if(istype(Obj,/obj/effect/decal/cleanable)) + del(Obj) + log_admin("[key_name_admin(usr)] cleaned the world ([i] objects deleted) ") + log_admin_single("[key_name_admin(usr)] cleaned the world ([i] objects deleted) ") + message_admins("\blue [key_name_admin(usr)] cleaned the world ([i] objects deleted) ") + From c2e3aa57e24e444e0149c2d544f40b129c58e36c Mon Sep 17 00:00:00 2001 From: SophiaMiller Date: Sat, 15 Aug 2015 23:28:24 +0200 Subject: [PATCH 2/4] Quick Clean fix Fixed --- baystation12.dme | 1 + baystation12.int | 2 ++ code/modules/admin/verbs/admin_clean.dm | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/baystation12.dme b/baystation12.dme index df8251129707b..901c292746dc8 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -820,6 +820,7 @@ #include "code\modules\admin\ToRban.dm" #include "code\modules\admin\DB ban\functions.dm" #include "code\modules\admin\permissionverbs\permissionedit.dm" +#include "code\modules\admin\verbs\admin_clean.dm" #include "code\modules\admin\verbs\adminhelp.dm" #include "code\modules\admin\verbs\adminjump.dm" #include "code\modules\admin\verbs\adminpm.dm" diff --git a/baystation12.int b/baystation12.int index c9a320eedefbd..70a30d4d0bf85 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,7 +1,9 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +WINDOW: code\modules\admin\verbs\admin_clean.dm DIR: code code\controllers code\game code\modules code\modules\admin code\modules\admin\verbs +FILE: code\modules\admin\verbs\admin_clean.dm AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/modules/admin/verbs/admin_clean.dm b/code/modules/admin/verbs/admin_clean.dm index 4cb71c9715c8b..60573cc022421 100644 --- a/code/modules/admin/verbs/admin_clean.dm +++ b/code/modules/admin/verbs/admin_clean.dm @@ -18,6 +18,5 @@ if(istype(Obj,/obj/effect/decal/cleanable)) del(Obj) log_admin("[key_name_admin(usr)] cleaned the world ([i] objects deleted) ") - log_admin_single("[key_name_admin(usr)] cleaned the world ([i] objects deleted) ") message_admins("\blue [key_name_admin(usr)] cleaned the world ([i] objects deleted) ") From 154b99ec9e0f492fded9cdfad7c9f385cabd96df Mon Sep 17 00:00:00 2001 From: SophiaMiller Date: Sun, 16 Aug 2015 00:03:05 +0200 Subject: [PATCH 3/4] Clean() command perms fix -Mods now may use Clean() -Admins now may use Clean() --- baystation12.dme | 1 - baystation12.int | 4 +--- code/modules/admin/admin_verbs.dm | 3 +++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/baystation12.dme b/baystation12.dme index 901c292746dc8..ca8916e2fb3d1 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -10,7 +10,6 @@ #define DEBUG // END_PREFERENCES // BEGIN_INCLUDE -#include "admin_clean.dm" #include "code\global.dm" #include "code\hub.dm" #include "code\names.dm" diff --git a/baystation12.int b/baystation12.int index 70a30d4d0bf85..f05c3d3932884 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,9 +1,7 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 -WINDOW: code\modules\admin\verbs\admin_clean.dm -DIR: code code\controllers code\game code\modules code\modules\admin code\modules\admin\verbs -FILE: code\modules\admin\verbs\admin_clean.dm +DIR: code code\modules code\modules\admin code\modules\admin\verbs AUTO_FILE_DIR: OFF */ // END_INTERNALS diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 72de4dabf85a2..261d19b18ba18 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -8,6 +8,7 @@ var/list/admin_verbs_default = list( /client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/ /client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/ // /client/proc/check_antagonists, /*shows all antags*/ + /client/proc/clean, /client/proc/cmd_mentor_check_new_players // /client/proc/deadchat /*toggles deadchat on/off*/ ) @@ -70,6 +71,7 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_change_custom_event, /client/proc/cmd_admin_rejuvenate, /client/proc/toggleattacklogs, + /client/proc/clean, /client/proc/toggledebuglogs, /client/proc/toggleghostwriters, /client/proc/toggledrones, @@ -281,6 +283,7 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/show_player_info, /client/proc/player_panel_new, /client/proc/dsay, + /client/proc/clean, /datum/admins/proc/show_skills, /datum/admins/proc/show_player_panel, /client/proc/check_antagonists, From e7eb33643107d62e60e68e24f7ff96c25cbe777f Mon Sep 17 00:00:00 2001 From: SophiaMiller Date: Sun, 16 Aug 2015 00:05:08 +0200 Subject: [PATCH 4/4] Clean() addition I forgot to select that file, dumb me --- baystation12.int | 2 ++ 1 file changed, 2 insertions(+) diff --git a/baystation12.int b/baystation12.int index f05c3d3932884..391e96c97baae 100644 --- a/baystation12.int +++ b/baystation12.int @@ -1,7 +1,9 @@ // BEGIN_INTERNALS /* MAP_ICON_TYPE: 0 +WINDOW: code\modules\admin\verbs\admin_clean.dm;code\modules\admin\admin_verbs.dm DIR: code code\modules code\modules\admin code\modules\admin\verbs +FILE: code\modules\admin\admin_verbs.dm AUTO_FILE_DIR: OFF */ // END_INTERNALS