diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm index a821df02e59..4ffc6490059 100644 --- a/code/ZAS/Airflow.dm +++ b/code/ZAS/Airflow.dm @@ -209,15 +209,6 @@ atom/movable/GotoAirflowDest(n) if(od) setDensity(FALSE) -/atom/movable/to_bump(atom/Obstacle) - if(airflow_speed > 0 && airflow_dest) - airflow_hit(Obstacle) - else - airflow_speed = 0 - airflow_time = 0 - . = ..() - sound_override = 0 - /atom/movable/proc/airflow_hit(atom/A) airflow_speed = 0 airflow_dest = null diff --git a/code/datums/gamemode/factions/legacy_cult/cult_structures.dm b/code/datums/gamemode/factions/legacy_cult/cult_structures.dm index f7dda17bca0..7f5a4c6f3af 100644 --- a/code/datums/gamemode/factions/legacy_cult/cult_structures.dm +++ b/code/datums/gamemode/factions/legacy_cult/cult_structures.dm @@ -128,16 +128,6 @@ plane = ABOVE_TURF_PLANE var/spawnable = null -/obj/effect/gateway/Bumped(mob/M as mob|obj) - spawn(0) - return - return - -/obj/effect/gateway/Crossed(AM as mob|obj) - spawn(0) - return - return - /obj/effect/gateway/active luminosity=5 light_color = LIGHT_COLOR_RED diff --git a/code/datums/gamemode/factions/legacy_cult/narsie.dm b/code/datums/gamemode/factions/legacy_cult/narsie.dm index bc56cb53bcf..5075e1a8e52 100644 --- a/code/datums/gamemode/factions/legacy_cult/narsie.dm +++ b/code/datums/gamemode/factions/legacy_cult/narsie.dm @@ -105,23 +105,6 @@ var/global/list/narsie_list = list() to_chat(M, "You feel your sanity crumble away in an instant as you gaze upon [src.name]...") M.apply_effect(3, STUN) - -/obj/machinery/singularity/narsie/large/to_bump(atom/A) - if(!narnar) - return - if(isturf(A)) - narsiewall(A) - else if(istype(A, /obj/structure/cult)) - qdel(A) - -/obj/machinery/singularity/narsie/large/Bumped(atom/A) - if(!narnar) - return - if(isturf(A)) - narsiewall(A) - else if(istype(A, /obj/structure/cult)) - qdel(A) - /obj/machinery/singularity/narsie/move(var/force_move = 0) if(!move_self) return 0 @@ -176,14 +159,6 @@ var/global/list/narsie_list = list() T.icon_state = "cult-narsie" T.luminosity = 1 -/obj/machinery/singularity/narsie/proc/narsiewall(var/turf/T) - T.desc = "An opening has been made on that wall, but who can say if what you seek truly lies on the other side?" - T.icon = 'icons/turf/walls.dmi' - T.icon_state = "cult-narsie" - T.opacity = 0 - T.setDensity(FALSE) - luminosity = 1 - /obj/machinery/singularity/narsie/large/consume(const/atom/A) //Has its own consume proc because it doesn't need energy and I don't want BoHs to explode it. --NEO //NEW BEHAVIOUR if(narsie_behaviour == "CultStation13") diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b3d0d534510..8bf31cfce7b 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -177,7 +177,9 @@ var/global/list/ghdel_profiling = list() /atom/proc/on_reagent_change() return -/atom/proc/Bumped(AM as mob|obj) +// This proc is intended to be called by `to_bump` whenever a movable +// object bumps into this atom. +/atom/proc/Bumped(atom/movable/AM) return /atom/proc/setDensity(var/density) @@ -830,8 +832,6 @@ its easier to just keep the beam vertical. else return TRUE -/atom/proc/to_bump() - return /atom/proc/get_last_player_touched() //returns a reference to the mob of the ckey that last touched the atom for(var/client/C in clients) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index b70714c9cdd..1a908478578 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -381,13 +381,23 @@ /atom/movable/Crossed(atom/movable/AM) return -/atom/movable/to_bump(atom/Obstacle) - if(src.throwing) - src.throw_impact(Obstacle) - src.throwing = 0 - - if (Obstacle) - Obstacle.Bumped(src) +// Always override this proc instead of BYOND-provided Bump(). +// This is a workaround for some dumb BYOND behavior: +// The `Obstacle` argument passed to Bump() is the first dense object +// in the turf's `contents`. The argument we provide to this proc +// is instead the actual object that's blocking movement. +/atom/movable/proc/to_bump(atom/Obstacle) + if(airflow_speed > 0 && airflow_dest) + airflow_hit(Obstacle) + else + airflow_speed = 0 + airflow_time = 0 + if(src.throwing) + src.throw_impact(Obstacle) + src.throwing = 0 + if(Obstacle) + Obstacle.Bumped(src) + sound_override = 0 // harderforce is for things like lighting overlays which should only be moved in EXTREMELY specific sitations. /atom/movable/proc/forceMove(atom/destination,var/no_tp=0, var/harderforce = FALSE, glide_size_override = 0) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 387d48faafe..df7ed56b0f7 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -1,8 +1,3 @@ /obj/item/weapon name = "weapon" icon = 'icons/obj/weapons.dmi' - -/obj/item/weapon/to_bump(mob/M as mob) - spawn(0) - ..() - return \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/cockatrice.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/cockatrice.dm index 1a72bc0d666..f3343af104c 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/cockatrice.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/cockatrice.dm @@ -193,7 +193,7 @@ for(var/mob/living/L in loc) movement_touch_check(L) -/mob/living/simple_animal/hostile/retaliate/cockatrice/Bump(mob/living/L) +/mob/living/simple_animal/hostile/retaliate/cockatrice/to_bump(mob/living/L) spawn() movement_touch_check(L) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index a5b1fdeaaf9..d429bd9ee20 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -867,7 +867,7 @@ var/list/laser_tag_vests = list(/obj/item/clothing/suit/tag/redtag, /obj/item/cl damage = 0 fire_sound = 'sound/weapons/railgun_highpower.ogg' -/obj/item/projectile/beam/combustion/Bump(atom/A) +/obj/item/projectile/beam/combustion/to_bump(atom/A) if(!A) return ..()