diff --git a/code/WorkInProgress/Ported/Bureaucracy/copier.dm b/code/WorkInProgress/Ported/Bureaucracy/copier.dm
index 9f933b822d..897681cd7d 100644
--- a/code/WorkInProgress/Ported/Bureaucracy/copier.dm
+++ b/code/WorkInProgress/Ported/Bureaucracy/copier.dm
@@ -3,23 +3,17 @@
/obj/machinery/copier
name = "Copy Machine"
icon = 'bureaucracy.dmi'
- icon_state = "copier"
+ icon_state = "copier_o"
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)
+ if(template)
return
if (istype(O, /obj/item/weapon/paper) || istype(O, /obj/item/weapon/photo))
@@ -27,7 +21,6 @@
template = O
usr.drop_item()
O.loc = src
- top_open = 0
update()
updateDialog()
@@ -37,63 +30,55 @@
/obj/machinery/copier/attack_ai(user as mob)
return src.attack_hand(user)
-/obj/machinery/copier/attack_hand(user as mob)
+/obj/machinery/copier/attack_hand(mob/user as mob)
// da UI
var/dat
if(..())
return
+ user.machine = src
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"
+ dat += "Cancel"
else
- if(!top_open)
- dat += "Open Top
"
-
- dat += "Number of Copies: "
-
- dat += "-"
- dat += "-"
- dat += " [num_copies] "
- dat += "+"
- dat += "+
"
-
if(template)
- dat += "Copy"
+ dat += "Open Lid"
else
dat += "No paper to be copied.
"
dat += "Please place a paper or photograph on top and close the lid."
- dat += "
"
+
+ dat += "
Number of Copies: "
+ dat += "-"
+ dat += "-"
+ dat += " [num_copies] "
+ dat += "+"
+ dat += "+
"
+
+ if(template)
+ dat += "Copy"
+
+ 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
+ if(template)
icon_state = "copier"
+ else
+ icon_state = "copier_o"
/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"])
@@ -103,35 +88,36 @@
num_copies = max_copies
updateDialog()
if(href_list["open"])
+ if(copying)
+ return
template.loc = src.loc
template = null
- top_open = 1
updateDialog()
update()
if(href_list["copy"])
- copying = 1
+ if(copying)
+ return
job_num_copies = num_copies
- update()
- updateDialog()
+ spawn(0)
+ do_copy(usr)
+
if(href_list["cancel"])
- copying = 0
job_num_copies = 0
- update()
+
+/obj/machinery/copier/proc/do_copy(mob/user)
+ if(!copying && job_num_copies > 0)
+ copying = 1
updateDialog()
+ while(job_num_copies > 0)
+ if(stat)
+ copying = 0
+ return
-/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
+ // fx
+ flick("copier_s", src)
+ playsound(src, 'polaroid1.ogg', 50, 1)
+ // dup the file
if(istype(template, /obj/item/weapon/paper))
// make duplicate paper
var/obj/item/weapon/paper/P = new(src.loc)
@@ -139,6 +125,9 @@
P.info = template:info
P.stamped = template:stamped
P.icon_state = template.icon_state
+ P.overlays = null
+ for(var/overlay in template.overlays)
+ P.overlays += overlay
else if(istype(template, /obj/item/weapon/photo))
// make duplicate photo
var/obj/item/weapon/photo/P = new(src.loc)
@@ -146,11 +135,10 @@
P.desc = template.desc
P.icon = template.icon
- // copy counting stuff
+ sleep(30)
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
+ for(var/mob/O in hearers(src))
+ O.show_message("[name] beeps happily.", 2)
+ copying = 0
+ updateDialog()
\ No newline at end of file
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 17364faafe..48c6a51b93 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -175,9 +175,9 @@ Class Procs:
return 1
if(user.lying || user.stat)
return 1
- if ( ! (istype(usr, /mob/living/carbon/human) || \
- istype(usr, /mob/living/silicon) || \
- istype(usr, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
+ if ( ! (istype(user, /mob/living/carbon/human) || \
+ istype(user, /mob/living/silicon) || \
+ istype(user, /mob/living/carbon/monkey) && ticker && ticker.mode.name == "monkey") )
usr << "\red You don't have the dexterity to do this!"
return 1
/*