Merge pull request #1055 from Citadel-Station-13/upstream-merge-27376
[MIRROR] If ratvar is alive, turning clockwork floors into clockwork walls is fast
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
to_chat(user, "<span class='warning'>Something is in the way, preventing you from proselytizing [src] into a clockwork wall.</span>")
|
||||
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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user