ASYNC EVERYTHING!
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
if(!F.check_variables() && !override_checks)
|
||||
QDEL_NULL(F)
|
||||
if(start_field && (F || override_checks))
|
||||
F.Initialize()
|
||||
F.begin_field()
|
||||
return F
|
||||
|
||||
/datum/proximity_monitor/advanced
|
||||
@@ -78,11 +78,11 @@
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/process_edge_turf(turf/T)
|
||||
|
||||
/datum/proximity_monitor/advanced/New()
|
||||
/datum/proximity_monitor/advanced/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
|
||||
if(requires_processing)
|
||||
START_PROCESSING(SSfields, src)
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/Initialize()
|
||||
/datum/proximity_monitor/advanced/proc/begin_field()
|
||||
setup_field()
|
||||
post_setup_field()
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
var/atom/_host = host
|
||||
var/atom/new_host_loc = _host.loc
|
||||
if(last_host_loc != new_host_loc)
|
||||
recalculate_field()
|
||||
INVOKE_ASYNC(src, .proc/recalculate_field)
|
||||
|
||||
/datum/proximity_monitor/advanced/proc/post_setup_field()
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
/obj/item/multitool/field_debug/attack_self(mob/user)
|
||||
operating = !operating
|
||||
to_chat(user, "You turn [src] [operating? "on":"off"].")
|
||||
to_chat(user, "<span class='notice'>You turn [src] [operating? "on":"off"].</span>")
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
if(!istype(current) && operating)
|
||||
@@ -312,13 +312,15 @@
|
||||
else if(!operating)
|
||||
QDEL_NULL(current)
|
||||
|
||||
/obj/item/multitool/field_debug/dropped(mob/user)
|
||||
/obj/item/multitool/field_debug/dropped()
|
||||
. = ..()
|
||||
if(listeningTo)
|
||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
||||
listeningTo = null
|
||||
|
||||
/obj/item/multitool/field_debug/proc/on_mob_move()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
check_turf(get_turf(src))
|
||||
|
||||
/obj/item/multitool/field_debug/process()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(G.summoner && locate(/obj/effect/proc_holder/spell/aoe_turf/timestop) in G.summoner.mind.spell_list) //It would only make sense that a person's stand would also be immune.
|
||||
immune[G] = TRUE
|
||||
if(start)
|
||||
timestop()
|
||||
INVOKE_ASYNC(src, .proc/timestop)
|
||||
|
||||
/obj/effect/timestop/Destroy()
|
||||
qdel(chronofield)
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
/obj/effect/timestop/proc/timestop()
|
||||
target = get_turf(src)
|
||||
playsound(src, 'sound/magic/timeparadox2.ogg', 75, 1, -1)
|
||||
playsound(src, 'sound/magic/timeparadox2.ogg', 75, TRUE, -1)
|
||||
chronofield = make_field(/datum/proximity_monitor/advanced/timestop, list("current_range" = freezerange, "host" = src, "immune" = immune, "check_anti_magic" = check_anti_magic, "check_holy" = check_holy))
|
||||
QDEL_IN(src, duration)
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
unfreeze_turf(T)
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_atom(atom/movable/A)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(A.throwing)
|
||||
unfreeze_throwing(A)
|
||||
if(isliving(A))
|
||||
@@ -128,12 +130,14 @@
|
||||
frozen_things -= A
|
||||
global_frozen_atoms -= A
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_mecha(obj/mecha/M)
|
||||
M.completely_disabled = TRUE
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mecha(obj/mecha/M)
|
||||
M.completely_disabled = FALSE
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_throwing(atom/movable/AM)
|
||||
var/datum/thrownthing/T = AM.throwing
|
||||
T.paused = TRUE
|
||||
@@ -160,7 +164,7 @@
|
||||
/datum/proximity_monitor/advanced/timestop/process()
|
||||
for(var/i in frozen_mobs)
|
||||
var/mob/living/m = i
|
||||
m.Stun(20, 1, 1)
|
||||
m.Stun(20, ignore_canstun = TRUE)
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/setup_field_turf(turf/T)
|
||||
for(var/i in T.contents)
|
||||
@@ -168,6 +172,7 @@
|
||||
freeze_turf(T)
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_projectile(obj/item/projectile/P)
|
||||
P.paused = TRUE
|
||||
|
||||
@@ -176,18 +181,18 @@
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/freeze_mob(mob/living/L)
|
||||
frozen_mobs += L
|
||||
L.Stun(20, 1, 1)
|
||||
L.Stun(20, ignore_canstun = TRUE)
|
||||
ADD_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
|
||||
walk(L, 0) //stops them mid pathing even if they're stunimmune
|
||||
if(isanimal(L))
|
||||
var/mob/living/simple_animal/S = L
|
||||
S.toggle_ai(AI_OFF)
|
||||
if(ishostile(L))
|
||||
var/mob/living/simple_animal/hostile/H = L
|
||||
H.LoseTarget()
|
||||
if(ishostile(L))
|
||||
var/mob/living/simple_animal/hostile/H = L
|
||||
H.LoseTarget()
|
||||
|
||||
/datum/proximity_monitor/advanced/timestop/proc/unfreeze_mob(mob/living/L)
|
||||
L.AdjustStun(-20, 1, 1)
|
||||
L.AdjustStun(-20, ignore_canstun = TRUE)
|
||||
REMOVE_TRAIT(L, TRAIT_MUTE, TIMESTOP_TRAIT)
|
||||
frozen_mobs -= L
|
||||
if(isanimal(L))
|
||||
|
||||
@@ -24,11 +24,12 @@
|
||||
desc = "Get off my turf!"
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_turf/CanPass(atom/movable/AM, turf/target)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_turf_canpass(AM, src, target)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_turf/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_turf_crossed(AM, src)
|
||||
return TRUE
|
||||
@@ -48,11 +49,12 @@
|
||||
desc = "Edgy description here."
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_edge/CanPass(atom/movable/AM, turf/target)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_edge_canpass(AM, src, target)
|
||||
return TRUE
|
||||
|
||||
/obj/effect/abstract/proximity_checker/advanced/field_edge/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(parent)
|
||||
return parent.field_edge_crossed(AM, src)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user