diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 37dc1b20fe9..ff078aab98a 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -142,82 +142,6 @@ updatehealth() return -/mob/living/carbon/alien/humanoid/Move(a, b, flag) - if (buckled) - return 0 - - if (restrained()) - stop_pulling() - - var/t7 = 1 - if (restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) - var/turf/T = loc - . = ..() - - if (pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if (!restrained()) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, pulling) > 1 || diag)) - if (ismob(pulling)) - var/mob/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 - del(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() - - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - if (istype(pulling, /obj/structure/window)) - if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) - stop_pulling() - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( s_active in contents ) )) - s_active.close(src) - - for(var/mob/living/carbon/slime/M in view(1,src)) - M.UpdateFeed(src) - - return - /mob/living/carbon/alien/humanoid/hand_p(mob/M as mob) if (!ticker) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 396ab532e76..c52c63bed9d 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -147,72 +147,6 @@ updatehealth() return -/mob/living/carbon/alien/larva/Move(a, b, flag) - - var/t7 = 1 - if (restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - - if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) - var/turf/T = loc - . = ..() - - if (pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if (!restrained()) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, pulling) > 1 || diag)) - if (ismob(pulling)) - var/mob/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 - del(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() - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( s_active in contents ) )) - s_active.close(src) - - for(var/mob/living/carbon/slime/M in view(1,src)) - M.UpdateFeed(src) - - return - /mob/living/carbon/alien/larva/hand_p(mob/M as mob) if (!ticker) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b21b040ad13..08bf79e12e0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -237,90 +237,6 @@ updatehealth() return -/mob/living/carbon/human/Move(a, b, flag) - - if (buckled) - return - - if (restrained()) - stop_pulling() - - - var/t7 = 1 - if (restrained()) - for(var/mob/living/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) - var/turf/T = loc - . = ..() - - if (pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if (!restrained()) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - 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 - del(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() - - //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) - - - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - if (istype(pulling, /obj/structure/window)) - if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) - stop_pulling() - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( s_active in contents ) )) - s_active.close(src) - - for(var/mob/living/carbon/slime/M in view(1,src)) - M.UpdateFeed(src) - return - /mob/living/carbon/human/hand_p(mob/M as mob) var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 98ad258226f..6ecf98d2280 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -16,6 +16,7 @@ nutrition = 700 // 1000 = max see_in_dark = 8 + update_slimes = 0 // canstun and canweaken don't affect slimes because they ignore stun and weakened variables // for the sake of cleanliness, though, here they are. @@ -275,68 +276,6 @@ return -/mob/living/carbon/slime/Move(a, b, flag) - - var/t7 = 1 - if (restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) - var/turf/T = loc - . = ..() - - if (pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at __LINE__ in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if (!restrained()) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, pulling) > 1 || diag)) - if (ismob(pulling)) - var/mob/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 - del(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() - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( s_active in contents ) )) - s_active.close(src) - return - - /mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob) if (!ticker) M << "You cannot attack people before the game has started." diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index d242df45b7b..1a44be5197e 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -410,57 +410,6 @@ return - -/mob/living/carbon/monkey/Move() - if ((!( buckled ) || buckled.loc != loc)) - buckled = null - if (buckled) - return - if (restrained()) - stop_pulling() - var/t7 = 1 - if (restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if (t7 && (pulling && get_dist(src, pulling) <= 1)) - if (pulling.anchored) - stop_pulling() - var/T = loc - . = ..() - if (!( isturf(pulling.loc) )) - stop_pulling() - return - if (!buckled) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - if ((ismob(pulling) && (get_dist(src, pulling) > 1 || diag))) - if (istype(pulling, type)) - var/mob/M = pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - if (istype(pulling, /obj/structure/window)) - if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) - stop_pulling() - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( contents.Find(s_active) ))) - s_active.close(src) - - for(var/mob/living/carbon/slime/M in view(1,src)) - M.UpdateFeed(src) - return - /mob/living/carbon/monkey/verb/removeinternal() set name = "Remove Internals" set category = "IC" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 4d5bb11126a..9035b1a5fc0 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -292,4 +292,87 @@ else usr << "OOC Metadata is not supported by this server!" - return \ No newline at end of file + return + +/mob/living/Move(a, b, flag) + if (buckled) + return + + if (restrained()) + stop_pulling() + + + var/t7 = 1 + if (restrained()) + for(var/mob/living/M in range(src, 1)) + if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) + t7 = null + if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) + var/turf/T = loc + . = ..() + + if (pulling && pulling.loc) + if(!( isturf(pulling.loc) )) + stop_pulling() + return + else + if(Debug) + diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]" + diary <<"REPORT THIS" + + ///// + if(pulling && pulling.anchored) + stop_pulling() + return + + if (!restrained()) + var/diag = get_dir(src, pulling) + if ((diag - 1) & diag) + else + diag = null + 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 + del(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() + + //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) + + + step(pulling, get_dir(pulling.loc, T)) + M.start_pulling(t) + else + if (pulling) + if (istype(pulling, /obj/structure/window)) + if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) + for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) + stop_pulling() + if (pulling) + step(pulling, get_dir(pulling.loc, T)) + else + stop_pulling() + . = ..() + if ((s_active && !( s_active in contents ) )) + s_active.close(src) + + if(update_slimes) + for(var/mob/living/carbon/slime/M in view(1,src)) + M.UpdateFeed(src) \ No newline at end of file diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 68e88517fbc..19d94b42f5a 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -35,4 +35,5 @@ var/cameraFollow = null - var/tod = null // Time of death \ No newline at end of file + var/tod = null // Time of death + var/update_slimes = 1 \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm index 254e344ca9f..7d52fbd7a24 100644 --- a/code/modules/mob/living/silicon/ai/freelook/cameranet.dm +++ b/code/modules/mob/living/silicon/ai/freelook/cameranet.dm @@ -108,6 +108,8 @@ var/datum/cameranet/cameranet = new() var/x2 = min(world.maxx, T.x + 8) & ~0xf var/y2 = min(world.maxy, T.y + 8) & ~0xf + //world << "X1: [x1] - Y1: [y1] - X2: [x2] - Y2: [y2]" + for(var/x = x1; x <= x2; x += 16) for(var/y = y1; y <= y2; y += 16) if(chunkGenerated(x, y, T.z)) @@ -132,4 +134,15 @@ var/datum/cameranet/cameranet = new() chunk.hasChanged(1) // Update now, no matter if it's visible or not. if(chunk.visibleTurfs[position]) return 1 - return 0 \ No newline at end of file + return 0 + + +// Debug verb for VVing the chunk that the turf is in. +/* +/turf/verb/view_chunk() + set src in world + + if(cameranet.chunkGenerated(x, y, z)) + var/datum/camerachunk/chunk = cameranet.getCameraChunk(x, y, z) + usr.client.debug_variables(chunk) +*/ \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index da1e5fbc9d7..479175007b6 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -903,73 +903,7 @@ /mob/living/silicon/robot/Move(a, b, flag) - if (buckled) - return - - if (restrained()) - stop_pulling() - - var/t7 = 1 - if (restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) - var/turf/T = loc - . = ..() - - if (pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if (!restrained()) - var/diag = get_dir(src, pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, pulling) > 1 || diag)) - if (ismob(pulling)) - var/mob/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 [G.affecting] has been pulled from [G.assailant]'s grip by [src]"), 1) - del(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() - step(pulling, get_dir(pulling.loc, T)) - M.start_pulling(t) - else - if (pulling) - if (istype(pulling, /obj/structure/window)) - if(pulling:ini_dir == NORTHWEST || pulling:ini_dir == NORTHEAST || pulling:ini_dir == SOUTHWEST || pulling:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(pulling,get_dir(pulling.loc, T))) - stop_pulling() - if (pulling) - step(pulling, get_dir(pulling.loc, T)) - else - stop_pulling() - . = ..() - if ((s_active && !( s_active in contents ) )) - s_active.close(src) + . = ..() if(module) if(module.type == /obj/item/weapon/robot_module/janitor) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5edc60e0e33..8ff661b2e16 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -510,7 +510,11 @@ var/list/slot_equipment_priority = list( \ show_inv(usr) -/mob/proc/stop_pulling() +/mob/verb/stop_pulling() + + set name = "Stop Pulling" + set category = "IC" + if(pulling) pulling.pulledby = null pulling = null @@ -518,11 +522,13 @@ var/list/slot_equipment_priority = list( \ /mob/proc/start_pulling(var/atom/movable/AM) if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! return - if (!( AM.anchored )) if(pulling) + var/pulling_old = pulling stop_pulling() - + // Are we pulling the same thing twice? Just stop pulling. + if(pulling_old == AM) + return src.pulling = AM AM.pulledby = src if(ismob(AM)) diff --git a/html/changelog.html b/html/changelog.html index f716466b06a..b088e098b9f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -48,6 +48,14 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

31 December 2012

+

Giacom updated:

+ +

30 December 2012

Giacom updated: