Merge pull request #7 from DeltaFire15/clockrework-arksequence
Clockrework arksequence-done by Deltafire
This commit is contained in:
@@ -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)
|
||||
@@ -265,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("<span class='warning'>The rift begins to ripple as [user] points [user.p_their()] slab at it!</span>", "<span class='brass'> You begin to shutdown the stabilised gateway with your slab.</span>")
|
||||
linked_gateway.visible_message("<span class='warning'[linked_gateway] begins to ripple, but nothing comes through...</span>")
|
||||
busy = TRUE
|
||||
linked_gateway.busy = TRUE
|
||||
user.visible_message("<span class='warning'>The rift begins to ripple as [user] points [user.p_their()] slab at it!</span>", "<span class='brass'> You begin to shutdown the stabilised gateway with your slab.</span>")
|
||||
linked_gateway.visible_message("<span class='warning'[linked_gateway] begins to ripple, but nothing comes through...</span>")
|
||||
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, "<span class='brass'>You successfully set the gateway to shutdown in another two seconds.</span>")
|
||||
start_shutdown()
|
||||
qdel(B)
|
||||
busy = FALSE
|
||||
linked_gateway.busy = FALSE
|
||||
return TRUE
|
||||
//TODO: Add effect for this, maybe reuse the void blaster one from that PR?
|
||||
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/stable/proc/start_shutdown()
|
||||
deltimer(timerid)
|
||||
|
||||
+25
-5
@@ -39,7 +39,17 @@
|
||||
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))
|
||||
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, "<span class='brass'>You decide against activating the ark.. for now.</span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
@@ -114,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("<span class='large_brass'><b>An Ark of the Clockwork Justicar has been created in [gate_area.map_name]!</b></span>", FALSE, src)
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/initiate_mass_recall()
|
||||
recalling = TRUE
|
||||
@@ -261,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)
|
||||
@@ -319,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))
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(!is_servant_of_ratvar(user) || !can_access_clockwork_power(src, hierophant_cost) || !anchored)
|
||||
to_chat(user, "<span class='warning'>You place your hand on [src], but it doesn't react.</span>")
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user