Merge pull request #222 from SkyMarshal/master

Reworked the mail system so it is almost flawless
This commit is contained in:
Albert Iordache
2012-01-05 09:24:02 -08:00
2 changed files with 5117 additions and 5108 deletions
+11 -3
View File
@@ -932,6 +932,7 @@
desc = "An underfloor disposal pipe with a package sorting mechanism."
icon_state = "pipe-j1s"
var/list/sortType = list()
var/list/backType = list()
var/backsort = 0 //For sending disposal packets to upstream destinations.
var/mailsort = 0
var/posdir = 0
@@ -961,6 +962,12 @@
nextdir(var/fromdir, var/sortTag, var/ismail)
//var/flipdir = turn(fromdir, 180)
var/isback = 0
if(sortTag)
for(var/i, i <= backType.len, i++)
if(sortTag == src.backType[i])
isback = 1
if(fromdir != sortdir) // probably came from the negdir
var/issort = 0
@@ -970,13 +977,14 @@
if(issort || ((!sortTag || ismail) && mailsort)) //if destination matches filtered type...
return sortdir // exit through sortdirection
else if (backsort && sortTag)
else if (isback)
return negdir
else
return posdir
else // came from sortdir
// so go with the flow to positive direction
return posdir
if(isback)
return negdir
return posdir // so go with the flow to positive direction
transfer(var/obj/structure/disposalholder/H)
var/nextdir = nextdir(H.dir, H.destinationTag, H.tomail)