Ported over BS12 style cameras, which photograph a 3x3 area. It's fuckin radical.

Removed /obj/item/weapon/camera while I was at it (unused).
New cameras are in modules/paperwork/photography.dm.
Standardised folder and paper naming a leetle bit.

Added a new gamekit sprite, also from BS12.

Path changes!
/obj/item/weapon/camera_test > /obj/item/device/camera

Updated all maps with the path changes, excepting oldstation.dmm.

Updated the changelog.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5116 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-11-18 23:41:37 +00:00
parent 0a610c3df6
commit b67262b32b
13 changed files with 3143 additions and 3084 deletions

View File

@@ -412,15 +412,6 @@
throw_speed = 4
throw_range = 5
/obj/item/weapon/camera
name = "camera"
desc = "Use this to take pictures."
icon_state = "camera"
var/last_pic = 1.0
item_state = "wrench"
w_class = 2.0
origin_tech = "magnets=1"
/obj/item/weapon/card
name = "card"
desc = "Does card things."
@@ -1221,7 +1212,7 @@
pressure_resistance = 70
/obj/item/weapon/camera_bug
/obj/item/device/camera_bug
name = "camera bug"
icon = 'icons/obj/device.dmi'
icon_state = "flash"

View File

@@ -136,7 +136,7 @@ datum/hSB
continue
if(istype(O, /obj/item/assembly))
continue
if(istype(O, /obj/item/weapon/camera))
if(istype(O, /obj/item/device/camera))
continue
if(istype(O, /obj/item/weapon/cloaking_device))
continue

View File

@@ -1,194 +0,0 @@
/* Photography!
* Contains:
* Camera
* Photos
* Photo Albums
*/
/*
* Camera
*/
/obj/item/weapon/camera_test
name = "camera"
icon = 'icons/obj/items.dmi'
desc = "A one use - polaroid camera. 10 photos left."
icon_state = "camera"
item_state = "electropack"
w_class = 2.0
flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS
slot_flags = SLOT_BELT
m_amt = 2000
throwforce = 5
throw_speed = 4
throw_range = 10
var/pictures_left = 10
var/can_use = 1
/obj/item/weapon/photo
name = "photo"
icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "clipboard"
w_class = 1.0
//////////////////////////////////////////////////////////////////////////////////////////////////
/obj/item/weapon/camera_test/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/weapon/camera_test/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if (!can_use || !pictures_left || ismob(target.loc)) return
var/turf/the_turf = get_turf(target)
var/icon/photo = icon('icons/obj/items.dmi',"photo")
var/icon/turficon = build_composite_icon(the_turf)
turficon.Scale(22,20)
photo.Blend(turficon,ICON_OVERLAY,6,8)
var/mob_title = null
var/mob_detail = null
var/item_title = null
var/item_detail = null
var/itemnumber = 0
for(var/atom/A in the_turf)
if(istype(A, /obj/item/weapon/photo)) continue
if(A.invisibility) continue
if(ismob(A))
var/icon/X = build_composite_icon(A)
X.Scale(22,20)
photo.Blend(X,ICON_OVERLAY,6,8)
del(X)
if(!mob_title)
mob_title = "[A]"
else
mob_title += " and [A]"
if(!mob_detail)
var/holding = null
if(istype(A, /mob/living/carbon))
var/mob/living/carbon/temp = A
if(temp.l_hand || temp.r_hand)
if(temp.l_hand) holding = "They are holding \a [temp.l_hand]"
if(temp.r_hand)
if(holding)
holding += " and \a [temp.r_hand]."
else
holding = "They are holding \a [temp.r_hand]."
if(isliving(A))
var/mob/living/L = A
if(!mob_detail)
mob_detail = "You can see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]"
else
mob_detail += "You can also see [L] on the photo[L.health < 75 ? " - [L] looks hurt":""].[holding ? " [holding]":"."]"
else
if(itemnumber < 5)
var/icon/X = build_composite_icon(A)
X.Scale(22,20)
photo.Blend(X,ICON_OVERLAY,6,8)
del(X)
itemnumber++
if(!item_title)
item_title = " \a [A]"
else
item_title = " some objects"
if(!item_detail)
item_detail = "\a [A]"
else
item_detail += " and \a [A]"
var/finished_title = null
var/finished_detail = null
if(!item_title && !mob_title)
finished_title = "boring photo"
finished_detail = "This is a pretty boring photo of \a [the_turf]."
else
if(mob_title)
finished_title = "photo of [mob_title][item_title ? " and[item_title]":""]"
finished_detail = "[mob_detail][item_detail ? " Theres also [item_detail].":"."]"
else if(item_title)
finished_title = "photo of[item_title]"
finished_detail = "You can see [item_detail]."
var/obj/item/weapon/photo/P = new/obj/item/weapon/photo( get_turf(src) )
P.icon = photo
P.name = finished_title
P.desc = finished_detail
playsound(src.loc, pick('sound/items/polaroid1.ogg','sound/items/polaroid2.ogg'), 75, 1, -3)
pictures_left--
src.desc = "A one use - polaroid camera. [pictures_left] photos left."
user << "\blue [pictures_left] photos left."
can_use = 0
spawn(50) can_use = 1
/*
* Photos
*/
/obj/item/weapon/paper/photograph/New()
..()
src.pixel_y = 0
src.pixel_x = 0
return
/obj/item/weapon/paper/photograph/attack_self(mob/user as mob)
var/n_name = copytext(sanitize(input(user, "What would you like to label the photo?", "Paper Labelling", null) as text),1,32)
if ((src.loc == user && user.stat == 0))
src.name = text("photo[]", (n_name ? text("- '[]'", n_name) : null))
src.add_fingerprint(user)
return
/*
* Photo Albums
*/
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if (!( istype(over_object, /obj/screen) ))
return ..()
playsound(src.loc, "rustle", 50, 1, -5)
if ((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
src.add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if (usr.s_active)
usr.s_active.close(usr)
src.show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()

View File

@@ -35,7 +35,7 @@
user << "<span class='notice'>You put the [W] into \the [src].</span>"
update_icon()
else if(istype(W, /obj/item/weapon/pen))
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text),1,MAX_NAME_LEN)
var/n_name = copytext(sanitize(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text), 1, MAX_NAME_LEN)
if((loc == usr && usr.stat == 0))
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
return

View File

@@ -67,8 +67,7 @@
if((CLUMSY in usr.mutations) && prob(50))
usr << "<span class='warning'>You cut yourself on the paper.</span>"
return
var/n_name = input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text
n_name = copytext(n_name, 1, 32)
var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_NAME_LEN)
if((loc == usr && usr.stat == 0))
name = "paper[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)

View File

@@ -0,0 +1,263 @@
/* Photography!
* Contains:
* Camera
* Photos
* Photo Albums
*/
/*
* Camera
*/
/obj/item/device/camera
name = "camera"
icon = 'icons/obj/items.dmi'
desc = "A polaroid camera. 10 photos left."
icon_state = "camera"
item_state = "electropack"
w_class = 2.0
flags = FPRINT | CONDUCT | USEDELAY | TABLEPASS
slot_flags = SLOT_BELT
m_amt = 2000
var/pictures_max = 10
var/pictures_left = 10
var/on = 1
/obj/item/weapon/photo
name = "photo"
icon = 'icons/obj/items.dmi'
icon_state = "photo"
item_state = "clipboard"
w_class = 1.0
var/icon/img //Big photo image
var/scribble //Scribble on the back.
/obj/item/weapon/photo/New()
..()
pixel_y = 0
pixel_x = 0
return
/obj/item/weapon/photo/attack_self(mob/user as mob)
examine()
/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))
var/txt = sanitize(input(usr, "What would you like to write on the back?", "Photo Writing", null) as text)
txt = copytext(txt, 1, 128)
if(loc == user && user.stat == 0)
scribble = txt
..()
/obj/item/weapon/photo/examine()
set src in oview(1)
if(in_range(usr, src))
show(usr)
usr << desc
else
usr << "<span class='notice'>It is too far away.</span>"
/obj/item/weapon/photo/proc/show(mob/user as mob)
usr << browse_rsc(img, "tmp_photo.png")
usr << browse("<html><head><title>[name]</title></head>" \
+ "<body style='overflow:hidden'>" \
+ "<div> <img src='tmp_photo.png' width = '180'" \
+ "[scribble ? "<div> Written on the back:<br><i>[scribble]</i>" : ]"\
+ "</body></html>", "window=book;size=200x[scribble ? 400 : 200]")
onclose(user, "[name]")
return
/obj/item/weapon/photo/verb/rename()
set name = "Rename photo"
set category = "Object"
set src in usr
var/n_name = copytext(sanitize(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text), 1, MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
if(( (loc == usr || (loc.loc && loc.loc == usr)) && usr.stat == 0))
name = "photo[(n_name ? text("- '[n_name]'") : null)]"
add_fingerprint(usr)
return
/obj/item/device/camera_film
name = "film cartridge"
icon = 'icons/obj/items.dmi'
desc = "A camera film cartridge. Insert it into a camera to reload it."
icon_state = "film"
item_state = "electropack"
w_class = 1.0
//////////////////////////////////////////////////////////////////////////////////////////////////
/obj/item/device/camera/attack(mob/living/carbon/human/M as mob, mob/user as mob)
return
/obj/item/device/camera/proc/get_icon(turf/the_turf as turf)
//Bigger icon base to capture those icons that were shifted to the next tile
//i.e. pretty much all wall-mounted machinery
var/icon/res = icon('icons/effects/96x96.dmi',"")
var/icon/turficon = build_composite_icon(the_turf)
res.Blend(turficon,ICON_OVERLAY,33,33)
var/atoms[] = list()
for(var/atom/A in the_turf)
if(A.invisibility) continue
atoms.Add(A)
//Sorting icons based on levels
var/gap = atoms.len
var/swapped = 1
while (gap > 1 || swapped)
swapped = 0
if(gap > 1)
gap = round(gap / 1.247330950103979)
if(gap < 1)
gap = 1
for(var/i = 1; gap + i <= atoms.len; i++)
var/atom/l = atoms[i] //Fucking hate
var/atom/r = atoms[gap+i] //how lists work here
if(l.layer > r.layer) //no "atoms[i].layer" for me
atoms.Swap(i, gap + i)
swapped = 1
for(var/i; i <= atoms.len; i++)
var/atom/A = atoms[i]
if(A)
var/icon/img = getFlatIcon(A,A.dir)//build_composite_icon(A)
if(istype(img, /icon))
res.Blend(new/icon(img,"",A.dir),ICON_OVERLAY,33+A.pixel_x,33+A.pixel_y)
return res
/*
/obj/item/device/camera/attack_self(mob/user as mob)
..()
if(on)
on = 0
icon_state = "camera_off"
user << "<span class='notice'>You turn [src] off.</span>"
else
on = 1
icon_state = "camera"
user << "<span class='notice'>You turn [src] on.</span>"
*/
/obj/item/device/camera/attackby(obj/item/I as obj, mob/user as mob)
if(istype(I, /obj/item/device/camera_film))
if(pictures_left)
user << "<span class='notice'>[src] still has some film in it!</span>"
return
user << "<span class='notice'>You insert [I] into [src].</span>"
user.drop_item()
del(I)
pictures_left = pictures_max
return
..()
/obj/item/device/camera/proc/get_mobs(turf/the_turf as turf)
var/mob_detail
for(var/mob/living/carbon/A in the_turf)
if(A.invisibility) continue
var/holding = null
if(A.l_hand || A.r_hand)
if(A.l_hand) holding = "They are holding \a [A.l_hand]"
if(A.r_hand)
if(holding)
holding += " and \a [A.r_hand]"
else
holding = "They are holding \a [A.r_hand]"
if(!mob_detail)
mob_detail = "You can see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]. "
else
mob_detail += "You can also see [A] on the photo[A:health < 75 ? " - [A] looks hurt":""].[holding ? " [holding]":"."]."
return mob_detail
/obj/item/device/camera/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag)
if(!on || !pictures_left || ismob(target.loc)) return
var/x_c = target.x - 1
var/y_c = target.y + 1
var/z_c = target.z
var/icon/temp = icon('icons/effects/96x96.dmi',"")
var/icon/black = icon('icons/turf/space.dmi', "black")
var/mobs = ""
for(var/i = 1; i <= 3; i++)
for(var/j = 1; j <= 3; j++)
var/turf/T = locate(x_c,y_c,z_c)
var/mob/dummy = new(T) //Go go visibility check dummy
var/viewer = user
if(user.client) //To make shooting through security cameras possible
viewer = user.client.eye
if(dummy in viewers(world.view, viewer))
temp.Blend(get_icon(T),ICON_OVERLAY,32*(j-1-1),32 - 32*(i-1))
else
temp.Blend(black,ICON_OVERLAY,32*(j-1),64 - 32*(i-1))
mobs += get_mobs(T)
del dummy //Alas, nameless creature
x_c++
y_c--
x_c = x_c - 3
var/obj/item/weapon/photo/P = new/obj/item/weapon/photo()
P.loc = usr.loc
if(!user.get_inactive_hand())
usr.put_in_inactive_hand(P)
var/icon/small_img = icon(temp)
var/icon/ic = icon('icons/obj/items.dmi',"photo")
small_img.Scale(8,8)
ic.Blend(small_img,ICON_OVERLAY,10,13)
P.icon = ic
P.img = temp
P.desc = mobs
P.pixel_x = rand(-10,10)
P.pixel_y = rand(-10,10)
playsound(loc, pick('sound/items/polaroid1.ogg','sound/items/polaroid2.ogg'), 75, 1, -3)
pictures_left--
desc = "A polaroid camera. It has [pictures_left] photos left."
user << "<span class='notice'>[pictures_left] photos left.</span>"
icon_state = "camera_off"
on = 0
spawn(64)
icon_state = "camera"
on = 1
/*
* Photo Albums
*/
/obj/item/weapon/storage/photo_album
name = "Photo album"
icon = 'icons/obj/items.dmi'
icon_state = "album"
item_state = "briefcase"
can_hold = list("/obj/item/weapon/photo",)
/obj/item/weapon/storage/photo_album/MouseDrop(obj/over_object as obj)
if((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey")))
var/mob/M = usr
if(!( istype(over_object, /obj/screen) ))
return ..()
playsound(loc, "rustle", 50, 1, -5)
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
M.u_equip(src)
M.put_in_r_hand(src)
if("l_hand")
M.u_equip(src)
M.put_in_l_hand(src)
add_fingerprint(usr)
return
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
if(usr.s_active)
usr.s_active.close(usr)
show_to(usr)
return
return
/obj/item/weapon/storage/photo_album/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()

View File

@@ -53,6 +53,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
<h2 class="date">18 November 2012</h2>
<h3 class="author">Petethegoat updated:</h3>
<ul class="changes bgimages16">
<li class="rscadd">Ported over BS12 style cameras. They now take a photo of a 3x3 area!</li>
<li class="tweak">Catatonic people (those that have ghosted while alive) now count as dead for assasinate objectives.</li>
</ul>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -564,7 +564,7 @@
"kR" = (/obj/structure/table,/obj/item/weapon/paper/pamphlet{pixel_x = 2; pixel_y = 2},/obj/item/weapon/paper/pamphlet{pixel_x = -2; pixel_y = -2},/turf/simulated/floor{tag = "icon-warningcorner (WEST)"; icon_state = "warningcorner"; dir = 8},/area/awaymission/gateroom)
"kS" = (/obj/effect/landmark{name = "awaystart"},/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/awaymission/gateroom)
"kT" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/obj/effect/landmark{name = "awaystart"},/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/awaymission/gateroom)
"kU" = (/obj/structure/table,/obj/item/weapon/camera_test,/turf/simulated/floor{tag = "icon-warningcorner (EAST)"; icon_state = "warningcorner"; dir = 4},/area/awaymission/gateroom)
"kU" = (/obj/structure/table,/obj/item/device/camera,/turf/simulated/floor{tag = "icon-warningcorner (EAST)"; icon_state = "warningcorner"; dir = 4},/area/awaymission/gateroom)
"kV" = (/obj/structure/stool/bed/chair/comfy/brown{tag = "icon-comfychair_brown (WEST)"; icon_state = "comfychair_brown"; dir = 8},/turf/simulated/floor{icon_state = "wood"},/area/awaymission/southblock)
"kW" = (/obj/structure/stool/bed/chair{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/awaymission/arrivalblock)
"kX" = (/obj/structure/stool/bed/chair,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/awaymission/arrivalblock)

View File

@@ -623,7 +623,7 @@
"alY" = (/obj/structure/table/woodentable,/obj/machinery/recharger{pixel_y = 4},/turf/simulated/floor/wood,/area/crew_quarters/captain)
"alZ" = (/obj/machinery/light{dir = 1},/obj/structure/filingcabinet,/turf/simulated/floor/wood,/area/crew_quarters/captain)
"ama" = (/obj/structure/table/woodentable,/obj/item/weapon/soap/deluxe,/turf/simulated/floor/wood,/area/crew_quarters/captain)
"amb" = (/obj/structure/table/woodentable,/obj/item/weapon/camera_test,/obj/item/weapon/storage/photo_album{pixel_y = -10},/turf/simulated/floor/wood,/area/crew_quarters/captain)
"amb" = (/obj/structure/table/woodentable,/obj/item/device/camera,/obj/item/weapon/storage/photo_album{pixel_y = -10},/turf/simulated/floor/wood,/area/crew_quarters/captain)
"amc" = (/obj/machinery/computer/arcade,/turf/simulated/floor/wood,/area/crew_quarters/captain)
"amd" = (/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor{dir = 8; icon_state = "brown"},/area/hallway/primary/central)
"ame" = (/obj/machinery/atmospherics/pipe/simple/supplymain/hidden,/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor{dir = 8; icon_state = "brown"},/area/hallway/primary/central)

File diff suppressed because it is too large Load Diff

View File

@@ -476,7 +476,6 @@
#include "code\game\objects\items\weapons\mop.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
#include "code\game\objects\items\weapons\photography.dm"
#include "code\game\objects\items\weapons\RCD.dm"
#include "code\game\objects\items\weapons\RSF.dm"
#include "code\game\objects\items\weapons\scrolls.dm"
@@ -922,6 +921,7 @@
#include "code\modules\paperwork\paperbin.dm"
#include "code\modules\paperwork\pen.dm"
#include "code\modules\paperwork\photocopier.dm"
#include "code\modules\paperwork\photography.dm"
#include "code\modules\paperwork\stamps.dm"
#include "code\modules\power\apc.dm"
#include "code\modules\power\cable.dm"