Controllers

This commit is contained in:
Poojawa
2018-09-11 02:04:10 -05:00
parent 07cb9572bd
commit 09512a6001
37 changed files with 522 additions and 447 deletions
@@ -4,10 +4,12 @@
/datum/config_entry/string/comms_key/ValidateAndSet(str_val)
return str_val != "default_pwd" && length(str_val) > 6 && ..()
/datum/config_entry/keyed_string_list/cross_server
/datum/config_entry/keyed_list/cross_server
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_TEXT
protection = CONFIG_ENTRY_LOCKED
/datum/config_entry/keyed_string_list/cross_server/ValidateAndSet(str_val)
/datum/config_entry/keyed_list/cross_server/ValidateAndSet(str_val)
. = ..()
if(.)
var/list/newv = list()
@@ -15,7 +17,7 @@
newv[replacetext(I, "+", " ")] = config_entry_value[I]
config_entry_value = newv
/datum/config_entry/keyed_string_list/cross_server/ValidateListEntry(key_name, key_value)
/datum/config_entry/keyed_list/cross_server/ValidateListEntry(key_name, key_value)
return key_value != "byond:\\address:port" && ..()
/datum/config_entry/string/cross_comms_name
@@ -1,31 +1,43 @@
/datum/config_entry/number_list/repeated_mode_adjust
/datum/config_entry/keyed_number_list/probability
/datum/config_entry/keyed_list/probability
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_number_list/probability/ValidateListEntry(key_name)
/datum/config_entry/keyed_list/probability/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_number_list/max_pop
/datum/config_entry/keyed_list/max_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_number_list/max_pop/ValidateListEntry(key_name)
/datum/config_entry/keyed_list/max_pop/ValidateListEntry(key_name)
return key_name in config.modes
/datum/config_entry/keyed_number_list/min_pop
/datum/config_entry/keyed_list/min_pop
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_number_list/min_pop/ValidateListEntry(key_name, key_value)
/datum/config_entry/keyed_list/min_pop/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_flag_list/continuous // which roundtypes continue if all antagonists die
/datum/config_entry/keyed_list/continuous // which roundtypes continue if all antagonists die
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_flag_list/continuous/ValidateListEntry(key_name, key_value)
/datum/config_entry/keyed_list/continuous/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_flag_list/midround_antag // which roundtypes use the midround antagonist system
/datum/config_entry/keyed_list/midround_antag // which roundtypes use the midround antagonist system
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_flag_list/midround_antag/ValidateListEntry(key_name, key_value)
/datum/config_entry/keyed_list/midround_antag/ValidateListEntry(key_name, key_value)
return key_name in config.modes
/datum/config_entry/keyed_string_list/policy
/datum/config_entry/keyed_list/policy
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_TEXT
/datum/config_entry/number/damage_multiplier
config_entry_value = 1
@@ -124,7 +136,9 @@
/datum/config_entry/flag/show_game_type_odds //if set this allows players to see the odds of each roundtype on the get revision screen
/datum/config_entry/keyed_flag_list/roundstart_races //races you can play as from the get go.
/datum/config_entry/keyed_list/roundstart_races //races you can play as from the get go.
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
@@ -174,28 +188,67 @@
/datum/config_entry/flag/emojis
/datum/config_entry/number/run_delay //Used for modifying movement speed for mobs.
var/static/value_cache = 0
/datum/config_entry/keyed_list/multiplicative_movespeed
key_mode = KEY_MODE_TYPE
value_mode = VALUE_MODE_NUM
config_entry_value = list( //DEFAULTS
/mob/living/simple_animal = 1,
/mob/living/silicon/pai = 1,
/mob/living/carbon/alien/humanoid/hunter = -1,
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
/mob/living/carbon/alien/humanoid/royal/queen = 3
)
/datum/config_entry/number/run_delay/ValidateAndSet()
/datum/config_entry/keyed_list/multiplicative_movespeed/ValidateAndSet()
. = ..()
if(.)
value_cache = config_entry_value
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/number/walk_delay
var/static/value_cache = 0
/datum/config_entry/keyed_list/multiplicative_movespeed/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_config_movespeed_type_lookup(TRUE)
/datum/config_entry/number/walk_delay/ValidateAndSet()
/datum/config_entry/number/movedelay //Used for modifying movement speed for mobs.
abstract_type = /datum/config_entry/number/movedelay
/datum/config_entry/number/movedelay/ValidateAndSet()
. = ..()
if(.)
value_cache = config_entry_value
update_mob_config_movespeeds()
/datum/config_entry/number/human_delay //Mob specific modifiers. NOTE: These will affect different mob types in different ways
/datum/config_entry/number/robot_delay
/datum/config_entry/number/monkey_delay
/datum/config_entry/number/alien_delay
/datum/config_entry/number/slime_delay
/datum/config_entry/number/animal_delay
/datum/config_entry/number/movedelay/vv_edit_var(var_name, var_value)
. = ..()
if(. && (var_name == NAMEOF(src, config_entry_value)))
update_mob_config_movespeeds()
/datum/config_entry/number/movedelay/run_delay
/datum/config_entry/number/movedelay/walk_delay
/////////////////////////////////////////////////Outdated move delay
/datum/config_entry/number/outdated_movedelay
deprecated_by = /datum/config_entry/keyed_list/multiplicative_movespeed
abstract_type = /datum/config_entry/number/outdated_movedelay
var/movedelay_type
/datum/config_entry/number/outdated_movedelay/DeprecationUpdate(value)
return "[movedelay_type] [value]"
/datum/config_entry/number/outdated_movedelay/human_delay
movedelay_type = /mob/living/carbon/human
/datum/config_entry/number/outdated_movedelay/robot_delay
movedelay_type = /mob/living/silicon/robot
/datum/config_entry/number/outdated_movedelay/monkey_delay
movedelay_type = /mob/living/carbon/monkey
/datum/config_entry/number/outdated_movedelay/alien_delay
movedelay_type = /mob/living/carbon/alien
/datum/config_entry/number/outdated_movedelay/slime_delay
movedelay_type = /mob/living/simple_animal/slime
/datum/config_entry/number/outdated_movedelay/animal_delay
movedelay_type = /mob/living/simple_animal
/////////////////////////////////////////////////
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
@@ -219,9 +272,13 @@
config_entry_value = 12
min_val = 0
/datum/config_entry/keyed_flag_list/random_laws
/datum/config_entry/keyed_list/random_laws
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_FLAG
/datum/config_entry/keyed_number_list/law_weight
/datum/config_entry/keyed_list/law_weight
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
splitter = ","
/datum/config_entry/number/overflow_cap
@@ -286,25 +343,10 @@
/datum/config_entry/flag/shift_time_realtime
/datum/config_entry/keyed_number_list/antag_rep
/datum/config_entry/keyed_list/antag_rep
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/number/monkeycap
config_entry_value = 64
min_val = 0
//Cit changes - Adds config options for crew objectives and miscreants
/datum/config_entry/flag/allow_crew_objectives
/datum/config_entry/flag/allow_miscreants
/datum/config_entry/flag/allow_extended_miscreants
/datum/config_entry/flag/nightshift_enabled
/datum/config_entry/number/nightshift_start
config_entry_value = 20
/datum/config_entry/number/nightshift_finish
config_entry_value = 6
//End of Cit changes
@@ -49,6 +49,8 @@
/datum/config_entry/flag/log_pda // log pda messages
/datum/config_entry/flag/log_telecomms // log telecomms messages
/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases.
/datum/config_entry/flag/log_world_topic // log all world.Topic() calls
@@ -324,8 +326,6 @@
/datum/config_entry/flag/allow_map_voting
/datum/config_entry/flag/generate_minimaps
/datum/config_entry/number/client_warn_version
config_entry_value = null
min_val = 500