diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index 844a4b6091c..366cc0d1e90 100644 --- a/code/modules/recycling/disposal-construction.dm +++ b/code/modules/recycling/disposal-construction.dm @@ -12,7 +12,7 @@ m_amt = 1850 level = 2 var/ptype = 0 - // 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk + // 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=junction-j1s, 7=junction-j2s var/dpdir = 0 // directions as disposalpipe var/base_state = "pipe-s" @@ -42,6 +42,12 @@ if(5) base_state = "pipe-t" dpdir = dir + if(6) + base_state = "pipe-j1s" + dpdir = dir | right | flip + if(7) + base_state = "pipe-j2s" + dpdir = dir | left | flip icon_state = "con[base_state]" @@ -93,6 +99,8 @@ return /obj/structure/disposalpipe/junction if(5) return /obj/structure/disposalpipe/trunk + if(6,7) + return /obj/structure/disposalpipe/sortjunction return diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index c651f743b1a..4b0b19bacff 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -934,13 +934,19 @@ 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 - var/negdir = 0 - var/sortdir = 0 + var + list/sortType = list() + list/backType = list() + backsort = 0 //For sending disposal packets to upstream destinations. + mailsort = 0 + posdir = 0 + negdir = 0 + sortdir = 0 + service = 0 + screen = 0 + icon_state_old = null +// mob/living/lastuser + New() ..() @@ -965,6 +971,8 @@ nextdir(var/fromdir, var/sortTag, var/ismail) //var/flipdir = turn(fromdir, 180) + if(service) + return posdir //If it's being worked on, it isn't sorting. if(sortTag) for(var/i, i <= backType.len, i++) if(sortTag == src.backType[i]) @@ -1007,6 +1015,77 @@ return P + attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/screwdriver)) + if(service) + icon_state = icon_state_old + service = 0 + user << "You close the service hatch on the sorter" + else + icon_state_old = icon_state + icon_state += "s" + service = 1 + user << "You open up the service hatch on the sorter" + + attack_hand(mob/user as mob) + if(service) + interact(user) + return + + proc + interact(var/mob/user) +// lastuser = user + var/dat = "Sorting Mechanism
" + if (!sortType) + dat += "
Currently Filtering: None
" + else + dat += "
Currently Filtering:" + for(var/i = 1, i <= sortType.len, i++) + dat += " [sortType[i]]," + dat += "
" + if (!backsort) + dat += "Backwards Sorting Disabled Toggle
" + else if(!backType && backsort) + dat += "Backwards Sorting Active. Sorting: None. Toggle
" + else + dat += "Backwards Sorting Active. Sorting:" + for(var/i = 1, i <= backType.len, i++) + dat += " [backType[i]]," + dat += " Toggle
" + user << browse(dat, "window=sortScreen") + onclose(user, "sortScreen") + return + + Topic(href, href_list) + src.add_fingerprint(usr) + usr.machine = src + switch(href_list["choice"]) + if("toggleBack") + backsort = !backsort + if("selectBack") + var/list/names = sortList(backType) + var/variable = input("Which tag?","Tag") as null|anything in names + "(ADD TAG)" + if(!variable) + return + if(variable == "(ADD TAG)") + var/var_value = input("Enter new tag:","Tag") as text|null + if(!var_value) return + backType |= var_value + else + backType -= variable + if("selectSort") + var/list/names = sortList(sortType) + var/variable = input("Which tag?","Tag") as null|anything in names + "(ADD TAG)" + if(!variable) + return + if(variable == "(ADD TAG)") + var/var_value = input("Enter new tag:","Tag") as text|null + if(!var_value) return + sortType |= var_value + else + sortType -= variable +// interact(lastuser) + updateUsrDialog() //a trunk joining to a disposal bin or outlet on the same turf /obj/structure/disposalpipe/trunk diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a768aeda84c..9cd1e772eca 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -12,6 +12,9 @@ attack_hand(mob/user as mob) + return unwrap() + + proc/unwrap() if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0 src.wrapped.loc = (get_turf(src.loc)) if (istype(src.wrapped,/obj/structure/closet)) diff --git a/icons/obj/pipes/disposal.dmi b/icons/obj/pipes/disposal.dmi index 92a4447d727..66493c474a9 100644 Binary files a/icons/obj/pipes/disposal.dmi and b/icons/obj/pipes/disposal.dmi differ diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 119a58f8834..48338488f1f 100644 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -609,7 +609,7 @@ "alK" = (/obj/machinery/door/firedoor/border_only,/turf/simulated/floor{icon_state = "redcorner"; dir = 4},/area/hallway/primary/fore) "alL" = (/obj/structure/disposalpipe/segment{dir = 1},/turf/simulated/wall,/area/maintenance/fsmaint) "alM" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = "Streight"},/turf/simulated/wall,/area/maintenance/fsmaint) -"alN" = (/obj/machinery/door/airlock/maintenance{name = "Atmospherics Maintenance"; req_access_txt = "12;24"},/turf/simulated/floor/plating,/area/maintenance/fsmaint) +"alN" = (/obj/machinery/door/airlock/maintenance{req_access_txt = "12"},/turf/simulated/floor/plating,/area/maintenance/fsmaint) "alO" = (/obj/structure/cable{icon_state = "0-2"; pixel_y = 1; d2 = 2},/obj/machinery/door/airlock/external{req_access_txt = "12"},/turf/simulated/floor/plating/airless,/area/maintenance/fpmaint) "alP" = (/turf/simulated/floor/plating/airless,/area/maintenance/fpmaint) "alQ" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/turf/simulated/wall,/area/security/detectives_office)