From 1642ce25580130604520227bc6bfc05fb5888f85 Mon Sep 17 00:00:00 2001 From: PrismaticGynoid Date: Fri, 8 Dec 2017 10:26:06 -0800 Subject: [PATCH] Crawling Mobs now have the ability to "crawl" to an adjacent turf by click-dragging themselves to it. This would allow people unable to stand to still move around, though very slowly. You could also do this to other movable mobs or objects, if you really wanted to. Moving this way takes about 2.5 seconds, plus half a second for each point of weakness you have. For a person missing a leg, this would take 5 seconds. It only works if the mob doing this is alive, conscious, unrestrained, not stunned or paralyzed, and in an area with gravity - no crawling through space. Mobs lying on the ground - again, with similar restrictions - are now able to buckle themselves to chairs or beds. For people missing legs or feet, this means no more being stuck helpless on the ground forever because Baldie McGreytide clicked on your wheelchair. Tested in many different situations, and I've patched every bug that popped up. --- code/game/objects/buckling.dm | 2 +- code/game/turfs/turf.dm | 18 ++++++++++++++++++ html/changelogs/PrismaticGynoid-crawl.yml | 5 +++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/PrismaticGynoid-crawl.yml diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index a91e022f9b..dce392e8f7 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -68,7 +68,7 @@ /atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, var/forced = FALSE, var/silent = FALSE) if(!ticker) user << "You can't buckle anyone in before the game starts." - if(!user.Adjacent(M) || user.restrained() || user.lying || user.stat || istype(user, /mob/living/silicon/pai)) + if(!user.Adjacent(M) || user.restrained() || user.stat || istype(user, /mob/living/silicon/pai)) return if(M == buckled_mob) return diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 10cee9b6b7..8d708e8c7e 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -84,6 +84,24 @@ turf/attackby(obj/item/weapon/W as obj, mob/user as mob) S.gather_all(src, user) return ..() +/turf/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob) + var/turf/T = get_turf(user) + var/area/A = T.loc + if((istype(A) && !(A.has_gravity)) || (istype(T,/turf/space))) + return + if(istype(O, /obj/screen)) + return + if(user.restrained() || user.stat || user.stunned || user.paralysis) + return + if((!(istype(O, /atom/movable)) || O.anchored || !Adjacent(user) || !Adjacent(O) || !user.Adjacent(O))) + return + if(!isturf(O.loc) || !isturf(user.loc)) + return + if(isanimal(user) && O != user) + return + if (do_after(user, 25 + (5 * user.weakened)) && !(user.stat)) + step_towards(O, src) + /turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) if(movement_disabled && usr.ckey != movement_disabled_exception) usr << "Movement is admin-disabled." //This is to identify lag problems diff --git a/html/changelogs/PrismaticGynoid-crawl.yml b/html/changelogs/PrismaticGynoid-crawl.yml new file mode 100644 index 0000000000..65b970b4f6 --- /dev/null +++ b/html/changelogs/PrismaticGynoid-crawl.yml @@ -0,0 +1,5 @@ +author: PrismaticGynoid +delete-after: True +changes: + - rscadd: "Adds the ability to 'crawl' to an adjacent turf by click-dragging yourself to it, after a delay. This can be used to move while unable to stand. You can also do this with other movable objects, if you really wanted to." + - tweak: "Conscious mobs lying on the ground can now buckle themselves to chairs/beds. This includes people missing legs."