diff --git a/code/game/objects/structures/industrial_lift.dm b/code/game/objects/structures/industrial_lift.dm index 5e455f71139..91e1505940d 100644 --- a/code/game/objects/structures/industrial_lift.dm +++ b/code/game/objects/structures/industrial_lift.dm @@ -283,7 +283,8 @@ GLOBAL_LIST_EMPTY(lifts) collided.throw_at() //if going EAST, will turn to the NORTHEAST or SOUTHEAST and throw the ran over guy away - collided.throw_at(throw_target, 200, 4) + var/datum/callback/land_slam = new(collided, /mob/living/.proc/tram_slam_land) + collided.throw_at(throw_target, 200, 4, callback = land_slam) forceMove(destination) for(var/atom/movable/thing as anything in things2move) thing.forceMove(destination) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 99e9bcc2dd3..d921a5c5605 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -2153,3 +2153,26 @@ exp_list[mind.assigned_role.title] = minutes return exp_list + +/** + * A proc triggered by callback when someone gets slammed by the tram and lands somewhere. + * + * This proc is used to force people to fall through things like lattice and unplated flooring at the expense of some + * extra damage, so jokers can't use half a stack of iron rods to make getting hit by the tram immediately lethal. + */ +/mob/living/proc/tram_slam_land() + if(!istype(loc, /turf/open/openspace) && !istype(loc, /turf/open/floor/plating)) + return + + if(istype(loc, /turf/open/floor/plating)) + var/turf/open/floor/smashed_plating = loc + visible_message(span_danger("[src] is thrown violently into [smashed_plating], smashing through it and punching straight through!"), + span_userdanger("You're thrown violently into [smashed_plating], smashing through it and punching straight through!")) + apply_damage(rand(5,20), BRUTE, BODY_ZONE_CHEST) + smashed_plating.ScrapeAway(1, CHANGETURF_INHERIT_AIR) + + for(var/obj/structure/lattice/lattice in loc) + visible_message(span_danger("[src] is thrown violently into [lattice], smashing through it and punching straight through!"), + span_userdanger("You're thrown violently into [lattice], smashing through it and punching straight through!")) + apply_damage(rand(5,10), BRUTE, BODY_ZONE_CHEST) + lattice.deconstruct(FALSE)