Pulling lockers, chairs, etc. now gives you a slowdown. (#9785)

This commit is contained in:
mikomyazaki
2020-08-28 19:46:03 +01:00
committed by GitHub
parent 5fba6ee1c1
commit 34c6b3ed87
10 changed files with 46 additions and 7 deletions

View File

@@ -4,11 +4,7 @@
if(species.slowdown)
tally = species.slowdown
if(ishuman(pulling))
var/mob/living/carbon/human/H = pulling
if(H.species.slowdown> species.slowdown)
tally = H.species.slowdown
tally += H.ClothesSlowdown()
tally += get_pulling_movement_delay()
if (istype(loc, /turf/space) || isopenturf(loc))
if(!(locate(/obj/structure/lattice, loc) || locate(/obj/structure/stairs, loc) || locate(/obj/structure/ladder, loc)))
@@ -176,3 +172,12 @@
/mob/living/carbon/human/proc/ClothesSlowdown()
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, wear_mask, shoes, l_ear, r_ear, glasses, belt))
. += I.slowdown
/mob/living/carbon/human/get_pulling_movement_delay()
. = ..()
if(ishuman(pulling))
var/mob/living/carbon/human/H = pulling
if(H.species.slowdown > species.slowdown)
. += H.species.slowdown - species.slowdown
. += H.ClothesSlowdown()

View File

@@ -31,4 +31,14 @@
up_hint.icon_state = "uphint[(B ? !!B.is_hole : 0)]"
/mob/living/silicon/robot/movement_delay()
return speed
. = speed
. += get_pulling_movement_delay()
/mob/living/silicon/robot/get_pulling_movement_delay()
. = ..()
if(ishuman(pulling))
var/mob/living/carbon/human/H = pulling
if(H.species.slowdown > speed)
. += H.species.slowdown - speed
. += H.ClothesSlowdown()

View File

@@ -207,7 +207,13 @@
return 0
/mob/proc/movement_delay()
return 0
. = get_pulling_movement_delay()
/mob/proc/get_pulling_movement_delay()
. = 0
if(istype(pulling, /obj/structure))
var/obj/structure/P = pulling
. += P.slowdown
/mob/proc/Life()
return