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
+14 -14
View File
@@ -60,16 +60,16 @@
if(health < maxhealth)
switch(health / maxhealth)
if(0.0 to 0.5)
. += "<span class='warning'>It looks severely damaged!</span>"
. += span_warning("It looks severely damaged!")
if(0.25 to 0.5)
. += "<span class='warning'>It looks damaged!</span>"
. += span_warning("It looks damaged!")
if(0.5 to 1.0)
. += "<span class='notice'>It has a few scrapes and dents.</span>"
. += span_notice("It has a few scrapes and dents.")
/obj/structure/railing/take_damage(amount)
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
visible_message(span_warning("\The [src] breaks down!"))
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
qdel(src)
@@ -205,7 +205,7 @@
if(W.has_tool_quality(TOOL_WRENCH) && !anchored)
playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<b>\The [user]</b> dismantles \the [src].", "<span class='notice'>You dismantle \the [src].</span>")
user.visible_message("<b>\The [user]</b> dismantles \the [src].", span_notice("You dismantle \the [src]."))
new /obj/item/stack/material/steel(get_turf(usr), 2)
qdel(src)
return
@@ -216,7 +216,7 @@
if(F.welding)
playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("<b>\The [user]</b> repairs some damage to \the [src].", "<span class='notice'>You repair some damage to \the [src].</span>")
user.visible_message("<b>\The [user]</b> repairs some damage to \the [src].", span_notice("You repair some damage to \the [src]."))
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
return
@@ -225,7 +225,7 @@
user.visible_message(anchored ? "<b>\The [user]</b> begins unscrewing \the [src]." : "<b>\The [user]</b> begins fasten \the [src]." )
playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
to_chat(user, (anchored ? "<span class='notice'>You have unfastened \the [src] from the floor.</span>" : "<span class='notice'>You have fastened \the [src] to the floor.</span>"))
to_chat(user, (anchored ? span_notice("You have unfastened \the [src] from the floor.") : span_notice("You have fastened \the [src] to the floor.")))
anchored = !anchored
update_icon()
return
@@ -237,17 +237,17 @@
var/mob/living/M = G.affecting
var/obj/occupied = turf_is_crowded()
if(occupied)
to_chat(user, "<span class='danger'>There's \a [occupied] in the way.</span>")
to_chat(user, span_danger("There's \a [occupied] in the way."))
return
if (G.state < 2)
if(user.a_intent == I_HURT)
if (prob(15)) M.Weaken(5)
M.apply_damage(8,def_zone = "head")
take_damage(8)
visible_message("<span class='danger'>[G.assailant] slams [G.affecting]'s face against \the [src]!</span>")
visible_message(span_danger("[G.assailant] slams [G.affecting]'s face against \the [src]!"))
playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
else
to_chat(user, "<span class='danger'>You need a better grip to do that!</span>")
to_chat(user, span_danger("You need a better grip to do that!"))
return
else
if (get_turf(G.affecting) == get_turf(src))
@@ -255,7 +255,7 @@
else
G.affecting.forceMove(get_turf(src))
G.affecting.Weaken(5)
visible_message("<span class='danger'>[G.assailant] throws [G.affecting] over \the [src]!</span>")
visible_message(span_danger("[G.assailant] throws [G.affecting] over \the [src]!"))
qdel(W)
return
@@ -285,7 +285,7 @@
if(!can_climb(user))
return
usr.visible_message("<span class='warning'>[user] starts climbing onto \the [src]!</span>")
usr.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
LAZYDISTINCTADD(climbers, user)
if(!do_after(user,(issmall(user) ? 20 : 34)))
@@ -301,7 +301,7 @@
else
usr.forceMove(get_turf(src))
usr.visible_message("<span class='warning'>[user] climbed over \the [src]!</span>")
usr.visible_message(span_warning("[user] climbed over \the [src]!"))
if(!anchored) take_damage(maxhealth) // Fatboy
LAZYREMOVE(climbers, user)
@@ -314,7 +314,7 @@
if(get_turf(user) == get_turf(src))
var/obj/occupied = neighbor_turf_impassable()
if(occupied)
to_chat(user, "<span class='danger'>You can't climb there, there's \a [occupied] in the way.</span>")
to_chat(user, span_danger("You can't climb there, there's \a [occupied] in the way."))
return 0
return 1