From 92940e1c007bfed7f28b2d1cbd7786bb82cd423d Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 13 Jul 2014 05:32:40 -0400 Subject: [PATCH] Running tests and cleaning out useless debug verbs/procs. --- baystation12.dme | 1 - code/game/structure/structure.dm | 4 +- code/game/turfs/simulated.dm | 3 - code/game/turfs/space/space.dm | 3 - code/game/turfs/turf.dm | 6 - code/game/verbs/ooc.dm | 8 -- code/modules/admin/admin_verbs.dm | 8 -- code/modules/admin/topic.dm | 4 - code/modules/admin/verbs/adminhelp.dm | 4 - code/modules/admin/verbs/diagnostics.dm | 107 ------------------ code/modules/admin/verbs/mapping.dm | 85 -------------- code/modules/admin/verbs/pray.dm | 4 - .../mob/living/carbon/human/whisper.dm | 4 - code/modules/mob/say.dm | 10 -- code/test.dm | 51 +++++++++ 15 files changed, 54 insertions(+), 248 deletions(-) create mode 100644 code/test.dm diff --git a/baystation12.dme b/baystation12.dme index f01a1c12322..800f88aba4a 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -798,7 +798,6 @@ #include "code\modules\admin\verbs\adminsay.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" -#include "code\modules\admin\verbs\check_customitem_activity.dm" #include "code\modules\admin\verbs\cinematic.dm" #include "code\modules\admin\verbs\custom_event.dm" #include "code\modules\admin\verbs\deadsay.dm" diff --git a/code/game/structure/structure.dm b/code/game/structure/structure.dm index af44c91dc69..6afd0beaf3f 100644 --- a/code/game/structure/structure.dm +++ b/code/game/structure/structure.dm @@ -4,4 +4,6 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "snowman" anchored = 1 - density = 1 \ No newline at end of file + density = 1 + +/obj/structure/poopiepants \ No newline at end of file diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 4908afc6f74..275261daba8 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -21,9 +21,6 @@ tracks.AddTracks(mob,bloodDNA,comingdir,goingdir,typepath) /turf/simulated/Entered(atom/A, atom/OL) - if(movement_disabled && usr.ckey != movement_disabled_exception) - usr << "\red Movement is admin-disabled." //This is to identify lag problems - return if (istype(A,/mob/living/carbon)) var/mob/living/carbon/M = A diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 7d09fa4ad6a..9bc007073a4 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -72,9 +72,6 @@ // Ported from unstable r355 /turf/space/Entered(atom/movable/A as mob|obj) - if(movement_disabled) - usr << "\red Movement is admin-disabled." //This is to identify lag problems - return ..() if ((!(A) || src != A.loc)) return diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index b08cfa82b2d..6289b6dd255 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -51,9 +51,6 @@ return 0 /turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) - if(movement_disabled && usr.ckey != movement_disabled_exception) - usr << "\red Movement is admin-disabled." //This is to identify lag problems - return if (!mover) return 1 @@ -90,9 +87,6 @@ /turf/Entered(atom/atom as mob|obj) - if(movement_disabled) - usr << "\red Movement is admin-disabled." //This is to identify lag problems - return ..() //vvvvv Infared beam stuff vvvvv diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index b37ac32777d..7765fa8aa6e 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -5,10 +5,6 @@ var/global/normal_ooc_colour = "#002eb8" set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite set category = "OOC" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - if(!mob) return if(IsGuestKey(key)) src << "Guests may not use OOC." @@ -91,10 +87,6 @@ var/global/normal_ooc_colour = "#002eb8" set desc = "Local OOC, seen only by those in view." set category = "OOC" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - if(!mob) return if(IsGuestKey(key)) src << "Guests may not use OOC." diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 10d7273aa73..3ef39762ba0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -62,7 +62,6 @@ var/list/admin_verbs_admin = list( /client/proc/toggledebuglogs, /client/proc/update_mob_sprite, /client/proc/toggledrones, - /client/proc/check_customitem_activity, /client/proc/man_up, /client/proc/global_man_up, /client/proc/delbook @@ -119,7 +118,6 @@ var/list/admin_verbs_server = list( /client/proc/cmd_debug_del_all, /datum/admins/proc/toggle_aliens, /datum/admins/proc/toggle_space_ninja, - /client/proc/check_customitem_activity, /client/proc/delbook, /client/proc/toggle_antagHUD_use, /client/proc/toggle_antagHUD_restrictions, @@ -143,13 +141,11 @@ var/list/admin_verbs_debug = list( /client/proc/kill_air, /client/proc/ZASSettings, /client/proc/cmd_debug_make_powernets, - /client/proc/kill_airgroup, /client/proc/debug_controller, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_admin_delete, /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_tog_aliens, - /client/proc/air_report, /client/proc/reload_admins, /client/proc/restart_controller, /client/proc/enable_debug_verbs, @@ -225,13 +221,11 @@ var/list/admin_verbs_hideable = list( /client/proc/reload_admins, /client/proc/kill_air, /client/proc/cmd_debug_make_powernets, - /client/proc/kill_airgroup, /client/proc/debug_controller, /client/proc/startSinglo, /client/proc/cmd_debug_mob_lists, /client/proc/cmd_debug_del_all, /client/proc/cmd_debug_tog_aliens, - /client/proc/air_report, /client/proc/enable_debug_verbs, /proc/possess, /proc/release @@ -290,13 +284,11 @@ var/list/admin_verbs_mod = list( /client/proc/camera_view, /client/proc/sec_camera_report, /client/proc/intercom_view, - /client/proc/air_status, /client/proc/atmosscan, /client/proc/powerdebug, /client/proc/count_objects_on_z_level, /client/proc/count_objects_all, /client/proc/cmd_assume_direct_control, - /client/proc/jump_to_dead_group, /client/proc/startSinglo, /client/proc/ticklag, /client/proc/cmd_admin_grantfullaccess, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index ac261f0cdc8..655761323dc 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2775,10 +2775,6 @@ src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", "")) src.access_news_network() - else if(href_list["populate_inactive_customitems"]) - if(check_rights(R_ADMIN|R_SERVER)) - populate_inactive_customitems_list(src.owner) - else if(href_list["vsc"]) if(check_rights(R_ADMIN|R_SERVER)) if(href_list["vsc"] == "airflow") diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 8e8870c891b..3038b414334 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -7,10 +7,6 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey"," set category = "Admin" set name = "Adminhelp" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - //handle muting and automuting if(prefs.muted & MUTE_ADMINHELP) src << "Error: Admin-PM: You cannot send adminhelps (Muted)." diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index 3b742a97567..2c27be1cde9 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -1,66 +1,3 @@ -/client/proc/air_report() - set category = "Debug" - set name = "Show Air Report" - - /*(!master_controller || !air_master) - alert(usr,"Master_controller or air_master not found.","Air Report") - return 0 - - var/active_groups = 0 - var/inactive_groups = 0 - var/active_tiles = 0 - for(var/datum/air_group/group in air_master.air_groups) - if(group.group_processing) - active_groups++ - else - inactive_groups++ - active_tiles += group.members.len - - var/hotspots = 0 - for(var/obj/effect/hotspot/hotspot in world) - hotspots++ - - var/output = {"AIR SYSTEMS REPORT
-General Processing Data
-# of Groups: [air_master.air_groups.len]
----- Active: [active_groups]
----- Inactive: [inactive_groups]
--------- Tiles: [active_tiles]
-# of Active Singletons: [air_master.active_singletons.len]
-
-Special Processing Data
-Hotspot Processing: [hotspots]
-High Temperature Processing: [air_master.active_super_conductivity.len]
-High Pressure Processing: [air_master.high_pressure_delta.len] (not yet implemented)
-
-Geometry Processing Data
-Group Rebuild: [air_master.groups_to_rebuild.len]
-Tile Update: [air_master.tiles_to_update.len]
-"} - - usr << browse(output,"window=airreport") - feedback_add_details("admin_verb","SAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -*/ -/client/proc/air_status(turf/target as turf) - set category = "Debug" - set name = "Display Air Status" - - /*(!isturf(target)) - return - - var/datum/gas_mixture/GM = target.return_air() - var/burning = 0 - if(istype(target, /turf/simulated)) - var/turf/simulated/T = target - if(T.active_hotspot) - burning = 1 - - usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]" - for(var/datum/gas/trace_gas in GM.trace_gases) - usr << "[trace_gas.type]: [trace_gas.moles]" - feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - */ - /client/proc/fix_next_move() set category = "Debug" set name = "Unfreeze Everyone" @@ -139,50 +76,6 @@ load_admins() feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -//todo: -/client/proc/jump_to_dead_group() - set name = "Jump to dead group" - set category = "Debug" - /* - if(!holder) - src << "Only administrators may use this command." - return - - if(!air_master) - usr << "Cannot find air_system" - return - var/datum/air_group/dead_groups = list() - for(var/datum/air_group/group in air_master.air_groups) - if (!group.group_processing) - dead_groups += group - var/datum/air_group/dest_group = pick(dead_groups) - usr.loc = pick(dest_group.members) - feedback_add_details("admin_verb","JDAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - return - */ - -/client/proc/kill_airgroup() - set name = "Kill Local Airgroup" - set desc = "Use this to allow manual manupliation of atmospherics." - set category = "Debug" - /* - if(!holder) - src << "Only administrators may use this command." - return - - if(!air_master) - usr << "Cannot find air_system" - return - - var/turf/T = get_turf(usr) - if(istype(T, /turf/simulated)) - var/datum/air_group/AG = T:parent - AG.next_check = 30 - AG.group_processing = 0 - else - usr << "Local airgroup is unsimulated!" - feedback_add_details("admin_verb","KLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - */ /client/proc/print_jobban_old() set name = "Print Jobban Log" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index e1ed1222f3a..686b4fc626c 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -134,14 +134,12 @@ var/intercom_range_display_status = 0 src.verbs += /client/proc/camera_view //-errorage src.verbs += /client/proc/sec_camera_report //-errorage src.verbs += /client/proc/intercom_view //-errorage - src.verbs += /client/proc/air_status //Air things src.verbs += /client/proc/Cell //More air things src.verbs += /client/proc/atmosscan //check plumbing src.verbs += /client/proc/powerdebug //check power src.verbs += /client/proc/count_objects_on_z_level src.verbs += /client/proc/count_objects_all src.verbs += /client/proc/cmd_assume_direct_control //-errorage - src.verbs += /client/proc/jump_to_dead_group src.verbs += /client/proc/startSinglo src.verbs += /client/proc/ticklag //allows you to set the ticklag. src.verbs += /client/proc/cmd_admin_grantfullaccess @@ -153,12 +151,6 @@ var/intercom_range_display_status = 0 src.verbs += /client/proc/print_jobban_old src.verbs += /client/proc/print_jobban_old_filter src.verbs += /client/proc/forceEvent - src.verbs += /client/proc/break_all_air_groups - src.verbs += /client/proc/regroup_all_air_groups - src.verbs += /client/proc/kill_pipe_processing - src.verbs += /client/proc/kill_air_processing - src.verbs += /client/proc/disable_communication - src.verbs += /client/proc/disable_movement src.verbs += /client/proc/Zone_Info src.verbs += /client/proc/Test_ZAS_Connection src.verbs += /client/proc/ZoneTick @@ -236,80 +228,3 @@ var/intercom_range_display_status = 0 world << "There are [count] objects of type [type_path] in the game world" feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - - -var/global/prevent_airgroup_regroup = 0 - -/client/proc/break_all_air_groups() - set category = "Mapping" - set name = "Break All Airgroups" - - /*prevent_airgroup_regroup = 1 - for(var/datum/air_group/AG in air_master.air_groups) - AG.suspend_group_processing() - message_admins("[src.ckey] used 'Break All Airgroups'")*/ - -/client/proc/regroup_all_air_groups() - set category = "Mapping" - set name = "Regroup All Airgroups Attempt" - - usr << "\red Proc disabled." - - /*prevent_airgroup_regroup = 0 - for(var/datum/air_group/AG in air_master.air_groups) - AG.check_regroup() - message_admins("[src.ckey] used 'Regroup All Airgroups Attempt'")*/ - -/client/proc/kill_pipe_processing() - set category = "Mapping" - set name = "Kill pipe processing" - - usr << "\red Proc disabled." - - /*pipe_processing_killed = !pipe_processing_killed - if(pipe_processing_killed) - message_admins("[src.ckey] used 'kill pipe processing', stopping all pipe processing.") - else - message_admins("[src.ckey] used 'kill pipe processing', restoring all pipe processing.")*/ - -/client/proc/kill_air_processing() - set category = "Mapping" - set name = "Kill air processing" - - usr << "\red Proc disabled." - - /*air_processing_killed = !air_processing_killed - if(air_processing_killed) - message_admins("[src.ckey] used 'kill air processing', stopping all air processing.") - else - message_admins("[src.ckey] used 'kill air processing', restoring all air processing.")*/ - -//This proc is intended to detect lag problems relating to communication procs -var/global/say_disabled = 0 -/client/proc/disable_communication() - set category = "Mapping" - set name = "Disable all communication verbs" - - usr << "\red Proc disabled." - - /*say_disabled = !say_disabled - if(say_disabled) - message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.") - else - message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")*/ - -//This proc is intended to detect lag problems relating to movement -var/global/movement_disabled = 0 -var/global/movement_disabled_exception //This is the client that calls the proc, so he can continue to run around to gauge any change to lag. -/client/proc/disable_movement() - set category = "Mapping" - set name = "Disable all movement" - - usr << "\red Proc disabled." - - /*movement_disabled = !movement_disabled - if(movement_disabled) - message_admins("[src.ckey] used 'Disable all movement', killing all movement.") - movement_disabled_exception = usr.ckey - else - message_admins("[src.ckey] used 'Disable all movement', restoring all movement.")*/ \ No newline at end of file diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 497c94b50c4..0494cfab89d 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -2,10 +2,6 @@ set category = "IC" set name = "Pray" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN) if(!msg) return diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 4159ac04845..f499bb8811c 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -1,10 +1,6 @@ //Lallander was here /mob/living/carbon/human/whisper(message as text) - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - message = trim(copytext(strip_html_simple(message), 1, MAX_MESSAGE_LEN)) if (!message || silent || miming) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index a4bc9eb66aa..8ba4a4555fa 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -9,19 +9,12 @@ /mob/verb/say_verb(message as text) set name = "Say" set category = "IC" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return usr.say(message) /mob/verb/me_verb(message as text) set name = "Me" set category = "IC" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) if(use_me) @@ -33,9 +26,6 @@ var/name = src.real_name var/alt_name = "" - if(say_disabled) //This is here to try to identify lag problems - usr << "\red Speech is currently admin-disabled." - return if(!src.client.holder) if(!dsay_allowed) diff --git a/code/test.dm b/code/test.dm new file mode 100644 index 00000000000..39da2e0e380 --- /dev/null +++ b/code/test.dm @@ -0,0 +1,51 @@ +/client/verb/listprocs() + set category = "Debug" + set name = "Debug Proc List" + + var/list/atomList = typesof(/atom) + var/list/objList = typesof(/obj) + var/list/mobList = typesof(/mob) + var/list/turfList = typesof(/turf) + var/list/clientList = typesof(/client) + var/list/datumList = typesof(/datum) + var/total = 0 + var/debuglog = file("data/logs/debug.log") + + for (var/A in atomList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + for (var/A in objList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + for (var/A in mobList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + for (var/A in turfList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + for (var/A in clientList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + for (var/A in datumList) + var/list/procList = typesof("[A]/proc") + for(var/B in procList) + debuglog << B + total += procList.len + + debuglog << total + world << total