mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Entertainment monitor screen now changes if there is any video camera active (#20024)
* not live monitor sprite * camera on controls monitor * second try * cooldown and update_overlays * Apply suggestions from code review Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * feeds_on autodoc * Apply suggestions from code review Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
This commit is contained in:
@@ -543,6 +543,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
/**************
|
||||
*video camera *
|
||||
***************/
|
||||
#define CAMERA_STATE_COOLDOWN 2 SECONDS
|
||||
|
||||
/obj/item/videocam
|
||||
name = "video camera"
|
||||
@@ -553,6 +554,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
materials = list(MAT_METAL = 1000, MAT_GLASS = 500)
|
||||
var/on = FALSE
|
||||
var/video_cooldown = 0
|
||||
var/obj/machinery/camera/camera
|
||||
var/icon_on = "videocam_on"
|
||||
var/icon_off = "videocam"
|
||||
@@ -571,8 +573,18 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
camera.c_tag = null
|
||||
QDEL_NULL(camera)
|
||||
visible_message("<span class='notice'>The video camera has been turned [on ? "on" : "off"].</span>")
|
||||
for(var/obj/machinery/computer/security/telescreen/entertainment/TV in GLOB.machines)
|
||||
if(on)
|
||||
TV.feeds_on++
|
||||
else
|
||||
TV.feeds_on--
|
||||
TV.update_icon(UPDATE_OVERLAYS)
|
||||
video_cooldown = world.time + CAMERA_STATE_COOLDOWN
|
||||
|
||||
/obj/item/videocam/attack_self(mob/user)
|
||||
if(world.time < video_cooldown)
|
||||
to_chat(user, "<span class='warning'>[src] is overheating, give it some time.</span>")
|
||||
return
|
||||
camera_state(user)
|
||||
|
||||
/obj/item/videocam/dropped()
|
||||
@@ -606,6 +618,8 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
|
||||
desc = "This video camera allows you to send live feeds even when attached to a belt."
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
#undef CAMERA_STATE_COOLDOWN
|
||||
|
||||
///hauntings, like hallucinations but more spooky
|
||||
|
||||
/obj/item/camera/proc/handle_haunt(mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user