diff --git a/code/__DEFINES/clockcult.dm b/code/__DEFINES/clockcult.dm
index 504dcb27e96..3bc8ff23a82 100644
--- a/code/__DEFINES/clockcult.dm
+++ b/code/__DEFINES/clockcult.dm
@@ -6,6 +6,7 @@ var/global/list/all_clockwork_objects = list() //All clockwork items, structures
var/global/list/all_clockwork_mobs = list() //All clockwork SERVANTS (not creatures) in existence
var/global/list/clockwork_component_cache = list("belligerent_eye" = 0, "vanguard_cogwheel" = 0, "guvax_capacitor" = 0, "replicant_alloy" = 0, "hierophant_ansible" = 0) //The pool of components that caches draw from
var/global/ratvar_awakens = FALSE //If Ratvar has been summoned
+var/global/clockwork_gateway_activated = FALSE //if a gateway to the celestial derelict has ever been successfully activated
#define SCRIPTURE_PERIPHERAL "Peripheral" //Scripture tiers; peripherals should never be used
#define SCRIPTURE_DRIVER "Driver"
@@ -47,3 +48,11 @@ var/global/ratvar_awakens = FALSE //If Ratvar has been summoned
#define GATEWAY_RATVAR_COMING 250 //when progress is at or above this, ratvar has entered and is coming through the gateway
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
+
+//Objective defines
+
+#define CLOCKCULT_GATEWAY "gateway"
+
+#define CLOCKCULT_ESCAPE "escape"
+
+#define CLOCKCULT_SILICONS "silicons"
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 02287efea2b..f4afbe8179e 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -287,7 +287,10 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
for(var/obj/structure/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
var/area/gate_area = get_area(G)
desc += "Ark Location: [uppertext(gate_area.map_name)]
"
- desc += "Seconds until Ratvar's arrival: [G.get_arrival_text(TRUE)]
"
+ if(G.ratvar_portal)
+ desc += "Seconds until Ratvar's arrival: [G.get_arrival_text(TRUE)]
"
+ else
+ desc += "Seconds until Proselytization: [G.get_arrival_text(TRUE)]
"
if(unconverted_ai_exists)
desc += "An unconverted AI exists!
"
if(scripture_states[SCRIPTURE_REVENANT])
diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm
index af87096c7a1..63397149602 100644
--- a/code/game/gamemodes/clock_cult/clock_cult.dm
+++ b/code/game/gamemodes/clock_cult/clock_cult.dm
@@ -16,7 +16,6 @@ Components, which are fallen fragments of Ratvar's body as he rusts in Reebe, ar
Game-wise, clockwork slabs will generate components over time, with more powerful components being slower.
This file's folder contains:
- __clock_defines.dm: Defined variables
clock_cult.dm: Core gamemode files.
clock_items.dm: Items (excluding the proselytizer).
clock_machines.dm: Machinery like the mending motor.
@@ -27,6 +26,7 @@ This file's folder contains:
clock_structures.dm: Structures and effects
clock_unsorted.dm: Anything else with no place to be
+ clockcult defines are in __DEFINES/clockcult.dm
*/
///////////
@@ -183,7 +183,7 @@ This file's folder contains:
var/list/servants_of_ratvar = list() //The Enlightened servants of Ratvar
var/required_escapees = 0 //How many servants need to escape, if applicable
var/required_silicon_converts = 0 //How many robotic lifeforms need to be converted, if applicable
- var/clockwork_objective = "gateway" //The objective that the servants must fulfill
+ var/clockwork_objective = CLOCKCULT_GATEWAY //The objective that the servants must fulfill
var/clockwork_explanation = "Construct a Gateway to the Celestial Derelict and free Ratvar." //The description of the current objective
/datum/game_mode/clockwork_cult
@@ -237,20 +237,20 @@ This file's folder contains:
return 1
/datum/game_mode/clockwork_cult/proc/forge_clock_objectives() //Determine what objective that Ratvar's servants will fulfill
- var/list/possible_objectives = list("escape", "gateway")
+ var/list/possible_objectives = list(CLOCKCULT_ESCAPE, CLOCKCULT_GATEWAY)
var/silicons_possible = FALSE
for(var/mob/living/silicon/S in living_mob_list)
silicons_possible = TRUE
if(silicons_possible)
- possible_objectives += "silicons"
+ possible_objectives += CLOCKCULT_SILICONS
clockwork_objective = pick(possible_objectives)
switch(clockwork_objective)
- if("escape")
+ if(CLOCKCULT_ESCAPE)
required_escapees = round(max(1, roundstart_player_count / 3)) //33% of the player count must be cultists
clockwork_explanation = "Ensure that [required_escapees] servants of Ratvar escape from [station_name()]."
- if("gateway")
+ if(CLOCKCULT_GATEWAY)
clockwork_explanation = "Construct a Gateway to the Celestial Derelict and free Ratvar."
- if("silicons")
+ if(CLOCKCULT_SILICONS)
clockwork_explanation = "Ensure that all active silicon-based lifeforms on [station_name()] are servants of Ratvar by the end of the shift."
return 1
@@ -291,16 +291,16 @@ This file's folder contains:
/datum/game_mode/clockwork_cult/proc/check_clockwork_victory()
switch(clockwork_objective)
- if("escape")
+ if(CLOCKCULT_ESCAPE)
var/surviving_servants = 0
for(var/datum/mind/M in servants_of_ratvar)
if(M.current && M.current.stat != DEAD && (M.current.onCentcom() || M.current.onSyndieBase()))
surviving_servants++
- clockwork_explanation = "Ensure that [required_escapees] servant(s) of Ratvar escape from [station_name()]. [surviving_servants] managed to escape!"
+ clockwork_explanation = "Ensure that [required_escapees] servant(s) of Ratvar escape from [station_name()].
[surviving_servants] managed to escape!"
if(surviving_servants >= required_escapees)
return TRUE
return FALSE
- if("silicons")
+ if(CLOCKCULT_SILICONS)
var/total_silicons = 0
var/valid_silicons = 0
var/successful = TRUE
@@ -314,10 +314,10 @@ This file's folder contains:
valid_silicons++
if(valid_silicons < total_silicons)
successful = FALSE
- clockwork_explanation = "Ensure that all active silicon-based lifeforms on [station_name()] are servants of Ratvar by the end of the shift. \
+ clockwork_explanation = "Ensure that all active silicon-based lifeforms on [station_name()] are servants of Ratvar by the end of the shift.
\
[valid_silicons]/[total_silicons] silicons were killed or converted!"
return successful
- if("gateway")
+ if(CLOCKCULT_GATEWAY)
return ratvar_awakens
return FALSE //This shouldn't ever be reached, but just in case it is
@@ -334,7 +334,7 @@ This file's folder contains:
feedback_set_details("round_end_result", "win - servants completed their objective ([clockwork_objective])")
else
var/half_victory = FALSE
- if(clockwork_objective == "gateway")
+ if(clockwork_objective == CLOCKCULT_GATEWAY)
var/obj/structure/clockwork/massive/celestial_gateway/G = locate() in all_clockwork_objects
if(G)
half_victory = TRUE
diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm
index 23481a508a9..64ef6c515cd 100644
--- a/code/game/gamemodes/clock_cult/clock_ratvar.dm
+++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm
@@ -13,6 +13,9 @@
poi_list -= src
return ..()
+/obj/structure/clockwork/massive/singularity_pull(S, current_size)
+ return
+
/obj/structure/clockwork/massive/celestial_gateway //The gateway to Reebe, from which Ratvar emerges
name = "Gateway to the Celestial Derelict"
desc = "A massive, thrumming rip in spacetime."
@@ -29,6 +32,7 @@
var/first_sound_played = FALSE
var/second_sound_played = FALSE
var/third_sound_played = FALSE
+ var/ratvar_portal = TRUE //if the gateway actually summons ratvar or just produces a hugeass conversion burst
var/obj/effect/clockwork/overlay/gateway_glow/glow
var/obj/effect/countdown/clockworkgate/countdown
@@ -120,23 +124,48 @@
sleep(125)
make_glow()
animate(glow, transform = matrix() * 3, alpha = 0, time = 5)
- sleep(5)
- new/obj/structure/clockwork/massive/ratvar(get_turf(src))
- qdel(src)
+ var/turf/startpoint = get_turf(src)
+ sleep(3)
+ QDEL_IN(src, 3)
+ clockwork_gateway_activated = TRUE
+ if(ratvar_portal)
+ new/obj/structure/clockwork/massive/ratvar(startpoint)
+ else
+ world << "\"[text2ratvar("Behold")]!\"\n\"[text2ratvar("See Engine's mercy")]!\"\n\
+ \"[text2ratvar("Observe Engine's design skills")]!\"\n\"[text2ratvar("Behold Engine's light")]!!\"\n\
+ \"[text2ratvar("Gaze upon Engine's power")]!\""
+ world << 'sound/magic/clockwork/invoke_general.ogg'
+ var/x0 = startpoint.x
+ var/y0 = startpoint.y
+ for(var/I in spiral_range_turfs(255, startpoint))
+ var/turf/T = I
+ if(!T)
+ continue
+ var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)
+ if(dist < 60)
+ dist = TRUE
+ else
+ dist = FALSE
+ T.ratvar_act(dist)
+ CHECK_TICK
+ for(var/I in all_clockwork_mobs)
+ var/mob/M = I
+ if(M.stat == CONSCIOUS)
+ clockwork_say(M, text2ratvar(pick("Purge all untruths and honor Engine!", "All glory to Engine's light!", "Engine's power is unmatched!")))
/obj/structure/clockwork/massive/celestial_gateway/examine(mob/user)
icon_state = "spatial_gateway" //cheat wildly by pretending to have an icon
..()
icon_state = initial(icon_state)
if(is_servant_of_ratvar(user) || isobserver(user))
- user << "Seconds until Ratvar's arrival: [get_arrival_text(TRUE)]"
+ user << "Seconds until [ratvar_portal ? "Ratvar's arrival":"Proselytization"]: [get_arrival_text(TRUE)]"
switch(progress_in_seconds)
if(-INFINITY to GATEWAY_REEBE_FOUND)
user << "It's still opening."
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
user << "It's reached the Celestial Derelict and is drawing power from it."
if(GATEWAY_RATVAR_COMING to INFINITY)
- user << "Ratvar is coming through the gateway!"
+ user << "[ratvar_portal ? "Ratvar is coming through the gateway":"The gateway is glowing with massed power"]!"
else
switch(progress_in_seconds)
if(-INFINITY to GATEWAY_REEBE_FOUND)
@@ -144,7 +173,7 @@
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
user << "It seems to be leading somewhere."
if(GATEWAY_RATVAR_COMING to INFINITY)
- user << "Something is coming through!"
+ user << "[ratvar_portal ? "Something is coming through":"It's glowing brightly"]!"
/obj/effect/clockwork/overlay/gateway_glow //the actual appearance of the Gateway to the Celestial Derelict; an object so the edges of the gate can be clicked through.
icon = 'icons/effects/96x96.dmi'
@@ -170,11 +199,11 @@
/obj/structure/clockwork/massive/ratvar/New()
..()
- ratvar_awakens = TRUE
+ ratvar_awakens++
for(var/obj/item/clockwork/ratvarian_spear/R in all_clockwork_objects)
R.update_force()
START_PROCESSING(SSobj, src)
- world << "\"[text2ratvar("ONCE AGAIN MY LIGHT SHALL SHINE ACROSS THIS PATHETIC REALM")]!!\""
+ world << "\"[text2ratvar("ONCE AGAIN MY LIGHT SHALL SHINE ACROSS THIS PATHETIC REALM")]!!\""
world << 'sound/effects/ratvar_reveal.ogg'
var/image/alert_overlay = image('icons/effects/clockwork_effects.dmi', "ratvar_alert")
var/area/A = get_area(src)
@@ -183,7 +212,7 @@
/obj/structure/clockwork/massive/ratvar/Destroy()
- ratvar_awakens = FALSE
+ ratvar_awakens--
for(var/obj/item/clockwork/ratvarian_spear/R in all_clockwork_objects)
R.update_force()
STOP_PROCESSING(SSobj, src)
@@ -201,8 +230,9 @@
/obj/structure/clockwork/massive/ratvar/Bump(atom/A)
- forceMove(get_turf(A))
- A.ratvar_act()
+ var/turf/T = get_turf(A)
+ forceMove(T)
+ T.ratvar_act()
/obj/structure/clockwork/massive/ratvar/Process_Spacemove()
@@ -212,8 +242,12 @@
/obj/structure/clockwork/massive/ratvar/process()
if(clashing) //I'm a bit occupied right now, thanks
return
- for(var/atom/A in range(proselytize_range, src))
- A.ratvar_act()
+ for(var/I in circlerangeturfs(src, proselytize_range))
+ var/turf/T = I
+ T.ratvar_act()
+ for(var/I in circleviewturfs(src, round(proselytize_range * 0.5)))
+ var/turf/T = I
+ T.ratvar_act(1)
var/dir_to_step_in = pick(cardinal)
if(!prey)
for(var/obj/singularity/narsie/N in poi_list)
diff --git a/code/game/gamemodes/clock_cult/clock_scripture.dm b/code/game/gamemodes/clock_cult/clock_scripture.dm
index e447b813e77..6d59ad2de81 100644
--- a/code/game/gamemodes/clock_cult/clock_scripture.dm
+++ b/code/game/gamemodes/clock_cult/clock_scripture.dm
@@ -1226,7 +1226,7 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
/datum/clockwork_scripture/ark_of_the_clockwork_justiciar //Ark of the Clockwork Justiciar: Creates a Gateway to the Celestial Derelict.
- descname = "Summon Ratvar"
+ descname = "Win Condition"
name = "Ark of the Clockwork Justiciar"
desc = "Pulls from the power of all of Ratvar's servants and generals to construct a massive machine used to tear apart a rift in spacetime to the Celestial Derelict. This gateway will \
call forth Ratvar from his exile after some time."
@@ -1236,55 +1236,83 @@ Judgement: 10 servants, 100 CV, and any existing AIs are converted or destroyed
channel_time = 150
required_components = list("belligerent_eye" = 10, "vanguard_cogwheel" = 10, "guvax_capacitor" = 10, "replicant_alloy" = 10, "hierophant_ansible" = 10)
consumed_components = list("belligerent_eye" = 10, "vanguard_cogwheel" = 10, "guvax_capacitor" = 10, "replicant_alloy" = 10, "hierophant_ansible" = 10)
- invokers_required = 4
+ invokers_required = 5
multiple_invokers_used = TRUE
- usage_tip = "The gateway is completely vulnerable to attack during its five-minute duration. In addition to preventing shuttle departure, it will periodically give indication of its general \
- position to everyone on the station as well as being loud enough to be heard throughout the entire sector. Defend it with your life!"
+ usage_tip = "The gateway is completely vulnerable to attack during its five-minute duration. It will periodically give indication of its general position to everyone on the station \
+ as well as being loud enough to be heard throughout the entire sector. Defend it with your life!"
tier = SCRIPTURE_JUDGEMENT
+/datum/clockwork_scripture/ark_of_the_clockwork_justiciar/New()
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective != CLOCKCULT_GATEWAY)
+ invocations = list("ARMORER! FRIGHT! AMPERAGE! VANGUARD! I CALL UPON YOU!!", \
+ "THIS STATION WILL BE A BEACON OF HOPE IN THE DARKNESS OF SPACE!!", \
+ "HELP US MAKE THIS SHOW ENGINE'S GLORY!!")
+ ..()
+
/datum/clockwork_scripture/ark_of_the_clockwork_justiciar/check_special_requirements()
- if(!slab.no_cost && ratvar_awakens)
- invoker << "\"I am already here, idiot.\""
- return 0
- for(var/obj/structure/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
- var/area/gate_area = get_area(G)
- invoker << "There is already a gateway at [gate_area.map_name]!"
- return 0
- var/area/A = get_area(invoker)
- if(!slab.no_cost && (invoker.z != ZLEVEL_STATION || istype(A, /area/shuttle)))
- invoker << "You must be on the station to activate the Ark!"
- return 0
- if(!slab.no_cost && ticker.mode.clockwork_objective != "gateway")
- invoker << "As painful as it is, Ratvar's will is not to be freed!"
- return 0
+ if(!slab.no_cost)
+ if(ratvar_awakens)
+ invoker << "\"I am already here, idiot.\""
+ return 0
+ for(var/obj/structure/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
+ var/area/gate_area = get_area(G)
+ invoker << "There is already a gateway at [gate_area.map_name]!"
+ return 0
+ var/area/A = get_area(invoker)
+ var/turf/T = get_turf(invoker)
+ if(!T || T.z != ZLEVEL_STATION || istype(A, /area/shuttle))
+ invoker << "You must be on the station to activate the Ark!"
+ return 0
+ if(clockwork_gateway_activated)
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective != CLOCKCULT_GATEWAY)
+ invoker << "\"Look upon his works. Is it not glorious?\""
+ else
+ invoker << "Ratvar's recent banishment renders him too weak to be wrung forth from Reebe!"
+ return 0
return 1
/datum/clockwork_scripture/ark_of_the_clockwork_justiciar/scripture_effects()
var/turf/T = get_turf(invoker)
new/obj/effect/clockwork/general_marker/inathneq(T)
- T.visible_message("\"[text2ratvar("Engine, come forth and show your servants your mercy!")]\"")
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective == CLOCKCULT_GATEWAY)
+ T.visible_message("\"[text2ratvar("Engine, come forth and show your servants your mercy!")]\"")
+ else
+ T.visible_message("\"[text2ratvar("We will show all the mercy of Engine!")]\"")
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 30, 0)
sleep(10)
if(!check_special_requirements())
return 0
new/obj/effect/clockwork/general_marker/sevtug(T)
- T.visible_message("\"[text2ratvar("Engine, come forth and show this station your decorating skills!")]\"")
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective == CLOCKCULT_GATEWAY)
+ T.visible_message("\"[text2ratvar("Engine, come forth and show this station your decorating skills!")]\"")
+ else
+ T.visible_message("\"[text2ratvar("We will show all Engine's decorating skills.")]\"")
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 45, 0)
sleep(10)
if(!check_special_requirements())
return 0
new/obj/effect/clockwork/general_marker/nezbere(T)
- T.visible_message("\"[text2ratvar("Engine, come forth and shine your light across this realm!")]\"")
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective == CLOCKCULT_GATEWAY)
+ T.visible_message("\"[text2ratvar("Engine, come forth and shine your light across this realm!!")]\"")
+ else
+ T.visible_message("\"[text2ratvar("We will show all Engine's light!!")]\"")
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 60, 0)
sleep(10)
if(!check_special_requirements())
return 0
new/obj/effect/clockwork/general_marker/nzcrentr(T)
- T.visible_message("\"[text2ratvar("Engine, come forth.")]\"")
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective == CLOCKCULT_GATEWAY)
+ T.visible_message("\"[text2ratvar("Engine, come forth.")]\"")
+ else
+ T.visible_message("\"[text2ratvar("We will show all Engine's power!")]\"")
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 75, 0)
sleep(10)
if(check_special_requirements())
- new/obj/structure/clockwork/massive/celestial_gateway(T)
+ var/obj/structure/clockwork/massive/celestial_gateway/CG = new/obj/structure/clockwork/massive/celestial_gateway(T)
+ if(ticker && ticker.mode && ticker.mode.clockwork_objective != CLOCKCULT_GATEWAY)
+ CG.ratvar_portal = FALSE
+ hierophant_message("This newly constructed gateway will not free Ratvar, \
+ and will instead simply proselytize and convert everything and everyone on the station.", TRUE)
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 100, 0)
var/list/open_turfs = list()
for(var/turf/open/OT in orange(1, T))
diff --git a/code/game/gamemodes/clock_cult/clock_structures.dm b/code/game/gamemodes/clock_cult/clock_structures.dm
index e0fc254e1ea..cddd9cb68af 100644
--- a/code/game/gamemodes/clock_cult/clock_structures.dm
+++ b/code/game/gamemodes/clock_cult/clock_structures.dm
@@ -653,6 +653,9 @@
/obj/effect/clockwork/overlay/ex_act()
return FALSE
+/obj/effect/clockwork/overlay/singularity_pull(S, current_size)
+ return
+
/obj/effect/clockwork/overlay/Destroy()
if(linked)
linked = null
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index 45b62caf01d..866daf1fbe1 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -55,7 +55,7 @@
take_damage(rand(10,30), BRUTE, 0)
/obj/machinery/computer/ratvar_act()
- if(!clockwork && prob(20))
+ if(!clockwork)
clockwork = TRUE
icon_screen = "ratvar[rand(1, 4)]"
icon_keyboard = "ratvar_key[rand(1, 6)]"
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index 276380f9e27..224d5e23110 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -156,12 +156,11 @@ var/list/airlock_overlays = list()
qdel(src)
/obj/machinery/door/airlock/ratvar_act() //Airlocks become pinion airlocks that only allow servants
- if(prob(20))
- if(glass)
- new/obj/machinery/door/airlock/clockwork/brass(get_turf(src))
- else
- new/obj/machinery/door/airlock/clockwork(get_turf(src))
- qdel(src)
+ if(glass)
+ new/obj/machinery/door/airlock/clockwork/brass(get_turf(src))
+ else
+ new/obj/machinery/door/airlock/clockwork(get_turf(src))
+ qdel(src)
/obj/machinery/door/airlock/Destroy()
qdel(wires)
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index 769d08cb838..8ad89e2f465 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -352,13 +352,6 @@
/obj/machinery/door/airlock/cult/narsie_act()
return
-/obj/machinery/door/airlock/cult/ratvar_act()
- ..()
- if(src)
- var/previouscolor = color
- color = "#FAE48C"
- animate(src, color = previouscolor, time = 8)
-
/obj/machinery/door/airlock/cult/friendly
friendly = TRUE
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 2babb9a44c1..a85e3bd2bd6 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -196,9 +196,8 @@
color = "#7D1919"
/obj/machinery/door/window/ratvar_act()
- if(prob(20))
- new/obj/machinery/door/window/clockwork(src.loc, dir)
- qdel(src)
+ new/obj/machinery/door/window/clockwork(src.loc, dir)
+ qdel(src)
/obj/machinery/door/window/bullet_act(obj/item/projectile/P)
. = ..()
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index a3f753c6de1..a3db02000e7 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -25,12 +25,11 @@
take_damage(rand(5,10), BRUTE, 0)
/obj/structure/grille/ratvar_act()
- if(prob(20))
- if(destroyed)
- new /obj/structure/grille/ratvar/broken(src.loc)
- else
- new /obj/structure/grille/ratvar(src.loc)
- qdel(src)
+ if(destroyed)
+ new /obj/structure/grille/ratvar/broken(src.loc)
+ else
+ new /obj/structure/grille/ratvar(src.loc)
+ qdel(src)
/obj/structure/grille/blob_act(obj/effect/blob/B)
qdel(src)
diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm
index 1d5fab163d8..5f165715ed1 100644
--- a/code/game/objects/structures/table_frames.dm
+++ b/code/game/objects/structures/table_frames.dm
@@ -79,9 +79,8 @@
qdel(src)
/obj/structure/table_frame/ratvar_act()
- if(prob(20))
- new /obj/structure/table_frame/brass(src.loc)
- qdel(src)
+ new /obj/structure/table_frame/brass(src.loc)
+ qdel(src)
/*
* Wooden Frames
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 4d8bb9c3702..552dd8a0362 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -62,8 +62,7 @@
new /obj/structure/table/wood(src.loc)
/obj/structure/table/ratvar_act()
- if(prob(20))
- new /obj/structure/table/reinforced/brass(src.loc)
+ new /obj/structure/table/reinforced/brass(src.loc)
/obj/structure/table/mech_melee_attack(obj/mecha/M)
playsound(src.loc, 'sound/weapons/punch4.ogg', 50, 1)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 8c89c8f8a0b..f5bf62d01a6 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -74,12 +74,11 @@
shard.color = NARSIE_WINDOW_COLOUR
/obj/structure/window/ratvar_act()
- if(prob(20))
- if(!fulltile)
- new/obj/structure/window/reinforced/clockwork(get_turf(src), dir)
- else
- new/obj/structure/window/reinforced/clockwork/fulltile(get_turf(src))
- qdel(src)
+ if(!fulltile)
+ new/obj/structure/window/reinforced/clockwork(get_turf(src), dir)
+ else
+ new/obj/structure/window/reinforced/clockwork/fulltile(get_turf(src))
+ qdel(src)
/obj/structure/window/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm
index b41861c5448..3766ed75826 100644
--- a/code/game/turfs/simulated/floor.dm
+++ b/code/game/turfs/simulated/floor.dm
@@ -170,9 +170,14 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
if(prob(20))
ChangeTurf(/turf/open/floor/engine/cult)
-/turf/open/floor/ratvar_act()
- if(prob(20))
+/turf/open/floor/ratvar_act(force)
+ var/converted = (prob(40) || force)
+ if(converted)
ChangeTurf(/turf/open/floor/clockwork)
+ for(var/I in src)
+ var/atom/A = I
+ if(ismob(A) || converted)
+ A.ratvar_act()
/turf/open/floor/initialize()
..()
diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm
index aa00c9eb8a9..86f5d417620 100644
--- a/code/game/turfs/simulated/floor/misc_floor.dm
+++ b/code/game/turfs/simulated/floor/misc_floor.dm
@@ -187,7 +187,8 @@
return ..()
/turf/open/floor/clockwork/ratvar_act()
- return 0
+ for(var/mob/M in src)
+ M.ratvar_act()
/turf/open/floor/clockwork/narsie_act()
..()
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 449eda6d469..9b5f0026e1a 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -256,9 +256,14 @@
if(prob(20))
ChangeTurf(/turf/closed/wall/mineral/cult)
-/turf/closed/wall/ratvar_act()
- if(prob(20))
+/turf/closed/wall/ratvar_act(force)
+ var/converted = (prob(40) || force)
+ if(converted)
ChangeTurf(/turf/closed/wall/clockwork)
+ for(var/I in src)
+ var/atom/A = I
+ if(ismob(A) || converted)
+ A.ratvar_act()
/turf/closed/wall/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
return 0
diff --git a/code/game/turfs/simulated/walls_misc.dm b/code/game/turfs/simulated/walls_misc.dm
index 484f2fdc523..d407cbfcf1c 100644
--- a/code/game/turfs/simulated/walls_misc.dm
+++ b/code/game/turfs/simulated/walls_misc.dm
@@ -94,7 +94,8 @@
return ..()
/turf/closed/wall/clockwork/ratvar_act()
- return 0
+ for(var/mob/M in src)
+ M.ratvar_act()
/turf/closed/wall/clockwork/narsie_act()
..()
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index cf46254a2f5..020a7d27e14 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -284,6 +284,9 @@
if(A.level >= affecting_level)
A.ex_act(severity, target)
+/turf/ratvar_act()
+ for(var/mob/M in src)
+ M.ratvar_act()
/turf/proc/add_blueprints(atom/movable/AM)
var/image/I = new
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index da9d63281a8..696aec45550 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -2,6 +2,7 @@
mob_list -= src
dead_mob_list -= src
living_mob_list -= src
+ all_clockwork_mobs -= src
if(observers && observers.len)
for(var/M in observers)
var/mob/dead/observe = M
diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm
index b99addac573..cd5f268c7d4 100644
--- a/interface/stylesheet.dm
+++ b/interface/stylesheet.dm
@@ -91,6 +91,7 @@ h1.alert, h2.alert {color: #000000;}
.heavy_brass {color: #BE8700; font-weight: bold; font-style: italic;}
.large_brass {color: #BE8700; font-size: 3;}
.big_brass {color: #BE8700; font-size: 3; font-weight: bold; font-style: italic;}
+.ratvar {color: #BE8700; font-size: 6; font-weight: bold; font-style: italic;}
.alloy {color: #42474D;}
.heavy_alloy {color: #42474D; font-weight: bold; font-style: italic;}
.large_alloy {color: #42474D; font-size: 3;}