From dbf6a2d0ace677ba5c80fea4baf5e8689e622278 Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 10 Dec 2014 22:16:55 +0000 Subject: [PATCH] Make walls and r-walls use the same proc for hulksmash, allow push towards walls --- code/game/turfs/simulated/walls.dm | 26 +++++++++++++------ code/game/turfs/simulated/walls_reinforced.dm | 25 ++++-------------- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index d8f91582b6c..57a615a54e5 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -225,28 +225,38 @@ ReplaceWithLattice() return 0 +/turf/simulated/wall + var/hulk_destroy_prob = 40 + var/hulk_take_damage = 1 + var/rotting_destroy_touch = 1 + var/rotting_touch_message = "\blue The wall crumbles under your touch." + //Interactions /turf/simulated/wall/attack_hand(mob/user as mob) if (HULK in user.mutations) - if (prob(40) || rotting) + if (prob(hulk_destroy_prob) || rotting) usr << text("\blue You smash through the wall.") usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) dismantle_wall(1) - return + return 1 else usr << text("\blue You punch the wall.") - take_damage(rand(25, 75)) - return + if(hulk_take_damage) + take_damage(rand(25, 75)) + return 1 if(rotting) - user << "\blue The wall crumbles under your touch." - dismantle_wall() - return + user << rotting_touch_message + if(rotting_destroy_touch) + dismantle_wall() + return 1 + + if(..()) return 1 user << "\blue You push the wall but nothing happens!" playsound(src, 'sound/weapons/Genhit.ogg', 25, 1) src.add_fingerprint(user) - return + return 0 /turf/simulated/wall/attack_generic(var/mob/user, var/damage, var/attack_message, var/wallbreaker) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 10c7a2cbceb..257ea4e3f75 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -12,26 +12,11 @@ var/d_state = 0 -/turf/simulated/wall/r_wall/attack_hand(mob/user as mob) - if (HULK in user.mutations) - if (prob(10) || rotting) - usr << text("\blue You smash through the wall.") - usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - if(rotting) - user << "\blue This wall feels rather unstable." - return - - user << "\blue You push the wall but nothing happens!" - playsound(src, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - return - +/turf/simulated/wall/r_wall + hulk_destroy_prob = 10 + hulk_take_damage = 0 + rotting_destroy_touch = 0 + rotting_touch_message = "\blue This wall feels rather unstable." /turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob)