mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
Adds the camera failure event (#20568)
* camera failure event * Increasing the amount * No disabling cameras on protected areas * scales up with number of engineers * Update code/modules/events/camerafailure.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> * conflict fix * better file name * better name part 2 * farie review * Apply suggestions from code review Co-authored-by: Farie82 <farie82@users.noreply.github.com> * Update code/modules/events/camera_failure.dm Co-authored-by: Farie82 <farie82@users.noreply.github.com> --------- Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: Farie82 <farie82@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/datum/event/camera_failure/start()
|
||||
var/failed_cameras
|
||||
var/failure_limit = rand(1, 3)
|
||||
for(var/obj/machinery/camera/C in shuffle(GLOB.cameranet.cameras))
|
||||
if(!("SS13" in C.network) || C.start_active) // We dont want protected cameras to be affected
|
||||
continue
|
||||
if(!C.status)
|
||||
continue
|
||||
C.toggle_cam(null, FALSE)
|
||||
failed_cameras++
|
||||
if(failed_cameras >= failure_limit)
|
||||
return
|
||||
@@ -140,8 +140,9 @@ GLOBAL_LIST_EMPTY(event_last_fired)
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Sentience", /datum/event/sentience, 50),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Wallrot", /datum/event/wallrot, 0, list(ASSIGNMENT_ENGINEER = 30, ASSIGNMENT_GARDENER = 50)),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Koi School", /datum/event/carp_migration/koi, 80),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Camera Failure", /datum/event/camera_failure, 100, list(ASSIGNMENT_ENGINEER = 10),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Fake Virus", /datum/event/fake_virus, 50),
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Disease Outbreak", /datum/event/disease_outbreak, 50, list(ASSIGNMENT_MEDICAL = 25), TRUE)
|
||||
new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Disease Outbreak", /datum/event/disease_outbreak, 50, list(ASSIGNMENT_MEDICAL = 25), TRUE))
|
||||
)
|
||||
|
||||
/datum/event_container/moderate
|
||||
|
||||
@@ -1602,6 +1602,7 @@
|
||||
#include "code\modules\events\apc_short.dm"
|
||||
#include "code\modules\events\blob_spawn.dm"
|
||||
#include "code\modules\events\brand_intelligence.dm"
|
||||
#include "code\modules\events\camera_failure.dm"
|
||||
#include "code\modules\events\carp_migration.dm"
|
||||
#include "code\modules\events\communications_blackout.dm"
|
||||
#include "code\modules\events\disease_outbreak.dm"
|
||||
|
||||
Reference in New Issue
Block a user