diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 11067721818..4baa576d777 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -75,6 +75,20 @@ var/revival_cloning = 1 var/revival_brain_life = -1 + //Used for modifying movement speed for mobs. + //Unversal modifiers + var/run_speed = 0 + var/walk_speed = 0 + + //Mob specific modifiers. NOTE: These will affect different mob types in different ways + var/human_delay = 0 + var/robot_delay = 0 + var/monkey_delay = 0 + var/alien_delay = 0 + var/metroid_delay = 0 + var/animal_delay = 0 + + /datum/configuration/New() var/list/L = typesof(/datum/game_mode) - /datum/game_mode for (var/T in L) @@ -335,6 +349,22 @@ config.revival_cloning = value if("revival_brain_life") config.revival_brain_life = value + if("run_speed") + config.run_speed = value + if("walk_speed") + config.walk_speed = value + if("human_delay") + config.human_delay = value + if("robot_delay") + config.robot_delay = value + if("monkey_delay") + config.monkey_delay = value + if("alien_delay") + config.alien_delay = value + if("metroid_delay") + config.metroid_delay = value + if("animal_delay") + config.animal_delay = value else diary << "Unknown setting in configuration: '[name]'" diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 9049cc61930..5d9045aab37 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -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() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5fb4c5a1268..f9c572ae67b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 214cd66d73a..d516a2cb1ec 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -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 diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 865d3d10cd2..2f50adbd721 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -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) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 385ea11a880..372c0f0e737 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 74522c2b0df..158d11795fb 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -12,4 +12,4 @@ tally = speed - return tally + return tally+config.robot_delay diff --git a/code/modules/mob/living/simple_animal/life.dm b/code/modules/mob/living/simple_animal/life.dm index 5086a760ffd..6b611e2d975 100644 --- a/code/modules/mob/living/simple_animal/life.dm +++ b/code/modules/mob/living/simple_animal/life.dm @@ -356,7 +356,7 @@ tally = speed - return tally + return tally+config.animal_delay /mob/living/simple_animal/Stat() ..() diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 2e9d3734df0..f6aca1e5b04 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -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) diff --git a/config/game_options.txt b/config/game_options.txt index 6521afe1867..9ec32a29484 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -15,4 +15,26 @@ REVIVAL_POD_PLANTS 1 REVIVAL_CLONING 1 ## amount of time (in hundredths of seconds) for which a brain retains the "spark of life" after the person's death (set to -1 for infinite) -REVIVAL_BRAIN_LIFE -1 \ No newline at end of file +REVIVAL_BRAIN_LIFE -1 + + + +### MOB MOVEMENT ### + +## We suggest editing these variabled in-game to find a good speed for your server. To do this you must be a high level admin. Open the 'debug' tab ingame. Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name. + +## These values get directly added to values and totals in-game. To speed things up make the number negative, to slow things down, make the number positive. + + +## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. +RUN_DELAY 0 +WALK_DELAY 0 + + +## The variables below affect the movement of specific mob types. +HUMAN_DELAY 0 +ROBOT_DELAY 0 +MONKEY_DELAY 0 +ALIEN_DELAY 0 +METROID_DELAY 0 +ANIMAL_DELAY 0 \ No newline at end of file