From 66232b87aefd5fe40af87d426836a77faecce008 Mon Sep 17 00:00:00 2001 From: "Kortgstation@gmail.com" Date: Sun, 28 Oct 2012 02:29:27 +0000 Subject: [PATCH] Removed the chance to fail a grab upgrade. Since choke was nerfed, this isn't really needed anymore, and just serves to be annoying. Replaced all the for viewer in range stuff that was in the grab file with visible_message git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4973 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/mob/mob_grab.dm | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 15d7ccc2eb1..4c1594acc0d 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -107,8 +107,7 @@ affecting.loc = assailant.loc if ((killing == 2 && state == 3)) if(assailant.loc != kill_loc) - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] lost \his tightened grip on []'s neck!", assailant, affecting), 1) + visible_message("\red [assailant] lost \his tightened grip on [affecting]'s neck!") killing = 0 hud1.icon_state = "disarm/kill" return @@ -133,8 +132,7 @@ if(1.0) if (state >= 3) if (!( killing )) - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has temporarily tightened \his grip on []!", assailant, affecting), 1) + visible_message("\red [assailant] has temporarily tightened \his grip on [affecting]!") //Foreach goto(97) assailant.next_move = world.time + 10 //affecting.stunned = max(2, affecting.stunned) @@ -163,7 +161,10 @@ if (state < 2) if (!( allow_upgrade )) return - if (prob(75)) + visible_message("\red [assailant] has grabbed [affecting] aggressively (now hands)!") + state = 2 + icon_state = "grabbed1" + /*if (prob(75)) for(var/mob/O in viewers(assailant, null)) O.show_message(text("\red [] has grabbed [] aggressively (now hands)!", assailant, affecting), 1) state = 2 @@ -172,7 +173,7 @@ for(var/mob/O in viewers(assailant, null)) O.show_message(text("\red [] has failed to grab [] aggressively!", assailant, affecting), 1) del(src) - return + return*/ else if (state < 3) if(istype(affecting, /mob/living/carbon/human)) @@ -197,9 +198,7 @@ assailant << "\blue You squeeze [affecting], but nothing interesting happens." return - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has reinforced \his grip on [] (now neck)!", assailant, affecting), 1) - + visible_message("\red [assailant] has reinforced \his grip on [affecting] (now neck)!") state = 3 icon_state = "grabbed+1" if (!( affecting.buckled )) @@ -211,8 +210,7 @@ hud1.name = "disarm/kill" else if (state >= 3 && !killing) - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] starts to tighten \his grip on []'s neck!", assailant, affecting), 1) + visible_message("\red [assailant] starts to tighten \his grip on [affecting]'s neck!") hud1.icon_state = "disarm/kill1" killing = 1 if(do_after(assailant, 50)) @@ -226,8 +224,7 @@ return killing = 2 kill_loc = assailant.loc - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] has tightened \his grip on []'s neck!", assailant, affecting), 1) + visible_message("\red [assailant] has tightened \his grip on [affecting]'s neck!") affecting.attack_log += text("\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])") assailant.attack_log += text("\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])") log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])") @@ -235,8 +232,7 @@ assailant.next_move = world.time + 10 affecting.losebreath += 1 else - for(var/mob/O in viewers(assailant, null)) - O.show_message(text("\red [] was unable to tighten \his grip on []'s neck!", assailant, affecting), 1) + visible_message("\red [assailant] was unable to tighten \his grip on [affecting]'s neck!") killing = 0 hud1.icon_state = "disarm/kill" return @@ -267,16 +263,12 @@ if(M == assailant && state >= 2) if( ( ishuman(user) && (FAT in user.mutations) && ismonkey(affecting) ) || ( isalien(user) && iscarbon(affecting) ) ) var/mob/living/carbon/attacker = user - for(var/mob/N in viewers(user, null)) - if(N.client) - N.show_message(text("\red [user] is attempting to devour [affecting]!"), 1) + visible_message("\red [user] is attempting to devour [affecting]!") if(istype(user, /mob/living/carbon/alien/humanoid/hunter)) if(!do_mob(user, affecting)||!do_after(user, 30)) return else if(!do_mob(user, affecting)||!do_after(user, 100)) return - for(var/mob/N in viewers(user, null)) - if(N.client) - N.show_message(text("\red [user] devours [affecting]!"), 1) + visible_message("\red [user] devours [affecting]!") affecting.loc = user attacker.stomach_contents.Add(affecting) del(src)