From fa89a07452418c430fdd91c7a462112c2671e5ba Mon Sep 17 00:00:00 2001 From: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Date: Mon, 8 Aug 2022 06:10:29 +0700 Subject: [PATCH] Disabling sounds on using Camera Bug (#18724) * Disabling sounds on using Camera Bug * Update code/game/machinery/computer/camera.dm Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> Co-authored-by: Charlie <69320440+hal9000PR@users.noreply.github.com> --- code/game/machinery/computer/camera.dm | 9 +++++++-- code/game/objects/items/devices/camera_bug.dm | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 5eacee68a60..e5c11c919b2 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -24,6 +24,9 @@ // Parent object this camera is assigned to. Used for camera bugs var/atom/movable/parent + /// is the console silent when switching cameras? + var/silent_console = FALSE + /obj/machinery/computer/security/ui_host() return parent ? parent : src @@ -68,7 +71,8 @@ watchers += user_uid // Turn on the console if(length(watchers) == 1 && is_living) - playsound(src, 'sound/machines/terminal_on.ogg', 25, FALSE) + if(!silent_console) + playsound(src, 'sound/machines/terminal_on.ogg', 25, FALSE) use_power(active_power_usage) // Register map objects user.client.register_map_obj(cam_screen) @@ -112,7 +116,8 @@ var/list/cameras = get_available_cameras() var/obj/machinery/camera/C = cameras[c_tag] active_camera = C - playsound(src, get_sfx("terminal_type"), 25, FALSE) + if(!silent_console) + playsound(src, get_sfx("terminal_type"), 25, FALSE) // Show static if can't use the camera if(!active_camera?.can_use()) diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index ba53f45d0ce..89493639919 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -16,6 +16,7 @@ name = "invasive camera utility" desc = "How did this get here?! Please report this as a bug to github" use_power = NO_POWER_USE + silent_console = TRUE /obj/item/camera_bug/Initialize(mapload) . = ..()