Skip to content

Commit

Permalink
hate hate hate hate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Suckerberg committed Sep 18, 2021
1 parent 15f836e commit 675b7e1
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 30 deletions.
4 changes: 0 additions & 4 deletions _maps/shuttles/shiptest/amogus_sus.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,6 @@
"hY" = (
/obj/machinery/atmospherics/pipe/simple/cyan/visible,
/obj/effect/spawner/structure/window/reinforced,
/obj/machinery/atmospherics/pipe/simple/cyan/visible,
/obj/machinery/door/firedoor/border_only,
/obj/machinery/door/firedoor/border_only{
dir = 1
Expand Down Expand Up @@ -3460,9 +3459,6 @@
/turf/open/floor/plating,
/area/ship/engineering/atmospherics)
"Od" = (
/obj/structure/cable/yellow{
icon_state = "1-2"
},
/obj/structure/cable/yellow{
icon_state = "1-2"
},
Expand Down
1 change: 0 additions & 1 deletion code/game/objects/effects/decals/decal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
icon = 'whitesands/icons/turf/decals.dmi'
icon_state = "warningline"
layer = TURF_DECAL_LAYER
appearance_flags = RESET_COLOR
var/detail_overlay
var/detail_color

Expand Down
65 changes: 43 additions & 22 deletions code/modules/admin/verbs/atmosdebug.dm
Original file line number Diff line number Diff line change
@@ -1,33 +1,47 @@
/client/proc/atmosscan()
/client/proc/check_plumbing()
set category = "Mapping"
set name = "Check Plumbing"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Plumbing") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/list/results = atmosscan()
to_chat(usr, "[results.Join("\n")]", confidential = TRUE)

/proc/atmosscan()
var/list/results = list()

//all plumbing - yes, some things might get stated twice, doesn't matter.
for(var/obj/machinery/atmospherics/components/pipe in GLOB.machines)
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
for(var/obj/machinery/atmospherics/components/component in GLOB.machines)
if(component.z && (!component.nodes || !component.nodes.len || (null in component.nodes)))
results += "Unconnected [component.name] located at [ADMIN_VERBOSEJMP(component)]"

//Manifolds
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in GLOB.machines)
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
for(var/obj/machinery/atmospherics/pipe/manifold/manifold in GLOB.machines)
if(manifold.z && (!manifold.nodes || !manifold.nodes.len || (null in manifold.nodes)))
results += "Unconnected [manifold.name] located at [ADMIN_VERBOSEJMP(manifold)]"

//Pipes
for(var/obj/machinery/atmospherics/pipe/simple/pipe in GLOB.machines)
if(pipe.z && (!pipe.nodes || !pipe.nodes.len || (null in pipe.nodes)))
to_chat(usr, "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]", confidential = TRUE)
results += "Unconnected [pipe.name] located at [ADMIN_VERBOSEJMP(pipe)]"
for(var/obj/machinery/atmospherics/pipe/simple/other_pipe in get_turf(pipe))
if(other_pipe != pipe && other_pipe.piping_layer == pipe.piping_layer && other_pipe.dir == pipe.dir)
results += "Doubled pipe located at [ADMIN_VERBOSEJMP(pipe)]"

/client/proc/powerdebug()
return results

/client/proc/check_wiring()
set category = "Mapping"
set name = "Check Power"
if(!src.holder)
to_chat(src, "Only administrators may use this command.", confidential = TRUE)
return
SSblackbox.record_feedback("tally", "admin_verb", 1, "Check Power") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/list/results = powerdebug()
to_chat(usr, "[results.Join("\n")]", confidential = TRUE)

/proc/powerdebug()
var/list/results = list()

for (var/datum/powernet/PN in GLOB.powernets)
Expand All @@ -41,16 +55,23 @@
var/obj/structure/cable/C = PN.cables[1]
results += "Powernet with fewer than 10 cables! (number [PN.number]) - example cable at [ADMIN_VERBOSEJMP(C)]"

for(var/turf/T in world.contents)
var/found_one = FALSE
for(var/obj/structure/cable/C in T.contents)
if(found_one)
results += "Doubled wire at [ADMIN_VERBOSEJMP(C)]"
else
found_one = TRUE
var/obj/machinery/power/terminal/term = locate(/obj/machinery/power/terminal) in T.contents
if(term)
var/obj/structure/cable/C = locate(/obj/structure/cable) in T.contents
if(!C)
results += "Unwired terminal at [ADMIN_VERBOSEJMP(term)]"
to_chat(usr, "[results.Join("\n")]", confidential = TRUE)
var/checked_list = list()
for(var/obj/structure/cable/specific_cable as anything in GLOB.cable_list)
if(specific_cable in checked_list)
continue
for(var/obj/structure/cable/other_cable in get_turf(specific_cable))
if(other_cable == specific_cable)
continue
checked_list += other_cable
if(other_cable.icon_state == specific_cable.icon_state)
results += "Doubled wire at [ADMIN_VERBOSEJMP(specific_cable)]"
continue

for(var/obj/machinery/power/terminal/terminal in GLOB.machines)
var/wired = FALSE
for(var/obj/structure/cable/cable in get_turf(terminal))
if(cable.d1 == 0)
wired = TRUE
if(!wired)
results += "Unwired terminal at [ADMIN_VERBOSEJMP(terminal)]"
return results
4 changes: 2 additions & 2 deletions code/modules/admin/verbs/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
/client/proc/intercom_view, //-errorage
/client/proc/air_status, //Air things
/client/proc/Cell, //More air things
/client/proc/atmosscan, //check plumbing
/client/proc/powerdebug, //check power
/client/proc/check_plumbing, //check plumbing
/client/proc/check_wiring, //check power
/client/proc/count_objects_on_z_level,
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/dead/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@
var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list
to_chat(src, "<span class='notice'>Now teleporting.</span>")
if (O)
observer.forceMove(O.loc) observer.key = key
observer.forceMove(O.loc)
observer.key = key
observer.client = client
observer.set_ghost_appearance()
if(observer.client && observer.client.prefs)
Expand Down

0 comments on commit 675b7e1

Please sign in to comment.