mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Work on photocopiers, and other paperwork stuff.
You can now photocopy photos! Hurray, the entire crew can have pictures of Ian to keep in their wallets. Filing cabinets now accept photos, and update properly. Also committing a new (unused) vending machine sprite from old BS12 code. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4705 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -21,18 +21,18 @@
|
|||||||
|
|
||||||
/obj/structure/filingcabinet/initialize()
|
/obj/structure/filingcabinet/initialize()
|
||||||
for(var/obj/item/I in loc)
|
for(var/obj/item/I in loc)
|
||||||
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder))
|
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo))
|
||||||
I.loc = src
|
I.loc = src
|
||||||
|
|
||||||
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
|
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
|
||||||
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder))
|
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo))
|
||||||
user << "<span class='notice'>You put [P] in [src].</span>"
|
user << "<span class='notice'>You put [P] in [src].</span>"
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
P.loc = src
|
P.loc = src
|
||||||
spawn()
|
icon_state = icon_open
|
||||||
icon_state = icon_open
|
sleep(5)
|
||||||
sleep(5)
|
icon_state = icon_closed
|
||||||
icon_state = icon_closed
|
updateUsrDialog()
|
||||||
else if(istype(P, /obj/item/weapon/wrench))
|
else if(istype(P, /obj/item/weapon/wrench))
|
||||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||||
anchored = !anchored
|
anchored = !anchored
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
user << "<span class='notice'>\The [src] is empty.</span>"
|
user << "<span class='notice'>\The [src] is empty.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
user.machine = src
|
||||||
var/dat = "<center><table>"
|
var/dat = "<center><table>"
|
||||||
var/i
|
var/i
|
||||||
for(i=contents.len, i>=1, i--)
|
for(i=contents.len, i>=1, i--)
|
||||||
@@ -61,12 +62,9 @@
|
|||||||
|
|
||||||
//var/retrieveindex = text2num(href_list["retrieve"])
|
//var/retrieveindex = text2num(href_list["retrieve"])
|
||||||
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
|
var/obj/item/P = locate(href_list["retrieve"])//contents[retrieveindex]
|
||||||
if(!isnull(P) && in_range(src,usr))
|
if(P && in_range(src, usr))
|
||||||
if(!usr.get_active_hand())
|
usr.put_in_hands(P)
|
||||||
usr.put_in_hands(P)
|
updateUsrDialog()
|
||||||
else
|
|
||||||
P.loc = get_turf_loc(src)
|
|
||||||
|
|
||||||
icon_state = icon_open
|
icon_state = icon_open
|
||||||
sleep(5)
|
sleep(5)
|
||||||
icon_state = icon_closed
|
icon_state = icon_closed
|
||||||
|
|||||||
@@ -63,11 +63,7 @@
|
|||||||
var/obj/item/P = locate(href_list["remove"])
|
var/obj/item/P = locate(href_list["remove"])
|
||||||
if(P)
|
if(P)
|
||||||
P.loc = usr.loc
|
P.loc = usr.loc
|
||||||
if(ishuman(usr))
|
usr.put_in_hands(P)
|
||||||
if(!usr.get_active_hand())
|
|
||||||
usr.put_in_hands(P)
|
|
||||||
else
|
|
||||||
P.loc = get_turf(usr)
|
|
||||||
|
|
||||||
if(href_list["read"])
|
if(href_list["read"])
|
||||||
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
var/obj/item/weapon/paper/P = locate(href_list["read"])
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
active_power_usage = 200
|
active_power_usage = 200
|
||||||
power_channel = EQUIP
|
power_channel = EQUIP
|
||||||
var/obj/item/weapon/paper/copy = null //what's in the copier!
|
var/obj/item/weapon/paper/copy = null //what's in the copier!
|
||||||
|
var/obj/item/weapon/photo/photocopy = null
|
||||||
var/copies = 1 //how many copies to print!
|
var/copies = 1 //how many copies to print!
|
||||||
var/toner = 30 //how much toner is left! woooooo~
|
var/toner = 30 //how much toner is left! woooooo~
|
||||||
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
|
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
user.machine = src
|
user.machine = src
|
||||||
|
|
||||||
var/dat = "Photocopier<BR><BR>"
|
var/dat = "Photocopier<BR><BR>"
|
||||||
if(copy)
|
if(copy || photocopy)
|
||||||
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><BR>"
|
dat += "<a href='byond://?src=\ref[src];remove=1'>Remove Paper</a><BR>"
|
||||||
if(toner)
|
if(toner)
|
||||||
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
|
dat += "<a href='byond://?src=\ref[src];copy=1'>Copy</a><BR>"
|
||||||
@@ -64,15 +65,36 @@
|
|||||||
else
|
else
|
||||||
break
|
break
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
else if(photocopy)
|
||||||
|
for(var/i = 0, i < copies, i++)
|
||||||
|
if(toner > 0)
|
||||||
|
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (src.loc)
|
||||||
|
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
|
||||||
|
if(toner > 10) //plenty of toner, go straight greyscale
|
||||||
|
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0)) //I'm not sure how expensive this is, but given the many limitations of photocopying, it shouldn't be an issue.
|
||||||
|
else //not much toner left, lighten the photo
|
||||||
|
I.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
|
||||||
|
p.icon = I
|
||||||
|
p.name = photocopy.name
|
||||||
|
p.desc = photocopy.desc
|
||||||
|
toner -= 5 //photos use a lot of ink!
|
||||||
|
sleep(15)
|
||||||
|
else
|
||||||
|
break
|
||||||
|
updateUsrDialog()
|
||||||
else if(href_list["remove"])
|
else if(href_list["remove"])
|
||||||
if(copy)
|
if(copy)
|
||||||
if(ishuman(usr))
|
copy.loc = usr.loc
|
||||||
if(!usr.get_active_hand())
|
usr.put_in_hands(copy)
|
||||||
copy.loc = usr.loc
|
usr << "<span class='notice'>You take the paper out of \the [src].</span>"
|
||||||
usr.put_in_hands(copy)
|
copy = null
|
||||||
usr << "<span class='notice'>You take the paper out of the photocopier.</span>"
|
updateUsrDialog()
|
||||||
copy = null
|
else if(photocopy)
|
||||||
updateUsrDialog()
|
photocopy.loc = usr.loc
|
||||||
|
usr.put_in_hands(photocopy)
|
||||||
|
usr << "<span class='notice'>You take the photo out of \the [src].</span>"
|
||||||
|
photocopy = null
|
||||||
|
updateUsrDialog()
|
||||||
else if(href_list["min"])
|
else if(href_list["min"])
|
||||||
if(copies > 1)
|
if(copies > 1)
|
||||||
copies--
|
copies--
|
||||||
@@ -84,7 +106,7 @@
|
|||||||
|
|
||||||
attackby(obj/item/O as obj, mob/user as mob)
|
attackby(obj/item/O as obj, mob/user as mob)
|
||||||
if(istype(O, /obj/item/weapon/paper))
|
if(istype(O, /obj/item/weapon/paper))
|
||||||
if(!copy)
|
if(!copy && !photocopy)
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
copy = O
|
copy = O
|
||||||
O.loc = src
|
O.loc = src
|
||||||
@@ -92,7 +114,17 @@
|
|||||||
flick("bigscanner1", src)
|
flick("bigscanner1", src)
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>There is already paper in \the [src].</span>"
|
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||||
|
else if(istype(O, /obj/item/weapon/photo))
|
||||||
|
if(!copy && !photocopy)
|
||||||
|
user.drop_item()
|
||||||
|
photocopy = O
|
||||||
|
O.loc = src
|
||||||
|
user << "<span class='notice'>You insert the photo into \the [src].</span>"
|
||||||
|
flick("bigscanner1", src)
|
||||||
|
updateUsrDialog()
|
||||||
|
else
|
||||||
|
user << "<span class='notice'>There is already something in \the [src].</span>"
|
||||||
else if(istype(O, /obj/item/device/toner))
|
else if(istype(O, /obj/item/device/toner))
|
||||||
if(toner == 0)
|
if(toner == 0)
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 65 KiB |
Reference in New Issue
Block a user