Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

UM-050 - Signing Pictures #207

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions code/WorkInProgress/Cameras.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,54 @@
w_class = 1.0
var/image/fullImage
var/icon/fullIcon
var/list/signed = list()
var/written = null
var/image/my_writing = null

/obj/item/photo/get_desc(var/dist)
if(dist>1)
return
else
if(signed || written)
. += "<br>"
if(signed.len > 0)
for(var/x in signed)
. += "It is signed: [x]"
. += "<br>"
if (written)
. += "At the bottom is written: [written]"


/obj/item/photo/attackby(obj/item/W as obj, mob/user as mob)
var/obj/item/pen/P = W
if(istype(P))
var/signwrite = input(user, "Sign or Write?", null, null) as null|anything in list("sign","write")
var/t = input(user, "What do you want to [signwrite]?", null, null) as null|text
t = copytext(html_encode(t), 1, MAX_MESSAGE_LEN)
if(t)
if(signwrite == "sign")
var/image/signature = image(icon='icons/misc/photo_writing.dmi',icon_state="[signwrite]")
signature.color = P.font_color
signature.pixel_x = -10*(1-rand())
signature.pixel_y = 15*(1-rand())
signature.layer = OBJ_LAYER + 0.01
src.overlays += signature
signed += "<span style='color: [P.font_color]'>[t]</span>"
else if (signwrite == "write")
var/image/writing = image(icon='icons/misc/photo_writing.dmi',icon_state="[signwrite]")
writing.color = P.font_color
writing.layer = OBJ_LAYER + 0.01

if(!written)
written = "<span style='color: [P.font_color]'>[t]</span>"
else
src.overlays -= src.my_writing
written = "[src.written] <span style='color: [P.font_color]'>[t]</span>"

src.my_writing = writing
src.overlays += writing
return
..()

//////////////////////////////////////////////////////////////////////////////////////////////////
/*/obj/item/camera_test*/
Expand Down
2 changes: 0 additions & 2 deletions code/WorkInProgress/Railgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,6 @@ proc/line_ReturnEfficDir(Angle)
ReturnedDir = WEST
return ReturnedDir



//This returns the tangent reciprocal of x, for use with East and West straights.
proc/tanR(x)
return (cos(x)/sin(x))
Binary file added icons/misc/photo_writing.dmi
Binary file not shown.