Added movement speed config options.

Basically these numbers get added directly to movement values.

run_delay and walk_delay affect all mob's walk/run speeds before their mob-specific modifiers take effect. Make this number higher to slow things down, make it lower to speed things up.

human_delay, robot_delay, monkey_delay, alien_delay, metroid_delay and animal_delay will affect those mobs specifically. So if you'd like humans to slow down but you don't want robots to suffer, just raise the value of human_delay! Same as before, raise the number to slow things down, lower it to speed it up.

Note: most mobs already run as fast as byond will let them.

Although these are config options. It is possible to adjust these values in-game. The values will reset at the end of the round however.
To adjust the values in-game you must be a high enough level admin to have access to the 'Debug' tab. Open the Debug tab and select 'Debug Controller". In the popup list, select "Configuration". The variables will have the same name as those in the config options.

Note: The values will act a little differently between servers with ticklag compensation turned on and those which have it turned off.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4576 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-08-28 16:20:35 +00:00
parent 1dde960a14
commit 024c16df00
10 changed files with 88 additions and 40 deletions

View File

@@ -58,7 +58,7 @@
tally += 1
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
tally = -1 // hunters go supersuperfast
return tally + move_delay_add
return (tally + move_delay_add + config.alien_delay)
//This needs to be fixed
/mob/living/carbon/alien/humanoid/Stat()

View File

@@ -107,34 +107,6 @@
return
return
/mob/living/carbon/human/movement_delay()
var/tally = 0
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
var/health_deficiency = (100 - health - halloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50
if(wear_suit)
tally += wear_suit.slowdown
if(shoes)
tally += shoes.slowdown
if(FAT in src.mutations)
tally += 1.5
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
return tally
/mob/living/carbon/human/Stat()
..()
statpanel("Status")
@@ -165,6 +137,7 @@
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
stat("Energy Charge", round(wear_suit:cell:charge/100))
/mob/living/carbon/human/ex_act(severity)
if(!blinded)
flick("flash", flash)

View File

@@ -1,3 +1,30 @@
/mob/living/carbon/human/movement_delay()
var/tally = 0
if(reagents.has_reagent("hyperzine")) return -1
if(reagents.has_reagent("nuka_cola")) return -1
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
var/health_deficiency = (100 - health - halloss)
if(health_deficiency >= 40) tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70) tally += hungry/50
if(wear_suit)
tally += wear_suit.slowdown
if(shoes)
tally += shoes.slowdown
if(FAT in src.mutations)
tally += 1.5
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
return (tally+config.human_delay)
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
//Can we act

View File

@@ -92,7 +92,7 @@
if (bodytemperature >= 330.23) // 135 F
return -1 // Metroids become supercharged at high temperatures
return tally
return tally+config.metroid_delay
/mob/living/carbon/metroid/Bump(atom/movable/AM as mob|obj, yes)

View File

@@ -51,7 +51,7 @@
if (bodytemperature < 283.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
return tally
return tally+config.monkey_delay
/mob/living/carbon/monkey/Bump(atom/movable/AM as mob|obj, yes)

View File

@@ -12,4 +12,4 @@
tally = speed
return tally
return tally+config.robot_delay

View File

@@ -356,7 +356,7 @@
tally = speed
return tally
return tally+config.animal_delay
/mob/living/simple_animal/Stat()
..()

View File

@@ -316,13 +316,9 @@
if("run")
if(mob.drowsyness > 0)
move_delay += 6
// if(mob.organStructure && mob.organStructure.legs)
// move_delay += mob.organStructure.legs.moveRunDelay
move_delay += 1
move_delay += 1+config.run_speed
if("walk")
// if(mob.organStructure && mob.organStructure.legs)
// move_delay += mob.organStructure.legs.moveWalkDelay
move_delay += 7
move_delay += 7+config.walk_speed
move_delay += mob.movement_delay()
if(config.Tickcomp)