mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
25 lines
643 B
Plaintext
25 lines
643 B
Plaintext
/datum/round_event_control/camera_failure
|
|
name = "Camera Failure"
|
|
typepath = /datum/round_event/camera_failure
|
|
weight = 100
|
|
max_occurrences = 20
|
|
alert_observers = FALSE
|
|
category = EVENT_CATEGORY_ENGINEERING
|
|
description = "Turns off a random amount of cameras."
|
|
|
|
/datum/round_event/camera_failure
|
|
fakeable = FALSE
|
|
|
|
/datum/round_event/camera_failure/start()
|
|
var/iterations = 1
|
|
var/list/cameras = GLOB.cameranet.cameras.Copy()
|
|
while(prob(round(100/iterations)))
|
|
var/obj/machinery/camera/C = pick_n_take(cameras)
|
|
if (!C)
|
|
break
|
|
if (!("ss13" in C.network))
|
|
continue
|
|
if(C.status)
|
|
C.toggle_cam(null, 0)
|
|
iterations *= 2.5
|