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
+16 -16
View File
@@ -353,7 +353,7 @@ var/list/mining_overlay_cache = list()
/turf/simulated/mineral/attackby(obj/item/W as obj, mob/user as mob)
if (!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return
if(!density)
@@ -373,19 +373,19 @@ var/list/mining_overlay_cache = list()
if(valid_tool)
if (sand_dug)
to_chat(user, "<span class='warning'>This area has already been dug.</span>")
to_chat(user, span_warning("This area has already been dug."))
return
var/turf/T = user.loc
if (!(istype(T)))
return
to_chat(user, "<span class='notice'>You start digging.</span>")
to_chat(user, span_notice("You start digging."))
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
if(!do_after(user,digspeed)) return
to_chat(user, "<span class='notice'>You dug a hole.</span>")
to_chat(user, span_notice("You dug a hole."))
GetDrilled()
else if(istype(W,/obj/item/storage/bag/ore))
@@ -426,9 +426,9 @@ var/list/mining_overlay_cache = list()
if (istype(W, /obj/item/measuring_tape))
var/obj/item/measuring_tape/P = W
user.visible_message("<b>\The [user]</b> extends \a [P] towards \the [src].","<span class='notice'>You extend \the [P] towards \the [src].</span>")
user.visible_message("<b>\The [user]</b> extends \a [P] towards \the [src].",span_notice("You extend \the [P] towards \the [src]."))
if(do_after(user, 15))
to_chat(user, "<span class='notice'>\The [src] has been excavated to a depth of [excavation_level]cm.</span>")
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
return
if(istype(W, /obj/item/xenoarch_multi_tool))
@@ -436,9 +436,9 @@ var/list/mining_overlay_cache = list()
if(C.mode) //Mode means scanning
C.depth_scanner.scan_atom(user, src)
else
user.visible_message("<b>\The [user]</b> extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!", "<span class='notice'>You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!</span>")
user.visible_message("<b>\The [user]</b> extends \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!", span_notice("You extend \the [C] over \the [src], a flurry of red beams scanning \the [src]'s surface!"))
if(do_after(user, 15))
to_chat(user, "<span class='notice'>\The [src] has been excavated to a depth of [excavation_level]cm.</span>")
to_chat(user, span_notice("\The [src] has been excavated to a depth of [excavation_level]cm."))
return
if (istype(W, /obj/item/melee/shock_maul))
@@ -447,7 +447,7 @@ var/list/mining_overlay_cache = list()
var/obj/item/melee/shock_maul/S = W
if(!S.wielded || !S.status) //if we're not wielded OR not powered up, do nothing
to_chat(user, "<span class='warning'>\The [src] must be wielded in two hands and powered on to be used for mining!</span>")
to_chat(user, span_warning("\The [src] must be wielded in two hands and powered on to be used for mining!"))
return
var/newDepth = excavation_level + S.excavation_amount // Used commonly below
@@ -460,7 +460,7 @@ var/list/mining_overlay_cache = list()
fail_message = ". <b>[pick("There is a crunching noise","[S] collides with some different rock","Part of the rock face crumbles away","Something breaks under [S]")]</b>"
wreckfinds(S.destroy_artefacts)
to_chat(user, "<span class='notice'>You smash through \the [src][fail_message].</span>")
to_chat(user, span_notice("You smash through \the [src][fail_message]."))
if(newDepth >= 200) // This means the rock is mined out fully
if(S.destroy_artefacts)
@@ -480,7 +480,7 @@ var/list/mining_overlay_cache = list()
geologic_data.UpdateNearbyArtifactInfo(src)
O.geologic_data = geologic_data
user.visible_message("<span class='warning'>\The [src] discharges with a thunderous, hair-raising crackle!</span>")
user.visible_message(span_warning("\The [src] discharges with a thunderous, hair-raising crackle!"))
playsound(src, 'sound/weapons/resonator_blast.ogg', 100, 1, -1)
S.deductcharge()
S.status = 0
@@ -505,7 +505,7 @@ var/list/mining_overlay_cache = list()
if(newDepth > F.excavation_required) // Digging too deep can break the item. At least you won't summon a Balrog (probably)
fail_message = ". <b>[pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]</b>"
wreckfinds(P.destroy_artefacts)
to_chat(user, "<span class='notice'>You start [P.drill_verb][fail_message].</span>")
to_chat(user, span_notice("You start [P.drill_verb][fail_message]."))
if(do_after(user,P.digspeed))
@@ -516,7 +516,7 @@ var/list/mining_overlay_cache = list()
else if(newDepth > F.excavation_required - F.clearance_range) // Not quite right but you still extract your find, the closer to the bottom the better, but not above 80%
excavate_find(prob(80 * (F.excavation_required - newDepth) / F.clearance_range), F)
to_chat(user, "<span class='notice'>You finish [P.drill_verb] \the [src].</span>")
to_chat(user, span_notice("You finish [P.drill_verb] \the [src]."))
if(newDepth >= 200) // This means the rock is mined out fully
if(P.destroy_artefacts)
@@ -646,7 +646,7 @@ var/list/mining_overlay_cache = list()
if(prob(50))
pain = 1
for(var/mob/living/M in range(src, 200))
to_chat(M, "<span class='danger'>[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!</span>")
to_chat(M, span_danger("[pick("A high-pitched [pick("keening","wailing","whistle")]","A rumbling noise like [pick("thunder","heavy machinery")]")] somehow penetrates your mind before fading away!"))
if(pain)
flick("pain",M.pain)
if(prob(50))
@@ -659,7 +659,7 @@ var/list/mining_overlay_cache = list()
if(prob(25))
excavate_find(prob(5), finds[1])
else if(rand(1,500) == 1)
visible_message("<span class='notice'>An old dusty crate was buried within!</span>")
visible_message(span_notice("An old dusty crate was buried within!"))
new /obj/structure/closet/crate/secure/loot(src)
make_floor()
@@ -690,7 +690,7 @@ var/list/mining_overlay_cache = list()
var/obj/effect/suspension_field/S = locate() in src
if(!S)
if(X)
visible_message("<span class='danger'>\The [pick("[display_name] crumbles away into dust","[display_name] breaks apart")].</span>")
visible_message(span_danger("\The [pick("[display_name] crumbles away into dust","[display_name] breaks apart")]."))
qdel(X)
finds.Remove(F)