diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index c6f08e300a..62facb8e4d 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -218,29 +218,16 @@ turf/simulated/floor/proc/update_icon() return 0 /turf/simulated/floor/attack_hand(mob/user as mob) - if (is_light_floor()) - toggle_lightfloor_on() - update_icon() - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) + . = ..() + if(.) return - if (user.pulling.anchored || !isturf(user.pulling.loc)) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling -// if(M==user) //temporary hack to stop runtimes. ~Carn -// user.stop_pulling() //but...fixed the root of the problem -// return //shoudn't be needed now, unless somebody fucks with pulling again. - - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return + if(is_light_floor()) + if(user.canmove && !user.restrained()) + toggle_lightfloor_on() + update_icon() + return 1 + return 0 /turf/simulated/floor/proc/gets_drilled() return diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 0dcd0dd8a7..ee67672b68 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -11,23 +11,6 @@ if(!istype(src, /turf/space/transit)) icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" -/turf/space/attack_hand(mob/user as mob) - if ((user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored || !isturf(user.pulling.loc)) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - /turf/space/attackby(obj/item/C as obj, mob/user as mob) if (istype(C, /obj/item/stack/rods)) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index d2cd7a18d5..6c9ee85751 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -37,6 +37,22 @@ /turf/ex_act(severity) return 0 +/turf/attack_hand(mob/user) + if(!(user.canmove) || user.restrained() || !(user.pulling)) + return 0 + if(user.pulling.anchored || !isturf(user.pulling.loc)) + return 0 + if(user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1) + return 0 + if(ismob(user.pulling)) + var/mob/M = user.pulling + var/atom/movable/t = M.pulling + M.stop_pulling() + step(user.pulling, get_dir(user.pulling.loc, src)) + M.start_pulling(t) + else + step(user.pulling, get_dir(user.pulling.loc, src)) + return 1 /turf/bullet_act(var/obj/item/projectile/Proj) if(istype(Proj ,/obj/item/projectile/beam/pulse)) diff --git a/code/game/turfs/unsimulated/floor.dm b/code/game/turfs/unsimulated/floor.dm index 68ac083f15..bd6884c5d8 100644 --- a/code/game/turfs/unsimulated/floor.dm +++ b/code/game/turfs/unsimulated/floor.dm @@ -2,20 +2,3 @@ name = "floor" icon = 'icons/turf/floors.dmi' icon_state = "Floor3" - -/turf/unsimulated/floor/attack_hand(var/mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored || !isturf(user.pulling.loc)) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return \ No newline at end of file