[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

@@ -86,7 +86,7 @@
/obj/vehicle/train/security/trolley/attackby(obj/item/W as obj, mob/user as mob)
if(open && istype(W, /obj/item/tool/wirecutters))
passenger_allowed = !passenger_allowed
user.visible_message("<span class='notice'>[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].</span>","<span class='notice'>You [passenger_allowed ? "cut" : "mend"] the load limiter cable.</span>")
user.visible_message(span_notice("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src]."),span_notice("You [passenger_allowed ? "cut" : "mend"] the load limiter cable."))
else
..()
@@ -182,8 +182,8 @@
if(is_train_head() && istype(load, /mob/living/carbon/human))
var/mob/living/carbon/human/D = load
to_chat(D, "<span class='danger'>You ran over \the [M]!</span>")
visible_message("<span class='danger'>\The [src] ran over \the [M]!</span>")
to_chat(D, span_danger("You ran over \the [M]!"))
visible_message(span_danger("\The [src] ran over \the [M]!"))
add_attack_logs(D,M,"Ran over with [src.name]")
attack_log += text("\[[time_stamp()]\] [span_red("ran over [M.name] ([M.ckey]), driven by [D.name] ([D.ckey])")]")
else

View File

@@ -98,7 +98,7 @@
visible_message("[user] puts up \the [src]'s kickstand.")
else
if(istype(src.loc,/turf/space) || istype(src.loc, /turf/simulated/floor/water))
to_chat(usr, "<span class='warning'> You don't think kickstands work here...</span>")
to_chat(usr, span_warning(" You don't think kickstands work here..."))
return
visible_message("[user] puts down \the [src]'s kickstand.")
if(pulledby)
@@ -116,7 +116,7 @@
/obj/vehicle/bike/MouseDrop_T(var/atom/movable/C, var/mob/user as mob)
if(!load(C, user))
to_chat(user, "<span class='warning'> You were unable to load \the [C] onto \the [src].</span>")
to_chat(user, span_warning(" You were unable to load \the [C] onto \the [src]."))
return
/obj/vehicle/bike/attack_hand(var/mob/user as mob)
@@ -138,7 +138,7 @@
if(on && (!cell || cell.charge < charge_use))
turn_off()
visible_message("<span class='warning'>\The [src] whines, before its engines wind down.</span>")
visible_message(span_warning("\The [src] whines, before its engines wind down."))
return 0
//these things like space, not turf. Dragging shouldn't weigh you down.

View File

@@ -70,7 +70,7 @@
/obj/vehicle/train/trolley/attackby(obj/item/W as obj, mob/user as mob)
if(open && W.has_tool_quality(TOOL_WIRECUTTER))
passenger_allowed = !passenger_allowed
user.visible_message("<span class='notice'>[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].</span>","<span class='notice'>You [passenger_allowed ? "cut" : "mend"] the load limiter cable.</span>")
user.visible_message(span_notice("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src]."),span_notice("You [passenger_allowed ? "cut" : "mend"] the load limiter cable."))
else
..()

View File

@@ -47,12 +47,12 @@
if(istype(W, /obj/item/stack/material/plastic))
var/obj/item/stack/material/plastic/P = W
if (P.get_amount() < 8)
to_chat(user, "<span class='warning'>You need eight sheets of plastic to add tires to \the [src].</span>")
to_chat(user, span_warning("You need eight sheets of plastic to add tires to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add tires to [src].</span>")
to_chat(user, span_notice("You start to add tires to [src]."))
if(do_after(user, 40) && build_stage == 0)
if(P.use(8))
to_chat(user, "<span class='notice'>You add tires to \the [src].</span>")
to_chat(user, span_notice("You add tires to \the [src]."))
increase_step("wheeled [initial(name)]")
return
@@ -60,7 +60,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -68,19 +68,19 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
if(istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/S = W
if(S.get_amount() < 5)
to_chat(user, "<span class='warning'>You need five sheets of steel to convert \the [src] into a trailer.</span>")
to_chat(user, span_warning("You need five sheets of steel to convert \the [src] into a trailer."))
if(do_after(user, 80) && build_stage == 2)
if(S.use(5))
var/obj/item/vehicle_assembly/quadtrailer/Trailer = new(src)
Trailer.forceMove(get_turf(src))
Trailer.increase_step("framed [initial(Trailer.name)]")
to_chat(user, "<span class='notice'>You convert \the [src] into \the [Trailer].</span>")
to_chat(user, span_notice("You convert \the [src] into \the [Trailer]."))
user.drop_from_inventory(src)
qdel(src)
return
@@ -89,12 +89,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 3)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -103,7 +103,7 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
@@ -111,7 +111,7 @@
if(istype(W, /obj/item/stock_parts/motor))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the motor to \the [src].</span>")
to_chat(user, span_notice("You add the motor to \the [src]."))
increase_step()
return
@@ -119,23 +119,23 @@
if(istype(W, /obj/item/stack/material/plasteel))
var/obj/item/stack/material/plasteel/PL = W
if (PL.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of plasteel to add reinforcement to \the [src].</span>")
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add reinforcement to [src].</span>")
to_chat(user, span_notice("You start to add reinforcement to [src]."))
if(do_after(user, 40) && build_stage == 6)
if(PL.use(2))
to_chat(user, "<span class='notice'>You add reinforcement to \the [src].</span>")
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
return
if(7)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)
@@ -159,7 +159,7 @@
if(istype(W, /obj/item/vehicle_assembly/quadbike))
var/obj/item/vehicle_assembly/quadbike/Q = W
if(Q.build_stage > 2)
to_chat(user, "<span class='notice'>\The [Q] is too advanced to be of use with \the [src]</span>")
to_chat(user, span_notice("\The [Q] is too advanced to be of use with \the [src]"))
return
user.drop_item()
qdel(W)
@@ -169,19 +169,19 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 1)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
if(2)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You close up \the [src].</span>")
to_chat(user, span_notice("You close up \the [src]."))
var/obj/vehicle/train/trolley/trailer/product = new(src)
product.loc = get_turf(src)
user.drop_from_inventory(src)
@@ -212,12 +212,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 1)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -225,12 +225,12 @@
if(istype(W, /obj/item/stack/material/plastic))
var/obj/item/stack/material/plastic/P = W
if (P.get_amount() < 3)
to_chat(user, "<span class='warning'>You need three sheets of plastic to add a seat to \the [src].</span>")
to_chat(user, span_warning("You need three sheets of plastic to add a seat to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add a seat to [src].</span>")
to_chat(user, span_notice("You start to add a seat to [src]."))
if(do_after(user, 40) && build_stage == 2)
if(P.use(3))
to_chat(user, "<span class='notice'>You add a seat to \the [src].</span>")
to_chat(user, span_notice("You add a seat to \the [src]."))
increase_step("seated [initial(name)]")
return
@@ -238,7 +238,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -246,7 +246,7 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
@@ -255,18 +255,18 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
if(6)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 6)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/bike/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)
@@ -291,12 +291,12 @@
if(istype(W, /obj/item/stack/material/steel))
var/obj/item/stack/material/steel/S = W
if (S.get_amount() < 6)
to_chat(user, "<span class='warning'>You need six sheets of steel to add treads to \the [src].</span>")
to_chat(user, span_warning("You need six sheets of steel to add treads to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add treads to [src].</span>")
to_chat(user, span_notice("You start to add treads to [src]."))
if(do_after(user, 40) && build_stage == 0)
if(S.use(6))
to_chat(user, "<span class='notice'>You add treads to \the [src].</span>")
to_chat(user, span_notice("You add treads to \the [src]."))
increase_step("tracked [initial(name)]")
return
@@ -304,7 +304,7 @@
if(istype(W, /obj/item/stock_parts/console_screen))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the lights to \the [src].</span>")
to_chat(user, span_notice("You add the lights to \the [src]."))
increase_step()
return
@@ -312,7 +312,7 @@
if(istype(W, /obj/item/stock_parts/spring))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the control system to \the [src].</span>")
to_chat(user, span_notice("You add the control system to \the [src]."))
increase_step()
return
@@ -320,12 +320,12 @@
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if (C.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two coils of wire to wire [src].</span>")
to_chat(user, span_warning("You need two coils of wire to wire [src]."))
return
to_chat(user, "<span class='notice'>You start to wire [src].</span>")
to_chat(user, span_notice("You start to wire [src]."))
if(do_after(user, 40) && build_stage == 3)
if(C.use(2))
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
to_chat(user, span_notice("You wire \the [src]."))
increase_step("wired [initial(name)]")
return
@@ -334,7 +334,7 @@
user.drop_item()
W.forceMove(src)
cell = W
to_chat(user, "<span class='notice'>You add the power supply to \the [src].</span>")
to_chat(user, span_notice("You add the power supply to \the [src]."))
increase_step("powered [initial(name)]")
return
@@ -342,7 +342,7 @@
if(istype(W, /obj/item/stock_parts/motor))
user.drop_item()
qdel(W)
to_chat(user, "<span class='notice'>You add the motor to \the [src].</span>")
to_chat(user, span_notice("You add the motor to \the [src]."))
increase_step()
return
@@ -350,23 +350,23 @@
if(istype(W, /obj/item/stack/material/plasteel))
var/obj/item/stack/material/plasteel/PL = W
if (PL.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of plasteel to add reinforcement to \the [src].</span>")
to_chat(user, span_warning("You need two sheets of plasteel to add reinforcement to \the [src]."))
return
to_chat(user, "<span class='notice'>You start to add reinforcement to [src].</span>")
to_chat(user, span_notice("You start to add reinforcement to [src]."))
if(do_after(user, 40) && build_stage == 6)
if(PL.use(2))
to_chat(user, "<span class='notice'>You add reinforcement to \the [src].</span>")
to_chat(user, span_notice("You add reinforcement to \the [src]."))
increase_step("reinforced [initial(name)]")
return
if(7)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER))
playsound(src, W.usesound, 50, 1)
to_chat(user, "<span class='notice'>You begin your finishing touches on \the [src].</span>")
to_chat(user, span_notice("You begin your finishing touches on \the [src]."))
if(do_after(user, 20) && build_stage == 7)
playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/snowmobile/built/product = new(src)
to_chat(user, "<span class='notice'>You finish \the [product]</span>")
to_chat(user, span_notice("You finish \the [product]"))
product.loc = get_turf(src)
product.cell = cell
cell.forceMove(product)

View File

@@ -140,7 +140,7 @@
if(istype(A, /mob/living))
var/mob/living/M = A
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
visible_message(span_danger("[src] knocks over [M]!"))
M.apply_effects(2, 2) // Knock people down for a short moment
M.apply_damages(8 / move_delay) // Smaller amount of damage than a tug, since this will always be possible because Quads don't have safeties.
var/list/throw_dirs = list(1, 2, 4, 8, 5, 6, 9, 10)
@@ -154,7 +154,7 @@
M.throw_at(T2, 1, 1, src)
if(istype(load, /mob/living/carbon/human))
var/mob/living/D = load
to_chat(D, "<span class='danger'>You hit [M]!</span>")
to_chat(D, span_danger("You hit [M]!"))
add_attack_logs(D,M,"Ran over with [src.name]")
@@ -253,7 +253,7 @@
if(istype(A, /mob/living))
var/mob/living/M = A
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
visible_message(span_danger("[src] knocks over [M]!"))
M.apply_effects(1, 1)
M.apply_damages(8 / move_delay)
if(load)
@@ -265,7 +265,7 @@
M.throw_at(T2, 1, 1, src)
if(istype(load, /mob/living/carbon/human))
var/mob/living/D = load
to_chat(D, "<span class='danger'>You hit [M]!</span>")
to_chat(D, span_danger("You hit [M]!"))
add_attack_logs(D,M,"Ran over with [src.name]")
/obj/vehicle/train/trolley/trailer/update_icon()

View File

@@ -86,7 +86,7 @@
/obj/vehicle/train/rover/trolley/attackby(obj/item/W as obj, mob/user as mob)
if(open && istype(W, /obj/item/tool/wirecutters))
passenger_allowed = !passenger_allowed
user.visible_message("<span class='notice'>[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src].</span>","<span class='notice'>You [passenger_allowed ? "cut" : "mend"] the load limiter cable.</span>")
user.visible_message(span_notice("[user] [passenger_allowed ? "cuts" : "mends"] a cable in [src]."),span_notice("You [passenger_allowed ? "cut" : "mend"] the load limiter cable."))
else
..()
@@ -183,8 +183,8 @@
if(is_train_head() && istype(load, /mob/living/carbon/human))
var/mob/living/carbon/human/D = load
to_chat(D, "<span class='danger'>You ran over \the [M]!</span>")
visible_message("<span class='danger'>\The [src] ran over \the [M]!</span>")
to_chat(D, span_danger("You ran over \the [M]!"))
visible_message(span_danger("\The [src] ran over \the [M]!"))
add_attack_logs(D,M,"Ran over with [src.name]")
attack_log += text("\[[time_stamp()]\] [span_red("ran over [M.name] ([M.ckey]), driven by [D.name] ([D.ckey])")]")
else

View File

@@ -110,7 +110,7 @@
if(!locked)
open = !open
update_icon()
to_chat(user, "<span class='notice'>Maintenance panel is now [open ? "opened" : "closed"].</span>")
to_chat(user, span_notice("Maintenance panel is now [open ? "opened" : "closed"]."))
playsound(src, W.usesound, 50, 1)
else if(W.has_tool_quality(TOOL_CROWBAR) && cell && open)
remove_cell(user)
@@ -127,11 +127,11 @@
playsound(src, T.usesound, 50, 1)
user.visible_message(span_red("[user] repairs [src]!"),span_blue("You repair [src]!"))
else
to_chat(user, "<span class='notice'>Unable to repair with the maintenance panel closed.</span>")
to_chat(user, span_notice("Unable to repair with the maintenance panel closed."))
else
to_chat(user, "<span class='notice'>[src] does not need a repair.</span>")
to_chat(user, span_notice("[src] does not need a repair."))
else
to_chat(user, "<span class='notice'>Unable to repair while [src] is off.</span>")
to_chat(user, span_notice("Unable to repair while [src] is off."))
else if(hasvar(W,"force") && hasvar(W,"damtype"))
user.setClickCooldown(user.get_attack_speed(W))
@@ -239,7 +239,7 @@
emagged = 1
if(locked)
locked = 0
to_chat(user, "<span class='warning'>You bypass [src]'s controls.</span>")
to_chat(user, span_warning("You bypass [src]'s controls."))
return TRUE
/obj/vehicle/proc/explode()
@@ -303,7 +303,7 @@
C.forceMove(src)
cell = C
powercheck()
to_chat(usr, "<span class='notice'>You install [C] in [src].</span>")
to_chat(usr, span_notice("You install [C] in [src]."))
/obj/vehicle/proc/remove_cell(var/mob/living/carbon/human/H)
if(!mechanical)
@@ -311,7 +311,7 @@
if(!cell)
return
to_chat(usr, "<span class='notice'>You remove [cell] from [src].</span>")
to_chat(usr, span_notice("You remove [cell] from [src]."))
cell.forceMove(get_turf(H))
H.put_in_hands(cell)
cell = null
@@ -419,7 +419,7 @@
/obj/vehicle/attack_generic(var/mob/user, var/damage, var/attack_message)
if(!damage)
return
visible_message("<span class='danger'>[user] [attack_message] the [src]!</span>")
visible_message(span_danger("[user] [attack_message] the [src]!"))
user.attack_log += text("\[[time_stamp()]\] [span_red("attacked [src.name]")]")
user.do_attack_animation(src)
src.health -= damage