Movement configuration

This commit is contained in:
AffectedArc07
2021-05-17 17:47:34 +01:00
parent 8dd5dfbf7f
commit d68480b8b4
17 changed files with 46 additions and 46 deletions

View File

@@ -47,19 +47,6 @@
var/shuttle_refuel_delay = 12000
//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/slime_delay = 0
var/animal_delay = 0
//IP Intel vars
var/ipintel_email
var/ipintel_rating_bad = 1
@@ -294,22 +281,6 @@
config.revival_brain_life = value
if("auto_toggle_ooc_during_round")
config.auto_toggle_ooc_during_round = 1
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("slime_delay")
config.slime_delay = value
if("animal_delay")
config.animal_delay = value
if("bones_can_break")
config.bones_can_break = value
if("shuttle_refuel_delay")

View File

@@ -27,6 +27,8 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
var/datum/configuration_section/logging_configuration/logging
/// Holder for the MC configuration datum
var/datum/configuration_section/mc_configuration/mc
/// Holder for the MC configuration datum
var/datum/configuration_section/movement_configuration/movement
/// Holder for the overflow configuration datum
var/datum/configuration_section/overflow_configuration/overflow
/// Holder for the ruins configuration datum
@@ -62,6 +64,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
jobs = new()
logging = new()
mc = new()
movement = new()
overflow = new()
ruins = new()
system = new()
@@ -87,6 +90,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
jobs.load_data(raw_config_data["job_configuration"])
logging.load_data(raw_config_data["logging_configuration"])
mc.load_data(raw_config_data["mc_configuration"])
movement.load_data(raw_config_data["movement_configuration"])
overflow.load_data(raw_config_data["overflow_configuration"])
ruins.load_data(raw_config_data["ruin_configuration"])
system.load_data(raw_config_data["system_configuration"])

View File

@@ -0,0 +1,26 @@
/// Config holder for values relating to mob movement speeds
/datum/configuration_section/movement_configuration
/// Base run speed before modifiers
var/base_run_speed = 1
/// Base walk speed before modifiers
var/base_walk_speed = 4
/// Move delay for humanoids
var/human_delay = 1.5
/// Move delay for cyborgs
var/robot_delay = 2.5
/// Move delay for xenomorphs
var/alien_delay = 1.5
/// Move delay for slimes (xenobio, not slimepeople)
var/slime_delay = 1.5
/// Move delay for other simple animals
var/animal_delay = 2.5
/datum/configuration_section/movement_configuration/load_data(list/data)
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
CONFIG_LOAD_NUM(base_run_speed, data["base_run_speed"])
CONFIG_LOAD_NUM(base_walk_speed, data["base_walk_speed"])
CONFIG_LOAD_NUM(human_delay, data["human_delay"])
CONFIG_LOAD_NUM(robot_delay, data["robot_delay"])
CONFIG_LOAD_NUM(alien_delay, data["alien_delay"])
CONFIG_LOAD_NUM(slime_delay, data["slime_delay"])
CONFIG_LOAD_NUM(animal_delay, data["animal_delay"])