[MIRROR] refactors most spans (#9139)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -60,7 +60,7 @@
/obj/item/gun/launcher/crossbow/bow/consume_next_projectile(mob/user)
if(!drawn)
to_chat(user, "<span class='warning'>\The [src] is not drawn back!</span>")
to_chat(user, span_warning("\The [src] is not drawn back!"))
return null
return bolt
@@ -94,7 +94,7 @@
return
current_user = user
user.visible_message("<b>[user]</b> begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
user.visible_message("<b>[user]</b> begins to draw back the string of [src].",span_notice("You begin to draw back the string of [src]."))
if(do_after(user, 25, src, exclusive = TASK_ALL_EXCLUSIVE))
drawn = TRUE
user.visible_message("<b>[user]</b> draws the string on [src] back fully!", "You draw the string on [src] back fully!")

View File

@@ -73,7 +73,7 @@
/obj/item/gun/launcher/crossbow/consume_next_projectile(mob/user=null)
if(tension <= 0)
to_chat(user, "<span class='warning'>\The [src] is not drawn back!</span>")
to_chat(user, span_warning("\The [src] is not drawn back!"))
return null
return bolt
@@ -108,12 +108,12 @@
return
current_user = user
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
user.visible_message("[user] begins to draw back the string of [src].",span_notice("You begin to draw back the string of [src]."))
tension = 1
while(bolt && tension && loc == current_user)
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
user.visible_message("[usr] stops drawing and relaxes the string of [src].",span_warning("You stop drawing back and relax the string of [src]."))
tension = 0
update_icon()
return
@@ -130,7 +130,7 @@
to_chat(usr, "[src] clunks as you draw the string to its maximum tension!")
return
user.visible_message("[usr] draws back the string of [src]!","<span class='notice'>You continue drawing back the string of [src]!</span>")
user.visible_message("[usr] draws back the string of [src]!",span_notice("You continue drawing back the string of [src]!"))
/obj/item/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
@@ -162,20 +162,20 @@
user.drop_item()
cell = W
cell.loc = src
to_chat(user, "<span class='notice'>You jam [cell] into [src] and wire it to the firing coil.</span>")
to_chat(user, span_notice("You jam [cell] into [src] and wire it to the firing coil."))
superheat_rod(user)
else
to_chat(user, "<span class='notice'>[src] already has a cell installed.</span>")
to_chat(user, span_notice("[src] already has a cell installed."))
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(cell)
var/obj/item/C = cell
C.loc = get_turf(user)
to_chat(user, "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>")
to_chat(user, span_notice("You jimmy [cell] out of [src] with [W]."))
playsound(src, W.usesound, 50, 1)
cell = null
else
to_chat(user, "<span class='notice'>[src] doesn't have a cell installed.</span>")
to_chat(user, span_notice("[src] doesn't have a cell installed."))
else
..()
@@ -186,7 +186,7 @@
if(bolt.throwforce >= 15) return
if(!istype(bolt,/obj/item/arrow/rod)) return
to_chat(user, "<span class='notice'>[bolt] plinks and crackles as it begins to glow red-hot.</span>")
to_chat(user, span_notice("[bolt] plinks and crackles as it begins to glow red-hot."))
bolt.throwforce = 15
bolt.icon_state = "metal-rod-superheated"
cell.use(500)
@@ -231,11 +231,11 @@
if(buildstate == 0)
var/obj/item/stack/rods/R = W
if(R.use(3))
to_chat(user, "<span class='notice'>You assemble a backbone of rods around the wooden stock.</span>")
to_chat(user, span_notice("You assemble a backbone of rods around the wooden stock."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least three rods to complete this task.</span>")
to_chat(user, span_notice("You need at least three rods to complete this task."))
return
else if(W.has_tool_quality(TOOL_WELDER))
if(buildstate == 1)
@@ -243,7 +243,7 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You weld the rods into place.</span>")
to_chat(user, span_notice("You weld the rods into place."))
buildstate++
update_icon()
return
@@ -251,33 +251,33 @@
var/obj/item/stack/cable_coil/C = W
if(buildstate == 2)
if(C.use(5))
to_chat(user, "<span class='notice'>You wire a crude cell mount into the top of the crossbow.</span>")
to_chat(user, span_notice("You wire a crude cell mount into the top of the crossbow."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>")
to_chat(user, span_notice("You need at least five segments of cable coil to complete this task."))
return
else if(buildstate == 4)
if(C.use(5))
to_chat(user, "<span class='notice'>You string a steel cable across the crossbow's lath.</span>")
to_chat(user, span_notice("You string a steel cable across the crossbow's lath."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five segments of cable coil to complete this task.</span>")
to_chat(user, span_notice("You need at least five segments of cable coil to complete this task."))
return
else if(istype(W,/obj/item/stack/material) && W.get_material_name() == "plastic")
if(buildstate == 3)
var/obj/item/stack/material/P = W
if(P.use(3))
to_chat(user, "<span class='notice'>You assemble and install a heavy plastic lath onto the crossbow.</span>")
to_chat(user, span_notice("You assemble and install a heavy plastic lath onto the crossbow."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least three plastic sheets to complete this task.</span>")
to_chat(user, span_notice("You need at least three plastic sheets to complete this task."))
return
else if(W.has_tool_quality(TOOL_SCREWDRIVER))
if(buildstate == 5)
to_chat(user, "<span class='notice'>You secure the crossbow's various parts.</span>")
to_chat(user, span_notice("You secure the crossbow's various parts."))
playsound(src, W.usesound, 50, 1)
new /obj/item/gun/launcher/crossbow(get_turf(src))
qdel(src)

View File

@@ -30,9 +30,9 @@
if(next)
grenades -= next //Remove grenade from loaded list.
chambered = next
to_chat(M, "<span class='warning'>You pump [src], loading \a [next] into the chamber.</span>")
to_chat(M, span_warning("You pump [src], loading \a [next] into the chamber."))
else
to_chat(M, "<span class='warning'>You pump [src], but the magazine is empty.</span>")
to_chat(M, span_warning("You pump [src], but the magazine is empty."))
update_icon()
/obj/item/gun/launcher/grenade/examine(mob/user)
@@ -46,24 +46,24 @@
/obj/item/gun/launcher/grenade/proc/load(obj/item/grenade/G, mob/user)
if(G.loadable)
if(grenades.len >= max_grenades)
to_chat(user, "<span class='warning'>[src] is full.</span>")
to_chat(user, span_warning("[src] is full."))
return
user.remove_from_mob(G)
G.loc = src
grenades.Insert(1, G) //add to the head of the list, so that it is loaded on the next pump
user.visible_message("[user] inserts \a [G] into [src].", "<span class='notice'>You insert \a [G] into [src].</span>")
user.visible_message("[user] inserts \a [G] into [src].", span_notice("You insert \a [G] into [src]."))
return
to_chat(user, "<span class='warning'>[G] doesn't seem to fit in the [src]!</span>")
to_chat(user, span_warning("[G] doesn't seem to fit in the [src]!"))
/obj/item/gun/launcher/grenade/proc/unload(mob/user)
if(grenades.len)
var/obj/item/grenade/G = grenades[grenades.len]
grenades.len--
user.put_in_hands(G)
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
user.visible_message("[user] removes \a [G] from [src].", span_notice("You remove \a [G] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))
/obj/item/gun/launcher/grenade/attack_self(mob/user)
pump(user)
@@ -106,20 +106,20 @@
/obj/item/gun/launcher/grenade/underslung/load(obj/item/grenade/G, mob/user)
if(G.loadable)
if(chambered)
to_chat(user, "<span class='warning'>[src] is already loaded.</span>")
to_chat(user, span_warning("[src] is already loaded."))
return
user.remove_from_mob(G)
G.loc = src
chambered = G
user.visible_message("[user] load \a [G] into [src].", "<span class='notice'>You load \a [G] into [src].</span>")
user.visible_message("[user] load \a [G] into [src].", span_notice("You load \a [G] into [src]."))
return
to_chat(user, "<span class='warning'>[G] doesn't seem to fit in the [src]!</span>")
to_chat(user, span_warning("[G] doesn't seem to fit in the [src]!"))
/obj/item/gun/launcher/grenade/underslung/unload(mob/user)
if(chambered)
user.put_in_hands(chambered)
user.visible_message("[user] removes \a [chambered] from [src].", "<span class='notice'>You remove \a [chambered] from [src].</span>")
user.visible_message("[user] removes \a [chambered] from [src].", span_notice("You remove \a [chambered] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
chambered = null
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))

View File

@@ -168,7 +168,7 @@
if(buildstate == 0)
user.drop_from_inventory(W)
qdel(W)
to_chat(user, "<span class='notice'>You secure the piping inside the frame.</span>")
to_chat(user, span_notice("You secure the piping inside the frame."))
buildstate++
update_icon()
return
@@ -176,17 +176,17 @@
if(buildstate == 2)
var/obj/item/stack/material/M = W
if(M.use(5))
to_chat(user, "<span class='notice'>You assemble a chassis around the cannon frame.</span>")
to_chat(user, span_notice("You assemble a chassis around the cannon frame."))
buildstate++
update_icon()
else
to_chat(user, "<span class='notice'>You need at least five metal sheets to complete this task.</span>")
to_chat(user, span_notice("You need at least five metal sheets to complete this task."))
return
else if(istype(W,/obj/item/transfer_valve))
if(buildstate == 4)
user.drop_from_inventory(W)
qdel(W)
to_chat(user, "<span class='notice'>You install the transfer valve and connect it to the piping.</span>")
to_chat(user, span_notice("You install the transfer valve and connect it to the piping."))
buildstate++
update_icon()
return
@@ -196,21 +196,21 @@
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the pipe into place.</span>")
to_chat(user, span_notice("You weld the pipe into place."))
buildstate++
update_icon()
if(buildstate == 3)
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the metal chassis together.</span>")
to_chat(user, span_notice("You weld the metal chassis together."))
buildstate++
update_icon()
if(buildstate == 5)
if(T.remove_fuel(0,user))
if(!src || !T.isOn()) return
playsound(src, W.usesound, 100, 1)
to_chat(user, "<span class='notice'>You weld the valve into place.</span>")
to_chat(user, span_notice("You weld the valve into place."))
new /obj/item/gun/launcher/pneumatic(get_turf(src))
qdel(src)
return

View File

@@ -20,7 +20,7 @@
/obj/item/syringe_cartridge/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/reagent_containers/syringe))
syringe = I
to_chat(user, "<span class='notice'>You carefully insert [syringe] into [src].</span>")
to_chat(user, span_notice("You carefully insert [syringe] into [src]."))
user.remove_from_mob(syringe)
syringe.loc = src
sharp = TRUE
@@ -29,7 +29,7 @@
/obj/item/syringe_cartridge/attack_self(mob/user)
if(syringe)
to_chat(user, "<span class='notice'>You remove [syringe] from [src].</span>")
to_chat(user, span_notice("You remove [syringe] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
user.put_in_hands(syringe)
syringe = null
@@ -94,26 +94,26 @@
/obj/item/gun/launcher/syringe/attack_self(mob/living/user as mob)
if(next)
user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", "<span class='warning'>You unlatch and carefully relax the bolt on [src], unloading the spring.</span>")
user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", span_warning("You unlatch and carefully relax the bolt on [src], unloading the spring."))
next = null
else if(darts.len)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", "<span class='warning'>You draw back the bolt on the [src], loading the spring!</span>")
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", span_warning("You draw back the bolt on the [src], loading the spring!"))
next = darts[1]
add_fingerprint(user)
/obj/item/gun/launcher/syringe/attack_hand(mob/living/user as mob)
if(user.get_inactive_hand() == src)
if(!darts.len)
to_chat(user, "<span class='warning'>[src] is empty.</span>")
to_chat(user, span_warning("[src] is empty."))
return
if(next)
to_chat(user, "<span class='warning'>[src]'s cover is locked shut.</span>")
to_chat(user, span_warning("[src]'s cover is locked shut."))
return
var/obj/item/syringe_cartridge/C = darts[1]
darts -= C
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
user.visible_message("[user] removes \a [C] from [src].", span_notice("You remove \a [C] from [src]."))
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
..()
@@ -122,12 +122,12 @@
if(istype(A, /obj/item/syringe_cartridge))
var/obj/item/syringe_cartridge/C = A
if(darts.len >= max_darts)
to_chat(user, "<span class='warning'>[src] is full!</span>")
to_chat(user, span_warning("[src] is full!"))
return
user.remove_from_mob(C)
C.loc = src
darts += C //add to the end
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
user.visible_message("[user] inserts \a [C] into [src].", span_notice("You insert \a [C] into [src]."))
else
..()