From 53482e6bd6f8557e2f631ff5efdd9879fff8d9c5 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Mon, 27 Jul 2020 00:52:35 +0200 Subject: [PATCH] modifies the ark, aswell as changing a tiny bit of stuff for stable gateways The ark no longer immediately activates when summoned. Instead, an cultist needs to activate it. Once on, it cannot be turned off again save by destroying it. Also, the stable-gateway deactivation doafter now has an actual beam-animation. --- .../clock_effects/spatial_gateway.dm | 8 ++--- .../ark_of_the_clockwork_justicar.dm | 29 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm index 25ff4a158a..434343c336 100644 --- a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm +++ b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm @@ -264,18 +264,18 @@ /obj/effect/clockwork/spatial_gateway/stable/attackby(obj/item/I, mob/living/user, params) if(!istype(I, /obj/item/clockwork/slab) || !is_servant_of_ratvar(user) || busy) return ..() - user.visible_message("The rift begins to ripple as [user] points [user.p_their()] slab at it!", " You begin to shutdown the stabilised gateway with your slab.") - linked_gateway.visible_message("") busy = TRUE linked_gateway.busy = TRUE + user.visible_message("The rift begins to ripple as [user] points [user.p_their()] slab at it!", " You begin to shutdown the stabilised gateway with your slab.") + linked_gateway.visible_message("") + var/datum/beam/B = user.Beam(src, icon_state = "nzcrentrs_power", maxdistance = 50, time = 80) //Not too fancy, but this'll do.. for now. if(do_after(user, 80, target = src)) //Eight seconds to initiate the closing, then another two before is closes. to_chat(user, "You successfully set the gateway to shutdown in another two seconds.") start_shutdown() + qdel(B) busy = FALSE linked_gateway.busy = FALSE return TRUE - //Not too fancy, but this'll do.. for now. - /obj/effect/clockwork/spatial_gateway/stable/proc/start_shutdown() deltimer(timerid) diff --git a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm index 6b95ecc442..8aa0581ce4 100644 --- a/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm +++ b/code/modules/antagonists/clockcult/clock_structures/ark_of_the_clockwork_justicar.dm @@ -45,12 +45,11 @@ if(.) return if(!active && is_servant_of_ratvar(user) && user.canUseTopic(src, !issilicon(user), NO_DEXTERY)) - var/choice = alert(user,"Enabling the ark", "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Activate!", "Cancel") - switch(choice) - if("Activate!") - START_PROCESSING(SSprocessing, src) - else - to_chat(user, "You decide against activating the ark.. for now.") + if(alert(user, "Are you sure you want to activate the ark? Once enabled, there will be no turning back.", "Enabling the ark", "Activate!", "Cancel") == "Activate!") + START_PROCESSING(SSprocessing, src) + SSshuttle.registerHostileEnvironment(src) + else + to_chat(user, "You decide against activating the ark.. for now.") /obj/structure/destructible/clockwork/massive/celestial_gateway/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() @@ -125,12 +124,8 @@ for(var/mob/living/L in T) L.forceMove(pick(open_turfs)) glow = new(get_turf(src)) - countdown = new(src) - countdown.start() var/area/gate_area = get_area(src) hierophant_message("An Ark of the Clockwork Justicar has been created in [gate_area.map_name]!", FALSE, src) - SSshuttle.registerHostileEnvironment(src) - START_PROCESSING(SSprocessing, src) /obj/structure/destructible/clockwork/massive/celestial_gateway/proc/initiate_mass_recall() recalling = TRUE @@ -272,6 +267,9 @@ obj/structure/destructible/clockwork/massive/celestial_gateway/Destroy() if(!step_away(O, src, 2) || get_dist(O, src) < 2) O.take_damage(50, BURN, "bomb") O.update_icon() + + conversion_pulse() //Converts the nearby area into clockcult-style + for(var/V in GLOB.player_list) var/mob/M = V var/turf/T = get_turf(M) @@ -330,6 +328,17 @@ obj/structure/destructible/clockwork/massive/celestial_gateway/Destroy() T.ratvar_act(dist) CHECK_TICK +//Converts nearby turfs into their clockwork equivalent, with ever-increasing range the closer the ark is to summoning Ratvar +/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/conversion_pulse() + var/convert_dist = 1 + (round(FLOOR(progress_in_seconds, 15) * 0.067)) + for(var/t in RANGE_TURFS(convert_dist, loc)) + var/turf/T = t + if(!T) + continue + var/dist = cheap_hypotenuse(T.x, T.y, x, y) + if(dist < convert_dist) + T.ratvar_act(FALSE, TRUE, 3) + //ATTACK GHOST IGNORING PARENT RETURN VALUE /obj/structure/destructible/clockwork/massive/celestial_gateway/attack_ghost(mob/user) if(!IsAdminGhost(user))