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
+13 -13
View File
@@ -40,13 +40,13 @@
/obj/item/flash/attackby(var/obj/item/W, var/mob/user)
if(W.has_tool_quality(TOOL_SCREWDRIVER) && broken)
if(repairing)
to_chat(user, "<span class='notice'>\The [src] is already being repaired!</span>")
to_chat(user, span_notice("\The [src] is already being repaired!"))
return
user.visible_message("<b>\The [user]</b> starts trying to repair \the [src]'s bulb.")
repairing = TRUE
if(do_after(user, (40 SECONDS + rand(0, 20 SECONDS)) * W.toolspeed) && can_repair)
if(prob(30))
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
user.visible_message(span_notice("\The [user] successfully repairs \the [src]!"))
broken = FALSE
update_icon()
playsound(src, W.usesound, 50, 1)
@@ -87,7 +87,7 @@
/obj/item/flash/proc/clown_check(var/mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>\The [src] slips out of your hand.</span>")
to_chat(user, span_warning("\The [src] slips out of your hand."))
user.drop_item()
return 0
return 1
@@ -128,7 +128,7 @@
if(prob( max(0, times_used - safe_flashes) * 2 + (times_used >= safe_flashes)) && can_break) //if you use it 10 times in a minute it has a 30% chance to break.
broken = TRUE
if(user)
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
to_chat(user, span_warning("The bulb has burnt out!"))
update_icon()
return FALSE
else
@@ -138,7 +138,7 @@
else if(!charge_only) //can only use it 10 times a minute, unless it runs purely on charge.
if(user)
update_icon()
to_chat(user, "<span class='warning'><i>click</i></span>")
to_chat(user, span_warning("<i>click</i>"))
playsound(src, 'sound/weapons/empty.ogg', 80, 1)
return FALSE
else if(battery && battery.checked_use(charge_cost + (round(charge_cost / 4) * max(0, times_used - max_flashes)))) // Using over your maximum flashes starts taking more charge per added flash.
@@ -157,7 +157,7 @@
if(!clown_check(user)) return
if(broken)
to_chat(user, "<span class='warning'>\The [src] is broken.</span>")
to_chat(user, span_warning("\The [src] is broken."))
return
flash_recharge()
@@ -226,14 +226,14 @@
flick("flash2", src)
if(!issilicon(M))
user.visible_message("<span class='disarm'>[user] blinds [M] with the flash!</span>")
user.visible_message(span_disarm("[user] blinds [M] with the flash!"))
else
user.visible_message("<span class='notice'>[user] overloads [M]'s sensors with the flash!</span>")
user.visible_message(span_notice("[user] overloads [M]'s sensors with the flash!"))
M.Weaken(rand(5,10))
else
user.visible_message("<span class='notice'>[user] fails to blind [M] with the flash!</span>")
user.visible_message(span_notice("[user] fails to blind [M] with the flash!"))
return
@@ -246,7 +246,7 @@
user.setClickCooldown(user.get_attack_speed(src))
if(broken)
user.show_message("<span class='warning'>The [src.name] is broken</span>", 2)
user.show_message(span_warning("The [src.name] is broken"), 2)
return
flash_recharge()
@@ -289,7 +289,7 @@
//C.Weaken(10)
C.flash_eyes()
for(var/mob/M in viewers(C, null))
M.show_message("<span class='disarm'>[C] is blinded by the flash!</span>")
M.show_message(span_disarm("[C] is blinded by the flash!"))
..()
/obj/item/flash/synthetic
@@ -305,14 +305,14 @@
..()
if(!broken)
broken = 1
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
to_chat(user, span_warning("The bulb has burnt out!"))
update_icon()
/obj/item/flash/synthetic/attack_self(mob/living/carbon/user as mob, flag = 0, emp = 0)
..()
if(!broken)
broken = 1
to_chat(user, "<span class='warning'>The bulb has burnt out!</span>")
to_chat(user, span_warning("The bulb has burnt out!"))
update_icon()
/obj/item/flash/robot