Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions code/game/objects/effects/alien_acid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
pixel_x = target.pixel_x + rand(-4,4)
pixel_y = target.pixel_y + rand(-4,4)

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

START_PROCESSING(SSobj, src)


Expand Down Expand Up @@ -52,8 +57,8 @@
qdel(src)
return 0

/obj/effect/acid/Crossed(AM as mob|obj)
. = ..()
/obj/effect/acid/proc/on_entered(datum/source, atom/movable/AM, ...)

if(isliving(AM))
var/mob/living/L = AM
if(L.movement_type & FLYING)
Expand Down
20 changes: 16 additions & 4 deletions code/game/objects/effects/anomalies.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
density = FALSE
var/boing = 0

/obj/effect/anomaly/grav/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/anomaly/grav/anomalyEffect()
..()
boing = 1
Expand All @@ -126,8 +133,7 @@
if(target && !target.stat)
O.throw_at(target, 5, 10)

/obj/effect/anomaly/grav/Crossed(atom/movable/AM)
. = ..()
/obj/effect/anomaly/grav/proc/on_entered(datum/source, atom/movable/AM, ...)
gravShock(AM)

/obj/effect/anomaly/grav/Bump(atom/A)
Expand Down Expand Up @@ -171,6 +177,13 @@
/obj/effect/anomaly/flux/explosion
explosive = ANOMALY_FLUX_EXPLOSION

/obj/effect/anomaly/flux/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/anomaly/flux/anomalyEffect(delta_time)
..()
canshock = 1
Expand All @@ -179,8 +192,7 @@
if(prob(delta_time * 2)) // shocks everyone nearby
tesla_zap(src, 5, shockdamage*500, TESLA_MOB_DAMAGE)

/obj/effect/anomaly/flux/Crossed(atom/movable/AM)
. = ..()
/obj/effect/anomaly/flux/proc/on_entered(datum/source, atom/movable/AM, ...)
mobShock(AM)

/obj/effect/anomaly/flux/Bump(atom/A)
Expand Down
10 changes: 8 additions & 2 deletions code/game/objects/effects/step_triggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
anchored = TRUE

/obj/effect/step_trigger/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
return 0

/obj/effect/step_trigger/Crossed(H as mob|obj)
..()
/obj/effect/step_trigger/proc/on_entered(datum/source, atom/movable/H, ...)
if(!H)
return
if(isobserver(H) && !affect_ghosts)
Expand Down
10 changes: 8 additions & 2 deletions code/game/objects/items/devices/transfer_valve.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
var/valve_open = FALSE
var/toggle = TRUE

/obj/item/transfer_valve/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/item/transfer_valve/Destroy()
attached_device = null
return ..()
Expand Down Expand Up @@ -70,8 +77,7 @@
if(attached_device)
attached_device.on_found(finder)

/obj/item/transfer_valve/Crossed(atom/movable/AM as mob|obj)
. = ..()
/obj/item/transfer_valve/proc/on_entered(datum/source, atom/movable/AM, ...)
if(attached_device)
attached_device.Crossed(AM)

Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/items/grenades/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
. = ..()
ADD_TRAIT(src, TRAIT_EMPPROOF_CONTENTS, "innate_empproof")
plastic_overlay = mutable_appearance(icon, "[item_state]2", ABOVE_ALL_MOB_LAYER)
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/item/grenade/plastic/Destroy()
qdel(nadeassembly)
Expand Down Expand Up @@ -80,8 +84,7 @@
/obj/item/grenade/plastic/receive_signal()
prime()

/obj/item/grenade/plastic/Crossed(atom/movable/AM)
. = ..()
/obj/item/grenade/plastic/proc/on_entered(datum/source, atom/movable/AM, ...)
if(nadeassembly)
nadeassembly.Crossed(AM)

Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/items/puzzle_pieces.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
. = ..()
if(undertile_pressureplate)
AddElement(/datum/element/undertile, tile_overlay = tile_overlay, use_anchor = FALSE) //we remove use_anchor here, so it ALWAYS stays anchored
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/item/pressure_plate/hologrid/examine(mob/user)
. = ..()
Expand All @@ -148,8 +152,7 @@
flick("lasergrid_a",src)
icon_state = "lasergrid_full"

/obj/item/pressure_plate/hologrid/Crossed(atom/movable/AM)
. = ..()
/obj/item/pressure_plate/hologrid/proc/on_entered(datum/source, atom/movable/AM, ...)
if(trigger_item && istype(AM, specific_item) && !claimed)
claimed = TRUE
flick("laserbox_burn", AM)
Expand Down
8 changes: 6 additions & 2 deletions code/game/objects/items/tanks/tanks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
air_contents = new(volume) //liters
air_contents.set_temperature(T20C)

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

populate_gas()

START_PROCESSING(SSobj, src)
Expand Down Expand Up @@ -367,8 +372,7 @@

//Assembly / attached device memes

/obj/item/tank/Crossed(atom/movable/AM) //for mousetraps
..()
/obj/item/tank/proc/on_entered(datum/source, atom/movable/AM, ...)
if(tank_assembly)
tank_assembly.Crossed(AM)

Expand Down
8 changes: 6 additions & 2 deletions code/game/objects/structures/shower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@

soundloop = new(list(src), FALSE)

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/machinery/shower/Destroy()
QDEL_NULL(soundloop)
QDEL_NULL(reagents)
Expand Down Expand Up @@ -95,8 +100,7 @@
qdel(mist)


/obj/machinery/shower/Crossed(atom/movable/AM)
..()
/obj/machinery/shower/proc/on_entered(datum/source, atom/movable/AM, ...)
if(on)
wash_atom(AM)

Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/structures/tables_racks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,16 @@
. = ..()
debris += new frame
debris += new /obj/item/shard
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/structure/table/glass/Destroy()
QDEL_LIST(debris)
. = ..()

/obj/structure/table/glass/Crossed(atom/movable/AM)
. = ..()
/obj/structure/table/glass/proc/on_entered(datum/source, atom/movable/AM, ...)
if(flags_1 & NODECONSTRUCT_1)
return
if(!isliving(AM))
Expand Down
9 changes: 7 additions & 2 deletions code/game/objects/structures/traps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
/obj/effect,
/mob/dead))

var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
COMSIG_ATOM_ENTERED = PROC_REF(on_trap_entered)
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/structure/trap/Destroy()
qdel(spark_system)
spark_system = null
Expand Down Expand Up @@ -56,8 +62,7 @@
else
animate(src, alpha = initial(alpha), time = time_between_triggers)

/obj/structure/trap/Crossed(atom/movable/AM)
. = ..()
/obj/structure/trap/proc/on_trap_entered(datum/source, atom/movable/AM, ...)
if(last_trigger + time_between_triggers > world.time)
return
// Don't want the traps triggered by sparks, ghosts or projectiles.
Expand Down
7 changes: 5 additions & 2 deletions code/game/objects/structures/wire_splicing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
. = ..()
messiness = rand (1,10)
icon_state = "wire_splicing[messiness]"
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)


//At messiness of 2 or below, triggering when walking on a catwalk is impossible
Expand Down Expand Up @@ -77,8 +81,7 @@
. += span_warning("or you could add more wires..!")
. += "It has [messiness] wire[messiness > 1?"s":""] dangling around."

/obj/structure/wire_splicing/Crossed(AM as mob|obj)
. = ..()
/obj/structure/wire_splicing/proc/on_entered(datum/source, atom/movable/AM, ...)
if(isliving(AM))
var/mob/living/L = AM
//var/turf/T = get_turf(src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,14 @@ Congratulations! You are now trained for invasive xenobiology research!"}

var/static/list/injected_reagents = list(/datum/reagent/medicine/corazone)

/obj/structure/table/optable/abductor/Crossed(atom/movable/AM)
/obj/structure/table/optable/abductor/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/structure/table/optable/abductor/proc/on_entered(datum/source, atom/movable/AM, ...)
if(iscarbon(AM))
START_PROCESSING(SSobj, src)
to_chat(AM, span_danger("You feel a series of tiny pricks!"))
Expand Down
11 changes: 9 additions & 2 deletions code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
var/resist_string = "glows blinding white" //string for when a null rod blocks its effects, "glows [resist_string]"
var/check_antimagic = TRUE

/obj/effect/clockwork/sigil/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)


/obj/effect/clockwork/sigil/attackby(obj/item/I, mob/living/user, params)
if(I.force)
if(is_servant_of_ratvar(user) && user.a_intent != INTENT_HARM)
Expand All @@ -39,8 +47,7 @@
visible_message(span_warning("[src] scatters into thousands of particles."))
qdel(src)

/obj/effect/clockwork/sigil/Crossed(atom/movable/AM)
..()
/obj/effect/clockwork/sigil/proc/on_entered(datum/source, atom/movable/AM, ...)
if(isliving(AM))
var/mob/living/L = AM
if(L.stat <= stat_affected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@
T.wired_to += src
to_chat(usr, span_alloy("[src] automatically links with [T] beneath it."))

/obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/Crossed(atom/movable/AM)
/obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/structure/destructible/clockwork/trap/trigger/pressure_sensor/proc/on_entered(datum/source, atom/movable/AM, ...)
if(isliving(AM) && !is_servant_of_ratvar(AM))
var/mob/living/L = AM
if(L.stat || L.m_intent == MOVE_INTENT_WALK || !(L.mobility_flags & MOBILITY_STAND))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
max_integrity = 100
density = FALSE

/obj/structure/destructible/clockwork/trap/steam_vent/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/structure/destructible/clockwork/trap/steam_vent/activate()
opacity = !opacity
icon_state = "steam_vent_[opacity]"
Expand All @@ -17,8 +24,7 @@
else
playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE)

/obj/structure/destructible/clockwork/trap/steam_vent/Crossed(atom/movable/AM)
. = ..()
/obj/structure/destructible/clockwork/trap/steam_vent/proc/on_entered(datum/source, atom/movable/AM, ...)
if(isliving(AM) && opacity)
var/mob/living/L = AM
L.adjust_wet_stacks(1) //It's wet!
8 changes: 7 additions & 1 deletion code/modules/assembly/infrared.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,14 @@
pass_flags = PASSTABLE|PASSGLASS|PASSGRILLE|LETPASSTHROW
var/obj/item/assembly/infra/master

/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
/obj/effect/beam/i_beam/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/beam/i_beam/proc/on_entered(datum/source, atom/movable/AM, ...)
if(istype(AM, /obj/effect/beam))
return
if (isitem(AM))
Expand Down
7 changes: 5 additions & 2 deletions code/modules/awaymissions/capture_the_flag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,13 @@

/obj/effect/ctf/ammo/Initialize(mapload)
..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)
QDEL_IN(src, AMMO_DROP_LIFETIME)

/obj/effect/ctf/ammo/Crossed(atom/movable/AM)
. = ..()
/obj/effect/ctf/ammo/proc/on_entered(datum/source, atom/movable/AM, ...)
reload(AM)

/obj/effect/ctf/ammo/Bump(atom/A)
Expand Down
8 changes: 7 additions & 1 deletion code/modules/awaymissions/mission_code/wildwest.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,14 @@
icon_state = "blobpod"
var/triggered = 0

/obj/effect/meatgrinder/Crossed(atom/movable/AM)
/obj/effect/meatgrinder/Initialize(mapload)
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)

/obj/effect/meatgrinder/proc/on_entered(datum/source, atom/movable/AM, ...)
Bumped(AM)

/obj/effect/meatgrinder/Bumped(atom/movable/AM)
Expand Down
Loading