Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ihatethisengine committed Apr 3, 2024
1 parent 058d0ae commit 68fdde3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 13 additions & 1 deletion code/game/machinery/camera/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion code/game/machinery/computer/camera_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
21 changes: 21 additions & 0 deletions code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 68fdde3

Please sign in to comment.