Wraps lowertext() to ensure proper stringification. (#82442)

## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
This commit is contained in:
san7890
2024-04-10 13:19:43 -06:00
committed by GitHub
parent a8ea2910c9
commit c403a6eccc
98 changed files with 175 additions and 161 deletions
@@ -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")