Adds in a var that allows species to ignore the slowdown effects of items

This commit is contained in:
Anewbe
2016-10-28 17:02:29 -05:00
parent 4130719b3b
commit 6fd82d6d3f
2 changed files with 19 additions and 15 deletions

View File

@@ -25,21 +25,6 @@
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80 var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50 if (hungry >= 70) tally += hungry/50
// Loop through some slots, and add up their slowdowns. Shoes are handled below, unfortunately.
// Includes slots which can provide armor, the back slot, and suit storage.
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, s_store) )
tally += I.slowdown
// Hands are also included, to make the 'take off your armor instantly and carry it with you to go faster' trick no longer viable.
// This is done seperately to disallow negative numbers.
for(var/obj/item/I in list(r_hand, l_hand) )
tally += max(I.slowdown, 0)
// Dragging heavy objects will also slow you down, similar to above.
if(pulling && istype(pulling, /obj/item))
var/obj/item/pulled = pulling
tally += max(pulled.slowdown, 0)
if(istype(buckled, /obj/structure/bed/chair/wheelchair)) if(istype(buckled, /obj/structure/bed/chair/wheelchair))
for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM)) for(var/organ_name in list(BP_L_HAND, BP_R_HAND, BP_L_ARM, BP_R_ARM))
var/obj/item/organ/external/E = get_organ(organ_name) var/obj/item/organ/external/E = get_organ(organ_name)
@@ -76,6 +61,24 @@
if(mRun in mutations) if(mRun in mutations)
tally = 0 tally = 0
if(species.slowdown_fixed)
return (tally+config.human_delay)
// Loop through some slots, and add up their slowdowns. Shoes are handled below, unfortunately.
// Includes slots which can provide armor, the back slot, and suit storage.
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head, s_store) )
tally += I.slowdown
// Hands are also included, to make the 'take off your armor instantly and carry it with you to go faster' trick no longer viable.
// This is done seperately to disallow negative numbers.
for(var/obj/item/I in list(r_hand, l_hand) )
tally += max(I.slowdown, 0)
// Dragging heavy objects will also slow you down, similar to above.
if(pulling && istype(pulling, /obj/item))
var/obj/item/pulled = pulling
tally += max(pulled.slowdown, 0)
return (tally+config.human_delay) return (tally+config.human_delay)
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0) /mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)

View File

@@ -121,6 +121,7 @@
var/appearance_flags = 0 // Appearance/display related features. var/appearance_flags = 0 // Appearance/display related features.
var/spawn_flags = 0 // Flags that specify who can spawn as this species var/spawn_flags = 0 // Flags that specify who can spawn as this species
var/slowdown = 0 // Passive movement speed malus (or boost, if negative) var/slowdown = 0 // Passive movement speed malus (or boost, if negative)
var/slowdown_fixed = 0 // If this is on, they're not affected by object related slowdown (positive or negative)
var/primitive_form // Lesser form, if any (ie. monkey for humans) var/primitive_form // Lesser form, if any (ie. monkey for humans)
var/greater_form // Greater form, if any, ie. human for monkeys. var/greater_form // Greater form, if any, ie. human for monkeys.
var/holder_type var/holder_type