From b943780a8c970ed1c77565eb903a377329646036 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 19 May 2017 06:25:19 -0500 Subject: [PATCH] If ratvar is alive, turning clockwork floors into clockwork walls is fast --- .../clock_helpers/proselytizer_helpers.dm | 2 +- .../clock_items/clockwork_proselytizer.dm | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm index 0566fb2d7a..5ede091ca4 100644 --- a/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm +++ b/code/game/gamemodes/clock_cult/clock_helpers/proselytizer_helpers.dm @@ -53,7 +53,7 @@ to_chat(user, "Something is in the way, preventing you from proselytizing [src] into a clockwork wall.") return TRUE var/operation_time = 100 - if(proselytizer.speed_multiplier > 0) + if(!GLOB.ratvar_awakens && proselytizer.speed_multiplier > 0) //if ratvar isn't awake, this always takes 10 seconds operation_time /= proselytizer.speed_multiplier return list("operation_time" = operation_time, "new_obj_type" = /turf/closed/wall/clockwork, "power_cost" = POWER_WALL_MINUS_FLOOR, "spawn_dir" = SOUTH) diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm index 1d34ea2814..aa174adcd8 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_proselytizer.dm @@ -246,8 +246,13 @@ return TRUE return FALSE +//The following three procs are heavy wizardry. +//What these procs do is they take an existing list of values, which they then modify. +//This(modifying an existing object, in this case the list) is the only way to get information OUT of a do_after callback, which this is used as. + +//The proselytize check proc. /obj/item/clockwork/clockwork_proselytizer/proc/proselytize_checks(list/proselytize_values, atom/target, expected_type, mob/user, silent) //checked constantly while proselytizing - if(!islist(proselytize_values) || !target || QDELETED(target) || !user) + if(!islist(proselytize_values) || QDELETED(target) || QDELETED(user)) return FALSE if(repairing || recharging) return FALSE @@ -266,11 +271,8 @@ return TRUE //The repair check proc. -//Is dark magic. Can probably kill you. -//What this proc does is it takes an existing list of values, which it modifies. -//This(modifying an existing object) is the only way to get information OUT of a do_after callback, which this is used as. /obj/item/clockwork/clockwork_proselytizer/proc/proselytizer_repair_checks(list/repair_values, atom/target, mob/user, silent) //Exists entirely to avoid an otherwise unreadable series of checks. - if(!islist(repair_values) || !target || QDELETED(target) || !user) + if(!islist(repair_values) || QDELETED(target) || QDELETED(user)) return FALSE if(isliving(target)) //standard checks for if we can affect the target var/mob/living/L = target @@ -309,9 +311,9 @@ return FALSE return TRUE -//checked constantly while charging from a sigil +//The sigil charge check proc. /obj/item/clockwork/clockwork_proselytizer/proc/sigil_charge_checks(list/charge_values, obj/effect/clockwork/sigil/transmission/sigil, mob/user, silent) - if(!islist(charge_values) || !sigil || QDELETED(sigil) || !user) + if(!islist(charge_values) || QDELETED(sigil) || QDELETED(user)) return FALSE if(can_use_power(RATVAR_POWER_CHECK)) return FALSE