From bad0d53c89da9955d9b6b49d42f1ca5f155e2d3c Mon Sep 17 00:00:00 2001 From: cowbot92 <75333826+cowbot92@users.noreply.github.com> Date: Fri, 23 Feb 2024 00:54:51 -0500 Subject: [PATCH 1/2] save this all yes --- code/game/objects/effects/alien_acid.dm | 9 +++++-- code/game/objects/effects/anomalies.dm | 20 +++++++++++--- code/game/objects/effects/step_triggers.dm | 10 +++++-- .../objects/items/devices/transfer_valve.dm | 10 +++++-- code/game/objects/items/grenades/plastic.dm | 7 +++-- code/game/objects/items/puzzle_pieces.dm | 7 +++-- code/game/objects/items/tanks/tanks.dm | 8 ++++-- code/game/objects/structures/shower.dm | 8 ++++-- code/game/objects/structures/tables_racks.dm | 7 +++-- code/game/objects/structures/traps.dm | 9 +++++-- code/game/objects/structures/wire_splicing.dm | 7 +++-- .../abductor/equipment/abduction_gear.dm | 8 +++++- .../clockcult/clock_effects/clock_sigils.dm | 11 ++++++-- .../trap_triggers/pressure_sensor.dm | 8 +++++- .../clock_structures/traps/steam_vent.dm | 10 +++++-- code/modules/assembly/infrared.dm | 8 +++++- code/modules/awaymissions/capture_the_flag.dm | 7 +++-- .../awaymissions/mission_code/wildwest.dm | 8 +++++- .../modules/awaymissions/super_secret_room.dm | 8 ++++-- code/modules/events/spacevine.dm | 7 +++-- code/modules/flufftext/Hallucination.dm | 27 ++++++++++++++----- code/modules/hydroponics/grown/towercap.dm | 7 +++-- .../living/carbon/alien/special/facehugger.dm | 10 +++++-- code/modules/mob/living/carbon/human/human.dm | 7 +++-- .../mob/living/carbon/monkey/combat.dm | 10 +++++-- .../mob/living/simple_animal/bot/honkbot.dm | 8 ++++-- .../mob/living/simple_animal/bot/mulebot.dm | 2 +- .../mob/living/simple_animal/bot/secbot.dm | 7 +++-- .../living/simple_animal/friendly/axolotl.dm | 12 +++++++-- 29 files changed, 208 insertions(+), 59 deletions(-) diff --git a/code/game/objects/effects/alien_acid.dm b/code/game/objects/effects/alien_acid.dm index 6d0ae81b5082..0f979ad1443b 100644 --- a/code/game/objects/effects/alien_acid.dm +++ b/code/game/objects/effects/alien_acid.dm @@ -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) @@ -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) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 1aa541aa1b7e..da939af96234 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -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 @@ -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) @@ -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 @@ -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) diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm index c430cdbd0307..0a2e15a5229e 100644 --- a/code/game/objects/effects/step_triggers.dm +++ b/code/game/objects/effects/step_triggers.dm @@ -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) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 7a195a99be79..11e82c572af3 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -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 ..() @@ -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) diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 15e28fc95142..819a1ce6f000 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -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) @@ -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) diff --git a/code/game/objects/items/puzzle_pieces.dm b/code/game/objects/items/puzzle_pieces.dm index b098d3320d53..f29a5f236fc2 100644 --- a/code/game/objects/items/puzzle_pieces.dm +++ b/code/game/objects/items/puzzle_pieces.dm @@ -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) . = ..() @@ -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) diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 0a981ca2ca74..ecee5b4ff520 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -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) @@ -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) diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm index 1c1bc933a2d3..0755465d4bbe 100644 --- a/code/game/objects/structures/shower.dm +++ b/code/game/objects/structures/shower.dm @@ -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) @@ -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) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 094650274a29..73bc10021478 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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)) diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm index 9bc5785e2a85..3c7487decdb6 100644 --- a/code/game/objects/structures/traps.dm +++ b/code/game/objects/structures/traps.dm @@ -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 @@ -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. diff --git a/code/game/objects/structures/wire_splicing.dm b/code/game/objects/structures/wire_splicing.dm index ea9e8780fb4e..9fd8855d3e55 100644 --- a/code/game/objects/structures/wire_splicing.dm +++ b/code/game/objects/structures/wire_splicing.dm @@ -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 @@ -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) diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 47c051bb5f21..6c2b42eec785 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -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!")) diff --git a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm index b9c483b75021..58fa73d292c2 100644 --- a/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm +++ b/code/modules/antagonists/clockcult/clock_effects/clock_sigils.dm @@ -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) @@ -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) diff --git a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm index 33ee2c0c225a..cac4d584bf5b 100644 --- a/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm +++ b/code/modules/antagonists/clockcult/clock_structures/trap_triggers/pressure_sensor.dm @@ -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)) diff --git a/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm b/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm index 28a068596ca2..9ad30c7ef297 100644 --- a/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm +++ b/code/modules/antagonists/clockcult/clock_structures/traps/steam_vent.dm @@ -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]" @@ -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! diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index cdb02b9dfb0e..6bcf042db889 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -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)) diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index 7f8d208ba54f..501b7e87ede9 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -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) diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm index e49ad2be275e..5e93a82ad7dc 100644 --- a/code/modules/awaymissions/mission_code/wildwest.dm +++ b/code/modules/awaymissions/mission_code/wildwest.dm @@ -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) diff --git a/code/modules/awaymissions/super_secret_room.dm b/code/modules/awaymissions/super_secret_room.dm index 7c8af5490bb9..51fe7f547301 100644 --- a/code/modules/awaymissions/super_secret_room.dm +++ b/code/modules/awaymissions/super_secret_room.dm @@ -128,8 +128,13 @@ . = ..() var/newcolor = color2hex(pick(10;"green", 5;"blue", 3;"red", 1;"purple")) add_atom_colour(newcolor, FIXED_COLOUR_PRIORITY) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) -/obj/item/rupee/Crossed(atom/movable/AM) + +/obj/item/rupee/proc/on_entered(datum/source, atom/movable/AM, ...) if(!ismob(AM)) return var/mob/M = AM @@ -137,7 +142,6 @@ if(src != M.get_active_held_item()) M.swap_hand() equip_to_best_slot(M) - ..() /obj/item/rupee/equipped(mob/user, slot) playsound(get_turf(loc), 'sound/misc/server-ready.ogg', 50, 1, -1) diff --git a/code/modules/events/spacevine.dm b/code/modules/events/spacevine.dm index c6dcda3ad61a..04f5c09e5cb6 100644 --- a/code/modules/events/spacevine.dm +++ b/code/modules/events/spacevine.dm @@ -284,6 +284,10 @@ /obj/structure/spacevine/Initialize(mapload) . = ..() add_atom_colour("#ffffff", FIXED_COLOUR_PRIORITY) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) /obj/structure/spacevine/examine(mob/user) . = ..() @@ -344,8 +348,7 @@ if(BURN) playsound(src.loc, 'sound/items/welder.ogg', 100, 1) -/obj/structure/spacevine/Crossed(atom/movable/AM) - . = ..() +/obj/structure/spacevine/proc/on_entered(datum/source, atom/movable/AM, ...) if(!isliving(AM)) return for(var/datum/spacevine_mutation/SM in mutations) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 9daaf5143401..af711de9902e 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -1104,13 +1104,19 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/danger/lava name = "lava" +/obj/effect/hallucination/danger/lava/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /obj/effect/hallucination/danger/lava/show_icon() image = image('icons/turf/floors/lava.dmi',src,"smooth",TURF_LAYER) if(target.client) target.client.images += image -/obj/effect/hallucination/danger/lava/Crossed(atom/movable/AM) - . = ..() +/obj/effect/hallucination/danger/lava/proc/on_entered(datum/source, atom/movable/AM, ...) if(AM == target) target.adjustStaminaLoss(20) new /datum/hallucination/fire(target) @@ -1118,13 +1124,19 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/danger/chasm name = "chasm" +/obj/effect/hallucination/danger/chasm/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /obj/effect/hallucination/danger/chasm/show_icon() image = image('icons/turf/floors/chasms.dmi',src,"smooth",TURF_LAYER) if(target.client) target.client.images += image -/obj/effect/hallucination/danger/chasm/Crossed(atom/movable/AM) - . = ..() +/obj/effect/hallucination/danger/chasm/proc/on_entered(datum/source, atom/movable/AM, ...) if(AM == target) if(istype(target, /obj/effect/dummy/phased_mob) || istype(target, /obj/effect/dummy/crawling)) return @@ -1139,6 +1151,10 @@ GLOBAL_LIST_INIT(hallucination_list, list( /obj/effect/hallucination/danger/anomaly/Initialize(mapload) . = ..() START_PROCESSING(SSobj, src) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) /obj/effect/hallucination/danger/anomaly/process(delta_time) if(DT_PROB(45, delta_time)) @@ -1153,8 +1169,7 @@ GLOBAL_LIST_INIT(hallucination_list, list( if(target.client) target.client.images += image -/obj/effect/hallucination/danger/anomaly/Crossed(atom/movable/AM) - . = ..() +/obj/effect/hallucination/danger/anomaly/proc/on_entered(datum/source, atom/movable/AM, ...) if(AM == target) new /datum/hallucination/shock(target) diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 693dbe5c2f6a..7d0c74703dfe 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -216,6 +216,10 @@ /obj/structure/bonfire/prelit/Initialize(mapload) . = ..() StartBurning() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) /obj/structure/bonfire/CanAllowThrough(atom/movable/mover, turf/target) . = ..() @@ -300,8 +304,7 @@ /obj/structure/bonfire/fire_act(exposed_temperature, exposed_volume) StartBurning() -/obj/structure/bonfire/Crossed(atom/movable/AM) - . = ..() +/obj/structure/bonfire/proc/on_entered(datum/source, atom/movable/AM, ...) if(burning & !grill) Burn() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 3a056f58facd..fc96248893a6 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -30,6 +30,13 @@ var/attached = 0 +/obj/item/clothing/mask/facehugger/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /obj/item/clothing/mask/facehugger/lamarr name = "Lamarr" sterile = 1 @@ -91,8 +98,7 @@ . = ..() Attach(M) -/obj/item/clothing/mask/facehugger/Crossed(atom/target) - . = ..() +/obj/item/clothing/mask/facehugger/proc/on_entered(datum/source, atom/movable/target, ...) HasProximity(target) /obj/item/clothing/mask/facehugger/on_found(mob/finder) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index be2381ed21bd..588a3aac7f61 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -36,6 +36,10 @@ AddComponent(/datum/component/personal_crafting) AddElement(/datum/element/footstep, FOOTSTEP_MOB_HUMAN, 1, -6) AddComponent(/datum/component/bloodysoles/feet) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) /mob/living/carbon/human/proc/setup_human_dna() //initialize dna. for spawned humans; overwritten by other code @@ -260,12 +264,11 @@ // called when something steps onto a human // this could be made more general, but for now just handle mulebot -/mob/living/carbon/human/Crossed(atom/movable/AM) +/mob/living/carbon/human/proc/on_entered(datum/source, atom/movable/AM, ...) var/mob/living/simple_animal/bot/mulebot/MB = AM if(istype(MB)) MB.RunOver(src) - . = ..() spreadFire(AM) /mob/living/carbon/human/Topic(href, href_list) diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 1a5f0e3209cf..08a9a74007c7 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -20,6 +20,13 @@ var/next_battle_screech = 0 var/battle_screech_cooldown = 5 SECONDS +/mob/living/carbon/monkey/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /mob/living/carbon/monkey/proc/IsStandingStill() return resisting || pickpocketing || disposing_body @@ -412,14 +419,13 @@ retaliate(H) ..() -/mob/living/carbon/monkey/Crossed(atom/movable/AM) +/mob/living/carbon/monkey/proc/on_entered(datum/source, atom/movable/AM, ...) if(!IsDeadOrIncap() && ismob(AM) && target) var/mob/living/carbon/monkey/M = AM if(!istype(M) || !M) return knock_over(M) return - ..() /mob/living/carbon/monkey/proc/monkeyDrop(obj/item/A) if(A) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 740b10fc002e..303e0480e1bd 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -45,6 +45,11 @@ access_card.access += J.get_access() prev_access = access_card.access + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /mob/living/simple_animal/bot/honkbot/proc/spam_flag_false() //used for addtimer spam_flag = FALSE @@ -344,7 +349,7 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, target = user mode = BOT_HUNT -/mob/living/simple_animal/bot/honkbot/Crossed(atom/movable/AM) +/mob/living/simple_animal/bot/honkbot/proc/on_entered(datum/source, atom/movable/AM, ...) if(ismob(AM) && (on)) //only if its online if(prob(30)) //you're far more likely to trip on a honkbot var/mob/living/carbon/C = AM @@ -363,7 +368,6 @@ Maintenance panel panel is [open ? "opened" : "closed"]"}, speak("Honk!") sensor_blink() return - ..() /obj/machinery/bot_core/honkbot req_one_access = list(ACCESS_THEATRE, ACCESS_ROBO_CONTROL) diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 2b8fecfe76a3..24499c9b2773 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -644,7 +644,7 @@ L.Knockdown(8 SECONDS) return ..() -// called from mob/living/carbon/human/Crossed() +// called from mob/living/carbon/human/proc/on_entered() // when mulebot is in the same loc /mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H) log_combat(src, H, "run over", null, "(DAMTYPE: [uppertext(BRUTE)])") diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 4be9944a7a33..8772fba379d9 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -52,6 +52,10 @@ /mob/living/simple_animal/bot/secbot/beepsky/jr/Initialize(mapload) . = ..() resize = 0.8 + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) update_transform() @@ -445,14 +449,13 @@ Auto Patrol: []"}, target = user mode = BOT_HUNT -/mob/living/simple_animal/bot/secbot/Crossed(atom/movable/AM) +/mob/living/simple_animal/bot/secbot/proc/on_entered(datum/source, atom/movable/AM, ...) if(has_gravity() && ismob(AM) && target) var/mob/living/carbon/C = AM if(!istype(C) || !C || in_range(src, target)) return knock_over(C) return - ..() /obj/machinery/bot_core/secbot req_access = list(ACCESS_SECURITY) diff --git a/code/modules/mob/living/simple_animal/friendly/axolotl.dm b/code/modules/mob/living/simple_animal/friendly/axolotl.dm index 8602ff483913..aa9e96e15ad6 100644 --- a/code/modules/mob/living/simple_animal/friendly/axolotl.dm +++ b/code/modules/mob/living/simple_animal/friendly/axolotl.dm @@ -24,6 +24,15 @@ wuv_angy = "makes a noise" var/stepped_sound = 'sound/effects/axolotl.ogg' + +/mob/living/simple_animal/pet/axolotl/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + + /mob/living/simple_animal/pet/axolotl/attack_hand(mob/living/carbon/human/user, list/modifiers) . = ..() if(src.stat == DEAD) @@ -38,8 +47,7 @@ else playsound(loc, 'sound/effects/axolotl.ogg', 100, TRUE) -/mob/living/simple_animal/pet/axolotl/Crossed(AM as mob|obj) - . = ..() +/mob/living/simple_animal/pet/axolotl/proc/on_entered(datum/source, atom/movable/AM, ...) if(!stat && isliving(AM)) var/mob/living/L = AM if(L.mob_size > MOB_SIZE_TINY) From b595866bf605462b3e28a9e657ddb23c63f52d61 Mon Sep 17 00:00:00 2001 From: cowbot92 <75333826+cowbot92@users.noreply.github.com> Date: Fri, 23 Feb 2024 01:09:40 -0500 Subject: [PATCH 2/2] ok this is mostly all of it --- .../living/simple_animal/hostile/jungle/leaper.dm | 9 +++++++-- .../simple_animal/hostile/megafauna/hierophant.dm | 7 +++++-- code/modules/power/singularity/containment_field.dm | 10 ++++++++-- code/modules/projectiles/projectile.dm | 8 ++++++-- code/modules/shuttle/special.dm | 12 +++++++++--- code/modules/swarmers/swarmer_objs.dm | 11 +++++++++-- .../code/modules/jungleland/jungle_megafauna.dm | 7 +++++-- 7 files changed, 49 insertions(+), 15 deletions(-) diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index 36d195a1a59c..9e89a499a488 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -80,6 +80,11 @@ /obj/structure/leaper_bubble/Initialize(mapload) . = ..() float(on = TRUE) + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + QDEL_IN(src, 100) /obj/structure/leaper_bubble/Destroy() @@ -87,7 +92,7 @@ playsound(src,'sound/effects/snap.ogg',50, 1, -1) return ..() -/obj/structure/leaper_bubble/Crossed(atom/movable/AM) +/obj/structure/leaper_bubble/proc/on_entered(datum/source, atom/movable/AM, ...) if(isliving(AM)) var/mob/living/L = AM if(!istype(L, /mob/living/simple_animal/hostile/jungle/leaper)) @@ -100,7 +105,7 @@ var/mob/living/simple_animal/A = L A.adjustHealth(25) qdel(src) - return ..() + return /datum/reagent/toxin/leaper_venom name = "Leaper venom" diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 4948f3990d81..d073fdccdfd6 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -645,6 +645,10 @@ Difficulty: Hard /obj/effect/temp_visual/hierophant/blast/Initialize(mapload, new_caster, friendly_fire) . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) friendly_fire_check = friendly_fire if(new_caster) hit_things += new_caster @@ -664,8 +668,7 @@ Difficulty: Hard sleep(0.13 SECONDS) //slightly forgiving; the burst animation is 0.15 seconds bursting = FALSE //we no longer damage crossers -/obj/effect/temp_visual/hierophant/blast/Crossed(atom/movable/AM) - ..() +/obj/effect/temp_visual/hierophant/blast/proc/on_entered(datum/source, atom/movable/AM, ...) if(bursting) do_damage(get_turf(src)) diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index 5b0faf3e0855..6d3bdc6fe904 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -16,6 +16,13 @@ var/obj/machinery/field/generator/FG1 = null var/obj/machinery/field/generator/FG2 = null +/obj/machinery/field/containment/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /obj/machinery/field/containment/Destroy() FG1.fields -= src FG2.fields -= src @@ -57,8 +64,7 @@ else ..() -/obj/machinery/field/containment/Crossed(atom/movable/AM) - . = ..() +/obj/machinery/field/containment/proc/on_entered(datum/source, atom/movable/AM, ...) if(isliving(AM)) shock(AM) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 97428e8e26e9..2fb30ed47b20 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -172,6 +172,11 @@ impacted = list() decayedRange = range + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + /obj/projectile/proc/Range() range-- if(wound_bonus != CANT_WOUND) @@ -722,8 +727,7 @@ angle = ATAN2(y - oy, x - ox) return list(angle, p_x, p_y) -/obj/projectile/Crossed(atom/movable/AM) //A mob moving on a tile with a projectile is hit by it. - . = ..() +/obj/projectile/proc/on_entered(datum/source, atom/movable/AM, ...) //A mob moving on a tile with a projectile is hit by it. if(isliving(AM) && !(pass_flags & PASSMOB)) var/mob/living/L = AM if(can_hit_target(L, impacted, (AM == original))) diff --git a/code/modules/shuttle/special.dm b/code/modules/shuttle/special.dm index d05758527ed0..ba49735c5d1a 100644 --- a/code/modules/shuttle/special.dm +++ b/code/modules/shuttle/special.dm @@ -182,7 +182,15 @@ max_integrity = 1000 var/boot_dir = 1 -/obj/structure/table/wood/bar/Crossed(atom/movable/AM) +/obj/structure/table/wood/bar/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/wood/bar/proc/on_entered(datum/source, atom/movable/AM, ...) if(isliving(AM) && !is_barstaff(AM)) // No climbing on the bar please var/mob/living/M = AM @@ -190,8 +198,6 @@ M.Paralyze(40) M.throw_at(throwtarget, 5, 1,src) to_chat(M, span_notice("No climbing on the bar please.")) - else - . = ..() /obj/structure/table/wood/bar/proc/is_barstaff(mob/living/user) . = FALSE diff --git a/code/modules/swarmers/swarmer_objs.dm b/code/modules/swarmers/swarmer_objs.dm index c5801983b834..2de324d3329a 100644 --- a/code/modules/swarmers/swarmer_objs.dm +++ b/code/modules/swarmers/swarmer_objs.dm @@ -108,7 +108,14 @@ max_integrity = 10 density = FALSE -/obj/structure/swarmer/trap/Crossed(atom/movable/AM) +/obj/structure/swarmer/trap/Initialize(mapload) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) + +/obj/structure/swarmer/trap/proc/on_entered(datum/source, atom/movable/AM, ...) if(isliving(AM)) var/mob/living/living_crosser = AM if(!istype(living_crosser, /mob/living/simple_animal/hostile/swarmer)) @@ -117,7 +124,7 @@ if(iscyborg(living_crosser)) living_crosser.Paralyze(100) qdel(src) - return ..() + return /obj/structure/swarmer/blockade name = "swarmer blockade" diff --git a/yogstation/code/modules/jungleland/jungle_megafauna.dm b/yogstation/code/modules/jungleland/jungle_megafauna.dm index 0fd04488714f..bae38e3db2ce 100644 --- a/yogstation/code/modules/jungleland/jungle_megafauna.dm +++ b/yogstation/code/modules/jungleland/jungle_megafauna.dm @@ -352,6 +352,10 @@ /obj/effect/better_animated_temp_visual/tar_king_chaser_impale/Initialize(mapload, new_caster) . = ..() caster = new_caster + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered), + ) + AddElement(/datum/element/connect_loc, loc_connections) INVOKE_ASYNC(src, PROC_REF(blast)) /obj/effect/better_animated_temp_visual/tar_king_chaser_impale/proc/blast() @@ -365,8 +369,7 @@ sleep(0.1 SECONDS) bursting = FALSE -/obj/effect/better_animated_temp_visual/tar_king_chaser_impale/Crossed(atom/movable/AM) - ..() +/obj/effect/better_animated_temp_visual/tar_king_chaser_impale/proc/on_entered(datum/source, atom/movable/AM, ...) if(bursting) do_damage(get_turf(src))