mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
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:
@@ -97,8 +97,8 @@
|
||||
attack_self(user)
|
||||
return
|
||||
|
||||
L.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [src.name] to flash [L.name] ([L.ckey])</span>")
|
||||
L.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been flashed (attempt) with [src.name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [src.name] to flash [L.name] ([L.ckey])</span>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) Used the [src.name] to flash [L.name] ([L.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(L))
|
||||
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
@@ -35,7 +35,7 @@ effective or pretty fucking useless.
|
||||
to_chat(user, SPAN_WARNING("The mind batterer has been burnt out!"))
|
||||
return
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used [src] to knock down people in the area.</span>")
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used [src] to knock down people in the area.</span>"
|
||||
|
||||
for(var/mob/living/carbon/human/M in orange(10, user))
|
||||
if(prob(50))
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var/obj/item/gift/G = new /obj/item/gift(src.loc)
|
||||
G.size = attacking_item.w_class
|
||||
G.w_class = G.size + 1
|
||||
G.icon_state = text("gift[]", G.size)
|
||||
G.icon_state = "gift[G.size]"
|
||||
G.gift = attacking_item
|
||||
attacking_item.forceMove(G)
|
||||
G.add_fingerprint(user)
|
||||
@@ -82,8 +82,8 @@
|
||||
|
||||
H.forceMove(present)
|
||||
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [src.name] to wrap [H.name] ([H.ckey])</span>")
|
||||
H.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been wrapped with [src.name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [src.name] to wrap [H.name] ([H.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] used [src] to wrap [key_name_admin(H)] (<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(H))
|
||||
|
||||
else
|
||||
@@ -123,7 +123,7 @@
|
||||
if(user in target) //no wrapping closets that you are inside - it's not physically possible
|
||||
return
|
||||
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='notice'>Has used [src.name] on [REF(target)]</span>")
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='notice'>Has used [src.name] on [REF(target)]</span>"
|
||||
|
||||
if(istype(target, /obj/item) && !(istype(target, /obj/item/storage) && !istype(target,/obj/item/storage/box)))
|
||||
var/obj/item/O = target
|
||||
|
||||
@@ -110,7 +110,7 @@ AI MODULES
|
||||
..()
|
||||
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
|
||||
targetName = targName
|
||||
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
|
||||
desc = "A 'safeguard' AI module: 'Safeguard [targetName]. Anyone threatening or attempting to harm [targetName] is no longer to be considered a crew member, and is a threat which must be neutralized.'"
|
||||
|
||||
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C)
|
||||
if(!targetName)
|
||||
@@ -119,7 +119,7 @@ AI MODULES
|
||||
..()
|
||||
|
||||
/obj/item/aiModule/safeguard/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
var/law = text("Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.", targetName, targetName)
|
||||
var/law = "Safeguard [targetName]. Anyone threatening or attempting to harm [targetName] is no longer to be considered a crew member, and is a threat which must be neutralized."
|
||||
target.add_supplied_law(9, law)
|
||||
GLOB.lawchanges.Add("The law specified [targetName]")
|
||||
|
||||
@@ -136,7 +136,7 @@ AI MODULES
|
||||
..()
|
||||
var/targName = sanitize(input("Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
|
||||
targetName = targName
|
||||
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
|
||||
desc = "A 'one crew member' AI module: 'Only [targetName] is a crew member.'"
|
||||
|
||||
/obj/item/aiModule/oneHuman/install(var/obj/machinery/computer/C)
|
||||
if(!targetName)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
set src in usr
|
||||
|
||||
if (t)
|
||||
src.name = text("data disk- '[]'", t)
|
||||
src.name = "data disk- '[t]'"
|
||||
else
|
||||
src.name = "data disk"
|
||||
src.add_fingerprint(usr)
|
||||
@@ -185,16 +185,16 @@ var/const/NO_EMAG_ACT = -50
|
||||
|
||||
/obj/item/card/id/proc/dat()
|
||||
var/dat = ("<table><tr><td>")
|
||||
dat += text("Name: []<br>", registered_name)
|
||||
dat += text("Age: []<br>\n", age)
|
||||
dat += text("Sex: []<br>\n", sex)
|
||||
dat += text("Citizenship: []<br>\n", citizenship)
|
||||
dat += text("Assignment and Employer: []<br>\n", assignment)
|
||||
dat += text("Blood Type: []<br>\n", blood_type)
|
||||
dat += text("Fingerprint Hash: []<br>\n", fingerprint_hash)
|
||||
dat += text("DNA Hash: []\n", dna_hash)
|
||||
dat += "Name: [registered_name]<br>"
|
||||
dat += "Age: [age]<br>\n"
|
||||
dat += "Sex: [sex]<br>\n"
|
||||
dat += "Citizenship: [citizenship]<br>\n"
|
||||
dat += "Assignment and Employer: [assignment]<br>\n"
|
||||
dat += "Blood Type: [blood_type]<br>\n"
|
||||
dat += "Fingerprint Hash: [fingerprint_hash]<br>\n"
|
||||
dat += "DNA Hash: [dna_hash]\n"
|
||||
if(mining_points)
|
||||
dat += text("<br>Ore Redemption Points: []\n", mining_points)
|
||||
dat += "<br>Ore Redemption Points: [mining_points]\n"
|
||||
if(front && side)
|
||||
dat +="<td align = center valign = top>Front and Side Photograph<br><img src=front.png height=128 width=128 border=4><img src=side.png height=128 width=128 border=4></td>"
|
||||
dat += "</tr></table>"
|
||||
|
||||
@@ -132,8 +132,8 @@
|
||||
if((buf.types & DNA2_BUF_SE) && (block ? (GetState() && block == MONKEYBLOCK) : GetState(MONKEYBLOCK)))
|
||||
injected_with_monkey = SPAN_DANGER(" (MONKEY)")
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [name] to inject [M.name] ([M.ckey])</span>")
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] to inject [M.name] ([M.ckey])</span>"
|
||||
log_attack("[user.name] ([user.ckey]) used the [name] to inject [M.name] ([M.ckey])")
|
||||
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with \the [src][injected_with_monkey]")
|
||||
|
||||
|
||||
@@ -83,8 +83,8 @@
|
||||
return
|
||||
|
||||
if(user)
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Attempted to handcuff [H.name] ([H.ckey])</span>")
|
||||
H.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been handcuffed (attempt) by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Attempted to handcuff [H.name] ([H.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] attempted to handcuff [key_name_admin(H)] (<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(H))
|
||||
feedback_add_details("handcuffs","H")
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
var/s = SPAN_WARNING("[H] chews on [H.get_pronoun("his")] [O.name]!")
|
||||
H.visible_message(s, SPAN_WARNING("You chew on your [O.name]!"))
|
||||
message_admins("[key_name_admin(H)] is chewing on [H.get_pronoun("his")] restrained hand - (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[H.x];Y=[H.y];Z=[H.z]'>JMP</a>)")
|
||||
H.attack_log += text("\[[time_stamp()]\] <span class='warning'>[s] ([H.ckey])</span>")
|
||||
H.attack_log += "\[[time_stamp()]\] <span class='warning'>[s] ([H.ckey])</span>"
|
||||
log_attack("[s] ([H.ckey])")
|
||||
|
||||
if(O.take_damage(3, 0, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, used_weapon = "teeth marks"))
|
||||
|
||||
@@ -100,8 +100,8 @@
|
||||
|
||||
user.visible_message(SPAN_WARNING("\The [user] tags \the [M] with \the [src]!"), SPAN_NOTICE("You tag \the [M] with \the [src]."), range = 3)
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([ipc_tag.name]) by [user.name] ([user.ckey])</font>")
|
||||
user.attack_log += text("\[[time_stamp()]\] <span class='warning'>Used the [name] ([ipc_tag.name]) to implant [M.name] ([M.ckey])</span>")
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'> Implanted with [name] ([ipc_tag.name]) by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log += "\[[time_stamp()]\] <span class='warning'>Used the [name] ([ipc_tag.name]) to implant [M.name] ([M.ckey])</span>"
|
||||
msg_admin_attack("[key_name_admin(user)] implanted [key_name_admin(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (<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))
|
||||
|
||||
ipc_tag.replaced(H, H.organs_by_name[BP_HEAD])
|
||||
|
||||
@@ -79,15 +79,15 @@
|
||||
|
||||
/obj/item/storage/secure/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/dat = "<TT><B>[src]</B><BR>\n\nLock Status: [(src.locked ? "LOCKED" : "UNLOCKED")]"
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
dat += "<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>"
|
||||
if (src.emagged)
|
||||
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
|
||||
dat += "<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>"
|
||||
if (src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
dat += "<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>"
|
||||
message = "src.code[]"
|
||||
if (!src.locked)
|
||||
message = "*****"
|
||||
dat += "<HR>\n>[message]<BR>\n<A href='?src=[REF(src)];type=1'>1</A>-<A href='?src=[REF(src)];type=2'>2</A>-<A href='?src=[REF(src)];type=3'>3</A><BR>\n<A href='?src=[REF(src)];type=4'>4</A>-<A href='?src=[REF(src)];type=5'>5</A>-<A href='?src=[REF(src)];type=6'>6</A><BR>\n<A href='?src=[REF(src)];type=7'>7</A>-<A href='?src=[REF(src)];type=8'>8</A>-<A href='?src=[REF(src)];type=9'>9</A><BR>\n<A href='?src=[REF(src)];type=R'>R</A>-<A href='?src=[REF(src)];type=0'>0</A>-<A href='?src=[REF(src)];type=E'>E</A><BR>\n</TT>"
|
||||
@@ -117,7 +117,7 @@
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", href_list["type"])
|
||||
src.code += "[href_list["type"]]"
|
||||
if (length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
Reference in New Issue
Block a user