diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm
index c4b5c5caae..66dafe2e8f 100644
--- a/code/game/area/Space_Station_13_areas.dm
+++ b/code/game/area/Space_Station_13_areas.dm
@@ -649,6 +649,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
icon_state = "chapel"
ambientsounds = list('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
flags_1 = NONE
+ clockwork_warp_allowed = FALSE
+ clockwork_warp_fail = "The consecration here prevents you from warping in."
/area/chapel/main
name = "Chapel"
@@ -706,6 +708,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/engine/gravity_generator
name = "Gravity Generator Room"
icon_state = "grav_gen"
+ clockwork_warp_allowed = FALSE
+ clockwork_warp_fail = "The gravitons generated here could throw off your warp's destination and possibly throw you into deep space."
/area/engine/secure_construction
name = "Secure Construction Area"
@@ -1276,10 +1280,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
/area/storage/eva
name = "EVA Storage"
icon_state = "eva"
+ clockwork_warp_allowed = FALSE
/area/storage/secure
name = "Secure Storage"
icon_state = "storage"
+ clockwork_warp_allowed = FALSE
/area/storage/emergency/starboard
name = "Starboard Emergency Storage"
@@ -1442,6 +1448,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
// Telecommunications Satellite
/area/tcommsat
+ clockwork_warp_allowed = FALSE
+ clockwork_warp_fail = "For safety reasons, warping here is disallowed; the radio and bluespace noise could cause catastrophic results."
ambientsounds = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
/area/tcommsat/entrance
diff --git a/code/game/area/ai_monitored.dm b/code/game/area/ai_monitored.dm
index 75548ff81e..e21d4e273b 100644
--- a/code/game/area/ai_monitored.dm
+++ b/code/game/area/ai_monitored.dm
@@ -1,5 +1,6 @@
/area/ai_monitored
name = "AI Monitored Area"
+ clockwork_warp_allowed = FALSE
var/list/obj/machinery/camera/motioncameras = list()
var/list/motionTargets = list()
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index ac2fa4be01..2d372d4c33 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -14,6 +14,8 @@
var/valid_territory = TRUE // If it's a valid territory for gangs to claim
var/blob_allowed = TRUE // Does it count for blobs score? By default, all areas count.
+ var/clockwork_warp_allowed = TRUE // Can servants warp into this area from Reebe?
+ var/clockwork_warp_fail = "The structure there is too dense for warping to pierce. (This is normal in high-security areas.)"
var/eject = null
diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm
index 803514adcb..d9d47bd771 100644
--- a/code/game/gamemodes/clock_cult/clock_cult.dm
+++ b/code/game/gamemodes/clock_cult/clock_cult.dm
@@ -1,3 +1,5 @@
+GLOBAL_VAR_INIT(servants_active, FALSE) //This var controls whether or not a lot of the cult's structures work or not
+
/*
CLOCKWORK CULT: Based off of the failed pull requests from /vg/
@@ -143,11 +145,7 @@ Credit where due:
equip_servant(L)
add_servant_of_ratvar(L, TRUE)
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar //that's a mouthful
- G.initial_activation_delay = ark_time * 60
- G.seconds_until_activation = ark_time * 60 //60 seconds in a minute * number of minutes
- for(var/obj/item/clockwork/construct_chassis/cogscarab/C in GLOB.all_clockwork_objects)
- C.infinite_resources = FALSE
- SSshuttle.registerHostileEnvironment(GLOB.ark_of_the_clockwork_justiciar)
+ G.final_countdown(ark_time)
..()
return 1
diff --git a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm
index ee782b1127..acf6e43974 100644
--- a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm
+++ b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm
@@ -86,7 +86,7 @@
/obj/item/clockwork/construct_chassis/cogscarab/Initialize()
. = ..()
- if(istype(SSticker.mode, /datum/game_mode/clockwork_cult))
+ if(GLOB.servants_active)
infinite_resources = FALSE //For any that are somehow spawned in late
/obj/item/clockwork/construct_chassis/cogscarab/pre_spawn()
diff --git a/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm
index dbb748ef89..201ce11cf6 100644
--- a/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm
+++ b/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm
@@ -34,6 +34,16 @@
GLOB.ark_of_the_clockwork_justiciar = src
START_PROCESSING(SSprocessing, src)
+/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/final_countdown(ark_time)
+ if(!ark_time)
+ ark_time = 30 //minutes
+ initial_activation_delay = ark_time * 60
+ seconds_until_activation = ark_time * 60 //60 seconds in a minute * number of minutes
+ for(var/obj/item/clockwork/construct_chassis/cogscarab/C in GLOB.all_clockwork_objects)
+ C.infinite_resources = FALSE
+ GLOB.servants_active = TRUE
+ SSshuttle.registerHostileEnvironment(src)
+
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/cry_havoc()
visible_message("[src] shudders and roars to life, its parts beginning to whirr and screech!")
hierophant_message("The Ark is activating! Get back to the base!")
@@ -255,6 +265,20 @@
T.ratvar_act(dist)
CHECK_TICK
+/obj/structure/destructible/clockwork/massive/celestial_gateway/attack_ghost(mob/user)
+ if(!user.client || !user.client.holder)
+ return
+ if(GLOB.servants_active)
+ to_chat(user, "The Ark is already counting down.")
+ return
+ if(alert(user, "Activate the Ark's countdown?", name, "Yes", "No") == "Yes")
+ if(alert(user, "REALLY activate the Ark's countdown?", name, "Yes", "No") == "Yes")
+ if(alert(user, "You're REALLY SURE? This cannot be undone.", name, "Yes - Activate the Ark", "No") == "Yes - Activate the Ark")
+ message_admins("Admin [key_name_admin(user)] started the Ark's countdown!")
+ to_chat(user, "The gamemode is now being treated as clockwork cult, and the Ark is counting down from 30 \
+ minutes. You will need to create servant players yourself.")
+ final_countdown(35)
+
//the actual appearance of the Ark of the Clockwork Justicar; an object so the edges of the gate can be clicked through.
diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm
index 9f252effa6..bf772a157f 100644
--- a/code/game/machinery/computer/camera_advanced.dm
+++ b/code/game/machinery/computer/camera_advanced.dm
@@ -281,7 +281,7 @@
/datum/action/innate/servant_warp/Activate()
if(QDELETED(target) || !(ishuman(owner) || iscyborg(owner)) || !owner.canUseTopic(target) || warping)
return
- if(!istype(SSticker.mode, /datum/game_mode/clockwork_cult)) //No leaving unless there's servants from the get-go
+ if(!GLOB.servants_active) //No leaving unless there's servants from the get-go
return
var/mob/living/carbon/human/user = owner
var/mob/camera/aiEye/remote/remote_eye = user.remote_control
@@ -296,8 +296,8 @@
to_chat(user, "[prob(1) ? "Servant cannot into space." : "You can't teleport into space."]")
return
var/area/AR = get_area(T)
- if(istype(AR, /area/ai_monitored))
- to_chat(user, "The structure there is too dense for [src] to pierce. (This is normal in high-security areas.)")
+ if(!AR.clockwork_warp_allowed)
+ to_chat(user, "[AR.clockwork_warp_fail]")
return
if(alert(user, "Are you sure you want to warp to [AR]?", target.name, "Warp", "Cancel") == "Cancel" || QDELETED(R) || !user.canUseTopic(R))
return