refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+8 -8
View File
@@ -60,7 +60,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
update_icon()
else
if(busy)
visible_message("<span class='notice'>[icon2html(src,viewers(src))] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
visible_message(span_notice("[icon2html(src,viewers(src))] flashes: insufficient materials: [getLackingMaterials(D)]."))
busy = 0
update_icon()
@@ -105,7 +105,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
/obj/machinery/r_n_d/circuit_imprinter/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(busy)
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
to_chat(user, span_notice("\The [src] is busy. Please wait for completion of previous operation."))
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
@@ -119,7 +119,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(istype(O, /obj/item/gripper/no_use/loader))
return 0 //Sheet loaders weren't finishing attack(), this prevents the message "You can't stuff that gripper into this" without preventing the rest of the attack sequence from finishing
if(panel_open)
to_chat(user, "<span class='notice'>You can't load \the [src] while it's opened.</span>")
to_chat(user, span_notice("You can't load \the [src] while it's opened."))
return 1
if(!linked_console)
to_chat(user, "\The [src] must be linked to an R&D console first.")
@@ -127,18 +127,18 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(O.is_open_container())
return 0
if(!istype(O, /obj/item/stack/material)) //Previously checked for specific material sheets, for some reason? Made the check on 133 redundant.
to_chat(user, "<span class='notice'>You cannot insert this item into \the [src].</span>")
to_chat(user, span_notice("You cannot insert this item into \the [src]."))
return 1
if(stat)
return 1
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
to_chat(user, "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>")
to_chat(user, span_notice("\The [src]'s material bin is full. Please remove material before adding more."))
return 1
var/obj/item/stack/material/S = O
if(!(S.material.name in materials))
to_chat(user, "<span class='warning'>The [src] doesn't accept [S.material]!</span>")
to_chat(user, span_warning("The [src] doesn't accept [S.material]!"))
return
busy = 1
@@ -158,9 +158,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
materials[S.material.name] += amnt
S.use(1)
count++
to_chat(user, "<span class='filter_notice'>You insert [count] [sname] into the fabricator.</span>")
to_chat(user, span_filter_notice("You insert [count] [sname] into the fabricator."))
else
to_chat(user, "<span class='filter_notice'>The fabricator cannot hold more [sname].</span>")
to_chat(user, span_filter_notice("The fabricator cannot hold more [sname]."))
busy = 0
updateUsrDialog()
+12 -12
View File
@@ -38,10 +38,10 @@ Note: Must be placed within 3 tiles of the R&D Console
/obj/machinery/r_n_d/destructive_analyzer/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(busy)
to_chat(user, "<span class='notice'>\The [src] is busy right now.</span>")
to_chat(user, span_notice("\The [src] is busy right now."))
return
if(loaded_item)
to_chat(user, "<span class='notice'>There is something already loaded into \the [src].</span>")
to_chat(user, span_notice("There is something already loaded into \the [src]."))
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
@@ -53,25 +53,25 @@ Note: Must be placed within 3 tiles of the R&D Console
if(default_part_replacement(user, O))
return
if(panel_open)
to_chat(user, "<span class='notice'>You can't load \the [src] while it's opened.</span>")
to_chat(user, span_notice("You can't load \the [src] while it's opened."))
return 1
if(!linked_console)
to_chat(user, "<span class='notice'>\The [src] must be linked to an R&D console first.</span>")
to_chat(user, span_notice("\The [src] must be linked to an R&D console first."))
return
if(!loaded_item)
if(isrobot(user)) //Don't put your module items in there!
return
if(!O.origin_tech)
to_chat(user, "<span class='notice'>This doesn't seem to have a tech origin.</span>")
to_chat(user, span_notice("This doesn't seem to have a tech origin."))
return
if(O.origin_tech.len == 0)
to_chat(user, "<span class='notice'>You cannot deconstruct this item.</span>")
to_chat(user, span_notice("You cannot deconstruct this item."))
return
busy = 1
loaded_item = O
user.drop_item()
O.loc = src
to_chat(user, "<span class='notice'>You add \the [O] to \the [src].</span>")
to_chat(user, span_notice("You add \the [O] to \the [src]."))
flick("d_analyzer_la", src)
spawn(10)
update_icon()
@@ -84,13 +84,13 @@ Note: Must be placed within 3 tiles of the R&D Console
var/obj/item/storage/part_replacer/replacer = dropping
replacer.hide_from(user)
if(!linked_console)
to_chat(user, "<span class='notice'>\The [src] must be linked to an R&D console first.</span>")
to_chat(user, span_notice("\The [src] must be linked to an R&D console first."))
return 0
if(!linked_console.linked_lathe)
to_chat(user, "<span class='notice'>Link a protolathe to [src]'s R&D console first.</span>")
to_chat(user, span_notice("Link a protolathe to [src]'s R&D console first."))
return 0
if(!rped_recycler_ready)
to_chat(user, "<span class='notice'>\The [src]'s stock parts recycler isn't ready yet.</span>")
to_chat(user, span_notice("\The [src]'s stock parts recycler isn't ready yet."))
return 0
var/obj/machinery/r_n_d/protolathe/lathe_to_fill = linked_console.linked_lathe
var/lowest_rating = INFINITY // We want the lowest-part tier rating in the RPED so we only recycle the lowest-tier parts.
@@ -98,7 +98,7 @@ Note: Must be placed within 3 tiles of the R&D Console
if(B.rped_rating() < lowest_rating)
lowest_rating = B.rped_rating()
if(lowest_rating == INFINITY)
to_chat(user, "<span class='notice'>Mass part deconstruction attempt canceled - no valid parts for recycling detected.</span>")
to_chat(user, span_notice("Mass part deconstruction attempt canceled - no valid parts for recycling detected."))
return 0
for(var/obj/item/B in replacer.contents)
if(B.rped_rating() > lowest_rating)
@@ -111,7 +111,7 @@ Note: Must be placed within 3 tiles of the R&D Console
playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
rped_recycler_ready = FALSE
addtimer(CALLBACK(src, PROC_REF(rped_ready)), 5 SECONDS)
to_chat(user, "<span class='notice'>You deconstruct all the parts of rating [lowest_rating] in [replacer] with [src].</span>")
to_chat(user, span_notice("You deconstruct all the parts of rating [lowest_rating] in [replacer] with [src]."))
return 1
else
..()
+2 -2
View File
@@ -143,7 +143,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
/obj/machinery/message_server/attack_hand(user as mob)
// to_chat(user, "<font color='blue'>There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.</font>")
to_chat(user, "<span class='filter_notice'>You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"].</span>")
to_chat(user, span_filter_notice("You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]."))
active = !active
update_icon()
@@ -155,7 +155,7 @@ var/global/list/obj/machinery/message_server/message_servers = list()
spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2)
user.drop_item()
qdel(O)
to_chat(user, "<span class='filter_notice'>You install additional memory and processors into message server. Its filtering capabilities been enhanced.</span>")
to_chat(user, span_filter_notice("You install additional memory and processors into message server. Its filtering capabilities been enhanced."))
else
..(O, user)
+8 -8
View File
@@ -75,7 +75,7 @@
update_icon()
else
if(busy)
visible_message("<span class='notice'>[icon2html(src,viewers(src))] flashes: insufficient materials: [getLackingMaterials(D)].</span>")
visible_message(span_notice("[icon2html(src,viewers(src))] flashes: insufficient materials: [getLackingMaterials(D)]."))
busy = 0
update_icon()
@@ -121,7 +121,7 @@
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(busy)
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
to_chat(user, span_notice("\The [src] is busy. Please wait for completion of previous operation."))
return 1
if(default_deconstruction_screwdriver(user, O))
if(linked_console)
@@ -137,20 +137,20 @@
if(istype(O, /obj/item/gripper/no_use/loader))
return 0 //Sheet loaders weren't finishing attack(), this prevents the message "You can't stuff that gripper into this" without preventing the rest of the attack sequence from finishing
if(panel_open)
to_chat(user, "<span class='notice'>You can't load \the [src] while it's opened.</span>")
to_chat(user, span_notice("You can't load \the [src] while it's opened."))
return 1
if(!linked_console)
to_chat(user, "<span class='notice'>\The [src] must be linked to an R&D console first!</span>")
to_chat(user, span_notice("\The [src] must be linked to an R&D console first!"))
return 1
if(!istype(O, /obj/item/stack/material))
to_chat(user, "<span class='notice'>You cannot insert this item into \the [src]!</span>")
to_chat(user, span_notice("You cannot insert this item into \the [src]!"))
return 1
if(stat)
return 1
var/obj/item/stack/material/S = O
if(!(S.material.name in materials))
to_chat(user, "<span class='warning'>The [src] doesn't accept [S.material]!</span>")
to_chat(user, span_warning("The [src] doesn't accept [S.material]!"))
return
busy = 1
@@ -168,9 +168,9 @@
materials[S.material.name] += amnt
S.use(1)
count++
to_chat(user, "<span class='filter_notice'>You insert [count] [sname] into the fabricator.</span>")
to_chat(user, span_filter_notice("You insert [count] [sname] into the fabricator."))
else
to_chat(user, "<span class='filter_notice'>The fabricator cannot hold more [sname].</span>")
to_chat(user, span_filter_notice("The fabricator cannot hold more [sname]."))
busy = 0
var/stacktype = S.type
+4 -4
View File
@@ -120,7 +120,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Loading a disk into it.
if(istype(D, /obj/item/disk))
if(t_disk || d_disk)
to_chat(user, "<span class='filter_notice'>A disk is already loaded into the machine.</span>")
to_chat(user, span_filter_notice("A disk is already loaded into the machine."))
return
if(istype(D, /obj/item/disk/tech_disk))
@@ -128,11 +128,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if (istype(D, /obj/item/disk/design_disk))
d_disk = D
else
to_chat(user, "<span class='notice'>Machine cannot accept disks in that format.</span>")
to_chat(user, span_notice("Machine cannot accept disks in that format."))
return
user.drop_item()
D.loc = src
to_chat(user, "<span class='notice'>You add \the [D] to the machine.</span>")
to_chat(user, span_notice("You add \the [D] to the machine."))
else
//The construction/deconstruction of the console code.
..()
@@ -153,7 +153,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(!emagged)
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "<span class='notice'>You disable the security protocols.</span>")
to_chat(user, span_notice("You disable the security protocols."))
return 1
/obj/machinery/computer/rdconsole/proc/GetResearchLevelsInfo()
+4 -4
View File
@@ -394,7 +394,7 @@
if("eject_item") //Eject the item inside the destructive analyzer.
if(linked_destroy)
if(linked_destroy.busy)
to_chat(usr, "<span class='notice'>The destructive analyzer is busy at the moment.</span>")
to_chat(usr, span_notice("The destructive analyzer is busy at the moment."))
return FALSE
if(linked_destroy.loaded_item)
@@ -408,7 +408,7 @@
return FALSE
if(linked_destroy.busy)
to_chat(usr, "<span class='notice'>The destructive analyzer is busy at the moment.</span>")
to_chat(usr, span_notice("The destructive analyzer is busy at the moment."))
return
if(tgui_alert(usr, "Proceeding will destroy loaded item. Continue?", "Destructive analyzer confirmation", list("Yes", "No")) != "Yes" || !linked_destroy)
@@ -421,7 +421,7 @@
linked_destroy.busy = 0
busy_msg = null
if(!linked_destroy.loaded_item)
to_chat(usr, "<span class='notice'>The destructive analyzer appears to be empty.</span>")
to_chat(usr, span_notice("The destructive analyzer appears to be empty."))
return
if(istype(linked_destroy.loaded_item,/obj/item/stack))//Only deconsturcts one sheet at a time instead of the entire stack
@@ -475,7 +475,7 @@
if("sync") //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
if(!sync)
to_chat(usr, "<span class='notice'>You must connect to the network first.</span>")
to_chat(usr, span_notice("You must connect to the network first."))
return
busy_msg = "Updating Database..."
+2 -2
View File
@@ -295,7 +295,7 @@
if(!emagged)
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "<span class='notice'>You you disable the security protocols.</span>")
to_chat(user, span_notice("You you disable the security protocols."))
SStgui.update_uis(src)
return 1
@@ -309,4 +309,4 @@
name = "Core R&D Server"
id_with_upload_string = "1"
id_with_download_string = "1"
server_id = 1
server_id = 1