ASYNC EVERYTHING!
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
return 0
|
||||
|
||||
/obj/effect/acid/Crossed(AM as mob|obj)
|
||||
. = ..()
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(L.movement_type & FLYING)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/effect/anomaly/grav/high/Initialize(mapload, new_lifespan)
|
||||
. = ..()
|
||||
setup_grav_field()
|
||||
INVOKE_ASYNC(src, .proc/setup_grav_field)
|
||||
|
||||
/obj/effect/anomaly/grav/high/proc/setup_grav_field()
|
||||
grav_field = make_field(/datum/proximity_monitor/advanced/gravity, list("current_range" = 7, "host" = src, "gravity_value" = rand(0,3)))
|
||||
|
||||
@@ -65,4 +65,5 @@
|
||||
/obj/effect/decal/cleanable/oil/slippery
|
||||
|
||||
/obj/effect/decal/cleanable/oil/slippery/Initialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/slippery, 80, (NO_SLIP_WHEN_WALKING | SLIDE))
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
|
||||
var/current_range
|
||||
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
|
||||
var/wire = FALSE
|
||||
|
||||
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
|
||||
checkers = list()
|
||||
@@ -35,6 +36,8 @@
|
||||
return ..()
|
||||
|
||||
/datum/proximity_monitor/proc/HandleMove()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/atom/_host = host
|
||||
var/atom/new_host_loc = _host.loc
|
||||
if(last_host_loc != new_host_loc)
|
||||
@@ -58,6 +61,8 @@
|
||||
var/atom/_host = host
|
||||
|
||||
var/atom/loc_to_use = ignore_if_not_on_turf ? _host.loc : get_turf(_host)
|
||||
if(wire && !isturf(loc_to_use)) //it makes assemblies attached on wires work
|
||||
loc_to_use = get_turf(loc_to_use)
|
||||
if(!isturf(loc_to_use)) //only check the host's loc
|
||||
if(range)
|
||||
var/obj/effect/abstract/proximity_checker/pc
|
||||
@@ -109,4 +114,5 @@
|
||||
|
||||
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
monitor?.hasprox_receiver.HasProximity(AM)
|
||||
. = ..()
|
||||
monitor?.hasprox_receiver?.HasProximity(AM)
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
/obj/item/clothing/under/rank/civilian/mime/sexy)
|
||||
|
||||
/obj/effect/spawner/bundle/crate/Initialize(mapload)
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
if(items && items.len)
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/closet/LC = locate(/obj/structure/closet) in T
|
||||
|
||||
@@ -84,6 +84,7 @@
|
||||
/obj/item/grenade/plastic/Crossed(atom/movable/AM)
|
||||
if(nadeassembly)
|
||||
nadeassembly.Crossed(AM)
|
||||
. = ..()
|
||||
|
||||
/obj/item/grenade/plastic/on_found(mob/finder)
|
||||
if(nadeassembly)
|
||||
|
||||
@@ -447,6 +447,7 @@ GLOBAL_LIST_INIT(valid_plushie_paths, valid_plushie_paths())
|
||||
can_random_spawn = FALSE
|
||||
|
||||
/obj/item/toy/plush/random/Initialize()
|
||||
SHOULD_CALL_PARENT(FALSE)
|
||||
var/newtype
|
||||
var/list/snowflake_list = CONFIG_GET(keyed_list/snowflake_plushies)
|
||||
|
||||
|
||||
@@ -134,11 +134,10 @@
|
||||
/obj/item/pressure_plate/hologrid/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(trigger_item && istype(AM, specific_item) && !claimed)
|
||||
AM.anchored = TRUE
|
||||
AM.set_anchored(TRUE)
|
||||
flick("laserbox_burn", AM)
|
||||
trigger()
|
||||
sleep(15)
|
||||
qdel(AM)
|
||||
QDEL_IN(AM, 15)
|
||||
|
||||
// snowflake code until undertile elements
|
||||
/obj/item/pressure_plate/hologrid/hide()
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(merge)
|
||||
for(var/obj/item/stack/S in loc)
|
||||
if(S.merge_type == merge_type)
|
||||
merge(S)
|
||||
INVOKE_ASYNC(src, .proc/merge, S)
|
||||
var/list/temp_recipes = get_main_recipes()
|
||||
recipes = temp_recipes.Copy()
|
||||
if(material_type)
|
||||
|
||||
@@ -531,6 +531,7 @@
|
||||
pop_burst()
|
||||
|
||||
/obj/item/toy/snappop/Crossed(H as mob|obj)
|
||||
. = ..()
|
||||
if(ishuman(H) || issilicon(H)) //i guess carp and shit shouldn't set them off
|
||||
var/mob/living/carbon/M = H
|
||||
if(issilicon(H) || M.m_intent == MOVE_INTENT_RUN)
|
||||
|
||||
@@ -269,13 +269,13 @@
|
||||
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
|
||||
|
||||
/obj/structure/table/rolling/Moved(atom/OldLoc, Dir)
|
||||
. = ..()
|
||||
for(var/mob/M in OldLoc.contents)//Kidnap everyone on top
|
||||
M.forceMove(loc)
|
||||
for(var/x in attached_items)
|
||||
var/atom/movable/AM = x
|
||||
if(!AM.Move(loc))
|
||||
RemoveItemFromTable(AM, AM.loc)
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
* Glass tables
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
animate(src, alpha = initial(alpha), time = time_between_triggers)
|
||||
|
||||
/obj/structure/trap/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(last_trigger + time_between_triggers > world.time)
|
||||
return
|
||||
// Don't want the traps triggered by sparks, ghosts or projectiles.
|
||||
@@ -67,6 +68,7 @@
|
||||
return
|
||||
if(M.anti_magic_check())
|
||||
flare()
|
||||
return
|
||||
if(charges <= 0)
|
||||
return
|
||||
flare()
|
||||
|
||||
Reference in New Issue
Block a user