mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
Added a lowercase variable to string, string lists and keyed list configs. Currently lowercase is only TRUE for keyed lists because they have been working like that since 2018. It might be changed to be FALSE by default but it'll take a while looking at the parsed logs for the config entries. Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
28 lines
951 B
Plaintext
28 lines
951 B
Plaintext
/datum/config_entry/string/comms_key
|
|
protection = CONFIG_ENTRY_HIDDEN
|
|
|
|
/datum/config_entry/string/comms_key/ValidateAndSet(str_val)
|
|
return str_val != "default_pwd" && length(str_val) > 6 && ..()
|
|
|
|
/datum/config_entry/keyed_list/cross_server
|
|
key_mode = KEY_MODE_TEXT
|
|
value_mode = VALUE_MODE_TEXT
|
|
protection = CONFIG_ENTRY_LOCKED
|
|
lowercase_key = FALSE // The names of the servers are proper nouns. Also required for the cross_comms_name config to work.
|
|
|
|
/datum/config_entry/keyed_list/cross_server/ValidateAndSet(str_val)
|
|
. = ..()
|
|
if(.)
|
|
var/list/newv = list()
|
|
for(var/I in config_entry_value)
|
|
newv[replacetext(I, "+", " ")] = config_entry_value[I]
|
|
config_entry_value = newv
|
|
|
|
/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
|
|
|
|
/datum/config_entry/string/cross_comms_network
|
|
protection = CONFIG_ENTRY_LOCKED
|