Merge remote-tracking branch 'upstream/dev' into faxmachine

Conflicts:
	code/WorkInProgress/kilakk/fax.dm
	code/modules/paperwork/faxmachine.dm
	code/modules/paperwork/paper.dm
	code/modules/paperwork/paper_bundle.dm
	code/modules/paperwork/photocopier.dm
	maps/tgstation2.dmm
This commit is contained in:
mwerezak
2014-11-20 14:57:35 -05:00
595 changed files with 7780 additions and 7624 deletions
@@ -212,5 +212,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
/obj/machinery/photocopier/faxmachine/proc/message_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/reply_type, font_colour="#006100")
var/msg = "\blue <b><font color='[font_colour]'>[faxname]: </font>[key_name(sender, 1)] (<A HREF='?_src_=holder;adminplayeropts=\ref[sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=\ref[sender]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) (<a href='?_src_=holder;[reply_type]=\ref[sender];originfax=\ref[src]'>REPLY</a>)</b>: Receiving '[sent.name]' via secure connection ... <a href='?_src_=holder;AdminFaxView=\ref[sent]'>view message</a>"
admins << msg
for(var/client/C in admins)
if(R_ADMIN & C.holder.rights)
C << msg
+6 -8
View File
@@ -59,13 +59,11 @@
return
icon_state = "paper"
/obj/item/weapon/paper/examine()
set src in oview(1)
if(in_range(usr, src))
/obj/item/weapon/paper/examine(mob/user)
if(in_range(user, src))
show_content(usr)
else
usr << "<span class='notice'>It is too far away.</span>"
user << "<span class='notice'>It is too far away.</span>"
return
/obj/item/weapon/paper/proc/show_content(var/mob/user, var/forceshow=0)
@@ -91,7 +89,7 @@
return
/obj/item/weapon/paper/attack_self(mob/living/user as mob)
examine()
user.examinate(src)
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
@@ -118,7 +116,7 @@
if(user.zone_sel.selecting == "eyes")
user.visible_message("<span class='notice'>You show the paper to [M]. </span>", \
"<span class='notice'> [user] holds up a paper and shows it to [M]. </span>")
M << examine()
M.examinate(src)
else if(user.zone_sel.selecting == "mouth") // lipstick wiping
if(ishuman(M))
@@ -227,7 +225,7 @@
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
t = replacetext(t, "\[row\]", "</td><tr>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[logo\]", "<img src = http://baystation12.net/wiki/logo.png>")
t = replacetext(t, "\[logo\]", "<img src = html/images/ntlogo.png>")
t = "<font face=\"[deffont]\" color=[P ? P.colour : "black"]>[t]</font>"
else // If it is a crayon, and he still tries to use these, make them empty!
+4 -8
View File
@@ -93,15 +93,11 @@
else
user << "\red You must hold \the [P] steady to burn \the [src]."
/obj/item/weapon/paper_bundle/examine()
set src in oview(1)
usr << desc
if(in_range(usr, src))
src.show_content(usr)
/obj/item/weapon/paper_bundle/examine(mob/user)
if(..(user, 1))
src.show_content(user)
else
usr << "<span class='notice'>It is too far away.</span>"
user << "<span class='notice'>It is too far away.</span>"
return
/obj/item/weapon/paper_bundle/proc/show_content(mob/user as mob)
+6 -12
View File
@@ -21,11 +21,6 @@
return
/obj/item/weapon/paper_bin/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/item/weapon/paper_bin/attack_hand(mob/user as mob)
if (hasorgans(user))
var/datum/organ/external/temp = user:organs_by_name["r_hand"]
@@ -81,13 +76,12 @@
amount++
/obj/item/weapon/paper_bin/examine()
set src in oview(1)
if(amount)
usr << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
usr << "<span class='notice'>There are no papers in the bin.</span>"
/obj/item/weapon/paper_bin/examine(mob/user)
if(get_dist(src, user) <= 1)
if(amount)
user << "<span class='notice'>There " + (amount > 1 ? "are [amount] papers" : "is one paper") + " in the bin.</span>"
else
user << "<span class='notice'>There are no papers in the bin.</span>"
return
+6 -15
View File
@@ -17,9 +17,6 @@
/obj/machinery/photocopier/attack_ai(mob/user as mob)
return attack_hand(user)
/obj/machinery/photocopier/attack_paw(mob/user as mob)
return attack_hand(user)
/obj/machinery/photocopier/attack_hand(mob/user as mob)
user.set_machine(src)
@@ -197,24 +194,18 @@
/obj/machinery/photocopier/proc/photocopy(var/obj/item/weapon/photo/photocopy)
var/obj/item/weapon/photo/p = new /obj/item/weapon/photo (src.loc)
var/obj/item/weapon/photo/p = photocopy.copy()
var/icon/I = icon(photocopy.icon, photocopy.icon_state)
var/icon/img = icon(photocopy.img)
var/icon/tiny = icon(photocopy.tiny)
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.
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
p.img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
p.tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
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))
img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.img.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.tiny.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(100,100,100))
p.icon = I
p.img = img
p.tiny = tiny
p.name = photocopy.name
p.desc = photocopy.desc
p.scribble = photocopy.scribble
toner -= 5 //photos use a lot of ink!
if(toner < 0)
toner = 0
+21 -9
View File
@@ -33,7 +33,7 @@
var/photo_size = 3
/obj/item/weapon/photo/attack_self(mob/user as mob)
examine()
user.examinate(src)
/obj/item/weapon/photo/attackby(obj/item/weapon/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon))
@@ -43,13 +43,12 @@
scribble = txt
..()
/obj/item/weapon/photo/examine()
set src in oview(1)
if(in_range(usr, src))
show(usr)
usr << desc
/obj/item/weapon/photo/examine(mob/user)
if(in_range(user, src))
show(user)
user << desc
else
usr << "<span class='notice'>It is too far away.</span>"
user << "<span class='notice'>It is too far away.</span>"
/obj/item/weapon/photo/proc/show(mob/user as mob)
user << browse_rsc(img, "tmp_photo.png")
@@ -287,7 +286,7 @@
pc.Blend(tiny_img,ICON_OVERLAY, 12, 19)
var/datum/picture/P = new()
P.fields["author"] = user
P.fields["name"] = "photo"
P.fields["icon"] = ic
P.fields["tiny"] = pc
P.fields["img"] = photoimage
@@ -306,10 +305,23 @@
Photo.construct(P)
/obj/item/weapon/photo/proc/construct(var/datum/picture/P)
name = P.fields["name"]
icon = P.fields["icon"]
tiny = P.fields["tiny"]
img = P.fields["img"]
desc = P.fields["desc"]
pixel_x = P.fields["pixel_x"]
pixel_y = P.fields["pixel_y"]
photo_size = P.fields["size"]
photo_size = P.fields["size"]
/obj/item/weapon/photo/proc/copy()
var/obj/item/weapon/photo/p = new/obj/item/weapon/photo()
p.icon = icon(icon, icon_state)
p.img = icon(img)
p.tiny = icon(tiny)
p.name = name
p.desc = desc
p.scribble = scribble
return p
+15 -16
View File
@@ -8,7 +8,7 @@
/obj/item/device/camera/siliconcam
var/in_camera_mode = 0
var/photos_taken = 0
var/list/aipictures = list()
var/list/obj/item/weapon/photo/aipictures = list()
/obj/item/device/camera/siliconcam/ai_camera //camera AI can take pictures with
name = "AI photo camera"
@@ -22,7 +22,9 @@
/obj/item/device/camera/siliconcam/proc/injectaialbum(var/datum/picture/P, var/sufix = "") //stores image information to a list similar to that of the datacore
photos_taken++
P.fields["name"] = "Image [photos_taken][sufix]"
aipictures += P
var/obj/item/weapon/photo/photo = new
photo.construct(P)
aipictures += photo
/obj/item/device/camera/siliconcam/proc/injectmasteralbum(var/datum/picture/P) //stores image information to a list similar to that of the datacore
var/mob/living/silicon/robot/C = src.loc
@@ -44,30 +46,27 @@
if(cam.aipictures.len == 0)
usr << "<span class='userdanger'>No images saved</span>"
return
for(var/datum/picture/t in cam.aipictures)
nametemp += t.fields["name"]
find = input("Select image (numbered in order taken)") in nametemp
for(var/obj/item/weapon/photo/t in cam.aipictures)
nametemp += t.name
find = input("Select image (numbered in order taken)") as null|anything in nametemp
if(!find)
return
for(var/datum/picture/q in cam.aipictures)
if(q.fields["name"] == find)
for(var/obj/item/weapon/photo/q in cam.aipictures)
if(q.name == find)
return q
/obj/item/device/camera/siliconcam/proc/viewpictures()
var/datum/picture/selection = selectpicture()
var/obj/item/weapon/photo/selection = selectpicture()
if(!selection)
return
var/obj/item/weapon/photo/P = new/obj/item/weapon/photo()
P.construct(selection)
P.show(usr)
usr << P.desc
// TG uses a special garbage collector.. qdel(P)
del(P) //so 10 thousand pictures items are not left in memory should an AI take them and then view them all.
selection.show(usr)
usr << selection.desc
/obj/item/device/camera/siliconcam/proc/deletepicture()
var/datum/picture/selection = selectpicture()
var/selection = selectpicture()
if(!selection)
return
-5
View File
@@ -64,12 +64,7 @@
icon_state = "stamp-cent"
item_color = "centcomm"
/obj/item/weapon/stamp/attack_paw(mob/user as mob)
return attack_hand(user)
// Syndicate stamp to forge documents.
/obj/item/weapon/stamp/chameleon/attack_self(mob/user as mob)
var/list/stamp_types = typesof(/obj/item/weapon/stamp) - src.type // Get all stamp types except our own