diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 70a3f4c3a26..25a6fd2aab7 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -510,52 +510,38 @@ default behaviour is: if ((get_dist(src, pulling) > 1 || diag)) if (isliving(pulling)) var/mob/living/M = pulling - var/ok = 1 - if (locate(/obj/item/weapon/grab, M.grabbed_by)) - if (prob(75)) - var/obj/item/weapon/grab/G = pick(M.grabbed_by) - if (istype(G, /obj/item/weapon/grab)) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1) - //G = null - qdel(G) - else - ok = 0 - if (locate(/obj/item/weapon/grab, M.grabbed_by.len)) - ok = 0 - if (ok) - var/atom/movable/t = M.pulling - M.stop_pulling() + var/atom/movable/t = M.pulling + M.stop_pulling() - if(!istype(M.loc, /turf/space)) - var/area/A = get_area(M) - if(A.has_gravity) - //this is the gay blood on floor shit -- Added back -- Skie - if (M.lying && (prob(M.getBruteLoss() / 6))) + if(!istype(M.loc, /turf/space)) + var/area/A = get_area(M) + if(A.has_gravity) + //this is the gay blood on floor shit -- Added back -- Skie + if (M.lying && (prob(M.getBruteLoss() / 6))) + var/turf/location = M.loc + if (istype(location, /turf/simulated)) + location.add_blood(M) + //pull damage with injured people + if(prob(25)) + M.adjustBruteLoss(1) + visible_message("\The [M]'s [M.isSynthetic() ? "state worsens": "wounds open more"] from being dragged!") + if(M.pull_damage()) + if(prob(25)) + M.adjustBruteLoss(2) + visible_message("\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!") var/turf/location = M.loc if (istype(location, /turf/simulated)) location.add_blood(M) - //pull damage with injured people - if(prob(25)) - M.adjustBruteLoss(1) - visible_message("\The [M]'s [M.isSynthetic() ? "state worsens": "wounds open more"] from being dragged!") - if(M.pull_damage()) - if(prob(25)) - M.adjustBruteLoss(2) - visible_message("\The [M]'s [M.isSynthetic() ? "state" : "wounds"] worsen terribly from being dragged!") - var/turf/location = M.loc - if (istype(location, /turf/simulated)) - location.add_blood(M) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/blood_volume = round(H.vessel.get_reagent_amount("blood")) - if(blood_volume > 0) - H.vessel.remove_reagent("blood", 1) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/blood_volume = round(H.vessel.get_reagent_amount("blood")) + if(blood_volume > 0) + H.vessel.remove_reagent("blood", 1) - step(pulling, get_dir(pulling.loc, T)) - if(t) - M.start_pulling(t) + step(pulling, get_dir(pulling.loc, T)) + if(t) + M.start_pulling(t) else if (pulling) if (istype(pulling, /obj/structure/window)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index ebb7f19ef4f..059208e3239 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -546,21 +546,33 @@ if(ismob(AM)) if(!can_pull_mobs || !can_pull_size) - src << "It won't budge!" + src << "They won't budge!" return if((mob_size < M.mob_size) && (can_pull_mobs != MOB_PULL_LARGER)) - src << "It won't budge!" + src << "[M] is too large for you to move!" return if((mob_size == M.mob_size) && (can_pull_mobs == MOB_PULL_SMALLER)) - src << "It won't budge!" + src << "[M] is too heavy for you to move!" return // If your size is larger than theirs and you have some // kind of mob pull value AT ALL, you will be able to pull // them, so don't bother checking that explicitly. + if(M.grabbed_by.len) + // Only start pulling when nobody else has a grab on them + . = 1 + for(var/obj/item/weapon/grab/G in M.grabbed_by) + if(G.assailant != usr) + . = 0 + else + qdel(G) + if(!.) + src << "Somebody has a grip on them!" + return + if(!iscarbon(src)) M.LAssailant = null else diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index ec83ced425f..47e05847402 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -57,8 +57,14 @@ G.dancing = 1 G.adjust_position() dancing = 1 + + //stop pulling the affected + if(assailant.pulling == affecting) + assailant.stop_pulling() + adjust_position() + //Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code. /obj/item/weapon/grab/proc/throw_held() if(affecting) @@ -91,9 +97,6 @@ assailant.client.screen -= hud assailant.client.screen += hud - if(assailant.pulling == affecting) - assailant.stop_pulling() - if(state <= GRAB_AGGRESSIVE) allow_upgrade = 1 //disallow upgrading if we're grabbing more than one person