Skip to content

Commit

Permalink
Merge pull request tgstation#13206 from JJRcop/i12121
Browse files Browse the repository at this point in the history
Fixes camera taking pictures when you try to put them on a table
  • Loading branch information
Aranclanos committed Nov 26, 2015
2 parents cb3a30c + e0446d5 commit 64b7ec1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,13 @@
viewpichelper(Ainfo)

/obj/item/device/camera/afterattack(atom/target, mob/user, flag)
if(!on || !pictures_left || ismob(target.loc)) return
if(!on || !pictures_left || ismob(target.loc) || !isturf(target.loc))
return
if(user.Adjacent(target))
var/list/bad_targets = list(/obj/structure, /obj/item/weapon/storage)
if(is_type_in_list(target, bad_targets))
return

captureimage(target, user, flag)

playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
Expand Down

0 comments on commit 64b7ec1

Please sign in to comment.