-Changed the powernet nodes list to be a dictionary list (associative list, hashtable, etc..)

-Added a solars_list. The sun will use this list instead of the machines list. I made a proc which decided on whether to use this list or the powernet nodes list depending on what is smallest. I replaced some loops to use this proc.
-The sun will reference this list for debugging purposes. The sun will also remove solar equipment in the list which are not connected to a powernet.
-Cut down on some duplicated code.
-Fixed an issue with solar panels not updating their direction correctly.
-Changed the proc updateicon()'s name to update_icon()

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5418 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-12-29 07:24:42 +00:00
parent 370ab8ebf9
commit 7af60a7fb5
7 changed files with 116 additions and 66 deletions
+3 -3
View File
@@ -41,7 +41,7 @@
powernets += NC.powernet
NC.powernet.cables += NC
powernet = NC.powernet
NC.powernet.nodes += src
NC.powernet.nodes[src] = src
NC.mergeConnectedNetworksOnTurf()
coil.use(1)
@@ -489,7 +489,7 @@
merge_powernets(powernet, N.terminal.powernet)
else
N.terminal.powernet = powernet
powernet.nodes += N.terminal
powernet.nodes[N.terminal] = N.terminal
else if(istype(AM,/obj/machinery/power))
var/obj/machinery/power/M = AM
@@ -498,7 +498,7 @@
merge_powernets(powernet, M.powernet)
else
M.powernet = powernet
powernet.nodes += M
powernet.nodes[M] = M
obj/structure/cable/proc/cableColor(var/colorC)