Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 53960ac

Browse files
authored
[BUGFIX] Removes depreciated /Crossed and replaces it with /proc/on_entered for most tile-based-crossing things (#21499)
* save this all yes * ok this is mostly all of it
1 parent 29a450d commit 53960ac

File tree

36 files changed

+258
-80
lines changed

36 files changed

+258
-80
lines changed

code/game/objects/effects/alien_acid.dm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
pixel_x = target.pixel_x + rand(-4,4)
2424
pixel_y = target.pixel_y + rand(-4,4)
2525

26+
var/static/list/loc_connections = list(
27+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
28+
)
29+
AddElement(/datum/element/connect_loc, loc_connections)
30+
2631
START_PROCESSING(SSobj, src)
2732

2833

@@ -52,8 +57,8 @@
5257
qdel(src)
5358
return 0
5459

55-
/obj/effect/acid/Crossed(AM as mob|obj)
56-
. = ..()
60+
/obj/effect/acid/proc/on_entered(datum/source, atom/movable/AM, ...)
61+
5762
if(isliving(AM))
5863
var/mob/living/L = AM
5964
if(L.movement_type & FLYING)

code/game/objects/effects/anomalies.dm

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@
109109
density = FALSE
110110
var/boing = 0
111111

112+
/obj/effect/anomaly/grav/Initialize(mapload)
113+
. = ..()
114+
var/static/list/loc_connections = list(
115+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
116+
)
117+
AddElement(/datum/element/connect_loc, loc_connections)
118+
112119
/obj/effect/anomaly/grav/anomalyEffect()
113120
..()
114121
boing = 1
@@ -126,8 +133,7 @@
126133
if(target && !target.stat)
127134
O.throw_at(target, 5, 10)
128135

129-
/obj/effect/anomaly/grav/Crossed(atom/movable/AM)
130-
. = ..()
136+
/obj/effect/anomaly/grav/proc/on_entered(datum/source, atom/movable/AM, ...)
131137
gravShock(AM)
132138

133139
/obj/effect/anomaly/grav/Bump(atom/A)
@@ -171,6 +177,13 @@
171177
/obj/effect/anomaly/flux/explosion
172178
explosive = ANOMALY_FLUX_EXPLOSION
173179

180+
/obj/effect/anomaly/flux/Initialize(mapload)
181+
. = ..()
182+
var/static/list/loc_connections = list(
183+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
184+
)
185+
AddElement(/datum/element/connect_loc, loc_connections)
186+
174187
/obj/effect/anomaly/flux/anomalyEffect(delta_time)
175188
..()
176189
canshock = 1
@@ -179,8 +192,7 @@
179192
if(prob(delta_time * 2)) // shocks everyone nearby
180193
tesla_zap(src, 5, shockdamage*500, TESLA_MOB_DAMAGE)
181194

182-
/obj/effect/anomaly/flux/Crossed(atom/movable/AM)
183-
. = ..()
195+
/obj/effect/anomaly/flux/proc/on_entered(datum/source, atom/movable/AM, ...)
184196
mobShock(AM)
185197

186198
/obj/effect/anomaly/flux/Bump(atom/A)

code/game/objects/effects/step_triggers.dm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,17 @@
77
invisibility = INVISIBILITY_ABSTRACT // nope cant see this shit
88
anchored = TRUE
99

10+
/obj/effect/step_trigger/Initialize(mapload)
11+
. = ..()
12+
var/static/list/loc_connections = list(
13+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
14+
)
15+
AddElement(/datum/element/connect_loc, loc_connections)
16+
1017
/obj/effect/step_trigger/proc/Trigger(atom/movable/A)
1118
return 0
1219

13-
/obj/effect/step_trigger/Crossed(H as mob|obj)
14-
..()
20+
/obj/effect/step_trigger/proc/on_entered(datum/source, atom/movable/H, ...)
1521
if(!H)
1622
return
1723
if(isobserver(H) && !affect_ghosts)

code/game/objects/items/devices/transfer_valve.dm

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
var/valve_open = FALSE
1515
var/toggle = TRUE
1616

17+
/obj/item/transfer_valve/Initialize(mapload)
18+
. = ..()
19+
var/static/list/loc_connections = list(
20+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
21+
)
22+
AddElement(/datum/element/connect_loc, loc_connections)
23+
1724
/obj/item/transfer_valve/Destroy()
1825
attached_device = null
1926
return ..()
@@ -70,8 +77,7 @@
7077
if(attached_device)
7178
attached_device.on_found(finder)
7279

73-
/obj/item/transfer_valve/Crossed(atom/movable/AM as mob|obj)
74-
. = ..()
80+
/obj/item/transfer_valve/proc/on_entered(datum/source, atom/movable/AM, ...)
7581
if(attached_device)
7682
attached_device.Crossed(AM)
7783

code/game/objects/items/grenades/plastic.dm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
. = ..()
2626
ADD_TRAIT(src, TRAIT_EMPPROOF_CONTENTS, "innate_empproof")
2727
plastic_overlay = mutable_appearance(icon, "[item_state]2", ABOVE_ALL_MOB_LAYER)
28+
var/static/list/loc_connections = list(
29+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
30+
)
31+
AddElement(/datum/element/connect_loc, loc_connections)
2832

2933
/obj/item/grenade/plastic/Destroy()
3034
qdel(nadeassembly)
@@ -80,8 +84,7 @@
8084
/obj/item/grenade/plastic/receive_signal()
8185
prime()
8286

83-
/obj/item/grenade/plastic/Crossed(atom/movable/AM)
84-
. = ..()
87+
/obj/item/grenade/plastic/proc/on_entered(datum/source, atom/movable/AM, ...)
8588
if(nadeassembly)
8689
nadeassembly.Crossed(AM)
8790

code/game/objects/items/puzzle_pieces.dm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@
137137
. = ..()
138138
if(undertile_pressureplate)
139139
AddElement(/datum/element/undertile, tile_overlay = tile_overlay, use_anchor = FALSE) //we remove use_anchor here, so it ALWAYS stays anchored
140+
var/static/list/loc_connections = list(
141+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
142+
)
143+
AddElement(/datum/element/connect_loc, loc_connections)
140144

141145
/obj/item/pressure_plate/hologrid/examine(mob/user)
142146
. = ..()
@@ -148,8 +152,7 @@
148152
flick("lasergrid_a",src)
149153
icon_state = "lasergrid_full"
150154

151-
/obj/item/pressure_plate/hologrid/Crossed(atom/movable/AM)
152-
. = ..()
155+
/obj/item/pressure_plate/hologrid/proc/on_entered(datum/source, atom/movable/AM, ...)
153156
if(trigger_item && istype(AM, specific_item) && !claimed)
154157
claimed = TRUE
155158
flick("laserbox_burn", AM)

code/game/objects/items/tanks/tanks.dm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@
7474
air_contents = new(volume) //liters
7575
air_contents.set_temperature(T20C)
7676

77+
var/static/list/loc_connections = list(
78+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
79+
)
80+
AddElement(/datum/element/connect_loc, loc_connections)
81+
7782
populate_gas()
7883

7984
START_PROCESSING(SSobj, src)
@@ -367,8 +372,7 @@
367372

368373
//Assembly / attached device memes
369374

370-
/obj/item/tank/Crossed(atom/movable/AM) //for mousetraps
371-
..()
375+
/obj/item/tank/proc/on_entered(datum/source, atom/movable/AM, ...)
372376
if(tank_assembly)
373377
tank_assembly.Crossed(AM)
374378

code/game/objects/structures/shower.dm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222

2323
soundloop = new(list(src), FALSE)
2424

25+
var/static/list/loc_connections = list(
26+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
27+
)
28+
AddElement(/datum/element/connect_loc, loc_connections)
29+
2530
/obj/machinery/shower/Destroy()
2631
QDEL_NULL(soundloop)
2732
QDEL_NULL(reagents)
@@ -95,8 +100,7 @@
95100
qdel(mist)
96101

97102

98-
/obj/machinery/shower/Crossed(atom/movable/AM)
99-
..()
103+
/obj/machinery/shower/proc/on_entered(datum/source, atom/movable/AM, ...)
100104
if(on)
101105
wash_atom(AM)
102106

code/game/objects/structures/tables_racks.dm

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,16 @@
270270
. = ..()
271271
debris += new frame
272272
debris += new /obj/item/shard
273+
var/static/list/loc_connections = list(
274+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
275+
)
276+
AddElement(/datum/element/connect_loc, loc_connections)
273277

274278
/obj/structure/table/glass/Destroy()
275279
QDEL_LIST(debris)
276280
. = ..()
277281

278-
/obj/structure/table/glass/Crossed(atom/movable/AM)
279-
. = ..()
282+
/obj/structure/table/glass/proc/on_entered(datum/source, atom/movable/AM, ...)
280283
if(flags_1 & NODECONSTRUCT_1)
281284
return
282285
if(!isliving(AM))

code/game/objects/structures/traps.dm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
/obj/effect,
2828
/mob/dead))
2929

30+
var/static/list/loc_connections = list(
31+
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
32+
COMSIG_ATOM_ENTERED = PROC_REF(on_trap_entered)
33+
)
34+
AddElement(/datum/element/connect_loc, loc_connections)
35+
3036
/obj/structure/trap/Destroy()
3137
qdel(spark_system)
3238
spark_system = null
@@ -56,8 +62,7 @@
5662
else
5763
animate(src, alpha = initial(alpha), time = time_between_triggers)
5864

59-
/obj/structure/trap/Crossed(atom/movable/AM)
60-
. = ..()
65+
/obj/structure/trap/proc/on_trap_entered(datum/source, atom/movable/AM, ...)
6166
if(last_trigger + time_between_triggers > world.time)
6267
return
6368
// Don't want the traps triggered by sparks, ghosts or projectiles.

0 commit comments

Comments
 (0)