From 93672ea1e40d24bc319ce8bf8041795029d0530c Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Sun, 26 Jul 2020 23:00:29 +0200 Subject: [PATCH 1/2] modifies the ark to not immediately activate and purges some todos Tin --- .../clockcult/clock_effects/spatial_gateway.dm | 3 +-- .../ark_of_the_clockwork_justicar.dm | 13 ++++++++++++- .../clockcult/clock_structures/clockwork_obelisk.dm | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm index 528fe44601..25ff4a158a 100644 --- a/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm +++ b/code/modules/antagonists/clockcult/clock_effects/spatial_gateway.dm @@ -251,7 +251,6 @@ /obj/effect/clockwork/spatial_gateway/stable name = "stable gateway" is_stable = TRUE - //TODO: Icon for the gateway that looks a bit different /obj/effect/clockwork/spatial_gateway/stable/ex_act(severity) if(severity == 1) @@ -275,7 +274,7 @@ busy = FALSE linked_gateway.busy = FALSE return TRUE - //TODO: Add effect for this, maybe reuse the void blaster one from that PR? + //Not too fancy, but this'll do.. for now. /obj/effect/clockwork/spatial_gateway/stable/proc/start_shutdown() 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 c9203a81e5..6b95ecc442 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 @@ -39,7 +39,18 @@ glow = new(get_turf(src)) if(!GLOB.ark_of_the_clockwork_justiciar) GLOB.ark_of_the_clockwork_justiciar = src - START_PROCESSING(SSprocessing, src) + +/obj/structure/destructible/clockwork/massive/celestial_gateway/attack_hand(mob/living/user, act_intent = user.a_intent, unarmed_attack_flags) + . = ..() + 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.") /obj/structure/destructible/clockwork/massive/celestial_gateway/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() diff --git a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm index 3ca0e8692b..f4fa92df78 100644 --- a/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm +++ b/code/modules/antagonists/clockcult/clock_structures/clockwork_obelisk.dm @@ -53,7 +53,7 @@ if(!is_servant_of_ratvar(user) || !can_access_clockwork_power(src, hierophant_cost) || !anchored) to_chat(user, "You place your hand on [src], but it doesn't react.") return - var/choice = alert(user,"You place your hand on [src]...",,"Hierophant Broadcast","Spatial Gateway","Cancel") //TODO: Find a good way to do this because choice / alert does only support up to six args, not seven as needed + var/choice = alert(user,"You place your hand on [src]...",,"Hierophant Broadcast","Spatial Gateway","Cancel") //Will create a stable gateway instead if between two obelisks one of which is onstation and the other on reebe switch(choice) if("Hierophant Broadcast") if(active) From 53482e6bd6f8557e2f631ff5efdd9879fff8d9c5 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Mon, 27 Jul 2020 00:52:35 +0200 Subject: [PATCH 2/2] 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))