mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
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:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user