Ports crawling from polaris (#4118)

What the title says; you can now crawl by dragging your sprite to a title next to your character. Also allows you to buckle yourself if you are lying down.
This commit is contained in:
Alberyk
2018-01-24 18:37:16 -02:00
committed by Erki
parent 0abc1d2a65
commit 769eec1bca
3 changed files with 34 additions and 1 deletions

View File

@@ -56,7 +56,7 @@
/obj/proc/user_buckle_mob(mob/living/M, mob/user)
if(!ROUND_IS_STARTED)
user << "<span class='warning'>You can't buckle anyone in before the game starts.</span>"
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

View File

@@ -389,3 +389,32 @@ var/const/enterloopsanity = 100
if(add)
L.Add(t)
return L
/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 || !user.lying)
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(ishuman(user))
var/mob/living/carbon/human/H = user
var/has_right_hand = TRUE
var/obj/item/organ/external/rhand = H.organs_by_name["r_hand"]
if(!rhand || rhand.is_stump())
has_right_hand = FALSE
var/obj/item/organ/external/lhand = H.organs_by_name["l_hand"]
if(!lhand || lhand.is_stump())
if(!has_right_hand)
return
if (do_after(user, 25 + (5 * user.weakened)) && !(user.stat))
step_towards(O, src)

View File

@@ -0,0 +1,4 @@
author: Alberyk
delete-after: True
changes:
- rscadd: "Ported crawling mechanics from polaris: you can now crawl, if lying down, by dragging your sprite to a title near yourself."