mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Mappers, this one's for you. New debug verb added for Coders and Hosts, when pressed, it goes through every obj/machinery/atmospherics in the map, and lists all of the ones that have the nodealert var set to 1, which should only be the case if not all the nodes are connected to something.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@970 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -14,7 +14,7 @@ obj/machinery/atmospherics
|
||||
anchored = 1
|
||||
power_usage = 10
|
||||
power_channel = ENVIRON
|
||||
|
||||
var/nodealert = 0
|
||||
|
||||
var/initialize_directions = 0
|
||||
var/color
|
||||
|
||||
@@ -106,7 +106,7 @@ obj/machinery/atmospherics/valve
|
||||
build_network()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
proc/normalize_dir()
|
||||
if(dir==3)
|
||||
dir = 1
|
||||
@@ -131,6 +131,17 @@ obj/machinery/atmospherics/valve
|
||||
..()
|
||||
if(open && (!node1 || !node2))
|
||||
close()
|
||||
if(!node1)
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (!node2)
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (nodealert)
|
||||
nodealert = 0
|
||||
|
||||
|
||||
return
|
||||
|
||||
@@ -139,14 +150,14 @@ obj/machinery/atmospherics/valve
|
||||
|
||||
var/node1_dir
|
||||
var/node2_dir
|
||||
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(direction&initialize_directions)
|
||||
if (!node1_dir)
|
||||
node1_dir = direction
|
||||
else if (!node2_dir)
|
||||
node2_dir = direction
|
||||
|
||||
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
node1 = target
|
||||
|
||||
@@ -5,7 +5,7 @@ obj/machinery/atmospherics/pipe
|
||||
var/datum/pipeline/parent
|
||||
|
||||
var/volume = 0
|
||||
var/nodealert = 0
|
||||
|
||||
|
||||
layer = 2.4 //under wires with their 2.5
|
||||
|
||||
@@ -118,6 +118,8 @@ obj/machinery/atmospherics/pipe
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (nodealert)
|
||||
nodealert = 0
|
||||
|
||||
|
||||
else if(parent)
|
||||
@@ -342,6 +344,11 @@ obj/machinery/atmospherics/pipe
|
||||
..()
|
||||
if(!node1)
|
||||
parent.mingle_with_turf(loc, 200)
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (nodealert)
|
||||
nodealert = 0
|
||||
|
||||
carbon_dioxide
|
||||
name = "Pressure Tank (Carbon Dioxide)"
|
||||
@@ -515,6 +522,13 @@ obj/machinery/atmospherics/pipe
|
||||
if(parent)
|
||||
parent.mingle_with_turf(loc, 250)
|
||||
|
||||
if(!node1)
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (nodealert)
|
||||
nodealert = 0
|
||||
|
||||
Del()
|
||||
if(node1)
|
||||
node1.disconnect(src)
|
||||
@@ -606,12 +620,21 @@ obj/machinery/atmospherics/pipe
|
||||
|
||||
if(!node1)
|
||||
parent.mingle_with_turf(loc, 70)
|
||||
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if(!node2)
|
||||
parent.mingle_with_turf(loc, 70)
|
||||
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if(!node3)
|
||||
parent.mingle_with_turf(loc, 70)
|
||||
if(!nodealert)
|
||||
//world << "Missing node from [src] at [src.x],[src.y],[src.z]"
|
||||
nodealert = 1
|
||||
else if (nodealert)
|
||||
nodealert = 0
|
||||
|
||||
Del()
|
||||
if(node1)
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
src.holder.level = 6
|
||||
|
||||
// Settings
|
||||
|
||||
src.verbs += /client/proc/colorooc // -- Urist
|
||||
src.verbs += /obj/admins/proc/adjump //toggle admin jumping
|
||||
src.verbs += /obj/admins/proc/adrev //toggle admin revives
|
||||
@@ -62,6 +63,7 @@
|
||||
src.verbs += /obj/admins/proc/startnow //start now bitch
|
||||
|
||||
// Debug
|
||||
src.verbs += /client/proc/atmosscan //for locating piping breaks
|
||||
src.verbs += /client/proc/debug_variables
|
||||
src.verbs += /client/proc/cmd_modify_object_variables
|
||||
src.verbs += /client/proc/cmd_modify_ticker_variables
|
||||
@@ -188,6 +190,7 @@
|
||||
src.verbs += /obj/admins/proc/startnow //start now bitch
|
||||
|
||||
// Debug
|
||||
src.verbs += /client/proc/atmosscan //for locating piping breaks
|
||||
src.verbs += /client/proc/debug_variables
|
||||
src.verbs += /client/proc/cmd_modify_object_variables
|
||||
src.verbs += /client/proc/cmd_modify_ticker_variables
|
||||
|
||||
10
code/modules/admin/verbs/atmosdebug.dm
Normal file
10
code/modules/admin/verbs/atmosdebug.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
/client/proc/atmosscan()
|
||||
set category = "Debug"
|
||||
set name = "Check Plumbing"
|
||||
if(!src.authenticated || !src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
for (var/obj/machinery/atmospherics/plumbing in world)
|
||||
if (plumbing.nodealert)
|
||||
usr << "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])"
|
||||
@@ -601,6 +601,7 @@
|
||||
#include "code\modules\admin\verbs\adminhelp.dm"
|
||||
#include "code\modules\admin\verbs\adminjump.dm"
|
||||
#include "code\modules\admin\verbs\adminsay.dm"
|
||||
#include "code\modules\admin\verbs\atmosdebug.dm"
|
||||
#include "code\modules\admin\verbs\changetemperature.dm"
|
||||
#include "code\modules\admin\verbs\deadsay.dm"
|
||||
#include "code\modules\admin\verbs\debug.dm"
|
||||
|
||||
Reference in New Issue
Block a user