Text() away (#19850)

Refactored all the builtin text procs to use string interpolation
instead.
Added a linting for the above.

This is based on, and should only be merged after, #19847
This commit is contained in:
Fluffy
2024-09-21 14:46:31 +02:00
committed by GitHub
parent 1aeeb6827d
commit 8f9de7c3e2
76 changed files with 351 additions and 264 deletions
+1 -1
View File
@@ -47,7 +47,7 @@
else if(attacking_item.ispen())
var/n_name = sanitizeSafe( tgui_input_text(user, "What would you like to label the folder?", "Folder Labelling", max_length = MAX_NAME_LEN), MAX_NAME_LEN )
if(Adjacent(user) && user.stat == 0)
name = "folder[(n_name ? text("- '[n_name]'") : null)]"
name = "folder[(n_name ? "- '[n_name]'" : null)]"
return
/obj/item/folder/attack_self(mob/user as mob)
+2 -2
View File
@@ -187,8 +187,8 @@
var/trans = reagents.trans_to_mob(M, 30, CHEM_BLOOD)
to_chat(user, SPAN_ALERT("You stab \the [M] with \the [src], injecting all of its contents.")) // To the stabber.
to_chat(M, SPAN_WARNING("You feel a small <b>pinch</b>!")) // To the stabbed.
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [name] to stab [M.name] ([M.ckey])</span>")
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been stabbed with [name] by [user.name] ([user.ckey])</font>"
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to stab [M.name] ([M.ckey])</span>"
msg_admin_attack("[user.name] ([user.ckey]) Used the [name] to stab [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user),ckey_target=key_name(M))
admin_inject_log(user, M, src, contained_reagents, reagents.get_temperature(), trans) // Admin log.