diff --git a/code/__DEFINES/text.dm b/code/__DEFINES/text.dm index c303eebbcdc..8b0fda53cd7 100644 --- a/code/__DEFINES/text.dm +++ b/code/__DEFINES/text.dm @@ -64,6 +64,10 @@ */ #define PREVENT_CHARACTER_TRIM_LOSS(integer) (integer + 1) +/// BYOND's string procs don't support being used on datum references (as in it doesn't look for a name for stringification) +/// We just use this macro to ensure that we will only pass strings to this BYOND-level function without developers needing to really worry about it. +#define LOWER_TEXT(thing) lowertext(UNLINT("[thing]")) + /// Folder directory for strings #define STRING_DIRECTORY "strings" diff --git a/code/__HELPERS/atmospherics.dm b/code/__HELPERS/atmospherics.dm index 3ac3bfaed56..2a59cf60b40 100644 --- a/code/__HELPERS/atmospherics.dm +++ b/code/__HELPERS/atmospherics.dm @@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(gas_handbook) factor_info["factor_name"] = factor factor_info["factor_type"] = "misc" if(factor == "Temperature" || factor == "Pressure") - factor_info["tooltip"] = "Reaction is influenced by the [lowertext(factor)] of the place where the reaction is occuring." + factor_info["tooltip"] = "Reaction is influenced by the [LOWER_TEXT(factor)] of the place where the reaction is occuring." else if(factor == "Energy") factor_info["tooltip"] = "Energy released by the reaction, may or may not result in linear temperature change depending on a slew of other factors." else if(factor == "Radiation") @@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(gas_handbook) factor_info["factor_name"] = factor factor_info["factor_type"] = "misc" if(factor == "Temperature" || factor == "Pressure") - factor_info["tooltip"] = "Reaction is influenced by the [lowertext(factor)] of the place where the reaction is occuring." + factor_info["tooltip"] = "Reaction is influenced by the [LOWER_TEXT(factor)] of the place where the reaction is occuring." else if(factor == "Energy") factor_info["tooltip"] = "Energy released by the reaction, may or may not result in linear temperature change depending on a slew of other factors." else if(factor == "Radiation") diff --git a/code/__HELPERS/chat_filter.dm b/code/__HELPERS/chat_filter.dm index 34d811bf85b..22fe36a2136 100644 --- a/code/__HELPERS/chat_filter.dm +++ b/code/__HELPERS/chat_filter.dm @@ -1,6 +1,6 @@ // [2] is the group index of the blocked term when it is not using word bounds. // This is sanity checked by unit tests. -#define GET_MATCHED_GROUP(regex) (lowertext(regex.group[2] || regex.match)) +#define GET_MATCHED_GROUP(regex) (LOWER_TEXT(regex.group[2] || regex.match)) /// Given a text, will return what word is on the IC filter, with the reason. /// Returns null if the message is OK. diff --git a/code/__HELPERS/hearted.dm b/code/__HELPERS/hearted.dm index 1eafef56a4f..adae298516e 100644 --- a/code/__HELPERS/hearted.dm +++ b/code/__HELPERS/hearted.dm @@ -54,7 +54,7 @@ if(!heart_nominee) return - heart_nominee = lowertext(heart_nominee) + heart_nominee = LOWER_TEXT(heart_nominee) var/list/name_checks = get_mob_by_name(heart_nominee) if(!name_checks || name_checks.len == 0) query_heart(attempt + 1) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index b6870757cdc..a67c78a12cc 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -679,7 +679,7 @@ world if(uppercase == 1) letter = uppertext(letter) else if(uppercase == -1) - letter = lowertext(letter) + letter = LOWER_TEXT(letter) var/image/text_image = new(loc = A) text_image.maptext = MAPTEXT("[letter]") diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm index 33bb0348df5..12c34d3a705 100644 --- a/code/__HELPERS/names.dm +++ b/code/__HELPERS/names.dm @@ -215,22 +215,22 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex) if(2) switch(rand(1,3))//Food, drinks, or places. Only selectable once. if(1) - . += lowertext(pick(drinks)) + . += LOWER_TEXT(pick(drinks)) if(2) - . += lowertext(pick(foods)) + . += LOWER_TEXT(pick(foods)) if(3) - . += lowertext(pick(locations)) + . += LOWER_TEXT(pick(locations)) safety -= 2 if(3) switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once. if(1) - . += lowertext(pick(nouns)) + . += LOWER_TEXT(pick(nouns)) if(2) - . += lowertext(pick(objects)) + . += LOWER_TEXT(pick(objects)) if(3) - . += lowertext(pick(adjectives)) + . += LOWER_TEXT(pick(adjectives)) if(4) - . += lowertext(pick(threats)) + . += LOWER_TEXT(pick(threats)) if(!return_list) if(words == 1) . += "." diff --git a/code/__HELPERS/reagents.dm b/code/__HELPERS/reagents.dm index d557db3173a..012a1fd5cc0 100644 --- a/code/__HELPERS/reagents.dm +++ b/code/__HELPERS/reagents.dm @@ -155,7 +155,7 @@ ///Returns a list of chemical_reaction datums that have the input STRING as a product /proc/get_reagent_type_from_product_string(string) - var/input_reagent = replacetext(lowertext(string), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name + var/input_reagent = replacetext(LOWER_TEXT(string), " ", "") //95% of the time, the reagent id is a lowercase/no spaces version of the name if (isnull(input_reagent)) return @@ -194,7 +194,7 @@ /proc/get_chem_id(chem_name) for(var/X in GLOB.chemical_reagents_list) var/datum/reagent/R = GLOB.chemical_reagents_list[X] - if(ckey(chem_name) == ckey(lowertext(R.name))) + if(ckey(chem_name) == ckey(LOWER_TEXT(R.name))) return X ///Takes a type in and returns a list of associated recipes diff --git a/code/__HELPERS/sanitize_values.dm b/code/__HELPERS/sanitize_values.dm index 555f5175d7a..8cc03a317e9 100644 --- a/code/__HELPERS/sanitize_values.dm +++ b/code/__HELPERS/sanitize_values.dm @@ -73,7 +73,7 @@ if(97 to 102) //letters a to f . += char if(65 to 70) //letters A to F - char = lowertext(char) + char = LOWER_TEXT(char) . += char else break diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 4f6031fcf3f..40915672ef9 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -785,7 +785,7 @@ GLOBAL_LIST_INIT(binary, list("0","1")) return string var/base = next_backslash == 1 ? "" : copytext(string, 1, next_backslash) - var/macro = lowertext(copytext(string, next_backslash + length(string[next_backslash]), next_space)) + var/macro = LOWER_TEXT(copytext(string, next_backslash + length(string[next_backslash]), next_space)) var/rest = next_backslash > leng ? "" : copytext(string, next_space + length(string[next_space])) //See https://secure.byond.com/docs/ref/info.html#/DM/text/macros @@ -1082,7 +1082,7 @@ GLOBAL_LIST_INIT(binary, list("0","1")) var/text_length = length(text) //remove caps since words will be shuffled - text = lowertext(text) + text = LOWER_TEXT(text) //remove punctuation for same reasons as above var/punctuation = "" var/punctuation_hit_list = list("!","?",".","-") diff --git a/code/__HELPERS/type2type.dm b/code/__HELPERS/type2type.dm index 9eb1a491f42..03d308e34d6 100644 --- a/code/__HELPERS/type2type.dm +++ b/code/__HELPERS/type2type.dm @@ -389,7 +389,7 @@ GLOBAL_LIST_INIT(modulo_angle_to_dir, list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH, if(/turf) return "turf" else //regex everything else (works for /proc too) - return lowertext(replacetext("[the_type]", "[type2parent(the_type)]/", "")) + return LOWER_TEXT(replacetext("[the_type]", "[type2parent(the_type)]/", "")) /// Return html to load a url. /// for use inside of browse() calls to html assets that might be loaded on a cdn. diff --git a/code/controllers/configuration/config_entry.dm b/code/controllers/configuration/config_entry.dm index fb1cf4bf5a6..7f28c361267 100644 --- a/code/controllers/configuration/config_entry.dm +++ b/code/controllers/configuration/config_entry.dm @@ -25,7 +25,7 @@ /datum/config_entry/New() if(type == abstract_type) CRASH("Abstract config entry [type] instatiated!") - name = lowertext(type2top(type)) + name = LOWER_TEXT(type2top(type)) default_protection = protection set_default() @@ -100,7 +100,7 @@ return FALSE config_entry_value = auto_trim ? trim(str_val) : str_val if(lowercase) - config_entry_value = lowertext(config_entry_value) + config_entry_value = LOWER_TEXT(config_entry_value) return TRUE /datum/config_entry/number @@ -148,7 +148,7 @@ return FALSE str_val = trim(str_val) if (str_val != "") - config_entry_value += lowercase ? lowertext(str_val) : str_val + config_entry_value += lowercase ? LOWER_TEXT(str_val) : str_val return TRUE /datum/config_entry/number_list @@ -246,7 +246,7 @@ config_key = jointext(config_entry_words, splitter) if(lowercase_key) - config_key = lowertext(config_key) + config_key = LOWER_TEXT(config_key) is_ambiguous = (length(config_entry_words) > 2) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index 830f15ae559..b7f48fcab5e 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -165,7 +165,7 @@ if(IsAdminAdvancedProcCall()) return - var/filename_to_test = world.system_type == MS_WINDOWS ? lowertext(filename) : filename + var/filename_to_test = world.system_type == MS_WINDOWS ? LOWER_TEXT(filename) : filename if(filename_to_test in stack) log_config_error("Warning: Config recursion detected ([english_list(stack)]), breaking!") return @@ -192,10 +192,10 @@ var/value = null if(pos) - entry = lowertext(copytext(L, 1, pos)) + entry = LOWER_TEXT(copytext(L, 1, pos)) value = copytext(L, pos + length(L[pos])) else - entry = lowertext(L) + entry = LOWER_TEXT(L) if(!entry) continue @@ -210,7 +210,7 @@ // Reset directive, used for setting a config value back to defaults. Useful for string list config types if (entry == "$reset") - var/datum/config_entry/resetee = _entries[lowertext(value)] + var/datum/config_entry/resetee = _entries[LOWER_TEXT(value)] if (!value || !resetee) log_config_error("Warning: invalid $reset directive: [value]") continue @@ -364,10 +364,10 @@ Example config: var/data = null if(pos) - command = lowertext(copytext(t, 1, pos)) + command = LOWER_TEXT(copytext(t, 1, pos)) data = copytext(t, pos + length(t[pos])) else - command = lowertext(t) + command = LOWER_TEXT(t) if(!command) continue @@ -471,7 +471,7 @@ Example config: var/list/formatted_banned_words = list() for (var/banned_word in banned_words) - formatted_banned_words[lowertext(banned_word)] = banned_words[banned_word] + formatted_banned_words[LOWER_TEXT(banned_word)] = banned_words[banned_word] return formatted_banned_words /datum/controller/configuration/proc/compile_filter_regex(list/banned_words) diff --git a/code/controllers/configuration/entries/resources.dm b/code/controllers/configuration/entries/resources.dm index c839ccc078d..1fb8a6237d4 100644 --- a/code/controllers/configuration/entries/resources.dm +++ b/code/controllers/configuration/entries/resources.dm @@ -6,7 +6,7 @@ /datum/config_entry/string/asset_transport /datum/config_entry/string/asset_transport/ValidateAndSet(str_val) - return (lowertext(str_val) in list("simple", "webroot")) && ..(lowertext(str_val)) + return (LOWER_TEXT(str_val) in list("simple", "webroot")) && ..(LOWER_TEXT(str_val)) /datum/config_entry/string/asset_cdn_webroot protection = CONFIG_ENTRY_LOCKED diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index fe28c7f3b00..468882f0e86 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -88,7 +88,7 @@ SUBSYSTEM_DEF(ticker) var/use_rare_music = prob(1) for(var/S in provisional_title_music) - var/lower = lowertext(S) + var/lower = LOWER_TEXT(S) var/list/L = splittext(lower,"+") switch(L.len) if(3) //rare+MAP+sound.ogg or MAP+rare.sound.ogg -- Rare Map-specific sounds @@ -112,7 +112,7 @@ SUBSYSTEM_DEF(ticker) for(var/S in music) var/list/L = splittext(S,".") if(L.len >= 2) - var/ext = lowertext(L[L.len]) //pick the real extension, no 'honk.ogg.exe' nonsense here + var/ext = LOWER_TEXT(L[L.len]) //pick the real extension, no 'honk.ogg.exe' nonsense here if(byond_sound_formats[ext]) continue music -= S diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm index 0a9a636c9a7..1f40dd921dd 100644 --- a/code/controllers/subsystem/title.dm +++ b/code/controllers/subsystem/title.dm @@ -25,7 +25,7 @@ SUBSYSTEM_DEF(title) for(var/S in provisional_title_screens) var/list/L = splittext(S,"+") - if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png")) || (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name))))) + if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png")) || (L.len > 1 && ((use_rare_screens && LOWER_TEXT(L[1]) == "rare") || (LOWER_TEXT(L[1]) == LOWER_TEXT(SSmapping.config.map_name))))) title_screens += S if(length(title_screens)) diff --git a/code/datums/brain_damage/hypnosis.dm b/code/datums/brain_damage/hypnosis.dm index dbaa571cacd..5630073c955 100644 --- a/code/datums/brain_damage/hypnosis.dm +++ b/code/datums/brain_damage/hypnosis.dm @@ -61,7 +61,7 @@ ..() if(SPT_PROB(1, seconds_per_tick)) if(prob(50)) - to_chat(owner, span_hypnophrase("...[lowertext(hypnotic_phrase)]...")) + to_chat(owner, span_hypnophrase("...[LOWER_TEXT(hypnotic_phrase)]...")) else owner.cause_hallucination( \ /datum/hallucination/chat, \ diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 21ecf1b520b..1d121d0db8a 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -212,7 +212,7 @@ word = copytext(word, 1, suffix_foundon) word = html_decode(word) - if(lowertext(word) in common_words) + if(LOWER_TEXT(word) in common_words) new_message += word + suffix else if(prob(30) && message_split.len > 2) diff --git a/code/datums/components/cult_ritual_item.dm b/code/datums/components/cult_ritual_item.dm index 74bac463e32..7d9710977ce 100644 --- a/code/datums/components/cult_ritual_item.dm +++ b/code/datums/components/cult_ritual_item.dm @@ -221,7 +221,7 @@ cultist.log_message("erased a [rune.cultist_name] rune with [parent].", LOG_GAME) message_admins("[ADMIN_LOOKUPFLW(cultist)] erased a [rune.cultist_name] rune with [parent].") - to_chat(cultist, span_notice("You carefully erase the [lowertext(rune.cultist_name)] rune.")) + to_chat(cultist, span_notice("You carefully erase the [LOWER_TEXT(rune.cultist_name)] rune.")) qdel(rune) /* @@ -338,8 +338,8 @@ var/obj/effect/rune/made_rune = new rune_to_scribe(our_turf, chosen_keyword) made_rune.add_mob_blood(cultist) - to_chat(cultist, span_cult("The [lowertext(made_rune.cultist_name)] rune [made_rune.cultist_desc]")) - cultist.log_message("scribed \a [lowertext(made_rune.cultist_name)] rune using [parent] ([parent.type])", LOG_GAME) + to_chat(cultist, span_cult("The [LOWER_TEXT(made_rune.cultist_name)] rune [made_rune.cultist_desc]")) + cultist.log_message("scribed \a [LOWER_TEXT(made_rune.cultist_name)] rune using [parent] ([parent.type])", LOG_GAME) SSblackbox.record_feedback("tally", "cult_runes_scribed", 1, made_rune.cultist_name) return TRUE diff --git a/code/datums/components/deadchat_control.dm b/code/datums/components/deadchat_control.dm index 7517f35ff29..210ef26a052 100644 --- a/code/datums/components/deadchat_control.dm +++ b/code/datums/components/deadchat_control.dm @@ -61,7 +61,7 @@ /datum/component/deadchat_control/proc/deadchat_react(mob/source, message) SIGNAL_HANDLER - message = lowertext(message) + message = LOWER_TEXT(message) if(!inputs[message]) return @@ -162,7 +162,7 @@ */ /datum/component/deadchat_control/proc/waive_automute(mob/speaker, client/client, message, mute_type) SIGNAL_HANDLER - if(mute_type == MUTE_DEADCHAT && inputs[lowertext(message)]) + if(mute_type == MUTE_DEADCHAT && inputs[LOWER_TEXT(message)]) return WAIVE_AUTOMUTE_CHECK return NONE diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 85a6a7e386b..d4b80ea1dd8 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -215,7 +215,7 @@ Behavior that's still missing from this component that original food items had t if(foodtypes) var/list/types = bitfield_to_list(foodtypes, FOOD_FLAGS) - examine_list += span_notice("It is [lowertext(english_list(types))].") + examine_list += span_notice("It is [LOWER_TEXT(english_list(types))].") var/quality = get_perceived_food_quality(user) if(quality > 0) diff --git a/code/datums/components/material/material_container.dm b/code/datums/components/material/material_container.dm index 69f67d46df3..a17e642e039 100644 --- a/code/datums/components/material/material_container.dm +++ b/code/datums/components/material/material_container.dm @@ -102,7 +102,7 @@ var/datum/material/M = I var/amt = materials[I] / SHEET_MATERIAL_AMOUNT if(amt) - examine_texts += span_notice("It has [amt] sheets of [lowertext(M.name)] stored.") + examine_texts += span_notice("It has [amt] sheets of [LOWER_TEXT(M.name)] stored.") /datum/component/material_container/vv_edit_var(var_name, var_value) var/old_flags = mat_container_flags diff --git a/code/datums/components/surgery_initiator.dm b/code/datums/components/surgery_initiator.dm index a1a354a7c21..002195ee677 100644 --- a/code/datums/components/surgery_initiator.dm +++ b/code/datums/components/surgery_initiator.dm @@ -317,7 +317,7 @@ var/datum/surgery/procedure = new surgery.type(target, selected_zone, affecting_limb) ADD_TRAIT(target, TRAIT_ALLOWED_HONORBOUND_ATTACK, type) - target.balloon_alert(user, "starting \"[lowertext(procedure.name)]\"") + target.balloon_alert(user, "starting \"[LOWER_TEXT(procedure.name)]\"") user.visible_message( span_notice("[user] drapes [parent] over [target]'s [parse_zone(selected_zone)] to prepare for surgery."), diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm index 5007d8caeb9..163de4867d5 100644 --- a/code/datums/components/uplink.dm +++ b/code/datums/components/uplink.dm @@ -378,8 +378,8 @@ /datum/component/uplink/proc/new_ringtone(datum/source, mob/living/user, new_ring_text) SIGNAL_HANDLER - if(trim(lowertext(new_ring_text)) != trim(lowertext(unlock_code))) - if(trim(lowertext(new_ring_text)) == trim(lowertext(failsafe_code))) + if(trim(LOWER_TEXT(new_ring_text)) != trim(LOWER_TEXT(unlock_code))) + if(trim(LOWER_TEXT(new_ring_text)) == trim(LOWER_TEXT(failsafe_code))) failsafe(user) return COMPONENT_STOP_RINGTONE_CHANGE return @@ -415,8 +415,8 @@ if(channel != RADIO_CHANNEL_UPLINK) return - if(!findtext(lowertext(message), lowertext(unlock_code))) - if(failsafe_code && findtext(lowertext(message), lowertext(failsafe_code))) + if(!findtext(LOWER_TEXT(message), LOWER_TEXT(unlock_code))) + if(failsafe_code && findtext(LOWER_TEXT(message), LOWER_TEXT(failsafe_code))) failsafe(user) // no point returning cannot radio, youre probably ded return locked = FALSE diff --git a/code/datums/greyscale/json_reader.dm b/code/datums/greyscale/json_reader.dm index ffe143c28fc..38286631fed 100644 --- a/code/datums/greyscale/json_reader.dm +++ b/code/datums/greyscale/json_reader.dm @@ -63,7 +63,7 @@ ) /datum/json_reader/blend_mode/ReadJson(value) - var/new_value = blend_modes[lowertext(value)] + var/new_value = blend_modes[LOWER_TEXT(value)] if(isnull(new_value)) CRASH("Blend mode expected but got '[value]'") return new_value diff --git a/code/datums/memory/_memory.dm b/code/datums/memory/_memory.dm index 0656d32006a..08a694616a3 100644 --- a/code/datums/memory/_memory.dm +++ b/code/datums/memory/_memory.dm @@ -392,7 +392,7 @@ if(istype(character, /datum/mind)) var/datum/mind/character_mind = character - return "\the [lowertext(initial(character_mind.assigned_role.title))]" + return "\the [LOWER_TEXT(initial(character_mind.assigned_role.title))]" // Generic result - mobs get "the guy", objs / turfs get "a thing" return ismob(character) ? "\the [character]" : "\a [character]" diff --git a/code/datums/quirks/negative_quirks/insanity.dm b/code/datums/quirks/negative_quirks/insanity.dm index 56b56a53812..40e70f07b18 100644 --- a/code/datums/quirks/negative_quirks/insanity.dm +++ b/code/datums/quirks/negative_quirks/insanity.dm @@ -25,7 +25,7 @@ added_trauma.resilience = TRAUMA_RESILIENCE_ABSOLUTE added_trauma.name = name added_trauma.desc = medical_record_text - added_trauma.scan_desc = lowertext(name) + added_trauma.scan_desc = LOWER_TEXT(name) added_trauma.gain_text = null added_trauma.lose_text = null @@ -33,7 +33,7 @@ added_trama_ref = WEAKREF(added_trauma) /datum/quirk/insanity/post_add() - var/rds_policy = get_policy("[type]") || "Please note that your [lowertext(name)] does NOT give you any additional right to attack people or cause chaos." + var/rds_policy = get_policy("[type]") || "Please note that your [LOWER_TEXT(name)] does NOT give you any additional right to attack people or cause chaos." // I don't /think/ we'll need this, but for newbies who think "roleplay as insane" = "license to kill", it's probably a good thing to have. to_chat(quirk_holder, span_big(span_info(rds_policy))) diff --git a/code/datums/station_traits/negative_traits.dm b/code/datums/station_traits/negative_traits.dm index 917bb6c7210..e4c16d713cc 100644 --- a/code/datums/station_traits/negative_traits.dm +++ b/code/datums/station_traits/negative_traits.dm @@ -149,7 +149,7 @@ /datum/station_trait/overflow_job_bureaucracy/proc/set_overflow_job_override(datum/source) SIGNAL_HANDLER var/datum/job/picked_job = pick(SSjob.get_valid_overflow_jobs()) - chosen_job_name = lowertext(picked_job.title) // like Chief Engineers vs like chief engineers + chosen_job_name = LOWER_TEXT(picked_job.title) // like Chief Engineers vs like chief engineers SSjob.set_overflow_role(picked_job.type) /datum/station_trait/slow_shuttle diff --git a/code/datums/status_effects/debuffs/speech_debuffs.dm b/code/datums/status_effects/debuffs/speech_debuffs.dm index 07bcd3c2543..4963a660b22 100644 --- a/code/datums/status_effects/debuffs/speech_debuffs.dm +++ b/code/datums/status_effects/debuffs/speech_debuffs.dm @@ -187,7 +187,7 @@ /datum/status_effect/speech/slurring/apply_speech(original_char) var/modified_char = original_char - var/lower_char = lowertext(modified_char) + var/lower_char = LOWER_TEXT(modified_char) if(prob(common_prob) && (lower_char in common_replacements)) var/to_replace = common_replacements[lower_char] if(islist(to_replace)) diff --git a/code/datums/storage/storage.dm b/code/datums/storage/storage.dm index a1a4180132f..87398f52555 100644 --- a/code/datums/storage/storage.dm +++ b/code/datums/storage/storage.dm @@ -402,7 +402,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches) var/datum/storage/bigger_fish = parent.loc.atom_storage if(bigger_fish && bigger_fish.max_specific_storage < max_specific_storage) if(messages && user) - user.balloon_alert(user, "[lowertext(parent.loc.name)] is in the way!") + user.balloon_alert(user, "[LOWER_TEXT(parent.loc.name)] is in the way!") return FALSE if(isitem(parent)) diff --git a/code/datums/voice_of_god_command.dm b/code/datums/voice_of_god_command.dm index 052af9d060b..21d4f460617 100644 --- a/code/datums/voice_of_god_command.dm +++ b/code/datums/voice_of_god_command.dm @@ -35,7 +35,7 @@ GLOBAL_LIST_INIT(voice_of_god_commands, init_voice_of_god_commands()) if(!user.say(message, spans = span_list, sanitize = FALSE, ignore_spam = ignore_spam, forced = forced)) return - message = lowertext(message) + message = LOWER_TEXT(message) var/list/mob/living/listeners = list() //used to check if the speaker specified a name or a job to focus on @@ -299,7 +299,7 @@ GLOBAL_LIST_INIT(voice_of_god_commands, init_voice_of_god_commands()) for(var/mob/living/target as anything in listeners) var/to_say = user.name // 0.1% chance to be a smartass - if(findtext(lowertext(message), smartass_regex) && prob(0.1)) + if(findtext(LOWER_TEXT(message), smartass_regex) && prob(0.1)) to_say = "My name" addtimer(CALLBACK(target, TYPE_PROC_REF(/atom/movable, say), to_say), 0.5 SECONDS * iteration) iteration++ diff --git a/code/datums/wounds/bones.dm b/code/datums/wounds/bones.dm index 9911a7cdd5d..9495d88cdc5 100644 --- a/code/datums/wounds/bones.dm +++ b/code/datums/wounds/bones.dm @@ -238,7 +238,7 @@ return FALSE if(user.grab_state == GRAB_PASSIVE) - to_chat(user, span_warning("You must have [victim] in an aggressive grab to manipulate [victim.p_their()] [lowertext(name)]!")) + to_chat(user, span_warning("You must have [victim] in an aggressive grab to manipulate [victim.p_their()] [LOWER_TEXT(name)]!")) return TRUE if(user.grab_state >= GRAB_AGGRESSIVE) diff --git a/code/datums/wounds/pierce.dm b/code/datums/wounds/pierce.dm index 4b104dedb34..c6aaffe8483 100644 --- a/code/datums/wounds/pierce.dm +++ b/code/datums/wounds/pierce.dm @@ -74,7 +74,7 @@ if(victim.bodytemperature < (BODYTEMP_NORMAL - 10)) adjust_blood_flow(-0.1 * seconds_per_tick) if(SPT_PROB(2.5, seconds_per_tick)) - to_chat(victim, span_notice("You feel the [lowertext(name)] in your [limb.plaintext_zone] firming up from the cold!")) + to_chat(victim, span_notice("You feel the [LOWER_TEXT(name)] in your [limb.plaintext_zone] firming up from the cold!")) if(HAS_TRAIT(victim, TRAIT_BLOODY_MESS)) adjust_blood_flow(0.25 * seconds_per_tick) // old heparin used to just add +2 bleed stacks per tick, this adds 0.5 bleed flow to all open cuts which is probably even stronger as long as you can cut them first diff --git a/code/game/atom/atom_color.dm b/code/game/atom/atom_color.dm index e5b52460aa0..2508e86f44d 100644 --- a/code/game/atom/atom_color.dm +++ b/code/game/atom/atom_color.dm @@ -42,15 +42,15 @@ * Can optionally be supplied with a range of priorities, IE only checking "washable" or above */ /atom/proc/is_atom_colour(looking_for_color, min_priority_index = 1, max_priority_index = COLOUR_PRIORITY_AMOUNT) - // make sure uppertext hex strings don't mess with lowertext hex strings - looking_for_color = lowertext(looking_for_color) + // make sure uppertext hex strings don't mess with LOWER_TEXT hex strings + looking_for_color = LOWER_TEXT(looking_for_color) if(!LAZYLEN(atom_colours)) // no atom colors list has been set up, just check the color var - return lowertext(color) == looking_for_color + return LOWER_TEXT(color) == looking_for_color for(var/i in min_priority_index to max_priority_index) - if(lowertext(atom_colours[i]) == looking_for_color) + if(LOWER_TEXT(atom_colours[i]) == looking_for_color) return TRUE return FALSE diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index ed896cc7576..b096633a9c1 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -110,7 +110,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/camera/xray, 0) for(var/network_name in network) network -= network_name - network += lowertext(network_name) + network += LOWER_TEXT(network_name) GLOB.cameranet.cameras += src diff --git a/code/game/machinery/camera/camera_construction.dm b/code/game/machinery/camera/camera_construction.dm index 48bf4ccabaa..15f22d02cbe 100644 --- a/code/game/machinery/camera/camera_construction.dm +++ b/code/game/machinery/camera/camera_construction.dm @@ -39,7 +39,7 @@ return ITEM_INTERACT_BLOCKING for(var/i in tempnetwork) tempnetwork -= i - tempnetwork += lowertext(i) + tempnetwork += LOWER_TEXT(i) camera_construction_state = CAMERA_STATE_FINISHED toggle_cam(user, displaymessage = FALSE) network = tempnetwork diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 0c6dd3d9c55..17bbe2299f7 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -30,7 +30,7 @@ // Convert networks to lowercase for(var/i in network) network -= i - network += lowertext(i) + network += LOWER_TEXT(i) // Initialize map objects cam_screen = new cam_screen.generate_view(map_name) diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index a271517b0c4..488331c41b8 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -30,7 +30,7 @@ . = ..() for(var/i in networks) networks -= i - networks += lowertext(i) + networks += LOWER_TEXT(i) if(lock_override) if(lock_override & CAMERA_LOCK_STATION) z_lock |= SSmapping.levels_by_trait(ZTRAIT_STATION) diff --git a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm index f6e1e92c2a5..f19f3d725c7 100644 --- a/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm +++ b/code/game/machinery/dna_infuser/organ_sets/rat_organs.dm @@ -103,7 +103,7 @@ /obj/item/organ/internal/tongue/rat/modify_speech(datum/source, list/speech_args) . = ..() - var/message = lowertext(speech_args[SPEECH_MESSAGE]) + var/message = LOWER_TEXT(speech_args[SPEECH_MESSAGE]) if(message == "hi" || message == "hi.") speech_args[SPEECH_MESSAGE] = "Cheesed to meet you!" if(message == "hi?") diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index d4cf080da69..06b1b977847 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -1066,7 +1066,7 @@ DEFINE_BITFIELD(turret_flags, list( shoot_cyborgs = !shoot_cyborgs if (user) var/status = shoot_cyborgs ? "Shooting Borgs" : "Not Shooting Borgs" - balloon_alert(user, lowertext(status)) + balloon_alert(user, LOWER_TEXT(status)) add_hiddenprint(user) log_combat(user, src, "[status]") updateTurrets() diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 36e09176c99..0abe9312a5f 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1048,7 +1048,7 @@ /obj/item/proc/apply_outline(outline_color = null) if(((get(src, /mob) != usr) && !loc?.atom_storage && !(item_flags & IN_STORAGE)) || QDELETED(src) || isobserver(usr)) //cancel if the item isn't in an inventory, is being deleted, or if the person hovering is a ghost (so that people spectating you don't randomly make your items glow) return FALSE - var/theme = lowertext(usr.client?.prefs?.read_preference(/datum/preference/choiced/ui_style)) + var/theme = LOWER_TEXT(usr.client?.prefs?.read_preference(/datum/preference/choiced/ui_style)) if(!outline_color) //if we weren't provided with a color, take the theme's color switch(theme) //yeah it kinda has to be this way if("midnight") diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 429ade110fb..b73e2a4a994 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -418,7 +418,7 @@ /obj/item/toy/crayon/proc/crayon_text_strip(text) text = copytext(text, 1, MAX_MESSAGE_LEN) var/static/regex/crayon_regex = new /regex(@"[^\w!?,.=&%#+/\-]", "ig") - return lowertext(crayon_regex.Replace(text, "")) + return LOWER_TEXT(crayon_regex.Replace(text, "")) /// Attempts to color the target. Returns how many charges were used. /obj/item/toy/crayon/proc/use_on(atom/target, mob/user, params) diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index b7a96d777ef..88c9251d5b2 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -21,7 +21,7 @@ if(LAZYLEN(channels) || translate_binary) var/list/examine_text_list = list() for(var/i in channels) - examine_text_list += "[GLOB.channel_tokens[i]] - [lowertext(i)]" + examine_text_list += "[GLOB.channel_tokens[i]] - [LOWER_TEXT(i)]" if(translate_binary) examine_text_list += "[GLOB.channel_tokens[MODE_BINARY]] - [MODE_BINARY]" diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 98f4282c626..310df72dbda 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -54,9 +54,9 @@ GLOBAL_LIST_INIT(channel_tokens, list( if(length(channels)) for(var/i in 1 to length(channels)) if(i == 1) - avail_chans += "use [MODE_TOKEN_DEPARTMENT] or [GLOB.channel_tokens[channels[i]]] for [lowertext(channels[i])]" + avail_chans += "use [MODE_TOKEN_DEPARTMENT] or [GLOB.channel_tokens[channels[i]]] for [LOWER_TEXT(channels[i])]" else - avail_chans += "use [GLOB.channel_tokens[channels[i]]] for [lowertext(channels[i])]" + avail_chans += "use [GLOB.channel_tokens[channels[i]]] for [LOWER_TEXT(channels[i])]" . += span_notice("A small screen on the headset displays the following available frequencies:\n[english_list(avail_chans)].") if(command) diff --git a/code/game/objects/items/devices/scanners/gas_analyzer.dm b/code/game/objects/items/devices/scanners/gas_analyzer.dm index 5a1be36b37e..cd57bd24a7e 100644 --- a/code/game/objects/items/devices/scanners/gas_analyzer.dm +++ b/code/game/objects/items/devices/scanners/gas_analyzer.dm @@ -159,7 +159,7 @@ var/list/airs = islist(mixture) ? mixture : list(mixture) var/list/new_gasmix_data = list() for(var/datum/gas_mixture/air as anything in airs) - var/mix_name = capitalize(lowertext(target.name)) + var/mix_name = capitalize(LOWER_TEXT(target.name)) if(airs.len != 1) //not a unary gas mixture mix_name += " - Node [airs.Find(air)]" new_gasmix_data += list(gas_mixture_parser(air, mix_name)) @@ -184,7 +184,7 @@ var/list/airs = islist(mixture) ? mixture : list(mixture) for(var/datum/gas_mixture/air as anything in airs) - var/mix_name = capitalize(lowertext(target.name)) + var/mix_name = capitalize(LOWER_TEXT(target.name)) if(airs.len > 1) //not a unary gas mixture var/mix_number = airs.Find(air) message += span_boldnotice("Node [mix_number]") diff --git a/code/game/objects/items/granters/magic/_spell_granter.dm b/code/game/objects/items/granters/magic/_spell_granter.dm index e1ca6352293..21a69248a14 100644 --- a/code/game/objects/items/granters/magic/_spell_granter.dm +++ b/code/game/objects/items/granters/magic/_spell_granter.dm @@ -91,4 +91,4 @@ spell_options -= spell granted_action = pick(spell_options) - action_name = lowertext(initial(granted_action.name)) + action_name = LOWER_TEXT(initial(granted_action.name)) diff --git a/code/game/objects/items/mail.dm b/code/game/objects/items/mail.dm index 5f084300442..4a3de80959f 100644 --- a/code/game/objects/items/mail.dm +++ b/code/game/objects/items/mail.dm @@ -512,7 +512,7 @@ return FALSE if(loc != user) return FALSE - mail_type = lowertext(mail_type) + mail_type = LOWER_TEXT(mail_type) var/mail_armed = tgui_alert(user, "Arm it?", "Mail Counterfeiting", list("Yes", "No")) == "Yes" if(isnull(mail_armed)) diff --git a/code/modules/admin/greyscale_modify_menu.dm b/code/modules/admin/greyscale_modify_menu.dm index ea0774cc99d..f96ecb7c590 100644 --- a/code/modules/admin/greyscale_modify_menu.dm +++ b/code/modules/admin/greyscale_modify_menu.dm @@ -154,13 +154,13 @@ if("recolor") var/index = text2num(params["color_index"]) - var/new_color = lowertext(params["new_color"]) + var/new_color = LOWER_TEXT(params["new_color"]) if(split_colors[index] != new_color && (findtext(new_color, GLOB.is_color) || (unlocked && findtext(new_color, GLOB.is_alpha_color)))) split_colors[index] = new_color queue_refresh() if("recolor_from_string") - var/full_color_string = lowertext(params["color_string"]) + var/full_color_string = LOWER_TEXT(params["color_string"]) if(full_color_string != split_colors.Join() && ReadColorsFromString(full_color_string)) queue_refresh() diff --git a/code/modules/admin/sql_ban_system.dm b/code/modules/admin/sql_ban_system.dm index f32eefe046f..bb8b938c7c0 100644 --- a/code/modules/admin/sql_ban_system.dm +++ b/code/modules/admin/sql_ban_system.dm @@ -577,7 +577,7 @@ duration = text2num(duration) if (!(interval in list("SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "YEAR"))) interval = "MINUTE" - var/time_message = "[duration] [lowertext(interval)]" //no DisplayTimeText because our duration is of variable interval type + var/time_message = "[duration] [LOWER_TEXT(interval)]" //no DisplayTimeText because our duration is of variable interval type if(duration > 1) //pluralize the interval if necessary time_message += "s" var/is_server_ban = (roles_to_ban[1] == "Server") diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 17047dbcd68..50da67115ea 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -1027,7 +1027,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/sdql2_vv_all, new(null return null else if(expression [start] == "{" && long) - if(lowertext(copytext(expression[start + 1], 1, 3)) != "0x") //3 == length("0x") + 1 + if(LOWER_TEXT(copytext(expression[start + 1], 1, 3)) != "0x") //3 == length("0x") + 1 to_chat(usr, span_danger("Invalid pointer syntax: [expression[start + 1]]"), confidential = TRUE) return null var/datum/located = locate("\[[expression[start + 1]]]") diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm index 58a18e1a936..eb262339841 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_parser.dm @@ -109,7 +109,7 @@ return null /datum/sdql_parser/proc/tokenl(i) - return lowertext(token(i)) + return LOWER_TEXT(token(i)) /datum/sdql_parser/proc/query_options(i, list/node) var/list/options = list() @@ -624,7 +624,7 @@ node += "null" i++ - else if(lowertext(copytext(token(i), 1, 3)) == "0x" && isnum(hex2num(copytext(token(i), 3))))//3 == length("0x") + 1 + else if(LOWER_TEXT(copytext(token(i), 1, 3)) == "0x" && isnum(hex2num(copytext(token(i), 3))))//3 == length("0x") + 1 node += hex2num(copytext(token(i), 3)) i++ diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm index 06c19ce5c91..bc74347475a 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2_wrappers.dm @@ -81,8 +81,8 @@ /proc/_log(X, Y) return log(X, Y) -/proc/_lowertext(T) - return lowertext(T) +/proc/_LOWER_TEXT(T) + return LOWER_TEXT(T) /proc/_matrix(a, b, c, d, e, f) return matrix(a, b, c, d, e, f) diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm index f133d486fdb..78b61fd40ba 100644 --- a/code/modules/admin/verbs/admingame.dm +++ b/code/modules/admin/verbs/admingame.dm @@ -222,7 +222,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(record_found)//If they have a record we can determine a few things. new_character.real_name = record_found.name - new_character.gender = lowertext(record_found.gender) + new_character.gender = LOWER_TEXT(record_found.gender) new_character.age = record_found.age var/datum/dna/found_dna = record_found.locked_dna new_character.hardset_dna(found_dna.unique_identity, found_dna.mutation_index, null, record_found.name, record_found.blood_type, new record_found.species_type, found_dna.features) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 8d09e28ec7c..a389980f533 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -1047,10 +1047,10 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new) if(!M.mind) continue - for(var/string in splittext(lowertext(M.real_name), " ")) + for(var/string in splittext(LOWER_TEXT(M.real_name), " ")) if(!(string in ignored_words)) nameWords += string - for(var/string in splittext(lowertext(M.name), " ")) + for(var/string in splittext(LOWER_TEXT(M.name), " ")) if(!(string in ignored_words)) nameWords += string diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index dd8bbb5cda4..d5157decf4c 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -629,7 +629,7 @@ // The ticket's id var/ticket_id = ticket?.id - var/compliant_msg = trim(lowertext(message)) + var/compliant_msg = trim(LOWER_TEXT(message)) var/tgs_tagged = "[sender](TGS/External)" var/list/splits = splittext(compliant_msg, " ") var/split_size = length(splits) diff --git a/code/modules/admin/verbs/player_ticket_history.dm b/code/modules/admin/verbs/player_ticket_history.dm index ac87707e98d..08373db3470 100644 --- a/code/modules/admin/verbs/player_ticket_history.dm +++ b/code/modules/admin/verbs/player_ticket_history.dm @@ -34,7 +34,7 @@ GLOBAL_PROTECT(player_ticket_history) var/list/user_selections = list() /datum/ticket_history_holder/proc/cache_history_for_ckey(ckey, entries = 5) - ckey = lowertext(ckey) + ckey = LOWER_TEXT(ckey) if(!isnum(entries) || entries <= 0) return diff --git a/code/modules/antagonists/disease/disease_datum.dm b/code/modules/antagonists/disease/disease_datum.dm index 9d5af7ab83e..17364feec55 100644 --- a/code/modules/antagonists/disease/disease_datum.dm +++ b/code/modules/antagonists/disease/disease_datum.dm @@ -54,7 +54,7 @@ result += objectives_text - var/special_role_text = lowertext(name) + var/special_role_text = LOWER_TEXT(name) if(win) result += span_greentext("The [special_role_text] was successful!") diff --git a/code/modules/antagonists/malf_ai/malf_ai.dm b/code/modules/antagonists/malf_ai/malf_ai.dm index f9f422d6e6f..d0c39f405d5 100644 --- a/code/modules/antagonists/malf_ai/malf_ai.dm +++ b/code/modules/antagonists/malf_ai/malf_ai.dm @@ -246,7 +246,7 @@ result += objectives_text - var/special_role_text = lowertext(name) + var/special_role_text = LOWER_TEXT(name) if(malf_ai_won) result += span_greentext("The [special_role_text] was successful!") diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 88776b6819a..5ad5aeecf26 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -360,7 +360,7 @@ result += contractor_round_end() result += "
The traitor had a total of [DISPLAY_PROGRESSION(uplink_handler.progression_points)] Reputation and [uplink_handler.telecrystals] Unused Telecrystals." - var/special_role_text = lowertext(name) + var/special_role_text = LOWER_TEXT(name) if(traitor_won) result += span_greentext("The [special_role_text] was successful!") diff --git a/code/modules/antagonists/traitor/objectives/sabotage_machinery.dm b/code/modules/antagonists/traitor/objectives/sabotage_machinery.dm index 9723d2b653e..5a31c4c1739 100644 --- a/code/modules/antagonists/traitor/objectives/sabotage_machinery.dm +++ b/code/modules/antagonists/traitor/objectives/sabotage_machinery.dm @@ -49,7 +49,7 @@ GLOBAL_DATUM_INIT(objective_machine_handler, /datum/objective_target_machine_han for(var/obj/machinery/machine as anything in possible_machines) prepare_machine(machine) - replace_in_name("%JOB%", lowertext(chosen_job)) + replace_in_name("%JOB%", LOWER_TEXT(chosen_job)) replace_in_name("%MACHINE%", possible_machines[1].name) return TRUE diff --git a/code/modules/art/paintings.dm b/code/modules/art/paintings.dm index dd370f480f4..a4758eb9e11 100644 --- a/code/modules/art/paintings.dm +++ b/code/modules/art/paintings.dm @@ -350,7 +350,7 @@ var/result = rustg_dmi_create_png(png_filename, "[width]", "[height]", image_data) if(result) CRASH("Error generating painting png : [result]") - painting_metadata.md5 = md5(lowertext(image_data)) + painting_metadata.md5 = md5(LOWER_TEXT(image_data)) generated_icon = new(png_filename) icon_generated = TRUE update_appearance() @@ -663,7 +663,7 @@ stack_trace("Invalid persistence_id - [persistence_id]") return var/data = current_canvas.get_data_string() - var/md5 = md5(lowertext(data)) + var/md5 = md5(LOWER_TEXT(data)) var/list/current = SSpersistent_paintings.paintings[persistence_id] if(!current) current = list() diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index c4bb2d17610..0fdc5093511 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -62,10 +62,10 @@ GLOBAL_LIST_INIT(potentialConfigRandomZlevels, generate_map_list_from_directory( var/name = null if (pos) - name = lowertext(copytext(t, 1, pos)) + name = LOWER_TEXT(copytext(t, 1, pos)) else - name = lowertext(t) + name = LOWER_TEXT(t) if (!name) continue diff --git a/code/modules/cargo/bounties/assistant.dm b/code/modules/cargo/bounties/assistant.dm index 7d345802eef..636b4f4791b 100644 --- a/code/modules/cargo/bounties/assistant.dm +++ b/code/modules/cargo/bounties/assistant.dm @@ -257,7 +257,7 @@ ..() fluid_type = pick(AQUARIUM_FLUID_FRESHWATER, AQUARIUM_FLUID_SALTWATER, AQUARIUM_FLUID_SULPHWATEVER) name = "[fluid_type] Fish" - description = "We need [lowertext(fluid_type)] fish to populate our aquariums with. Fishes that are dead or bought from cargo will only be paid half as much." + description = "We need [LOWER_TEXT(fluid_type)] fish to populate our aquariums with. Fishes that are dead or bought from cargo will only be paid half as much." /datum/bounty/item/assistant/fish/fluid/can_ship_fish(obj/item/fish/fishie) return compatible_fluid_type(fishie.required_fluid_type, fluid_type) diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 684721af5ee..a5753fc6f33 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( return #ifndef TESTING - if (lowertext(hsrc_command) == "_debug") //disable the integrated byond vv in the client side debugging tools since it doesn't respect vv read protections + if (LOWER_TEXT(hsrc_command) == "_debug") //disable the integrated byond vv in the client side debugging tools since it doesn't respect vv read protections return #endif diff --git a/code/modules/client/preferences/glasses.dm b/code/modules/client/preferences/glasses.dm index 03c975abce7..a08f15955ea 100644 --- a/code/modules/client/preferences/glasses.dm +++ b/code/modules/client/preferences/glasses.dm @@ -11,7 +11,7 @@ if (value == "Random") return icon('icons/effects/random_spawners.dmi', "questionmark") else - return icon('icons/obj/clothing/glasses.dmi', "glasses_[lowertext(value)]") + return icon('icons/obj/clothing/glasses.dmi', "glasses_[LOWER_TEXT(value)]") /datum/preference/choiced/glasses/is_accessible(datum/preferences/preferences) if (!..(preferences)) diff --git a/code/modules/client/preferences/middleware/antags.dm b/code/modules/client/preferences/middleware/antags.dm index b3bc613d2ee..abd9495d09a 100644 --- a/code/modules/client/preferences/middleware/antags.dm +++ b/code/modules/client/preferences/middleware/antags.dm @@ -180,4 +180,4 @@ GLOBAL_LIST_INIT(non_ruleset_antagonists, list( /// Serializes an antag name to be used for preferences UI /proc/serialize_antag_name(antag_name) // These are sent through CSS, so they need to be safe to use as class names. - return lowertext(sanitize_css_class_name(antag_name)) + return LOWER_TEXT(sanitize_css_class_name(antag_name)) diff --git a/code/modules/emoji/emoji_parse.dm b/code/modules/emoji/emoji_parse.dm index 533628eedf4..fa9b9ea0d5e 100644 --- a/code/modules/emoji/emoji_parse.dm +++ b/code/modules/emoji/emoji_parse.dm @@ -16,7 +16,7 @@ pos = search search = findtext(text, ":", pos + length(text[pos])) if(search) - emoji = lowertext(copytext(text, pos + length(text[pos]), search)) + emoji = LOWER_TEXT(copytext(text, pos + length(text[pos]), search)) var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/chat) var/tag = sheet.icon_tag("emoji-[emoji]") if(tag) @@ -46,9 +46,9 @@ pos = search search = findtext(text, ":", pos + length(text[pos])) if(search) - var/word = lowertext(copytext(text, pos + length(text[pos]), search)) + var/word = LOWER_TEXT(copytext(text, pos + length(text[pos]), search)) if(word in emojis) - final += lowertext(copytext(text, pos, search + length(text[search]))) + final += LOWER_TEXT(copytext(text, pos, search + length(text[search]))) pos = search + length(text[search]) continue break diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index d079323e3a9..f46f4c3912a 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -234,7 +234,7 @@ else t_prod = new product(output_loc, new_seed = src) if(parent.myseed.plantname != initial(parent.myseed.plantname)) - t_prod.name = lowertext(parent.myseed.plantname) + t_prod.name = LOWER_TEXT(parent.myseed.plantname) if(productdesc) t_prod.desc = productdesc t_prod.seed.name = parent.myseed.name @@ -475,7 +475,7 @@ return if(!user.can_perform_action(src)) return - name = "[lowertext(newplantname)]" + name = "[LOWER_TEXT(newplantname)]" plantname = newplantname if("Seed Description") var/newdesc = tgui_input_text(user, "Write a new seed description", "Seed Description", desc, 180) diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm index 7094de85a89..c49122d4641 100644 --- a/code/modules/instruments/songs/play_legacy.dm +++ b/code/modules/instruments/songs/play_legacy.dm @@ -9,7 +9,7 @@ var/list/octaves = list(3, 3, 3, 3, 3, 3, 3) var/list/accents = list("n", "n", "n", "n", "n", "n", "n") for(var/line in lines) - var/list/chords = splittext(lowertext(line), ",") + var/list/chords = splittext(LOWER_TEXT(line), ",") for(var/chord in chords) var/list/compiled_chord = list() var/tempodiv = 1 diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index 836c2fdd86b..05e23a8c97a 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -9,7 +9,7 @@ var/list/octaves = list(3, 3, 3, 3, 3, 3, 3) var/list/accents = list("n", "n", "n", "n", "n", "n", "n") for(var/line in lines) - var/list/chords = splittext(lowertext(line), ",") + var/list/chords = splittext(LOWER_TEXT(line), ",") for(var/chord in chords) var/list/compiled_chord = list() var/tempodiv = 1 diff --git a/code/modules/jobs/job_types/chaplain/chaplain.dm b/code/modules/jobs/job_types/chaplain/chaplain.dm index 58821ec5358..8bcfaefcfc6 100644 --- a/code/modules/jobs/job_types/chaplain/chaplain.dm +++ b/code/modules/jobs/job_types/chaplain/chaplain.dm @@ -69,7 +69,7 @@ var/new_bible = player_client?.prefs?.read_preference(/datum/preference/name/bible) || DEFAULT_BIBLE holy_bible.deity_name = new_deity - switch(lowertext(new_religion)) + switch(LOWER_TEXT(new_religion)) if("homosexuality", "gay", "penis", "ass", "cock", "cocks") new_bible = pick("Guys Gone Wild","Coming Out of The Closet","War of Cocks") switch(new_bible) diff --git a/code/modules/jobs/jobs.dm b/code/modules/jobs/jobs.dm index a0b0ebee560..0c2731c268e 100644 --- a/code/modules/jobs/jobs.dm +++ b/code/modules/jobs/jobs.dm @@ -56,7 +56,7 @@ GLOBAL_PROTECT(exp_specialmap) var/static/regex/chef_expand = new("chef") var/static/regex/borg_expand = new("(?" /obj/item/stack/marker_beacon/update_icon_state() - icon_state = "[initial(icon_state)][lowertext(picked_color)]" + icon_state = "[initial(icon_state)][LOWER_TEXT(picked_color)]" return ..() /obj/item/stack/marker_beacon/attack_self(mob/user) @@ -116,7 +116,7 @@ GLOBAL_LIST_INIT(marker_beacon_colors, sort_list(list( set_light(light_range, light_power, GLOB.marker_beacon_colors[picked_color]) /obj/structure/marker_beacon/update_icon_state() - icon_state = "[icon_prefix][lowertext(picked_color)]-on" + icon_state = "[icon_prefix][LOWER_TEXT(picked_color)]-on" return ..() /obj/structure/marker_beacon/attack_hand(mob/living/user, list/modifiers) diff --git a/code/modules/mob/dead/observer/observer_say.dm b/code/modules/mob/dead/observer/observer_say.dm index e43086349b3..e3a5ff3cdf0 100644 --- a/code/modules/mob/dead/observer/observer_say.dm +++ b/code/modules/mob/dead/observer/observer_say.dm @@ -5,7 +5,7 @@ /mob/dead/observer/get_message_mods(message, list/mods) var/key = message[1] if((key in GLOB.department_radio_prefixes) && length(message) > length(key) + 1 && !mods[RADIO_EXTENSION]) - mods[RADIO_KEY] = lowertext(message[1 + length(key)]) + mods[RADIO_KEY] = LOWER_TEXT(message[1 + length(key)]) mods[RADIO_EXTENSION] = GLOB.department_radio_keys[mods[RADIO_KEY]] return message diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index bf9e099e5c9..c1822ff0e51 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -19,7 +19,7 @@ param = copytext(act, custom_param + length(act[custom_param])) act = copytext(act, 1, custom_param) - act = lowertext(act) + act = LOWER_TEXT(act) var/list/key_emotes = GLOB.emote_list[act] if(!length(key_emotes)) diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index 3a19eebadc9..9bfc19b3008 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -633,20 +633,20 @@ to_chat(user, span_warning("\"[input]\"")) REPORT_CHAT_FILTER_TO_USER(user, filter_result) log_filter("IC Emote", input, filter_result) - SSblackbox.record_feedback("tally", "ic_blocked_words", 1, lowertext(config.ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "ic_blocked_words", 1, LOWER_TEXT(config.ic_filter_regex.match)) return FALSE filter_result = is_soft_ic_filtered(input) if(filter_result) if(tgui_alert(user,"Your emote contains \"[filter_result[CHAT_FILTER_INDEX_WORD]]\". \"[filter_result[CHAT_FILTER_INDEX_REASON]]\", Are you sure you want to emote it?", "Soft Blocked Word", list("Yes", "No")) != "Yes") - SSblackbox.record_feedback("tally", "soft_ic_blocked_words", 1, lowertext(config.soft_ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "soft_ic_blocked_words", 1, LOWER_TEXT(config.soft_ic_filter_regex.match)) log_filter("Soft IC Emote", input, filter_result) return FALSE message_admins("[ADMIN_LOOKUPFLW(user)] has passed the soft filter for emote \"[filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Emote: \"[input]\"") log_admin_private("[key_name(user)] has passed the soft filter for emote \"[filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Emote: \"[input]\"") - SSblackbox.record_feedback("tally", "passed_soft_ic_blocked_words", 1, lowertext(config.soft_ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "passed_soft_ic_blocked_words", 1, LOWER_TEXT(config.soft_ic_filter_regex.match)) log_filter("Soft IC Emote (Passed)", input, filter_result) return TRUE diff --git a/code/modules/mob/living/silicon/ai/_preferences.dm b/code/modules/mob/living/silicon/ai/_preferences.dm index 4b0aaaecc25..10958b2adc4 100644 --- a/code/modules/mob/living/silicon/ai/_preferences.dm +++ b/code/modules/mob/living/silicon/ai/_preferences.dm @@ -115,7 +115,7 @@ GLOBAL_LIST_INIT(ai_core_display_screens, sort_list(list( else if(input == "Random") input = pick(GLOB.ai_core_display_screens - "Random") - return "ai-[lowertext(input)]" + return "ai-[LOWER_TEXT(input)]" /proc/resolve_ai_icon(input) if (input == "Portrait") diff --git a/code/modules/mob/living/silicon/ai/ai_say.dm b/code/modules/mob/living/silicon/ai/ai_say.dm index 6a4cd255a6a..967cbb2b984 100644 --- a/code/modules/mob/living/silicon/ai/ai_say.dm +++ b/code/modules/mob/living/silicon/ai/ai_say.dm @@ -126,7 +126,7 @@ words.len = 30 for(var/word in words) - word = lowertext(trim(word)) + word = LOWER_TEXT(trim(word)) if(!word) words -= word continue @@ -156,7 +156,7 @@ /proc/play_vox_word(word, ai_turf, mob/only_listener) - word = lowertext(word) + word = LOWER_TEXT(word) if(GLOB.vox_sounds[word]) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 92ad416c275..d011e19f153 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -959,7 +959,7 @@ selected_hand = (active_hand_index % held_items.len)+1 if(istext(selected_hand)) - selected_hand = lowertext(selected_hand) + selected_hand = LOWER_TEXT(selected_hand) if(selected_hand == "right" || selected_hand == "r") selected_hand = 2 if(selected_hand == "left" || selected_hand == "l") diff --git a/code/modules/mob/mob_say.dm b/code/modules/mob/mob_say.dm index 6b300b2938a..e2a840d569b 100644 --- a/code/modules/mob/mob_say.dm +++ b/code/modules/mob/mob_say.dm @@ -66,17 +66,17 @@ to_chat(src, span_warning("\"[message]\"")) REPORT_CHAT_FILTER_TO_USER(src, filter_result) log_filter("IC", message, filter_result) - SSblackbox.record_feedback("tally", "ic_blocked_words", 1, lowertext(config.ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "ic_blocked_words", 1, LOWER_TEXT(config.ic_filter_regex.match)) return FALSE if(soft_filter_result && !filterproof) if(tgui_alert(usr,"Your message contains \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\". \"[soft_filter_result[CHAT_FILTER_INDEX_REASON]]\", Are you sure you want to say it?", "Soft Blocked Word", list("Yes", "No")) != "Yes") - SSblackbox.record_feedback("tally", "soft_ic_blocked_words", 1, lowertext(config.soft_ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "soft_ic_blocked_words", 1, LOWER_TEXT(config.soft_ic_filter_regex.match)) log_filter("Soft IC", message, filter_result) return FALSE message_admins("[ADMIN_LOOKUPFLW(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Message: \"[message]\"") log_admin_private("[key_name(usr)] has passed the soft filter for \"[soft_filter_result[CHAT_FILTER_INDEX_WORD]]\" they may be using a disallowed term. Message: \"[message]\"") - SSblackbox.record_feedback("tally", "passed_soft_ic_blocked_words", 1, lowertext(config.soft_ic_filter_regex.match)) + SSblackbox.record_feedback("tally", "passed_soft_ic_blocked_words", 1, LOWER_TEXT(config.soft_ic_filter_regex.match)) log_filter("Soft IC (Passed)", message, filter_result) if(client && !(ignore_spam || forced)) @@ -217,7 +217,7 @@ if(stat == CONSCIOUS) //necessary indentation so it gets stripped of the semicolon anyway. mods[MODE_HEADSET] = TRUE else if((key in GLOB.department_radio_prefixes) && length(message) > length(key) + 1 && !mods[RADIO_EXTENSION]) - mods[RADIO_KEY] = lowertext(message[1 + length(key)]) + mods[RADIO_KEY] = LOWER_TEXT(message[1 + length(key)]) mods[RADIO_EXTENSION] = GLOB.department_radio_keys[mods[RADIO_KEY]] chop_to = length(key) + 2 else if(key == "," && !mods[LANGUAGE_EXTENSION]) diff --git a/code/modules/modular_computers/computers/machinery/console_presets.dm b/code/modules/modular_computers/computers/machinery/console_presets.dm index bc277a72313..0ec80da4bbb 100644 --- a/code/modules/modular_computers/computers/machinery/console_presets.dm +++ b/code/modules/modular_computers/computers/machinery/console_presets.dm @@ -94,7 +94,7 @@ setup_starting_software() REGISTER_REQUIRED_MAP_ITEM(1, 1) if(department_type) - name = "[lowertext(initial(department_type.department_name))] [name]" + name = "[LOWER_TEXT(initial(department_type.department_name))] [name]" cpu.name = name /obj/machinery/modular_computer/preset/cargochat/proc/add_starting_software() @@ -105,7 +105,7 @@ return var/datum/computer_file/program/chatclient/chatprogram = cpu.find_file_by_name("ntnrc_client") - chatprogram.username = "[lowertext(initial(department_type.department_name))]_department" + chatprogram.username = "[LOWER_TEXT(initial(department_type.department_name))]_department" cpu.idle_threads += chatprogram var/datum/computer_file/program/department_order/orderprogram = cpu.find_file_by_name("dept_order") diff --git a/code/modules/modular_computers/file_system/programs/atmosscan.dm b/code/modules/modular_computers/file_system/programs/atmosscan.dm index 8f29af43510..7e260872859 100644 --- a/code/modules/modular_computers/file_system/programs/atmosscan.dm +++ b/code/modules/modular_computers/file_system/programs/atmosscan.dm @@ -44,7 +44,7 @@ var/list/airs = islist(mixture) ? mixture : list(mixture) var/list/new_gasmix_data = list() for(var/datum/gas_mixture/air as anything in airs) - var/mix_name = capitalize(lowertext(target.name)) + var/mix_name = capitalize(LOWER_TEXT(target.name)) if(airs.len != 1) //not a unary gas mixture mix_name += " - Node [airs.Find(air)]" new_gasmix_data += list(gas_mixture_parser(air, mix_name)) diff --git a/code/modules/modular_computers/file_system/programs/secureye.dm b/code/modules/modular_computers/file_system/programs/secureye.dm index eee170e7c2c..aa3ed0e5828 100644 --- a/code/modules/modular_computers/file_system/programs/secureye.dm +++ b/code/modules/modular_computers/file_system/programs/secureye.dm @@ -70,7 +70,7 @@ // Convert networks to lowercase for(var/i in network) network -= i - network += lowertext(i) + network += LOWER_TEXT(i) // Initialize map objects cam_screen = new cam_screen.generate_view(map_name) diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index ce912027225..c9cbb0d3ecc 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -50,9 +50,9 @@ . = ..() if(can_change_cable_layer) if(!QDELETED(powernet)) - . += span_notice("It's operating on the [lowertext(GLOB.cable_layer_to_name["[cable_layer]"])].") + . += span_notice("It's operating on the [LOWER_TEXT(GLOB.cable_layer_to_name["[cable_layer]"])].") else - . += span_warning("It's disconnected from the [lowertext(GLOB.cable_layer_to_name["[cable_layer]"])].") + . += span_warning("It's disconnected from the [LOWER_TEXT(GLOB.cable_layer_to_name["[cable_layer]"])].") . += span_notice("It's power line can be changed with a [EXAMINE_HINT("multitool")].") /obj/machinery/power/multitool_act(mob/living/user, obj/item/tool) diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 4c861a4bb4b..04b9ab8798b 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -26,9 +26,9 @@ /obj/machinery/power/terminal/examine(mob/user) . = ..() if(!QDELETED(powernet)) - . += span_notice("It's operating on the [lowertext(GLOB.cable_layer_to_name["[cable_layer]"])].") + . += span_notice("It's operating on the [LOWER_TEXT(GLOB.cable_layer_to_name["[cable_layer]"])].") else - . += span_warning("It's disconnected from the [lowertext(GLOB.cable_layer_to_name["[cable_layer]"])].") + . += span_warning("It's disconnected from the [LOWER_TEXT(GLOB.cable_layer_to_name["[cable_layer]"])].") /obj/machinery/power/terminal/should_have_node() return TRUE diff --git a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm index 2f2ff330251..3fd769ddba9 100644 --- a/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm @@ -1658,7 +1658,7 @@ need_mob_update += drinker.adjustStaminaLoss(-heal_amt, updating_stamina = FALSE, required_biotype = affected_biotype) if(need_mob_update) drinker.updatehealth() - drinker.visible_message(span_warning("[drinker] shivers with renewed vigor!"), span_notice("One taste of [lowertext(name)] fills you with energy!")) + drinker.visible_message(span_warning("[drinker] shivers with renewed vigor!"), span_notice("One taste of [LOWER_TEXT(name)] fills you with energy!")) if(!drinker.stat && heal_points == 20) //brought us out of softcrit drinker.visible_message(span_danger("[drinker] lurches to [drinker.p_their()] feet!"), span_boldnotice("Up and at 'em, kid.")) diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 3f5ecd20009..2e45ecf641b 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -484,13 +484,13 @@ adjust_blood_flow(-0.06 * reac_volume, initial_flow * 0.6) // 20u of a salt shacker * 0.1 = -1.6~ blood flow, but is always clamped to, at best, third blood loss from that wound. // Crystal irritation worsening recovery. gauzed_clot_rate *= 0.65 - to_chat(carbies, span_notice("The salt bits seep in and stick to [lowertext(src)], painfully irritating the skin but soaking up most of the blood.")) + to_chat(carbies, span_notice("The salt bits seep in and stick to [LOWER_TEXT(src)], painfully irritating the skin but soaking up most of the blood.")) /datum/wound/slash/flesh/on_salt(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.1 * reac_volume, initial_flow * 0.5) // 20u of a salt shacker * 0.1 = -2~ blood flow, but is always clamped to, at best, halve blood loss from that wound. // Crystal irritation worsening recovery. clot_rate *= 0.75 - to_chat(carbies, span_notice("The salt bits seep in and stick to [lowertext(src)], painfully irritating the skin but soaking up most of the blood.")) + to_chat(carbies, span_notice("The salt bits seep in and stick to [LOWER_TEXT(src)], painfully irritating the skin but soaking up most of the blood.")) /datum/wound/burn/flesh/on_salt(reac_volume) // Slightly sanitizes and disinfects, but also increases infestation rate (some bacteria are aided by salt), and decreases flesh healing (can damage the skin from moisture absorption) @@ -498,7 +498,7 @@ infestation -= max(VALUE_PER(0.3, 30) * reac_volume, 0) infestation_rate += VALUE_PER(0.12, 30) * reac_volume flesh_healing -= max(VALUE_PER(5, 30) * reac_volume, 0) - to_chat(victim, span_notice("The salt bits seep in and stick to [lowertext(src)], painfully irritating the skin! After a few moments, it feels marginally better.")) + to_chat(victim, span_notice("The salt bits seep in and stick to [LOWER_TEXT(src)], painfully irritating the skin! After a few moments, it feels marginally better.")) /datum/reagent/consumable/blackpepper name = "Black Pepper" @@ -652,18 +652,18 @@ /datum/wound/pierce/bleed/on_flour(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.015 * reac_volume) // 30u of a flour sack * 0.015 = -0.45~ blood flow, prettay good - to_chat(carbies, span_notice("The flour seeps into [lowertext(src)], painfully drying it up and absorbing some of the blood.")) + to_chat(carbies, span_notice("The flour seeps into [LOWER_TEXT(src)], painfully drying it up and absorbing some of the blood.")) // When some nerd adds infection for wounds, make this increase the infection /datum/wound/slash/flesh/on_flour(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.04 * reac_volume) // 30u of a flour sack * 0.04 = -1.25~ blood flow, pretty good! - to_chat(carbies, span_notice("The flour seeps into [lowertext(src)], painfully drying some of it up and absorbing a little blood.")) + to_chat(carbies, span_notice("The flour seeps into [LOWER_TEXT(src)], painfully drying some of it up and absorbing a little blood.")) // When some nerd adds infection for wounds, make this increase the infection // Don't pour flour onto burn wounds, it increases infection risk! Very unwise. Backed up by REAL info from REAL professionals. // https://www.reuters.com/article/uk-factcheck-flour-burn-idUSKCN26F2N3 /datum/wound/burn/flesh/on_flour(reac_volume) - to_chat(victim, span_notice("The flour seeps into [lowertext(src)], spiking you with intense pain! That probably wasn't a good idea...")) + to_chat(victim, span_notice("The flour seeps into [LOWER_TEXT(src)], spiking you with intense pain! That probably wasn't a good idea...")) sanitization -= min(0, 1) infestation += 0.2 return @@ -758,18 +758,18 @@ /datum/wound/pierce/bleed/on_starch(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.03 * reac_volume) - to_chat(carbies, span_notice("The slimey starch seeps into [lowertext(src)], painfully drying some of it up and absorbing a little blood.")) + to_chat(carbies, span_notice("The slimey starch seeps into [LOWER_TEXT(src)], painfully drying some of it up and absorbing a little blood.")) // When some nerd adds infection for wounds, make this increase the infection return /datum/wound/slash/flesh/on_starch(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.06 * reac_volume) - to_chat(carbies, span_notice("The slimey starch seeps into [lowertext(src)], painfully drying it up and absorbing some of the blood.")) + to_chat(carbies, span_notice("The slimey starch seeps into [LOWER_TEXT(src)], painfully drying it up and absorbing some of the blood.")) // When some nerd adds infection for wounds, make this increase the infection return /datum/wound/burn/flesh/on_starch(reac_volume, mob/living/carbon/carbies) - to_chat(carbies, span_notice("The slimey starch seeps into [lowertext(src)], spiking you with intense pain! That probably wasn't a good idea...")) + to_chat(carbies, span_notice("The slimey starch seeps into [LOWER_TEXT(src)], spiking you with intense pain! That probably wasn't a good idea...")) sanitization -= min(0, 0.5) infestation += 0.1 return diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 75a7cfa5792..991cd5d3098 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -325,18 +325,18 @@ /datum/wound/pierce/bleed/on_saltwater(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.06 * reac_volume, initial_flow * 0.6) - to_chat(carbies, span_notice("The salt water splashes over [lowertext(src)], soaking up the blood.")) + to_chat(carbies, span_notice("The salt water splashes over [LOWER_TEXT(src)], soaking up the blood.")) /datum/wound/slash/flesh/on_saltwater(reac_volume, mob/living/carbon/carbies) adjust_blood_flow(-0.1 * reac_volume, initial_flow * 0.5) - to_chat(carbies, span_notice("The salt water splashes over [lowertext(src)], soaking up the blood.")) + to_chat(carbies, span_notice("The salt water splashes over [LOWER_TEXT(src)], soaking up the blood.")) /datum/wound/burn/flesh/on_saltwater(reac_volume) // Similar but better stats from normal salt. sanitization += VALUE_PER(0.6, 30) * reac_volume infestation -= max(VALUE_PER(0.5, 30) * reac_volume, 0) infestation_rate += VALUE_PER(0.07, 30) * reac_volume - to_chat(victim, span_notice("The salt water splashes over [lowertext(src)], soaking up the... miscellaneous fluids. It feels somewhat better afterwards.")) + to_chat(victim, span_notice("The salt water splashes over [LOWER_TEXT(src)], soaking up the... miscellaneous fluids. It feels somewhat better afterwards.")) return /datum/reagent/water/holywater @@ -711,7 +711,7 @@ var/datum/species/species_type = race affected_mob.set_species(species_type) holder.del_reagent(type) - to_chat(affected_mob, span_warning("You've become \a [lowertext(initial(species_type.name))]!")) + to_chat(affected_mob, span_warning("You've become \a [LOWER_TEXT(initial(species_type.name))]!")) return /datum/reagent/mutationtoxin/classic //The one from plasma on green slimes diff --git a/code/modules/reagents/reagent_containers/cups/_cup.dm b/code/modules/reagents/reagent_containers/cups/_cup.dm index cb3ab1a122b..9aaafda4ead 100644 --- a/code/modules/reagents/reagent_containers/cups/_cup.dm +++ b/code/modules/reagents/reagent_containers/cups/_cup.dm @@ -23,7 +23,7 @@ . = ..() if(drink_type) var/list/types = bitfield_to_list(drink_type, FOOD_FLAGS) - . += span_notice("It is [lowertext(english_list(types))].") + . += span_notice("It is [LOWER_TEXT(english_list(types))].") /** * Checks if the mob actually liked drinking this cup. diff --git a/code/modules/surgery/bodyparts/_bodyparts.dm b/code/modules/surgery/bodyparts/_bodyparts.dm index 530c4f3aa13..1738bac95a2 100644 --- a/code/modules/surgery/bodyparts/_bodyparts.dm +++ b/code/modules/surgery/bodyparts/_bodyparts.dm @@ -342,13 +342,13 @@ for(var/datum/wound/wound as anything in wounds) switch(wound.severity) if(WOUND_SEVERITY_TRIVIAL) - check_list += "\t [span_danger("Your [name] is suffering [wound.a_or_from] [lowertext(wound.name)].")]" + check_list += "\t [span_danger("Your [name] is suffering [wound.a_or_from] [LOWER_TEXT(wound.name)].")]" if(WOUND_SEVERITY_MODERATE) - check_list += "\t [span_warning("Your [name] is suffering [wound.a_or_from] [lowertext(wound.name)]!")]" + check_list += "\t [span_warning("Your [name] is suffering [wound.a_or_from] [LOWER_TEXT(wound.name)]!")]" if(WOUND_SEVERITY_SEVERE) - check_list += "\t [span_boldwarning("Your [name] is suffering [wound.a_or_from] [lowertext(wound.name)]!!")]" + check_list += "\t [span_boldwarning("Your [name] is suffering [wound.a_or_from] [LOWER_TEXT(wound.name)]!!")]" if(WOUND_SEVERITY_CRITICAL) - check_list += "\t [span_boldwarning("Your [name] is suffering [wound.a_or_from] [lowertext(wound.name)]!!!")]" + check_list += "\t [span_boldwarning("Your [name] is suffering [wound.a_or_from] [LOWER_TEXT(wound.name)]!!!")]" for(var/obj/item/embedded_thing in embedded_objects) var/stuck_word = embedded_thing.isEmbedHarmless() ? "stuck" : "embedded" diff --git a/code/modules/surgery/organs/internal/eyes/_eyes.dm b/code/modules/surgery/organs/internal/eyes/_eyes.dm index aaf79ba7553..bffdf1ae44d 100644 --- a/code/modules/surgery/organs/internal/eyes/_eyes.dm +++ b/code/modules/surgery/organs/internal/eyes/_eyes.dm @@ -501,7 +501,7 @@ set_beam_color(new_color, to_update) return TRUE if("enter_color") - var/new_color = lowertext(params["new_color"]) + var/new_color = LOWER_TEXT(params["new_color"]) var/to_update = params["to_update"] set_beam_color(new_color, to_update, sanitize = TRUE) return TRUE diff --git a/code/modules/surgery/organs/internal/tongue/_tongue.dm b/code/modules/surgery/organs/internal/tongue/_tongue.dm index 5098d738d30..469879263cc 100644 --- a/code/modules/surgery/organs/internal/tongue/_tongue.dm +++ b/code/modules/surgery/organs/internal/tongue/_tongue.dm @@ -444,7 +444,7 @@ GLOBAL_LIST_INIT(english_to_zombie, list()) var/list/message_word_list = splittext(message, " ") var/list/translated_word_list = list() for(var/word in message_word_list) - word = GLOB.english_to_zombie[lowertext(word)] + word = GLOB.english_to_zombie[LOWER_TEXT(word)] translated_word_list += word ? word : FALSE // all occurrences of characters "eiou" (case-insensitive) are replaced with "r" diff --git a/code/modules/tooltip/tooltip.dm b/code/modules/tooltip/tooltip.dm index 4b9514aa38c..9956305db26 100644 --- a/code/modules/tooltip/tooltip.dm +++ b/code/modules/tooltip/tooltip.dm @@ -112,7 +112,7 @@ Notes: return var/ui_style = user.client?.prefs?.read_preference(/datum/preference/choiced/ui_style) if(!theme && ui_style) - theme = lowertext(ui_style) + theme = LOWER_TEXT(ui_style) if(!theme) theme = "default" user.client.tooltips.show(tip_src, params, title, content, theme) diff --git a/code/modules/wiremod/components/action/equpiment_action.dm b/code/modules/wiremod/components/action/equpiment_action.dm index 54150ca44d6..641722c595b 100644 --- a/code/modules/wiremod/components/action/equpiment_action.dm +++ b/code/modules/wiremod/components/action/equpiment_action.dm @@ -89,4 +89,4 @@ for(var/ref in granted_to) var/datum/action/granted_action = granted_to[ref] granted_action.name = button_name.value || "Action" - granted_action.button_icon_state = "bci_[replacetextEx(lowertext(icon_options.value), " ", "_")]" + granted_action.button_icon_state = "bci_[replacetextEx(LOWER_TEXT(icon_options.value), " ", "_")]" diff --git a/code/modules/wiremod/components/string/textcase.dm b/code/modules/wiremod/components/string/textcase.dm index ac289654236..70b67740b41 100644 --- a/code/modules/wiremod/components/string/textcase.dm +++ b/code/modules/wiremod/components/string/textcase.dm @@ -41,7 +41,7 @@ var/result switch(textcase_options.value) if(COMP_TEXT_LOWER) - result = lowertext(value) + result = LOWER_TEXT(value) if(COMP_TEXT_UPPER) result = uppertext(value) diff --git a/code/modules/wiremod/core/component.dm b/code/modules/wiremod/core/component.dm index 530f73ded8c..4d8344e1e6a 100644 --- a/code/modules/wiremod/core/component.dm +++ b/code/modules/wiremod/core/component.dm @@ -77,7 +77,7 @@ /obj/item/circuit_component/Initialize(mapload) . = ..() if(name == COMPONENT_DEFAULT_NAME) - name = "[lowertext(display_name)] [COMPONENT_DEFAULT_NAME]" + name = "[LOWER_TEXT(display_name)] [COMPONENT_DEFAULT_NAME]" populate_options() populate_ports() if((circuit_flags & CIRCUIT_FLAG_INPUT_SIGNAL) && !trigger_input) diff --git a/code/modules/wiremod/shell/module.dm b/code/modules/wiremod/shell/module.dm index 6f9a3dda93b..9061bac3e30 100644 --- a/code/modules/wiremod/shell/module.dm +++ b/code/modules/wiremod/shell/module.dm @@ -106,7 +106,7 @@ action_comp.granted_to[REF(user)] = src circuit_component = action_comp name = action_comp.button_name.value - button_icon_state = "bci_[replacetextEx(lowertext(action_comp.icon_options.value), " ", "_")]" + button_icon_state = "bci_[replacetextEx(LOWER_TEXT(action_comp.icon_options.value), " ", "_")]" /datum/action/item_action/mod/pinnable/circuit/Destroy() circuit_component.granted_to -= REF(pinner) diff --git a/tools/ci/check_grep.sh b/tools/ci/check_grep.sh index 8763cca749e..5a3606d71ed 100644 --- a/tools/ci/check_grep.sh +++ b/tools/ci/check_grep.sh @@ -152,6 +152,16 @@ if $grep -i '(add_traits|remove_traits)\(.+,\s*src\)' $code_files; then st=1 fi; +part "ensure proper lowertext usage" +# lowertext() is a BYOND-level proc, so it can be used in any sort of code... including the TGS DMAPI which we don't manage in this repository. +# basically, we filter out any results with "tgs" in it to account for this edgecase without having to enforce this rule in that separate codebase. +# grepping the grep results is a bit of a sad solution to this but it's pretty much the only option in our existing linter framework +if $grep -i 'lowertext\(.+\)' $code_files | $grep -v 'UNLINT\(.+\)' | $grep -v '\/modules\/tgs\/'; then + echo + echo -e "${RED}ERROR: Found a lowertext() proc call. Please use the LOWER_TEXT() macro instead. If you know what you are doing, wrap your text (ensure it is a string) in UNLINT().${NC}" + st=1 +fi; + part "balloon_alert sanity" if $grep 'balloon_alert\(".*"\)' $code_files; then echo