mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
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:
@@ -75,6 +75,20 @@
|
|||||||
var/revival_cloning = 1
|
var/revival_cloning = 1
|
||||||
var/revival_brain_life = -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()
|
/datum/configuration/New()
|
||||||
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
var/list/L = typesof(/datum/game_mode) - /datum/game_mode
|
||||||
for (var/T in L)
|
for (var/T in L)
|
||||||
@@ -335,6 +349,22 @@
|
|||||||
config.revival_cloning = value
|
config.revival_cloning = value
|
||||||
if("revival_brain_life")
|
if("revival_brain_life")
|
||||||
config.revival_brain_life = value
|
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
|
else
|
||||||
diary << "Unknown setting in configuration: '[name]'"
|
diary << "Unknown setting in configuration: '[name]'"
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
tally += 1
|
tally += 1
|
||||||
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
|
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
|
||||||
tally = -1 // hunters go supersuperfast
|
tally = -1 // hunters go supersuperfast
|
||||||
return tally + move_delay_add
|
return (tally + move_delay_add + config.alien_delay)
|
||||||
|
|
||||||
//This needs to be fixed
|
//This needs to be fixed
|
||||||
/mob/living/carbon/alien/humanoid/Stat()
|
/mob/living/carbon/alien/humanoid/Stat()
|
||||||
|
|||||||
@@ -107,34 +107,6 @@
|
|||||||
return
|
return
|
||||||
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()
|
/mob/living/carbon/human/Stat()
|
||||||
..()
|
..()
|
||||||
statpanel("Status")
|
statpanel("Status")
|
||||||
@@ -165,6 +137,7 @@
|
|||||||
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized)
|
||||||
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
stat("Energy Charge", round(wear_suit:cell:charge/100))
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/ex_act(severity)
|
/mob/living/carbon/human/ex_act(severity)
|
||||||
if(!blinded)
|
if(!blinded)
|
||||||
flick("flash", flash)
|
flick("flash", flash)
|
||||||
|
|||||||
@@ -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)
|
/mob/living/carbon/human/Process_Spacemove(var/check_drift = 0)
|
||||||
//Can we act
|
//Can we act
|
||||||
|
|||||||
@@ -92,7 +92,7 @@
|
|||||||
if (bodytemperature >= 330.23) // 135 F
|
if (bodytemperature >= 330.23) // 135 F
|
||||||
return -1 // Metroids become supercharged at high temperatures
|
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)
|
/mob/living/carbon/metroid/Bump(atom/movable/AM as mob|obj, yes)
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
if (bodytemperature < 283.222)
|
if (bodytemperature < 283.222)
|
||||||
tally += (283.222 - bodytemperature) / 10 * 1.75
|
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)
|
/mob/living/carbon/monkey/Bump(atom/movable/AM as mob|obj, yes)
|
||||||
|
|
||||||
|
|||||||
@@ -12,4 +12,4 @@
|
|||||||
|
|
||||||
tally = speed
|
tally = speed
|
||||||
|
|
||||||
return tally
|
return tally+config.robot_delay
|
||||||
|
|||||||
@@ -356,7 +356,7 @@
|
|||||||
|
|
||||||
tally = speed
|
tally = speed
|
||||||
|
|
||||||
return tally
|
return tally+config.animal_delay
|
||||||
|
|
||||||
/mob/living/simple_animal/Stat()
|
/mob/living/simple_animal/Stat()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -316,13 +316,9 @@
|
|||||||
if("run")
|
if("run")
|
||||||
if(mob.drowsyness > 0)
|
if(mob.drowsyness > 0)
|
||||||
move_delay += 6
|
move_delay += 6
|
||||||
// if(mob.organStructure && mob.organStructure.legs)
|
move_delay += 1+config.run_speed
|
||||||
// move_delay += mob.organStructure.legs.moveRunDelay
|
|
||||||
move_delay += 1
|
|
||||||
if("walk")
|
if("walk")
|
||||||
// if(mob.organStructure && mob.organStructure.legs)
|
move_delay += 7+config.walk_speed
|
||||||
// move_delay += mob.organStructure.legs.moveWalkDelay
|
|
||||||
move_delay += 7
|
|
||||||
move_delay += mob.movement_delay()
|
move_delay += mob.movement_delay()
|
||||||
|
|
||||||
if(config.Tickcomp)
|
if(config.Tickcomp)
|
||||||
|
|||||||
@@ -16,3 +16,25 @@ 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)
|
## 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
|
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
|
||||||
Reference in New Issue
Block a user