From a3a1236c23c84d1152099cac384f6a43ec3a4554 Mon Sep 17 00:00:00 2001 From: Tigercat2000 Date: Mon, 11 May 2015 04:43:09 -0700 Subject: [PATCH] CBGI: Comment out every controversial thing This commit comments out all of the controversial code from the new grab system. The code is being left non-hard-deleted as an example, the framework would be a shame to kill. --- code/modules/mob/living/living_defense.dm | 8 ++-- code/modules/mob/mob_grab.dm | 58 +++++++++++++---------- 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 31f57edaadc..572123feadf 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -285,11 +285,11 @@ LAssailant = user playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - if(user.dir == src.dir) + /*if(user.dir == src.dir) G.state = GRAB_AGGRESSIVE G.last_upgrade = world.time if(!supress_message) visible_message("[user] has grabbed [src] from behind!") - else - if(!supress_message) - visible_message("[user] has grabbed [src] passively!") + else*///This is an example of how you can make special types of grabs simply based on direction. + if(!supress_message) + visible_message("[user] has grabbed [src] passively!") diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index e37b3af25e9..cb3946984d4 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -19,7 +19,7 @@ var/allow_upgrade = 1 var/last_upgrade = 0 var/last_hit_zone = 0 - var/force_down //determines if the affecting mob will be pinned to the ground +// var/force_down //determines if the affecting mob will be pinned to the ground //disabled due to balance, kept for an example for any new things. var/dancing //determines if assailant and affecting keep looking at each other. Basically a wrestling position layer = 21 @@ -116,7 +116,7 @@ affecting.hand = 1 affecting.drop_item() affecting.hand = h - +/* BLOCK BEING LEFT AS EXAMPLE FOR ADDING NEW THINGS var/hit_zone = assailant.zone_sel.selecting var/announce = 0 if(hit_zone != last_hit_zone) @@ -124,7 +124,7 @@ last_hit_zone = hit_zone if(ishuman(affecting)) switch(hit_zone) - if("mouth") + /*if("mouth") if(announce) assailant.visible_message("[assailant] covers [affecting]'s mouth!") if(affecting.silent < 3) @@ -133,13 +133,15 @@ if(announce) assailant.visible_message("[assailant] covers [affecting]'s eyes!") if(affecting.eye_blind < 3) - affecting.eye_blind = 3 + affecting.eye_blind = 3*///These are being left in the code as an example for adding new hit-zone based things. if(force_down) if(affecting.loc != assailant.loc) force_down = 0 else - affecting.Weaken(3) + affecting.Weaken(3) //This is being left in the code as an example of adding a new variable to do something in grab code. + +*/ if(state >= GRAB_NECK) affecting.Stun(5) //It will hamper your voice, being choked and all. @@ -166,9 +168,10 @@ return if(affecting.lying && state != GRAB_KILL) animate(affecting, pixel_x = 0, pixel_y = 0, 5, 1, LINEAR_EASING) - if(force_down) - affecting.set_dir(SOUTH) //face up - return + return //KJK + /* if(force_down) //THIS GOES ABOVE THE RETURN LABELED KJK + affecting.set_dir(SOUTH)*///This shows how you can apply special directions based on a variable. //face up + var/shift = 0 var/adir = get_dir(assailant, affecting) affecting.layer = 4 @@ -220,15 +223,16 @@ if(state < GRAB_AGGRESSIVE) if(!allow_upgrade) return - if(!affecting.lying) - assailant.visible_message("[assailant] has grabbed [affecting] aggressively (now hands)!") - else + //if(!affecting.lying) + assailant.visible_message("[assailant] has grabbed [affecting] aggressively (now hands)!") + /* else assailant.visible_message("[assailant] pins [affecting] down to the ground (now hands)!") force_down = 1 affecting.Weaken(3) step_to(assailant, affecting) assailant.set_dir(EAST) //face the victim - affecting.set_dir(SOUTH) //face up + affecting.set_dir(SOUTH) //face up //This is an example of a new feature based on the context of the location of the victim. + */ //It means that upgrading while someone is lying on the ground would cause you to go into pin mode. state = GRAB_AGGRESSIVE icon_state = "grabbed1" hud.icon_state = "reinforce1" @@ -289,16 +293,18 @@ var/mob/living/carbon/human/attacker = assailant switch(assailant.a_intent) if("help") - if(force_down) + /*if(force_down) assailant << "You no longer pin [affecting] to the ground." force_down = 0 - return + return*///This is a very basic demonstration of a new feature based on attacking someone with the grab, based on intent. + //This specific example would allow you to stop pinning people to the floor without moving away from them. + return if("grab") return - if("harm") - if(last_hit_zone == "eyes") + if("harm") //This checks that the user is on harm intent. + /*if(last_hit_zone == "eyes") if(state < GRAB_NECK) assailant << "You require a better grab to do this." return @@ -319,25 +325,26 @@ eyes.damage += rand(3,4) if (eyes.damage >= eyes.min_broken_damage) if(M.stat != 2) - M << "\red You go blind!" - else if(last_hit_zone == "head") + M << "\red You go blind!"*///This is a demonstration of adding a new damaging type based on intent as well as hitzone. + //This specific example would allow you to squish people's eyes with a GRAB_NECK. + if(last_hit_zone == "head") //This checks the hitzone the user has selected. In this specific case, they have the head selected. if(affecting.lying) return - assailant.visible_message("[assailant] thrusts \his head into [affecting]'s skull!") - var/damage = 20 + assailant.visible_message("[assailant] thrusts \his head into [affecting]'s skull!") //A visible message for what is going on. + var/damage = 5 var/obj/item/clothing/hat = attacker.head if(istype(hat)) - damage += hat.force * 10 + damage += hat.force * 3 affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", affected.run_armor_check(affecting, "melee")) - assailant.apply_damage(10*rand(90, 110)/100, BRUTE, "head", attacker.run_armor_check("head", "melee")) + assailant.apply_damage(3*rand(90, 110)/100, BRUTE, "head", attacker.run_armor_check("head", "melee")) playsound(assailant.loc, "swing_hit", 25, 1, -1) assailant.attack_log += text("\[[time_stamp()]\] Headbutted [affecting.name] ([affecting.ckey])") affecting.attack_log += text("\[[time_stamp()]\] Headbutted by [assailant.name] ([assailant.ckey])") msg_admin_attack("[key_name(assailant)] has headbutted [key_name(affecting)]") return - if("disarm") - if(state < GRAB_AGGRESSIVE) + if("disarm") //This checks that the user is on disarm intent. + /* if(state < GRAB_AGGRESSIVE) assailant << "You require a better grab to do this." return if(!force_down) @@ -351,7 +358,8 @@ return else assailant << "You are already pinning [affecting] to the ground." - return + return*///This is an example of something being done with an agressive grab + disarm intent. + return if(M == assailant && state >= GRAB_AGGRESSIVE) //no eatin unless you have an agressive grab