From 68fdde3327301ef3bb62d9b0fdd6ef004e1cd6a4 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 01:03:24 +0300 Subject: [PATCH 01/22] init --- code/__DEFINES/camera.dm | 1 + code/game/machinery/camera/camera.dm | 14 ++++++++++++- .../game/machinery/computer/camera_console.dm | 6 +++++- code/modules/paperwork/photography.dm | 21 +++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/camera.dm b/code/__DEFINES/camera.dm index 9d797b964d61..f50d7d8e2c72 100644 --- a/code/__DEFINES/camera.dm +++ b/code/__DEFINES/camera.dm @@ -16,6 +16,7 @@ #define CAMERA_NET_VEHICLE "Vehicle" #define CAMERA_NET_LANDING_ZONES "Landing Zones" #define CAMERA_NET_LASER_TARGETS "Laser Targets" +#define CAMERA_NET_CORRESPONDENT "Combat Correspondent Live" #define CAMERA_NET_POWER_ALARMS "Power Alarms" #define CAMERA_NET_ATMOSPHERE_ALARMS "Atmosphere Alarms" diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 7621e82ce936..3c5abb321e44 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -69,7 +69,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) var/area/my_area = get_area(src) if(my_area) for(var/obj/structure/machinery/camera/autoname/current_camera in GLOB.machines) - if(current_camera == src) + if(current_camera == src) continue var/area/current_camera_area = get_area(current_camera) if(current_camera_area.type != my_area.type) @@ -299,6 +299,18 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) return 1 return 0 +/obj/structure/machinery/camera/correspondent + network = list(CAMERA_NET_CORRESPONDENT) + invisibility = 101 + invuln = TRUE + unslashable = TRUE + unacidable = TRUE + colony_camera_mapload = FALSE + +/obj/structure/machinery/camera/correspondent/Initialize(mapload, c_tag_name) + c_tag = c_tag_name + return ..() + /obj/structure/machinery/camera/mortar alpha = 0 mouse_opacity = MOUSE_OPACITY_TRANSPARENT diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index f36719a8453e..e9e21e458983 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -205,7 +205,11 @@ /obj/structure/machinery/computer/cameras/wooden_tv/prop name = "Television Set" desc = "An old TV hooked up to a video cassette recorder, you can even use it to time shift WOW." - network = null + network = list(CAMERA_NET_CORRESPONDENT) + +/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_state(mob/user) + return GLOB.default_state + /obj/structure/machinery/computer/cameras/wooden_tv/ot name = "Mortar Monitoring Set" diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 69ce9ec4ce13..5f126719e38e 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -357,6 +357,27 @@ pictures_max = 20 w_class = SIZE_HUGE flags_equip_slot = NO_FLAGS //cannot be equiped + var/obj/structure/machinery/camera/correspondent/linked_cam + +/obj/item/device/camera/broadcasting/attack_self(mob/user) //wielding capabilities + . = ..() + if(flags_item & WIELDED) + linked_cam = new(loc, "[user] LIVE") + linked_cam.network = list(CAMERA_NET_CORRESPONDENT) + RegisterSignal(src, list( + COMSIG_ITEM_DROPPED, + COMSIG_ITEM_UNWIELD, + COMSIG_PARENT_QDELETING, + ), PROC_REF(clear_broadcast)) + to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) + +/obj/item/device/camera/broadcasting/proc/clear_broadcast() + QDEL_NULL(linked_cam) + UnregisterSignal(src, list( + COMSIG_ITEM_DROPPED, + COMSIG_ITEM_UNWIELD, + COMSIG_PARENT_QDELETING, + )) /obj/item/photo/proc/construct(datum/picture/P) icon = P.fields["icon"] From d2c0d00f0016f12671d0fd1cffc780fbddb637a2 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 14:08:17 +0300 Subject: [PATCH 02/22] smallfix --- code/modules/paperwork/photography.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5f126719e38e..c33b45739111 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -372,6 +372,7 @@ to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) /obj/item/device/camera/broadcasting/proc/clear_broadcast() + SIGNAL_HANDLER QDEL_NULL(linked_cam) UnregisterSignal(src, list( COMSIG_ITEM_DROPPED, From 5e11dad272e16e37c9a32fcd9e5625ca4e27a8a9 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 14:34:45 +0300 Subject: [PATCH 03/22] we are so back +effort +going back live --- .../dcs/signals/atom/signals_item.dm | 3 +++ code/game/machinery/camera/camera.dm | 1 + .../game/machinery/computer/camera_console.dm | 25 +++++++++++++++++++ code/modules/paperwork/photography.dm | 2 ++ 4 files changed, 31 insertions(+) diff --git a/code/__DEFINES/dcs/signals/atom/signals_item.dm b/code/__DEFINES/dcs/signals/atom/signals_item.dm index f0456f8dd9f6..f038d4c5dbce 100644 --- a/code/__DEFINES/dcs/signals/atom/signals_item.dm +++ b/code/__DEFINES/dcs/signals/atom/signals_item.dm @@ -29,6 +29,9 @@ #define COMSIG_ITEM_PICKUP "item_pickup" +///from /obj/item/device/camera/broadcasting/attack_self +#define COMSIG_BROADCAST_GO_LIVE "broadcast_live" + /// from /obj/item/proc/mob_can_equip #define COMSIG_ITEM_ATTEMPTING_EQUIP "item_attempting_equip" ///Return this in response if you don't want items equipped diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 3c5abb321e44..cdc0637b7221 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -306,6 +306,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) unslashable = TRUE unacidable = TRUE colony_camera_mapload = FALSE + var/linked_broadcasting /obj/structure/machinery/camera/correspondent/Initialize(mapload, c_tag_name) c_tag = c_tag_name diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index e9e21e458983..865b06b3564b 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -206,10 +206,35 @@ name = "Television Set" desc = "An old TV hooked up to a video cassette recorder, you can even use it to time shift WOW." network = list(CAMERA_NET_CORRESPONDENT) + var/obj/item/device/camera/broadcasting/broadcastingcamera = null /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_state(mob/user) return GLOB.default_state +/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_act(action, params) + . = ..() + if(action != "switch_camera") + return . + broadcastingcamera = null + if (!istype(current, /obj/structure/machinery/camera/correspondent)) + return . + var/obj/structure/machinery/camera/correspondent/corr_cam = current + if (!corr_cam.linked_broadcasting) + return . + broadcastingcamera = corr_cam.linked_broadcasting + RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, TYPE_PROC_REF(/obj/structure/machinery/computer/cameras/wooden_tv/prop, go_back_live)) + +/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_close(mob/user) + . = ..() + if (current == null && broadcastingcamera) + UnregisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE) + broadcastingcamera = null + +/obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera) + SIGNAL_HANDLER + if (current.c_tag == "[broadcastingcamera.loc] LIVE") + current = broadcastingcamera.linked_cam + SEND_SIGNAL(src, COMSIG_CAMERA_SET_TARGET, broadcastingcamera.linked_cam, broadcastingcamera.linked_cam.view_range, broadcastingcamera.linked_cam.view_range) /obj/structure/machinery/computer/cameras/wooden_tv/ot name = "Mortar Monitoring Set" diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index c33b45739111..ada2996a5ea5 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -364,11 +364,13 @@ if(flags_item & WIELDED) linked_cam = new(loc, "[user] LIVE") linked_cam.network = list(CAMERA_NET_CORRESPONDENT) + linked_cam.linked_broadcasting = src RegisterSignal(src, list( COMSIG_ITEM_DROPPED, COMSIG_ITEM_UNWIELD, COMSIG_PARENT_QDELETING, ), PROC_REF(clear_broadcast)) + SEND_SIGNAL(src, COMSIG_BROADCAST_GO_LIVE) to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) /obj/item/device/camera/broadcasting/proc/clear_broadcast() From ec478181d211718e29ba9c664133a098e897c5bc Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 16:18:28 +0300 Subject: [PATCH 04/22] broadcast name --- code/game/machinery/computer/camera_console.dm | 2 +- code/modules/paperwork/photography.dm | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index 865b06b3564b..85a1bc6ba4c9 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -232,7 +232,7 @@ /obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera) SIGNAL_HANDLER - if (current.c_tag == "[broadcastingcamera.loc] LIVE") + if (current.c_tag == broadcastingcamera.get_broadcast_name()) current = broadcastingcamera.linked_cam SEND_SIGNAL(src, COMSIG_CAMERA_SET_TARGET, broadcastingcamera.linked_cam, broadcastingcamera.linked_cam.view_range, broadcastingcamera.linked_cam.view_range) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index ada2996a5ea5..7c8911fdce7b 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -362,7 +362,7 @@ /obj/item/device/camera/broadcasting/attack_self(mob/user) //wielding capabilities . = ..() if(flags_item & WIELDED) - linked_cam = new(loc, "[user] LIVE") + linked_cam = new(loc, get_broadcast_name()) linked_cam.network = list(CAMERA_NET_CORRESPONDENT) linked_cam.linked_broadcasting = src RegisterSignal(src, list( @@ -382,6 +382,12 @@ COMSIG_PARENT_QDELETING, )) +/obj/item/device/camera/broadcasting/proc/get_broadcast_name() + var/datum/component/label/src_label_component = GetComponent(/datum/component/label) + if(src_label_component) + return src_label_component.label_name + return "Broadcast [serial_number]" + /obj/item/photo/proc/construct(datum/picture/P) icon = P.fields["icon"] tiny = P.fields["tiny"] From 7833fcecba6e3f5eafeccdf61c49b5f414426644 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 22:07:13 +0300 Subject: [PATCH 05/22] aaaa --- code/game/machinery/computer/camera_console.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index 85a1bc6ba4c9..bd5e4d96231c 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -226,7 +226,7 @@ /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_close(mob/user) . = ..() - if (current == null && broadcastingcamera) + if (!current && broadcastingcamera) UnregisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE) broadcastingcamera = null From b5934c161334cdf5d20fbbe8c7130dabc62906e3 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Thu, 4 Apr 2024 23:49:47 +0300 Subject: [PATCH 06/22] bbbb --- code/game/machinery/computer/camera_console.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index bd5e4d96231c..0c6d2326ebe1 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -214,13 +214,13 @@ /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_act(action, params) . = ..() if(action != "switch_camera") - return . + return broadcastingcamera = null if (!istype(current, /obj/structure/machinery/camera/correspondent)) - return . + return var/obj/structure/machinery/camera/correspondent/corr_cam = current if (!corr_cam.linked_broadcasting) - return . + return broadcastingcamera = corr_cam.linked_broadcasting RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, TYPE_PROC_REF(/obj/structure/machinery/computer/cameras/wooden_tv/prop, go_back_live)) From c5a3e7ec3ebdcc60011b558c950d27ccebdc322c Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 03:42:28 +0300 Subject: [PATCH 07/22] tv craft --- code/game/machinery/vending/vendor_types/engineering.dm | 1 + code/game/objects/items/circuitboards/computer.dm | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/code/game/machinery/vending/vendor_types/engineering.dm b/code/game/machinery/vending/vendor_types/engineering.dm index 245e06009695..826f4431235b 100644 --- a/code/game/machinery/vending/vendor_types/engineering.dm +++ b/code/game/machinery/vending/vendor_types/engineering.dm @@ -92,6 +92,7 @@ list("Auxiliar Power Storage Unit", 2, /obj/item/circuitboard/machine/ghettosmes, VENDOR_ITEM_REGULAR), list("Air Alarm Electronics", 2, /obj/item/circuitboard/airalarm, VENDOR_ITEM_REGULAR), list("Security Camera Monitor", 2, /obj/item/circuitboard/computer/cameras, VENDOR_ITEM_REGULAR), + list("Television Set", 4, /obj/item/circuitboard/computer/cameras/tv, VENDOR_ITEM_REGULAR), list("Station Alerts", 2, /obj/item/circuitboard/computer/stationalert, VENDOR_ITEM_REGULAR), list("Arcade", 2, /obj/item/circuitboard/computer/arcade, VENDOR_ITEM_REGULAR), list("Atmospheric Monitor", 2, /obj/item/circuitboard/computer/air_management, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm index 08dcfc6964a6..cae4ccb42a98 100644 --- a/code/game/objects/items/circuitboards/computer.dm +++ b/code/game/objects/items/circuitboards/computer.dm @@ -26,6 +26,12 @@ if (..(C)) network = C.network +/obj/item/circuitboard/computer/cameras/tv + name = "Circuit board (Television Set)" + build_path = /obj/structure/machinery/computer/cameras/wooden_tv/prop + network = list(CAMERA_NET_CORRESPONDENT) + req_access = list() + /obj/item/circuitboard/computer/cameras/engineering name = "Circuit board (Engineering Camera Monitor)" build_path = /obj/structure/machinery/computer/cameras/engineering From f55ba61b246a2018353db34dc71292e9a8863400 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:44:47 +0300 Subject: [PATCH 08/22] Update code/modules/paperwork/photography.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/modules/paperwork/photography.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 7c8911fdce7b..d39e55508f94 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -368,7 +368,6 @@ RegisterSignal(src, list( COMSIG_ITEM_DROPPED, COMSIG_ITEM_UNWIELD, - COMSIG_PARENT_QDELETING, ), PROC_REF(clear_broadcast)) SEND_SIGNAL(src, COMSIG_BROADCAST_GO_LIVE) to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) From f147dcf62a2a6e8064593d52e1319344495dd27a Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:44:55 +0300 Subject: [PATCH 09/22] Update code/modules/paperwork/photography.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/modules/paperwork/photography.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index d39e55508f94..4fc617cd9d1f 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -378,7 +378,6 @@ UnregisterSignal(src, list( COMSIG_ITEM_DROPPED, COMSIG_ITEM_UNWIELD, - COMSIG_PARENT_QDELETING, )) /obj/item/device/camera/broadcasting/proc/get_broadcast_name() From 7125db679b336c249bfdc3ecb5079517c3ab651c Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:45:01 +0300 Subject: [PATCH 10/22] Update code/game/machinery/camera/camera.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/camera/camera.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index cdc0637b7221..ed4af93739bb 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -301,7 +301,7 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) /obj/structure/machinery/camera/correspondent network = list(CAMERA_NET_CORRESPONDENT) - invisibility = 101 + invisibility = INVISIBILITY_ABSTRACT invuln = TRUE unslashable = TRUE unacidable = TRUE From 62ac75870fb5c462bc095243ec7d2a7f9765234d Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:45:12 +0300 Subject: [PATCH 11/22] Update code/game/machinery/computer/camera_console.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/computer/camera_console.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index 0c6d2326ebe1..401588718d5b 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -208,6 +208,10 @@ network = list(CAMERA_NET_CORRESPONDENT) var/obj/item/device/camera/broadcasting/broadcastingcamera = null +/obj/structure/machinery/computer/cameras/wooden_tv/prop/Destroy() + broadcastingcamera = null + return ..() + /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_state(mob/user) return GLOB.default_state From c1e8fc2fddcd2019f75585b1708558db96189ce6 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:45:21 +0300 Subject: [PATCH 12/22] Update code/game/machinery/computer/camera_console.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/computer/camera_console.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index 401588718d5b..cf20c1f56601 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -226,7 +226,7 @@ if (!corr_cam.linked_broadcasting) return broadcastingcamera = corr_cam.linked_broadcasting - RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, TYPE_PROC_REF(/obj/structure/machinery/computer/cameras/wooden_tv/prop, go_back_live)) + RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, PROC_REF(go_back_live)) /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_close(mob/user) . = ..() From 88b11da31df55f63f4fce523e8bedd17eca23f58 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:45:26 +0300 Subject: [PATCH 13/22] Update code/game/machinery/computer/camera_console.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/computer/camera_console.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index cf20c1f56601..fd7fce4682d9 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -238,7 +238,7 @@ SIGNAL_HANDLER if (current.c_tag == broadcastingcamera.get_broadcast_name()) current = broadcastingcamera.linked_cam - SEND_SIGNAL(src, COMSIG_CAMERA_SET_TARGET, broadcastingcamera.linked_cam, broadcastingcamera.linked_cam.view_range, broadcastingcamera.linked_cam.view_range) + SEND_SIGNAL(src, COMSIG_CAMERA_SET_TARGET, broadcastingcamera.linked_cam, broadcastingcamera.linked_cam.view_range, broadcastingcamera.linked_cam.view_range) /obj/structure/machinery/computer/cameras/wooden_tv/ot name = "Mortar Monitoring Set" From e1f2078def0f8176bdad03364361b5671a06aa76 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:45:33 +0300 Subject: [PATCH 14/22] Update code/modules/paperwork/photography.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/modules/paperwork/photography.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 4fc617cd9d1f..d47bd9885116 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -359,6 +359,11 @@ flags_equip_slot = NO_FLAGS //cannot be equiped var/obj/structure/machinery/camera/correspondent/linked_cam +/obj/item/device/camera/broadcasting/Destroy() + if(!QDELETED(linked_cam)) + clear_broadcast() + return ..() + /obj/item/device/camera/broadcasting/attack_self(mob/user) //wielding capabilities . = ..() if(flags_item & WIELDED) From 0b39e43899a7b7e1017272b443a4a08dc461c303 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:51:10 +0300 Subject: [PATCH 15/22] Update code/game/machinery/computer/camera_console.dm --- code/game/machinery/computer/camera_console.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index fd7fce4682d9..d69edc407cc6 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -227,12 +227,17 @@ return broadcastingcamera = corr_cam.linked_broadcasting RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, PROC_REF(go_back_live)) + RegisterSignal(broadcastingcamera, COMSIG_PARENT_QDELETING, PROC_REF(clear_camera)) /obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_close(mob/user) . = ..() if (!current && broadcastingcamera) - UnregisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE) - broadcastingcamera = null + clear_camera() + +/obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/clear_camera() + SIGNAL_HANDLER + UnregisterSignal(broadcastingcamera, list(COMSIG_BROADCAST_GO_LIVE, COMSIG_PARENT_QDELETING)) + broadcastingcamera = null /obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera) SIGNAL_HANDLER From 41f39f412e52dc596e81667b4e94c734e1d8560d Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 18:00:10 +0300 Subject: [PATCH 16/22] change name --- code/game/machinery/computer/camera_console.dm | 16 ++++++++-------- .../game/objects/items/circuitboards/computer.dm | 2 +- .../LV522_Chances_Claim/LV522_Chances_Claim.dmm | 12 ++++++------ maps/map_files/USS_Almayer/USS_Almayer.dmm | 6 +++--- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index d69edc407cc6..cd0ee780f478 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -202,20 +202,20 @@ name = "Ship Security Cameras" network = list(CAMERA_NET_ALMAYER) -/obj/structure/machinery/computer/cameras/wooden_tv/prop +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast name = "Television Set" desc = "An old TV hooked up to a video cassette recorder, you can even use it to time shift WOW." network = list(CAMERA_NET_CORRESPONDENT) var/obj/item/device/camera/broadcasting/broadcastingcamera = null -/obj/structure/machinery/computer/cameras/wooden_tv/prop/Destroy() +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/Destroy() broadcastingcamera = null return ..() -/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_state(mob/user) +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_state(mob/user) return GLOB.default_state -/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_act(action, params) +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_act(action, params) . = ..() if(action != "switch_camera") return @@ -229,17 +229,17 @@ RegisterSignal(broadcastingcamera, COMSIG_BROADCAST_GO_LIVE, PROC_REF(go_back_live)) RegisterSignal(broadcastingcamera, COMSIG_PARENT_QDELETING, PROC_REF(clear_camera)) -/obj/structure/machinery/computer/cameras/wooden_tv/prop/ui_close(mob/user) +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/ui_close(mob/user) . = ..() if (!current && broadcastingcamera) clear_camera() - -/obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/clear_camera() + +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/clear_camera() SIGNAL_HANDLER UnregisterSignal(broadcastingcamera, list(COMSIG_BROADCAST_GO_LIVE, COMSIG_PARENT_QDELETING)) broadcastingcamera = null -/obj/structure/machinery/computer/cameras/wooden_tv/prop/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera) +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/proc/go_back_live(obj/item/device/camera/broadcasting/broadcastingcamera) SIGNAL_HANDLER if (current.c_tag == broadcastingcamera.get_broadcast_name()) current = broadcastingcamera.linked_cam diff --git a/code/game/objects/items/circuitboards/computer.dm b/code/game/objects/items/circuitboards/computer.dm index cae4ccb42a98..ecdfba00719d 100644 --- a/code/game/objects/items/circuitboards/computer.dm +++ b/code/game/objects/items/circuitboards/computer.dm @@ -28,7 +28,7 @@ /obj/item/circuitboard/computer/cameras/tv name = "Circuit board (Television Set)" - build_path = /obj/structure/machinery/computer/cameras/wooden_tv/prop + build_path = /obj/structure/machinery/computer/cameras/wooden_tv/broadcast network = list(CAMERA_NET_CORRESPONDENT) req_access = list() diff --git a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm index 4da1bbb7ff45..38c917ce08e8 100644 --- a/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm +++ b/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm @@ -6863,7 +6863,7 @@ /area/lv522/atmos/east_reactor) "dkJ" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ dir = 8; layer = 3; pixel_x = 5; @@ -15281,7 +15281,7 @@ /area/lv522/outdoors/nw_rockies) "gEQ" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ dir = 1; pixel_x = -10; pixel_y = 6 @@ -20248,7 +20248,7 @@ /area/lv522/outdoors/nw_rockies) "ivN" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ pixel_y = 8 }, /turf/open/floor/prison{ @@ -26446,7 +26446,7 @@ /area/lv522/atmos/cargo_intake) "kCN" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ pixel_y = 16 }, /obj/item/trash/plate, @@ -32795,7 +32795,7 @@ /area/lv522/indoors/a_block/dorms) "mZK" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ pixel_x = 16; pixel_y = 7 }, @@ -54626,7 +54626,7 @@ "val" = ( /obj/effect/decal/cleanable/dirt, /obj/structure/surface/table/woodentable/fancy, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ dir = 1; pixel_y = 3 }, diff --git a/maps/map_files/USS_Almayer/USS_Almayer.dmm b/maps/map_files/USS_Almayer/USS_Almayer.dmm index 513e8739ad99..a6a4c6002f7f 100644 --- a/maps/map_files/USS_Almayer/USS_Almayer.dmm +++ b/maps/map_files/USS_Almayer/USS_Almayer.dmm @@ -20104,7 +20104,7 @@ /area/almayer/living/grunt_rnr) "cDH" = ( /obj/effect/decal/cleanable/dirt, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ pixel_y = 29 }, /turf/open/floor/almayer{ @@ -62039,7 +62039,7 @@ /area/almayer/engineering/lower/engine_core) "rjV" = ( /obj/structure/surface/table/almayer, -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ dir = 8; layer = 3.2; pixel_x = -3; @@ -81554,7 +81554,7 @@ }, /area/almayer/shipboard/panic) "xML" = ( -/obj/structure/machinery/computer/cameras/wooden_tv/prop{ +/obj/structure/machinery/computer/cameras/wooden_tv/broadcast{ pixel_x = -4; pixel_y = 2 }, From b2f010750a6b3f354c3f268a2b393ea4ce88f607 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Fri, 5 Apr 2024 23:02:29 +0300 Subject: [PATCH 17/22] Update code/game/machinery/camera/camera.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/game/machinery/camera/camera.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ed4af93739bb..3f8bfd265cd1 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -308,8 +308,9 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) colony_camera_mapload = FALSE var/linked_broadcasting -/obj/structure/machinery/camera/correspondent/Initialize(mapload, c_tag_name) - c_tag = c_tag_name +/obj/structure/machinery/camera/correspondent/Initialize(mapload, obj/item/device/camera/broadcasting/camera_item) + c_tag = camera_item.get_broadcast_name() + linked_broadcasting = camera_item return ..() /obj/structure/machinery/camera/mortar From 2f600acbb40b0e31a38f847977bccd217a79acf7 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 23:07:46 +0300 Subject: [PATCH 18/22] sug --- code/modules/paperwork/photography.dm | 31 +++++++++++---------------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index d47bd9885116..255ae708ef2a 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -360,30 +360,25 @@ var/obj/structure/machinery/camera/correspondent/linked_cam /obj/item/device/camera/broadcasting/Destroy() - if(!QDELETED(linked_cam)) - clear_broadcast() + clear_broadcast() return ..() -/obj/item/device/camera/broadcasting/attack_self(mob/user) //wielding capabilities +/obj/item/device/camera/broadcasting/wield(mob/user) . = ..() - if(flags_item & WIELDED) - linked_cam = new(loc, get_broadcast_name()) - linked_cam.network = list(CAMERA_NET_CORRESPONDENT) - linked_cam.linked_broadcasting = src - RegisterSignal(src, list( - COMSIG_ITEM_DROPPED, - COMSIG_ITEM_UNWIELD, - ), PROC_REF(clear_broadcast)) - SEND_SIGNAL(src, COMSIG_BROADCAST_GO_LIVE) - to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) + if(!.) + return + linked_cam = new(loc, get_broadcast_name()) + SEND_SIGNAL(src, COMSIG_BROADCAST_GO_LIVE) + to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) + +/obj/item/device/camera/broadcasting/unwield(mob/user) + . = ..() + clear_broadcast() /obj/item/device/camera/broadcasting/proc/clear_broadcast() SIGNAL_HANDLER - QDEL_NULL(linked_cam) - UnregisterSignal(src, list( - COMSIG_ITEM_DROPPED, - COMSIG_ITEM_UNWIELD, - )) + if(!QDELETED(linked_cam)) + QDEL_NULL(linked_cam) /obj/item/device/camera/broadcasting/proc/get_broadcast_name() var/datum/component/label/src_label_component = GetComponent(/datum/component/label) From b0760532b0f28841c3c9f51b17c732811de84587 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 23:10:25 +0300 Subject: [PATCH 19/22] no longer handle signals........ --- code/modules/paperwork/photography.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 255ae708ef2a..5efe31cc2e25 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -376,7 +376,6 @@ clear_broadcast() /obj/item/device/camera/broadcasting/proc/clear_broadcast() - SIGNAL_HANDLER if(!QDELETED(linked_cam)) QDEL_NULL(linked_cam) From be9ae373d142da484c3b5c1b54da9aa830089bc8 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 23:13:31 +0300 Subject: [PATCH 20/22] oops --- code/modules/paperwork/photography.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 5efe31cc2e25..5614a4ffe52b 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -367,7 +367,7 @@ . = ..() if(!.) return - linked_cam = new(loc, get_broadcast_name()) + linked_cam = new(loc, src) SEND_SIGNAL(src, COMSIG_BROADCAST_GO_LIVE) to_chat(user, SPAN_NOTICE("[src] begins to buzz softly as you go live.")) From 894a8ab6b6fa1736cccbffb41d87b42b74a1b8e6 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 23:30:07 +0300 Subject: [PATCH 21/22] new --- code/game/machinery/camera/camera.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 3f8bfd265cd1..9ee375a71250 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -308,10 +308,10 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) colony_camera_mapload = FALSE var/linked_broadcasting -/obj/structure/machinery/camera/correspondent/Initialize(mapload, obj/item/device/camera/broadcasting/camera_item) +/obj/structure/machinery/camera/correspondent/New(loc, obj/item/device/camera/broadcasting/camera_item) + . = ..() c_tag = camera_item.get_broadcast_name() linked_broadcasting = camera_item - return ..() /obj/structure/machinery/camera/mortar alpha = 0 From a2beee549a7bd00d02991d133a1839dc458919de Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 5 Apr 2024 23:39:07 +0300 Subject: [PATCH 22/22] fix --- code/game/machinery/camera/camera.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 9ee375a71250..948d83e76148 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -306,10 +306,12 @@ GLOBAL_LIST_EMPTY_TYPED(all_cameras, /obj/structure/machinery/camera) unslashable = TRUE unacidable = TRUE colony_camera_mapload = FALSE - var/linked_broadcasting + var/obj/item/device/camera/broadcasting/linked_broadcasting -/obj/structure/machinery/camera/correspondent/New(loc, obj/item/device/camera/broadcasting/camera_item) +/obj/structure/machinery/camera/correspondent/Initialize(mapload, obj/item/device/camera/broadcasting/camera_item) . = ..() + if(!camera_item) + return INITIALIZE_HINT_QDEL c_tag = camera_item.get_broadcast_name() linked_broadcasting = camera_item