refactoring altclick interaction to allow parent calls without forcing the turf contents stat menu open.

This commit is contained in:
Ghommie
2019-11-29 00:40:16 +01:00
parent 8cec8fa506
commit 3b8aebbbc2
99 changed files with 269 additions and 162 deletions
+2 -1
View File
@@ -46,13 +46,14 @@
. += "<span class='notice'>Alt-click to change its focusing, allowing you to set how big of an area it will capture.</span>"
/obj/item/camera/AltClick(mob/user)
. = ..()
if(!user.canUseTopic(src, BE_CLOSE))
return
var/desired_x = input(user, "How high do you want the camera to shoot, between [picture_size_x_min] and [picture_size_x_max]?", "Zoom", picture_size_x) as num
var/desired_y = input(user, "How wide do you want the camera to shoot, between [picture_size_y_min] and [picture_size_y_max]?", "Zoom", picture_size_y) as num
picture_size_x = min(CLAMP(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
picture_size_y = min(CLAMP(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
return TRUE
/obj/item/camera/attack(mob/living/carbon/human/M, mob/user)
return