|
25 | 25 | if(can_feel_pain() && get_shock() >= 10) |
26 | 26 | tally += (get_shock() / 10) //pain shouldn't slow you down if you can't even feel it |
27 | 27 |
|
| 28 | + var/list/limbs_to_check |
28 | 29 | if(istype(buckled, /obj/structure/chair/wheelchair)) |
29 | | - for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM)) |
30 | | - var/obj/item/organ/external/E = GET_EXTERNAL_ORGAN(src, organ_name) |
31 | | - tally += E ? E.get_movement_delay(4) : 4 |
32 | | - else |
33 | 30 | for(var/obj/item/I in get_equipped_items(include_carried = TRUE)) |
34 | 31 | var/slot = get_equipped_slot_for_item(I) |
35 | 32 | tally += LAZYACCESS(I.slowdown_per_slot, slot) |
36 | 33 | tally += I.slowdown_general |
37 | 34 | tally += I.slowdown_accessory |
| 35 | + limbs_to_check = global.all_maniple_limbs |
| 36 | + else |
| 37 | + limbs_to_check = global.all_stance_limbs |
38 | 38 |
|
39 | | - for(var/organ_name in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)) |
40 | | - var/obj/item/organ/external/E = GET_EXTERNAL_ORGAN(src, organ_name) |
41 | | - tally += E ? E.get_movement_delay(4) : 4 |
| 39 | + var/missing_limbs = H ? H.bodytype.get_expected_organ_count_for_categories(limbs_to_check) : 4 |
| 40 | + if(missing_limbs > 0) |
| 41 | + var/max_delay_per_limb = ceil(16/missing_limbs) |
| 42 | + for(var/obj/item/organ/external/limb in get_organs_by_categories(limbs_to_check)) |
| 43 | + tally += limb.get_movement_delay(max_delay_per_limb) |
| 44 | + missing_limbs-- |
| 45 | + if(missing_limbs > 0) |
| 46 | + tally += missing_limbs * max_delay_per_limb |
42 | 47 |
|
43 | 48 | if(shock_stage >= 10 || get_stamina() <= 0) |
44 | 49 | tally += 3 |
|
96 | 101 | handle_leg_damage() |
97 | 102 | species.handle_post_move(src) |
98 | 103 |
|
| 104 | +/mob/living/human/forceMove() |
| 105 | + . = ..() |
| 106 | + if(.) |
| 107 | + species.handle_post_move(src, exertion = FALSE) |
| 108 | + |
99 | 109 | /mob/living/human/proc/handle_leg_damage() |
100 | 110 | if(!can_feel_pain()) |
101 | 111 | return |
|
0 commit comments