Files
CHOMPStation2/code/WorkInProgress/carn/debug_powernets.dm
elly1989@rocketmail.com 5d3c6a9259 Please stop committing all the #define FILE_DIR stuff every commit. Dreammaker updates it automatically anyway. Just remove that section prior to commit.
Added some WIP master controller alternatives. Located in code/WorkInProgress/carn They should stop the MC doubling up and smooth the lagspikes over a little bit (depending on how they are set up). They need a bit of work still, but are functional. Just untick code/game/master_controller.dm and tick the version you want to try out.

Committing Giacom's pai remote-signaller code.

Minor map fix for Travis (extra grille NE corner of atmos)

Added a debug tool that prints powernets into a text-based map.

Fixed a runtime that occurred everytime somebody cut a laid cable. It was updating the power networks twice each time >_>

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3920 316c924e-a436-60f5-8080-3fe189b3f50e
2012-06-26 01:47:40 +00:00

86 lines
2.2 KiB
Plaintext

//Inefficient as hell so don't copypasta this anywhere! It's only here as a tool for debugging
//prints a map of the powernetworks on z-level 1
/client/verb/print_powernets()
set name = "print powernets"
var/file = file("powernets_map.html")
var/list/grid[255][255]
var/list/checklist = list()
for(var/obj/structure/cable/C in world)
if(C.z != 1) continue
if(C.x < 1 || C.x > 255) continue
if(C.y < 1 || C.y > 255) continue
grid[C.x][C.y] = C.netnum
checklist |= C.netnum
sleep(1)
file << "<font size='1'><tt>"
for(var/netnum in checklist)
file << "[netnum]<br>"
for(var/j=255, j>=1, j--)
var/line = "<br>"
for(var/i=1, i<=255, i++)
switch(grid[i][j])
if(null) line += "&nbsp;"
if(0 to 9) line += "[grid[i][j]]"
if(10) line += "a"
if(11) line += "b"
if(12) line += "c"
if(13) line += "d"
if(14) line += "e"
if(15) line += "f"
if(16) line += "g"
if(17) line += "h"
if(18) line += "i"
if(19) line += "j"
if(20) line += "k"
if(21) line += "l"
if(22) line += "m"
if(23) line += "n"
if(24) line += "o"
if(25) line += "p"
if(26) line += "q"
if(27) line += "r"
if(28) line += "s"
if(29) line += "t"
if(30) line += "u"
if(31) line += "v"
if(32) line += "w"
if(33) line += "x"
if(34) line += "y"
if(35) line += "z"
if(36) line += "A"
if(37) line += "B"
if(38) line += "C"
if(39) line += "D"
if(40) line += "E"
if(41) line += "F"
if(42) line += "G"
if(43) line += "H"
if(44) line += "I"
if(45) line += "J"
if(46) line += "K"
if(47) line += "L"
if(48) line += "M"
if(49) line += "N"
if(50) line += "O"
if(51) line += "P"
if(52) line += "Q"
if(53) line += "R"
if(54) line += "S"
if(55) line += "T"
if(56) line += "U"
if(57) line += "V"
if(58) line += "W"
if(59) line += "X"
if(60) line += "Y"
if(61) line += "Z"
else line += "#"
file << line
file << "</tt></font>"
src << "printed to powernets_map.html"
src << browse(file)