Merge pull request #14696 from Heroman3003/slowdown-stuff

Fixes some minor issues with water/snow slowdown
This commit is contained in:
Heroman3003
2023-03-15 07:19:30 +10:00
committed by GitHub
@@ -128,13 +128,9 @@
// It is in a seperate place to avoid an infinite loop situation with dragging mobs dragging each other.
// Also its nice to have these things seperated.
/mob/living/carbon/human/proc/calculate_item_encumbrance()
if(!buckled && shoes) // Shoes can make you go faster.
. += shoes.slowdown
//VOREStation Addition Start
if(buckled && istype(buckled, /obj/machinery/power/rtg/reg))
. += shoes.slowdown
//VOREStation Addition End
if(shoes) // Shoes can make you go faster.
if(!buckled || (buckled && istype(buckled, /obj/machinery/power/rtg/reg)))
. += shoes.slowdown
// Loop through some slots, and add up their slowdowns.
// Includes slots which can provide armor, the back slot, and suit storage.
@@ -158,7 +154,7 @@
turf_move_cost = CLAMP(turf_move_cost + species.water_movement, HUMAN_LOWEST_SLOWDOWN, 15)
if(shoes)
var/obj/item/clothing/shoes/feet = shoes
if(feet.water_speed)
if(istype(feet) && feet.water_speed)
turf_move_cost = CLAMP(turf_move_cost + feet.water_speed, HUMAN_LOWEST_SLOWDOWN, 15)
. += turf_move_cost
else if(istype(T, /turf/simulated/floor/outdoors/snow))
@@ -166,7 +162,7 @@
turf_move_cost = CLAMP(turf_move_cost + species.snow_movement, HUMAN_LOWEST_SLOWDOWN, 15)
if(shoes)
var/obj/item/clothing/shoes/feet = shoes
if(feet.water_speed)
if(istype(feet) && feet.snow_speed)
turf_move_cost = CLAMP(turf_move_cost + feet.snow_speed, HUMAN_LOWEST_SLOWDOWN, 15)
. += turf_move_cost
else