mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Convert preferences to /tg/ preferences (#9797)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
689b354903
commit
039ee85382
@@ -974,6 +974,13 @@ var/global/list/json_cache = list()
|
||||
new_value = deep_copy_list_alt(value)
|
||||
copied_list[key_or_value] = new_value
|
||||
|
||||
/// Turns an associative list into a flat list of keys
|
||||
/proc/assoc_to_keys(list/input)
|
||||
var/list/keys = list()
|
||||
for(var/key in input)
|
||||
UNTYPED_LIST_ADD(keys, key)
|
||||
return keys
|
||||
|
||||
//CHOMPAdd start
|
||||
/proc/pick_weight(list/list_to_pick)
|
||||
var/total = 0
|
||||
|
||||
@@ -374,7 +374,7 @@ Proc for attack log creation, because really why not
|
||||
cached_character_icons[cachekey] = .
|
||||
|
||||
/proc/not_has_ooc_text(mob/user)
|
||||
if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.metadata || length(user.client.prefs.metadata) < 15))
|
||||
if (CONFIG_GET(flag/allow_metadata) && (!user.client?.prefs?.read_preference(/datum/preference/text/living/ooc_notes) || length(user.client.prefs.read_preference(/datum/preference/text/living/ooc_notes)) < 15))
|
||||
to_chat(user, span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -631,5 +631,5 @@ GLOBAL_LIST_EMPTY(text_tag_cache)
|
||||
|
||||
/// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts
|
||||
/proc/sanitize_css_class_name(name)
|
||||
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
|
||||
return replacetext(name, regex, "")
|
||||
var/static/regex/regex = new(@"[^a-zA-Z0-9]","g")
|
||||
return replacetext(name, regex, "")
|
||||
|
||||
Reference in New Issue
Block a user