mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Merge pull request #222 from SkyMarshal/master
Reworked the mail system so it is almost flawless
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user