diff --git a/baystation12.dme b/baystation12.dme
index 693e1384b19..f12f62af8e7 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -1002,8 +1002,10 @@
#include "code\modules\security levels\security levels.dm"
#include "code\WorkInProgress\AI_Visibility.dm"
#include "code\WorkInProgress\buildmode.dm"
+#include "code\WorkInProgress\copier.dm"
#include "code\WorkInProgress\detective_work.dm"
#include "code\WorkInProgress\explosion_particles.dm"
+#include "code\WorkInProgress\filing.dm"
#include "code\WorkInProgress\mapload\dmm_suite.dm"
#include "code\WorkInProgress\mapload\reader.dm"
#include "code\WorkInProgress\Mini\atmos_control.dm"
diff --git a/code/WorkInProgress/copier.dm b/code/WorkInProgress/copier.dm
new file mode 100644
index 00000000000..9f933b822dd
--- /dev/null
+++ b/code/WorkInProgress/copier.dm
@@ -0,0 +1,156 @@
+// Contains: copy machine
+
+/obj/machinery/copier
+ name = "Copy Machine"
+ icon = 'bureaucracy.dmi'
+ icon_state = "copier"
+ density = 1
+ anchored = 1
+ var/num_copies = 1 // number of copies selected, will be maintained between jobs
+ var/copying = 0 // are we copying
+ var/job_num_copies = 0 // number of copies remaining
+ var/top_open = 1 // the top is open
+ var/obj/item/weapon/template // the paper OR photo being scanned
+ var/copy_wait = 0 // wait for current page to finish
+ var/max_copies = 10 // MAP EDITOR: can set the number of max copies, possibly to 5 or something for public, more for QM, robutist, etc.
+
+/obj/machinery/copier/New()
+ ..()
+ update()
+
+/obj/machinery/copier/attackby(obj/item/weapon/O as obj, mob/user as mob)
+ if(!top_open)
+ return
+
+ if (istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
+ // put it inside
+ template = O
+ usr.drop_item()
+ O.loc = src
+ top_open = 0
+ update()
+ updateDialog()
+
+/obj/machinery/copier/attack_paw(user as mob)
+ return src.attack_hand(user)
+
+/obj/machinery/copier/attack_ai(user as mob)
+ return src.attack_hand(user)
+
+/obj/machinery/copier/attack_hand(user as mob)
+ // da UI
+ var/dat
+ if(..())
+ return
+
+ if(src.stat)
+ user << "[name] does not seem to be responding to your button mashing."
+ return
+
+ /*
+ if(top_open)
+ user << "[name] beeps, \"Please place a paper on top and close the lid.\""
+ return
+ */
+
+ dat = "
Copy MachineXeno Corp. Copying Machine
"
+
+ if(copying)
+ dat += "[job_num_copies] copies remaining.
"
+ dat += "Cancel"
+ else
+ if(!top_open)
+ dat += "Open Top
"
+
+ dat += "Number of Copies: "
+
+ dat += "-"
+ dat += "-"
+ dat += " [num_copies] "
+ dat += "+"
+ dat += "+
"
+
+ if(template)
+ dat += "Copy"
+ else
+ dat += "No paper to be copied.
"
+ dat += "Please place a paper or photograph on top and close the lid."
+
+ dat += "
"
+
+ user << browse(dat, "window=copy_machine")
+ onclose(user, "copy_machine")
+
+/obj/machinery/copier/proc/update()
+ if(top_open)
+ icon_state = "copier_o"
+ else if(copying)
+ icon_state = "copier_s"
+ else
+ icon_state = "copier"
+
+/obj/machinery/copier/Topic(href, href_list)
+ if(..())
+ return
+ usr.machine = src
+ src.add_fingerprint(usr)
+
+ if(href_list["num"])
+ num_copies += text2num(href_list["num"])
+ if(num_copies < 1)
+ num_copies = 1
+ else if(num_copies > max_copies)
+ num_copies = max_copies
+ updateDialog()
+ if(href_list["open"])
+ template.loc = src.loc
+ template = null
+ top_open = 1
+ updateDialog()
+ update()
+ if(href_list["copy"])
+ copying = 1
+ job_num_copies = num_copies
+ update()
+ updateDialog()
+ if(href_list["cancel"])
+ copying = 0
+ job_num_copies = 0
+ update()
+ updateDialog()
+
+/obj/machinery/copier/process()
+ if(src.stat)
+ usr << "[name] does not seem to be responding to your button mashing."
+ return
+
+ if(copying && !copy_wait)
+ copy_wait = 1
+ // make noise
+ playsound(src, 'polaroid1.ogg', 50, 1)
+ spawn(5)
+ if(!copying)
+ return // user cancelled
+
+ if(istype(template, /obj/item/weapon/paper))
+ // make duplicate paper
+ var/obj/item/weapon/paper/P = new(src.loc)
+ P.name = template.name
+ P.info = template:info
+ P.stamped = template:stamped
+ P.icon_state = template.icon_state
+ else if(istype(template, /obj/item/weapon/photo))
+ // make duplicate photo
+ var/obj/item/weapon/photo/P = new(src.loc)
+ P.name = template.name
+ P.desc = template.desc
+ P.icon = template.icon
+
+ // copy counting stuff
+ job_num_copies -= 1
+ if(job_num_copies == 0)
+ usr << "[name] beeps happily."
+ copying = 0
+ update()
+ updateDialog()
+ copy_wait = 0
\ No newline at end of file
diff --git a/code/WorkInProgress/filing.dm b/code/WorkInProgress/filing.dm
new file mode 100644
index 00000000000..5bbfdf29ff9
--- /dev/null
+++ b/code/WorkInProgress/filing.dm
@@ -0,0 +1,23 @@
+/obj/filingcabinet
+ name = "Filing Cabinet"
+ desc = "A large cabinet with drawers."
+ icon = 'computer.dmi'
+ icon_state = "messyfiles"
+ density = 1
+ anchored = 1
+
+/obj/filingcabinet/attackby(obj/item/weapon/paper/P,mob/M)
+ if(istype(P))
+ M << "You put the [P] in the [src]."
+ M.drop_item()
+ P.loc = src
+ else
+ M << "You can't put a [P] in the [src]!"
+
+/obj/filingcabinet/attack_hand(mob/user)
+ if(src.contents.len <= 0)
+ user << "The [src] is empty."
+ return
+ var/obj/item/weapon/paper/P = input(user,"Choose a sheet to take out.","[src]", "Cancel") as null|obj in src.contents
+ if(in_range(src,user))
+ P.loc = user.loc
\ No newline at end of file
diff --git a/code/defines/obj/hydro.dm b/code/defines/obj/hydro.dm
index 9a85cb59cb9..dbb26d4de1f 100644
--- a/code/defines/obj/hydro.dm
+++ b/code/defines/obj/hydro.dm
@@ -1139,7 +1139,7 @@
bitesize = 1+round(reagents.total_volume / 2, 1)
/obj/item/weapon/reagent_containers/food/snacks/grown/ambrosiavulgaris
- seed = "/obj/item/seeds/ambrosiavulgaris"
+ seed = "/obj/item/seeds/ambrosiavulgarisseed"
name = "Ambrosia Vulgaris"
desc = "A plant containing various healing chemicals."
icon_state = "ambrosiavulgaris"
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 711bb769f8c..6926d196ad2 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -83,23 +83,34 @@
traitor.objectives += block_objective
else
+ var/list/target = traitor.objectives
for(var/i = 1, i <= rand(1,3), i++)
+ var/datum/objective/objective
switch(rand(1,100))
if(1 to 30)
var/datum/objective/assassinate/kill_objective = new
kill_objective.owner = traitor
kill_objective.find_target()
- traitor.objectives += kill_objective
+ objective = kill_objective
if(31 to 40)
var/datum/objective/protect/protect_objective = new
protect_objective.owner = traitor
protect_objective.find_target()
- traitor.objectives += protect_objective
+ objective = protect_objective
else
var/datum/objective/steal/steal_objective = new
steal_objective.owner = traitor
steal_objective.find_target()
- traitor.objectives += steal_objective
+ objective = steal_objective
+ var/inthere = 0
+ for(var/j, j<= target.len, j++)
+ if(target[j] == objective)
+ inthere = 1
+ break
+ if(!inthere)
+ traitor.objectives += objective
+ else
+ i -= 1
if (!(locate(/datum/objective/escape) in traitor.objectives))
var/datum/objective/escape/escape_objective = new
escape_objective.owner = traitor
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index b4b2830cbf8..175ecc4c7ac 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -119,6 +119,8 @@
Junction
Y-Junction
Trunk
+Sort Junction 1
+Sort Junction 2
"}
user << browse("[src][dat]", "window=pipedispenser")
@@ -147,6 +149,10 @@
C.ptype = 4
if(4)
C.ptype = 5
+ if(5)
+ C.ptype = 6
+ if(6)
+ C.ptype = 7
C.update()
wait = 1
diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm
index 4449ebc933b..c92c206c71d 100644
--- a/code/game/magic/cultist/runes.dm
+++ b/code/game/magic/cultist/runes.dm
@@ -5,6 +5,13 @@ var/list/sacrificed = list()
proc
teleport(var/key)
var/mob/living/user = usr
+ var/mob/living/grabbed
+ if (istype(user.get_active_hand(), /obj/item/weapon/grab))
+ var/obj/item/weapon/grab/G = user.get_active_hand()
+ grabbed = G.affecting
+ else if (istype(user.get_inactive_hand(), /obj/item/weapon/grab))
+ var/obj/item/weapon/grab/G = user.get_inactive_hand()
+ grabbed = G.affecting
var/allrunesloc[]
allrunesloc = new/list()
var/index = 0
@@ -17,7 +24,7 @@ var/list/sacrificed = list()
allrunesloc.len = index
allrunesloc[index] = R.loc
if(index >= 5)
- user << "\red You feel pain, as rune disappears in reality shift caused by too much wear of space-time fabric"
+ user << "\red You feel pain, as the rune disappears into a reality shift caused by too much wear on the fabric of space-time."
if (istype(user, /mob/living))
user.take_overall_damage(5, 0)
del(src)
@@ -29,7 +36,10 @@ var/list/sacrificed = list()
user.visible_message("\red [user] disappears in a flash of red light!", \
"\red You feel as your body gets dragged through the dimension of Nar-Sie!", \
"\red You hear a sickening crunch and sloshing of viscera.")
- user.loc = allrunesloc[rand(1,index)]
+ var/target = rand(1,index)
+ user.loc = allrunesloc[target]
+ if(grabbed)
+ grabbed.loc = allrunesloc[target]
return
if(istype(src,/obj/effect/rune))
return fizzle() //Use friggin manuals, Dorf, your list was of zero length.
diff --git a/code/game/objects/closets.dm b/code/game/objects/closets.dm
index 31a405f034e..e28a78355f1 100644
--- a/code/game/objects/closets.dm
+++ b/code/game/objects/closets.dm
@@ -123,6 +123,7 @@
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(src.loc))
P.wrapped = src
src.close()
+ P.waswelded = welded
src.welded = 1
src.loc = P
O.amount -= 3
@@ -185,13 +186,26 @@
return
if(!src.open())
- user << "\blue It won't budge!"
- if(!lastbang)
- lastbang = 1
- for (var/mob/M in hearers(src, null))
- M << text("BANG, bang!", max(0, 5 - get_dist(src, M)))
- spawn(30)
- lastbang = 0
+ if(istype(src.loc,/obj/effect/bigDelivery) && lastbang == 0)
+ var/obj/effect/bigDelivery/Pack = src.loc
+ if(istype(Pack.loc,/turf) && Pack.waswelded == 0)
+ for (var/mob/M in hearers(src.loc, null))
+ M << text("BANG, bang, rrrrrip!", max(0, 5 - get_dist(src, M)))
+ lastbang = 1
+ sleep(10)
+ src.welded = 0
+ Pack.unwrap()
+ src.open()
+ spawn(30)
+ lastbang = 0
+ else if(!istype(src.loc,/obj/effect/bigDelivery))
+ user << "\blue It won't budge!"
+ if(!lastbang)
+ lastbang = 1
+ for (var/mob/M in hearers(src, null))
+ M << text("BANG, bang!", max(0, 5 - get_dist(src, M)))
+ spawn(30)
+ lastbang = 0
/obj/structure/closet/Move()
..()
diff --git a/code/game/objects/storage/firstaid.dm b/code/game/objects/storage/firstaid.dm
index f8b777bf3ff..4930f569d22 100644
--- a/code/game/objects/storage/firstaid.dm
+++ b/code/game/objects/storage/firstaid.dm
@@ -81,6 +81,20 @@
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
new /obj/item/weapon/reagent_containers/pill/kelotane( src )
+/obj/item/weapon/storage/pill_bottle/tramadol
+ name = "Pill bottle (tramadol)"
+ desc = "Contains painkiller pills."
+
+/obj/item/weapon/storage/pill_bottle/kelotane/New()
+ ..()
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+ new /obj/item/weapon/reagent_containers/pill/tramadol( src )
+
/obj/item/weapon/storage/pill_bottle/antitox
name = "Pill bottle (Anti-toxin)"
desc = "Contains pills used to counter toxins."
diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm
index ec511e28f00..358423a88ce 100644
--- a/code/modules/chemical/Chemistry-Reagents.dm
+++ b/code/modules/chemical/Chemistry-Reagents.dm
@@ -1311,6 +1311,19 @@ datum
..()
return
+ tramadol
+ name = "Tramadol"
+ id = "tramadol"
+ description = "A simple, yet effective painkiller."
+ reagent_state = LIQUID
+ color = "#C8A5DC"
+
+ oxycodone
+ name = "Oxycodone"
+ id = "oxycodone"
+ description = "An effective and very addictive painkiller."
+ reagent_state = LIQUID
+ color = "#C805DC"
impedrezene
name = "Impedrezene"
diff --git a/code/modules/chemical/Chemistry-Recipes.dm b/code/modules/chemical/Chemistry-Recipes.dm
index cba158e9b0e..250c3222221 100644
--- a/code/modules/chemical/Chemistry-Recipes.dm
+++ b/code/modules/chemical/Chemistry-Recipes.dm
@@ -70,6 +70,13 @@ datum
required_reagents = list("radium" = 1, "phosphorus" = 1, "chlorine" = 1)
result_amount = 3
+ tramadol
+ name = "Tramadol"
+ id = "tramadol"
+ result = "tramadol"
+ required_reagents = list("inaprovaline" = 1, "ethanol" = 1, "oxygen" = 1)
+ result_amount = 3
+
//cyanide
// name = "Cyanide"
// id = "cyanide"
diff --git a/code/modules/chemical/Chemistry-Tools.dm b/code/modules/chemical/Chemistry-Tools.dm
index 05ff3cba25f..bfe65f3b686 100644
--- a/code/modules/chemical/Chemistry-Tools.dm
+++ b/code/modules/chemical/Chemistry-Tools.dm
@@ -675,6 +675,21 @@
R.my_atom = src
attackby(obj/item/weapon/W as obj, mob/user as mob)
+ if (istype(W, /obj/item/weapon/packageWrap))
+ if(istype(src.loc,/obj/item/weapon/storage) || istype(src.loc,/obj/item/clothing/suit/storage/)) //Taking stuff out of storage duplicates it.
+ user << "\blue Do not do this, it is broken as all hell. Take it out of the container first."
+ return
+ for(var/obj/item/T in user) //Lets remove it from their inventory
+ if(T == src)
+ user.remove_from_mob(T)
+ break
+ var/obj/item/weapon/packageWrap/O = W
+ if (O.amount > 1)
+ var/obj/item/smallDelivery/P = new /obj/item/smallDelivery(get_turf(src.loc))
+ P.wrapped = src
+
+ src.loc = P
+ O.amount -= 1
return
attack_self(mob/user as mob)
return
@@ -2711,6 +2726,14 @@
..()
reagents.add_reagent("kelotane", 30)
+/obj/item/weapon/reagent_containers/pill/tramadol
+ name = "Tramadol pill"
+ desc = "A simple painkiller."
+ icon_state = "pill8"
+ New()
+ ..()
+ reagents.add_reagent("tramadol", 30)
+
/obj/item/weapon/reagent_containers/pill/inaprovaline
name = "Inaprovaline pill"
desc = "Used to stabilize patients."
diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm
index c3833700b9f..07a49bb12be 100644
--- a/code/modules/mob/living/carbon/shock.dm
+++ b/code/modules/mob/living/carbon/shock.dm
@@ -8,8 +8,12 @@
src.traumatic_shock -= 10
if(reagents.has_reagent("inaprovaline"))
src.traumatic_shock -= 25
- if(reagents.has_reagent("synaptizine"))
- src.traumatic_shock -= 100 // make synaptizine function as good painkiller
+ if(reagents.has_reagent("tramadol"))
+ src.traumatic_shock -= 80 // make synaptizine function as good painkiller
+ if(reagents.has_reagent("oxycodone"))
+ src.traumatic_shock -= 200 // make synaptizine function as good painkiller
+ if(src.slurring)
+ src.traumatic_shock -= 20
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
@@ -19,7 +23,10 @@
if(organ.destroyed || organ.open)
src.traumatic_shock += 60
else if(organ.broken)
- src.traumatic_shock += 40
+ src.traumatic_shock += 30
+
+ if(src.traumatic_shock < 0)
+ src.traumatic_shock = 0
return src.traumatic_shock
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index 844a4b6091c..0b79efc3623 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
@@ -142,6 +150,15 @@
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
P.base_icon_state = base_state
P.dir = dir
+ if(ptype >= 6)
+ var/obj/structure/disposalpipe/sortjunction/V = P
+ V.posdir = dir
+ if(ptype == 6)
+ V.sortdir = turn(dir, -90)
+ V.negdir = turn(dir, 180)
+ else
+ V.sortdir = turn(dir, 90)
+ V.negdir = turn(dir, 180)
P.dpdir = dpdir
P.updateicon()
del(src)
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index fc31a238cbf..f2250483465 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -20,6 +20,7 @@
var/obj/structure/disposalpipe/trunk/trunk = null // the attached pipe trunk
var/flushing = 0 // true if flushing in progress
var/timeleft = 0 //used to give a delay after the last item was put in before flushing
+ var/islarge = 0 //If there is a crate, lets not add a second.
// create a new disposal
// find the attached trunk (if present) and init gas resvr.
@@ -112,41 +113,83 @@
// mouse drop another mob or self
//
- MouseDrop_T(mob/target, mob/user)
- if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
+ MouseDrop_T(var/atom/movable/T, mob/user)
+ if (istype(T,/mob))
+ var/mob/target = T
+ if (!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai))
+ return
+
+ if(src.islarge == 1)
+ user << "They won't fit with that crate in there!"
+ return
+
+ var/msg
+ for (var/mob/V in viewers(usr))
+ if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
+ V.show_message("[usr] starts climbing into the disposal.", 3)
+ if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
+ if(target.anchored) return
+ V.show_message("[usr] starts stuffing [target.name] into the disposal.", 3)
+ if(!do_after(usr, 20))
+ return
+ if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) // if drop self, then climbed in // must be awake, not stunned or whatever
+ msg = "[user.name] climbs into the [src]."
+ user << "You climb into the [src]."
+ else if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
+ msg = "[user.name] stuffs [target.name] into the [src]!"
+ user << "You stuff [target.name] into the [src]!"
+ else
+ return
+ if (target.client)
+ target.client.perspective = EYE_PERSPECTIVE
+ target.client.eye = src
+ target.loc = src
+
+ for (var/mob/C in viewers(src))
+ if(C == user)
+ continue
+ C.show_message(msg, 3)
+
+ timeleft = 5
+ update()
+ return
+ if(istype(T,/obj/effect/bigDelivery))
+ if (T.anchored || get_dist(user, src) > 1 || get_dist(src,T) > 2 )
+ return
+
+ if(src.islarge == 1)
+ user << "[T] won't fit with that crate in there!"
+ return
+
+ for(var/mob/M in viewers(src))
+ if(M == user)
+ user << "You start to shove \the [T] into the [src]."
+ continue
+ M.show_message("[user.name] looks like they're trying to place \the [T] into the [src].", 5)
+
+ if(!do_after(usr, 20))
+ return
+
+ user << "Your back is starting to hurt!"
+ sleep(5)
+ if(prob(50))
+ user << "No way can you get this thing in there."
+ return
+
+ if(!do_after(usr, 20))
+ return
+
+ T.loc = src
+ src.islarge = 1
+ for(var/mob/M in viewers(src))
+ if(M == user)
+ user << "You shove \the [T] into the [src]."
+ continue
+ M.show_message("[user.name] manages to stuff \the [T] into the [src]. Impressive!", 5)
return
- var/msg
- for (var/mob/V in viewers(usr))
- if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
- V.show_message("[usr] starts climbing into the disposal.", 3)
- if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
- if(target.anchored) return
- V.show_message("[usr] starts stuffing [target.name] into the disposal.", 3)
- if(!do_after(usr, 20))
- return
- if(target == user && !user.stat && !user.weakened && !user.stunned && !user.paralysis) // if drop self, then climbed in
- // must be awake, not stunned or whatever
- msg = "[user.name] climbs into the [src]."
- user << "You climb into the [src]."
- else if(target != user && !user.restrained() && !user.stat && !user.weakened && !user.stunned && !user.paralysis)
- msg = "[user.name] stuffs [target.name] into the [src]!"
- user << "You stuff [target.name] into the [src]!"
else
return
- if (target.client)
- target.client.perspective = EYE_PERSPECTIVE
- target.client.eye = src
- target.loc = src
-
- for (var/mob/C in viewers(src))
- if(C == user)
- continue
- C.show_message(msg, 3)
-
- timeleft = 5
- update()
- return
// can breath normally in the disposal
alter_health()
@@ -364,6 +407,8 @@
flush = 0
if(mode == 2) // if was ready,
mode = 1 // switch to charging
+ if(islarge)
+ islarge = 0
update()
return
@@ -517,10 +562,6 @@
src.destinationTag = T.sortTag
else if (!src.destinationTag)
src.destinationTag = null
- else if (istype(AM, /mob)) //If there is a mob somewhere in there....
- if(prob(10))
- src.destinationTag = "Mail Office"
-
// start the movement process
// argument is the disposal unit the holder started in
@@ -685,7 +726,7 @@
M.weakened += 4
M << "\red You're gonna remember that one in the morning!"
M:UpdateDamageIcon()
- M:UpdateDamage()
+ //M:UpdateDamage() //doesnt fucking exist if you arent a blob
else
M.bruteloss += 4
if(prob(2))
@@ -739,7 +780,7 @@
H.active = 0
H.loc = src
return
- if(T.intact && istype(T,/turf/simulated/floor)) //intact floor, pop the tile
+ if(istype(T,/turf/simulated/floor) && T.intact) //intact floor, pop the tile
var/turf/simulated/floor/F = T
//F.health = 100
F.burnt = 1
@@ -964,13 +1005,18 @@
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
+
New()
..()
@@ -995,6 +1041,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])
@@ -1037,6 +1085,75 @@
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)
+ var/dat = "Sorting Mechanism
"
+ if (sortType.len == 0)
+ 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.len == 0 && 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
+ 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 29cbfc52cf0..cadec94f5bd 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -8,16 +8,21 @@
var/sortTag = null
flags = FPRINT
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
- var/examtext = null
+ var/examtext = null
var/label_x = 0
- var/tag_x = 0
+ var/tag_x = 0
+ var/waswelded = 0
+
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))
var/obj/structure/closet/O = src.wrapped
- O.welded = 0
+ O.welded = waswelded
del(src)
return
@@ -235,7 +240,6 @@
flags = FPRINT | TABLEPASS | ONBELT | CONDUCT
attack_self(mob/user as mob)
- user.machine = src
interact(user)
proc/interact(mob/user as mob)
@@ -244,6 +248,7 @@
dat += "
Current Selection: None
"
else
dat += "
Current Selection: [currTag]
"
+ dat += "Set Custom Destination
"
for (var/i = 1, i <= locationList.len, i++)
if(spaceList[i])
dat += "
"
@@ -251,14 +256,19 @@
dat += "
"
user << browse(dat, "window=destTagScreen")
onclose(user, "destTagScreen")
- usr.machine = null
return
Topic(href, href_list)
+ usr.machine = src
src.add_fingerprint(usr)
if(href_list["nextTag"])
var/n = text2num(href_list["nextTag"])
- src.currTag = locationList[n]
+ if(n > locationList.len)
+ var/t1 = input("Which tag?","Tag") as null|text
+ if(t1)
+ src.currTag = t1
+ else
+ src.currTag = locationList[n]
if(istype(loc,/mob))
interact(loc)
else
diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi
new file mode 100644
index 00000000000..e2686681f3a
Binary files /dev/null and b/icons/obj/bureaucracy.dmi differ
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 b59c9e2908d..07c330ddbb8 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)
@@ -2748,7 +2748,7 @@
"baR" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor/plating,/area/maintenance/maintcentral)
"baS" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/turf/simulated/floor/plating,/area/maintenance/maintcentral)
"baT" = (/obj/structure/rack{dir = 1},/obj/item/clothing/suit/fire/firefighter,/obj/item/weapon/extinguisher,/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/turf/simulated/floor/plating,/area/maintenance/maintcentral)
-"baU" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/table,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
+"baU" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/obj/structure/table,/obj/item/weapon/storage/pill_bottle/tramadol{pixel_x = 8},/obj/item/stack/medical/bruise_pack,/obj/item/stack/medical/bruise_pack,/obj/item/stack/medical/bruise_pack,/obj/item/stack/medical/ointment,/obj/item/stack/medical/ointment,/obj/item/stack/medical/ointment,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"baV" = (/obj/machinery/light{icon_state = "tube1"; dir = 4},/obj/structure/table,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"baW" = (/obj/structure/morgue,/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{dir = 4},/turf/simulated/floor{icon_state = "dark"},/area/medical/morgue)
"baX" = (/turf/simulated/floor{icon_state = "dark"},/area/medical/morgue)
@@ -3621,7 +3621,7 @@
"brG" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/wall,/area/crew_quarters/bar)
"brH" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/disposalpipe/sortjunction{sortType = list("Bar")},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/turf/simulated/floor/plating,/area/maintenance/maintcentral)
"brI" = (/obj/machinery/atmospherics/pipe/manifold{color = "blue"; dir = 8; icon_state = "manifold-b-f"; initialize_directions = 11; level = 1; name = "pipe manifold"},/turf/simulated/floor/plating,/area/maintenance/maintcentral)
-"brJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/structure/table,/obj/item/weapon/storage/backpack/medic{pixel_x = 3; pixel_y = 6},/obj/item/weapon/storage/backpack/medic{pixel_x = 3; pixel_y = 6},/obj/item/weapon/cleaner,/obj/machinery/light{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
+"brJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/structure/table,/obj/item/weapon/storage/backpack/medic{pixel_x = 3; pixel_y = 6},/obj/item/weapon/storage/backpack/medic{pixel_x = 3; pixel_y = 6},/obj/item/weapon/cleaner,/obj/machinery/light{dir = 8},/obj/item/weapon/storage/pill_bottle/tramadol,/obj/item/weapon/storage/pill_bottle/tramadol,/obj/item/weapon/storage/pill_bottle/tramadol,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"brK" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 9},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)
"brL" = (/obj/structure/closet/secure_closet/medical1{pixel_x = 5},/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/medical/medbay)
"brM" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/obj/machinery/alarm{dir = 4; icon_state = "alarm0"; pixel_x = -22},/obj/structure/disposalpipe/segment,/turf/simulated/floor{icon_state = "white"},/area/medical/medbay)