mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -55,11 +55,11 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
if(I.item_flags & ABSTRACT)
|
||||
return
|
||||
if(!istype(I) || (I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION))
|
||||
to_chat(user, "<span class='warning'>[M] won't accept [I]!</span>")
|
||||
to_chat(user, span_warning("[M] won't accept [I]!"))
|
||||
return
|
||||
var/item_mats = materials.get_item_material_amount(I, breakdown_flags)
|
||||
if(!item_mats)
|
||||
to_chat(user, "<span class='warning'>[I] does not contain sufficient materials to be accepted by [M].</span>")
|
||||
to_chat(user, span_warning("[I] does not contain sufficient materials to be accepted by [M]."))
|
||||
return
|
||||
// assumes unlimited space...
|
||||
var/amount = I.amount
|
||||
@@ -183,7 +183,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
/obj/machinery/ore_silo/multitool_act(mob/living/user, obj/item/multitool/I)
|
||||
. = ..()
|
||||
if (istype(I))
|
||||
to_chat(user, "<span class='notice'>You log [src] in the multitool's buffer.</span>")
|
||||
to_chat(user, span_notice("You log [src] in the multitool's buffer."))
|
||||
I.buffer = src
|
||||
return TRUE
|
||||
|
||||
@@ -203,7 +203,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
|
||||
|
||||
/obj/machinery/ore_silo/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>[src] can be linked to techfabs, circuit printers and protolathes with a multitool.</span>"
|
||||
. += span_notice("[src] can be linked to techfabs, circuit printers and protolathes with a multitool.")
|
||||
|
||||
/datum/ore_silo_log
|
||||
var/name // for VV
|
||||
|
||||
Reference in New Issue
Block a user