mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Getting closer....
This commit is contained in:
@@ -966,7 +966,7 @@
|
||||
if(sortTag == src.sortType[i])
|
||||
issort = 1
|
||||
|
||||
if(issort || (!sortTag && mailsort)) //if destination matches filtered type...
|
||||
if(issort || ((!sortTag || ismail) && mailsort)) //if destination matches filtered type...
|
||||
return sortdir // exit through sortdirection
|
||||
else if (backsort && sortTag)
|
||||
return negdir
|
||||
@@ -996,68 +996,6 @@
|
||||
return P
|
||||
|
||||
|
||||
//a three-way junction that sorts objects destined for the mail office mail table (tomail = 1)
|
||||
/obj/structure/disposalpipe/wrapsortjunction
|
||||
|
||||
desc = "An underfloor disposal pipe which sorts wrapped and unwrapped objects."
|
||||
icon_state = "pipe-j1s"
|
||||
var/posdir = 0
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
posdir = dir
|
||||
if(icon_state == "pipe-j1s")
|
||||
sortdir = turn(posdir, -90)
|
||||
negdir = turn(posdir, 180)
|
||||
else
|
||||
icon_state = "pipe-j2s"
|
||||
sortdir = turn(posdir, 90)
|
||||
negdir = turn(posdir, 180)
|
||||
dpdir = sortdir | posdir | negdir
|
||||
|
||||
update()
|
||||
return
|
||||
|
||||
|
||||
// next direction to move
|
||||
// if coming in from negdir, then next is primary dir or sortdir
|
||||
// if coming in from posdir, then flip around and go back to posdir
|
||||
// if coming in from sortdir, go to posdir
|
||||
|
||||
nextdir(var/fromdir, var/istomail, var/issort)
|
||||
//var/flipdir = turn(fromdir, 180)
|
||||
if(fromdir != sortdir) // probably came from the negdir
|
||||
|
||||
if(istomail || issort == "Mail Office") //if destination matches filtered type...
|
||||
return sortdir // exit through sortdirection
|
||||
else
|
||||
return posdir
|
||||
else // came from sortdir
|
||||
// so go with the flow to positive direction
|
||||
return posdir
|
||||
|
||||
transfer(var/obj/structure/disposalholder/H)
|
||||
var/nextdir = nextdir(H.dir, H.tomail, H.destinationTag)
|
||||
H.dir = nextdir
|
||||
var/turf/T = H.nextloc()
|
||||
var/obj/structure/disposalpipe/P = H.findpipe(T)
|
||||
|
||||
if(P)
|
||||
// find other holder in next loc, if inactive merge it with current
|
||||
var/obj/structure/disposalholder/H2 = locate() in P
|
||||
if(H2 && !H2.active)
|
||||
H.merge(H2)
|
||||
|
||||
H.loc = P
|
||||
else // if wasn't a pipe, then set loc to turf
|
||||
H.loc = T
|
||||
return null
|
||||
|
||||
return P
|
||||
|
||||
|
||||
//a trunk joining to a disposal bin or outlet on the same turf
|
||||
/obj/structure/disposalpipe/trunk
|
||||
icon_state = "pipe-t"
|
||||
|
||||
Reference in New Issue
Block a user