From 5959fe1228a98a278b2a6095a29ced8d078ef799 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sun, 28 Jun 2020 14:17:58 +0200 Subject: [PATCH 1/2] Fixes cultists being teleported to null space --- code/game/gamemodes/cult/runes.dm | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 8c83c88f3d0..befcbd97fee 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -332,11 +332,11 @@ GLOBAL_LIST_EMPTY(teleport_runes) user.forceMove(get_turf(actual_selected_rune)) var/mob/living/carbon/human/H = user if(user.z != T.z) - if(istype(H)) + if(istype(H)) H.bleed(5) user.apply_damage(5, BRUTE) else - if(istype(H)) + if(istype(H)) H.bleed(rand(5,10)) else fail_invoke() @@ -808,6 +808,7 @@ GLOBAL_LIST_EMPTY(teleport_runes) allow_excess_invokers = 1 icon_state = "5" invoke_damage = 5 + var/summoning = FALSE var/summontime = 0 /obj/effect/rune/summon/invoke(var/list/invokers) @@ -819,6 +820,11 @@ GLOBAL_LIST_EMPTY(teleport_runes) var/mob/living/cultist_to_summon = input(user, "Who do you wish to call to [src]?", "Followers of [SSticker.cultdat.entity_title3]") as null|anything in cultists if(!Adjacent(user) || !src || QDELETED(src) || user.incapacitated()) return + if(summoning) + to_chat(user, "You are already summoning a target!") + fail_invoke() + return + if(!cultist_to_summon) to_chat(user, "You require a summoning target!") fail_invoke() @@ -841,18 +847,20 @@ GLOBAL_LIST_EMPTY(teleport_runes) new /obj/effect/temp_visual/cult/sparks(get_turf(cultist_to_summon)) //observer warning log_game("Summon Cultist rune failed - holywater in target") return - + summoning = TRUE ..() if(hard_summon) summontime = 20 if(do_after(user, summontime, target = loc)) + summoning = FALSE // Here incase the proc stops after the qdel cultist_to_summon.visible_message("[cultist_to_summon] suddenly disappears in a flash of red light!", \ "Overwhelming vertigo consumes you as you are hurled through the air!") visible_message("A foggy shape materializes atop [src] and solidifies into [cultist_to_summon]!") cultist_to_summon.forceMove(get_turf(src)) qdel(src) + summoning = FALSE //Rite of Boiling Blood: Deals extremely high amounts of damage to non-cultists nearby /obj/effect/rune/blood_boil From 708148bd33414b454e8e2d2084254cc7b56a8312 Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sun, 28 Jun 2020 14:59:39 +0200 Subject: [PATCH 2/2] use rune as target for do_after --- code/game/gamemodes/cult/runes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index befcbd97fee..676a0ae2772 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -852,7 +852,7 @@ GLOBAL_LIST_EMPTY(teleport_runes) if(hard_summon) summontime = 20 - if(do_after(user, summontime, target = loc)) + if(do_after(user, summontime, target = src)) summoning = FALSE // Here incase the proc stops after the qdel cultist_to_summon.visible_message("[cultist_to_summon] suddenly disappears in a flash of red light!", \ "Overwhelming vertigo consumes you as you are hurled through the air!")