mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
@@ -349,8 +349,6 @@
|
||||
|
||||
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
|
||||
// travels through the pipes.
|
||||
|
||||
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
|
||||
air_contents = new() // new empty gas resv.
|
||||
@@ -492,9 +490,9 @@
|
||||
var/datum/gas_mixture/gas = null // gas used to flush, will appear at exit point
|
||||
var/active = 0 // true if the holder is moving, otherwise inactive
|
||||
dir = 0
|
||||
var/count = 1000 //*** can travel 1000 steps before going inactive (in case of loops)
|
||||
var/has_fat_guy = 0 // true if contains a fat person
|
||||
var/destinationTag = 0 // changes if contains a delivery container
|
||||
var/count = 1000 //*** can travel 1000 steps before going to the mail room (in case of loops)
|
||||
var/destinationTag = null // changes if contains a delivery container
|
||||
var/tomail = 0 //changes if contains wrapped package
|
||||
|
||||
|
||||
// initialize a holder from the contents of a disposal unit
|
||||
@@ -514,9 +512,11 @@
|
||||
if(istype(AM, /obj/effect/bigDelivery))
|
||||
var/obj/effect/bigDelivery/T = AM
|
||||
src.destinationTag = T.sortTag
|
||||
if(istype(AM, /obj/item/smallDelivery))
|
||||
else if(istype(AM, /obj/item/smallDelivery))
|
||||
var/obj/item/smallDelivery/T = AM
|
||||
src.destinationTag = T.sortTag
|
||||
else if (!src.destinationTag)
|
||||
src.destinationTag = "Mail Office"
|
||||
|
||||
|
||||
// start the movement process
|
||||
@@ -538,12 +538,6 @@
|
||||
process()
|
||||
var/obj/structure/disposalpipe/last
|
||||
while(active)
|
||||
if(has_fat_guy && prob(2)) // chance of becoming stuck per segment if contains a fat guy
|
||||
active = 0
|
||||
// find the fat guys
|
||||
for(var/mob/living/carbon/human/H in src)
|
||||
|
||||
break
|
||||
sleep(1) // was 1
|
||||
var/obj/structure/disposalpipe/curr = loc
|
||||
last = curr
|
||||
@@ -553,7 +547,8 @@
|
||||
|
||||
//
|
||||
if(!(count--))
|
||||
active = 0
|
||||
tomail = 1 //So loops end up in the mail room.
|
||||
destinationTag = null
|
||||
return
|
||||
|
||||
|
||||
@@ -584,9 +579,6 @@
|
||||
var/mob/M = AM
|
||||
if(M.client) // if a client mob, update eye to follow this holder
|
||||
M.client.eye = src
|
||||
|
||||
if(other.has_fat_guy)
|
||||
has_fat_guy = 1
|
||||
del(other)
|
||||
|
||||
|
||||
@@ -939,7 +931,9 @@
|
||||
|
||||
desc = "An underfloor disposal pipe with a package sorting mechanism."
|
||||
icon_state = "pipe-j1s"
|
||||
var/sortType = 0
|
||||
var/list/sortType = list()
|
||||
var/backsort = 0 //For sending disposal packets to upstream destinations.
|
||||
var/mailsort = 0
|
||||
var/posdir = 0
|
||||
var/negdir = 0
|
||||
var/sortdir = 0
|
||||
@@ -965,12 +959,19 @@
|
||||
// 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/sortTag)
|
||||
nextdir(var/fromdir, var/sortTag, var/ismail)
|
||||
//var/flipdir = turn(fromdir, 180)
|
||||
if(fromdir != sortdir) // probably came from the negdir
|
||||
|
||||
if(src.sortType == sortTag) //if destination matches filtered type...
|
||||
var/issort = 0
|
||||
for(var/i, i <= sortType.len, i++)
|
||||
if(sortTag == src.sortType[i])
|
||||
issort = 1
|
||||
|
||||
if(issort || ((!sortTag || ismail) && mailsort)) //if destination matches filtered type...
|
||||
return sortdir // exit through sortdirection
|
||||
else if (backsort && sortTag)
|
||||
return negdir
|
||||
else
|
||||
return posdir
|
||||
else // came from sortdir
|
||||
@@ -978,7 +979,7 @@
|
||||
return posdir
|
||||
|
||||
transfer(var/obj/structure/disposalholder/H)
|
||||
var/nextdir = nextdir(H.dir, H.destinationTag)
|
||||
var/nextdir = nextdir(H.dir, H.destinationTag, H.tomail)
|
||||
H.dir = nextdir
|
||||
var/turf/T = H.nextloc()
|
||||
var/obj/structure/disposalpipe/P = H.findpipe(T)
|
||||
@@ -997,9 +998,6 @@
|
||||
return P
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//a trunk joining to a disposal bin or outlet on the same turf
|
||||
/obj/structure/disposalpipe/trunk
|
||||
icon_state = "pipe-t"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "deliverycrate"
|
||||
var/obj/wrapped = null
|
||||
density = 1
|
||||
var/sortTag = 0
|
||||
var/sortTag = null
|
||||
flags = FPRINT
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
@@ -24,6 +24,18 @@
|
||||
var/obj/item/device/destTagger/O = W
|
||||
user << "\blue *TAGGED*"
|
||||
src.sortTag = O.currTag
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/str = input(usr,"Label text?","Set label","")
|
||||
if(!str || !length(str))
|
||||
usr << "\red Invalid text."
|
||||
return
|
||||
if(length(str) > 64)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
var/label = str
|
||||
for(var/mob/M in viewers())
|
||||
M << "\blue [user] labels [src] as [label]."
|
||||
src.name = "[src.name] ([label])"
|
||||
return
|
||||
|
||||
/obj/item/smallDelivery
|
||||
@@ -32,11 +44,11 @@
|
||||
icon = 'storage.dmi'
|
||||
icon_state = "deliverycrateSmall"
|
||||
var/obj/item/wrapped = null
|
||||
var/sortTag = 0
|
||||
var/sortTag = null
|
||||
flags = FPRINT
|
||||
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
attack_self(mob/user)
|
||||
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||
src.wrapped.loc = (get_turf(src.loc))
|
||||
|
||||
@@ -48,6 +60,18 @@
|
||||
var/obj/item/device/destTagger/O = W
|
||||
user << "\blue *TAGGED*"
|
||||
src.sortTag = O.currTag
|
||||
else if(istype(W, /obj/item/weapon/pen))
|
||||
var/str = input(usr,"Label text?","Set label","")
|
||||
if(!str || !length(str))
|
||||
usr << "\red Invalid text."
|
||||
return
|
||||
if(length(str) > 64)
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
var/label = str
|
||||
for(var/mob/M in viewers())
|
||||
M << "\blue [user] labels [src] as [label]."
|
||||
src.name = "[src.name] ([label])"
|
||||
return
|
||||
|
||||
|
||||
@@ -56,6 +80,7 @@
|
||||
name = "package wrapper"
|
||||
icon = 'items.dmi'
|
||||
icon_state = "deliveryPaper"
|
||||
w_class = 4.0
|
||||
var/amount = 25.0
|
||||
|
||||
|
||||
@@ -102,13 +127,18 @@
|
||||
name = "destination tagger"
|
||||
desc = "Used to set the destination of properly wrapped packages."
|
||||
icon_state = "forensic0"
|
||||
var/currTag = 0
|
||||
var/currTag = null
|
||||
var/list/spaceList = list(0,1,0,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0,0,0,1,0,0,0,1,0,1,0,0) // Breaks up departments with whitespace.
|
||||
var/list/locationList = list("Disposals",
|
||||
"Cargo Bay", "QM Office", "Engineering", "CE Office",
|
||||
"Atmospherics", "Security", "HoS Office", "Medbay",
|
||||
"CMO Office", "Chemistry", "Research", "RD Office",
|
||||
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
|
||||
"Bar", "Kitchen", "Hydroponics", "Janitor Closet",)
|
||||
"Mail Office", "Cargo Bay", "QM Office",
|
||||
"Locker Room", "Tool Storage", "Laundry Room", "Toilets",
|
||||
"Security", "Courtroom", "Detective's Office", "Law Office",
|
||||
"Research Division", "Research Director", "Genetics",
|
||||
"Medbay", "CMO", "Chemistry", "Morgue",
|
||||
"Library", "Chapel", "Chapel Office", "Theater", "Janitor",
|
||||
"Bar", "Kitchen", "Diner", "Hydroponics",
|
||||
"Meeting Room", "HoP Office",
|
||||
"Engineering", "Chief Engineer", "Robotics",)
|
||||
//The whole system for the sorttype var is determined based on the order of this list,
|
||||
//disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude
|
||||
|
||||
@@ -120,37 +150,36 @@
|
||||
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
user.machine = src
|
||||
interact(user)
|
||||
|
||||
proc/interact(mob/user as mob)
|
||||
var/dat = "<TT><B>TagMaster 2.2</B><BR><BR>"
|
||||
if (src.currTag == 0)
|
||||
if (!currTag)
|
||||
dat += "<br>Current Selection: None<br>"
|
||||
else
|
||||
dat += "<br>Current Selection: [locationList[currTag]]<br><br>"
|
||||
dat += "<br>Current Selection: [currTag]<br><br>"
|
||||
for (var/i = 1, i <= locationList.len, i++)
|
||||
dat += "<A href='?src=\ref[src];nextTag=[i]'>[locationList[i]]</A>"
|
||||
if (i%4==0)
|
||||
if(spaceList[i])
|
||||
dat += "<br>"
|
||||
else
|
||||
dat += " "
|
||||
dat += "<A href='?src=\ref[src];nextTag=[i]'>[locationList[i]]</A>"
|
||||
dat += "<br>"
|
||||
user << browse(dat, "window=destTagScreen")
|
||||
onclose(user, "destTagScreen")
|
||||
usr.machine = null
|
||||
return
|
||||
|
||||
Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["nextTag"])
|
||||
var/n = text2num(href_list["nextTag"])
|
||||
src.currTag = n
|
||||
src.updateUsrDialog()
|
||||
src.currTag = locationList[n]
|
||||
if(istype(loc,/mob))
|
||||
interact(loc)
|
||||
else
|
||||
updateDialog()
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
attack(target as obj, mob/user as mob)
|
||||
user << "/blue *TAGGED*"
|
||||
target.sortTag = src.currTag
|
||||
|
||||
attack(target as obj, mob/user as mob)
|
||||
user << "/blue You can only tag properly wrapped delivery packages!"
|
||||
*/
|
||||
attack(target as obj, mob/user as mob)
|
||||
if (istype(target, /obj/effect/bigDelivery))
|
||||
user << "\blue *TAGGED*"
|
||||
@@ -190,14 +219,14 @@
|
||||
// travels through the pipes.
|
||||
for(var/obj/effect/bigDelivery/O in src)
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1
|
||||
if(!O.sortTag)
|
||||
O.sortTag = "Disposals"
|
||||
for(var/obj/item/smallDelivery/O in src)
|
||||
deliveryCheck = 1
|
||||
if (O.sortTag == 0)
|
||||
O.sortTag = 1
|
||||
if (!O.sortTag)
|
||||
O.sortTag = "Disposals"
|
||||
if(deliveryCheck == 0)
|
||||
H.destinationTag = 1
|
||||
H.destinationTag = "Disposals"
|
||||
|
||||
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
@@ -216,4 +245,11 @@
|
||||
if(mode == 2) // if was ready,
|
||||
mode = 1 // switch to charging
|
||||
update()
|
||||
return
|
||||
return
|
||||
|
||||
CanPass(atom/A, turf/T)
|
||||
if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
HasEntered(M)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user