Replace all modular HTML spans with defines spans

In total:
- Adds span defines for `reallybig hypnophrase`, `big warning`, `header`
- Fixes a missing apostrophe for hypno stare
- Makes a special exception for cuddling.dm, which uses an irregular span
- Puts the spans file back
This commit is contained in:
Darius
2023-01-16 04:05:27 -05:00
parent 41e15dd097
commit ad0239b5de
108 changed files with 779 additions and 773 deletions
@@ -21,17 +21,17 @@
var/mob/living/carbon/human/H = user
if(istype(I, /obj/item/soap))
if(!istype(H.gloves, /obj/item/clothing/gloves/color/latex))
to_chat(H, "<span class='warning'>No! No fucking way I'm touching this shit without at LEAST latex gloves!</span>")
to_chat(H, span_warning("No! No fucking way I'm touching this shit without at LEAST latex gloves!"))
return
if(!istype(H.get_inactive_held_item(), /obj/item/storage/bag/trash))
to_chat(H, "<span class='warning'>I'd.. need a trashbag or similar to stash all this shit.</span>")
to_chat(H, span_warning("I'd.. need a trashbag or similar to stash all this shit."))
return
H.visible_message("<span class='notice'>[H] starts cleaning \the [src]![prob(0.1) ? " All for free.." : ""]</span>", "<span class='notice'>You start.. scooping all the shit into the trash bag.. Eugh.</span>")
H.visible_message(span_notice("[H] starts cleaning \the [src]![prob(0.1) ? " All for free.." : ""]"), span_notice("You start.. scooping all the shit into the trash bag.. Eugh."))
if(!do_after(H, 130, target = src))
H.visible_message("<span class='notice'>[H] gives up!</span>", "<span class='warning'>Fuck this shit.</span>")
H.visible_message(span_notice("[H] gives up!"), span_warning("Fuck this shit."))
return
H.visible_message("<span class='notice'>[H] finishes cleaning \the [src]!</span>", "<span class='notice'>You're finally done. Thank fuck.'</span>")
H.visible_message(span_notice("[H] finishes cleaning \the [src]!"), span_notice("You're finally done. Thank fuck.'"))
new /obj/structure/urinal(loc, dir, TRUE)
return
return ..()
@@ -25,8 +25,8 @@
/obj/structure/cannon/examine(mob/user)
. = ..()
. += "<span class='notice'>[src] accepts gunpowder or welding fuel.</span>"
. += "<span class='warning'>Using welding fuel will weaken the force of the projectile fired.</span>"
. += span_notice("[src] accepts gunpowder or welding fuel.")
. += span_warning("Using welding fuel will weaken the force of the projectile fired.")
/obj/structure/cannon/proc/fire()
for(var/mob/shaken_mob in urange(10, src))
@@ -48,24 +48,24 @@
/obj/structure/cannon/attackby(obj/item/used_item, mob/user, params)
if(charge_ignited)
to_chat(user, "<span class='warning'>It's gonna fire!</span>")
to_chat(user, span_warning("It's gonna fire!"))
return
var/ignition_message = used_item.ignition_effect(src, user)
if(istype(used_item, /obj/item/stack/cannonball))
if(loaded_cannonball)
to_chat(user, "<span class='warning'>[src] is already loaded!</span>")
to_chat(user, span_warning("[src] is already loaded!"))
else
var/obj/item/stack/cannonball/cannoneers_balls = used_item
loaded_cannonball = new cannoneers_balls.type(src, 1)
loaded_cannonball.copy_evidences(cannoneers_balls)
to_chat(user, "<span class='notice'>You load a [cannoneers_balls.singular_name] into \the [src].</span>")
to_chat(user, span_notice("You load a [cannoneers_balls.singular_name] into \the [src]."))
cannoneers_balls.use(1, transfer = TRUE)
return
else if(ignition_message)
if(!reagents.has_reagent(/datum/reagent/blackpowder,charge_size) && !reagents.has_reagent(/datum/reagent/fuel,charge_size))
to_chat(user, "<span class='warning'>[src] needs [reagents.maximum_volume]u of charge!</span>")
to_chat(user, span_warning("[src] needs [reagents.maximum_volume]u of charge!"))
return
visible_message(ignition_message)
log_game("Cannon fired by [key_name(user)] in [AREACOORD(src)]")
@@ -81,7 +81,7 @@
return ..()
if(!powder_keg.reagents.total_volume)
to_chat(user, "<span class='warning'>[powder_keg] is empty!</span>")
to_chat(user, span_warning("[powder_keg] is empty!"))
return
if(reagents.total_volume >= reagents.maximum_volume)
to_chat(user, "<span class='warning'[src] is full!</span>")
@@ -89,15 +89,15 @@
var/has_enough_gunpowder = powder_keg.reagents.has_reagent(/datum/reagent/blackpowder, charge_size)
var/has_enough_alt_fuel = powder_keg.reagents.has_reagent(/datum/reagent/fuel, charge_size)
if(!has_enough_gunpowder && !has_enough_alt_fuel)
to_chat(user, "<span class='warning'>[powder_keg] doesn't have at least 15u of fuel to fill [src]!</span>")
to_chat(user, span_warning("[powder_keg] doesn't have at least 15u of fuel to fill [src]!"))
return
if(has_enough_gunpowder)
powder_keg.reagents.trans_id_to(src, /datum/reagent/blackpowder, amount = charge_size)
to_chat(user, "<span class='notice'>You load [src] with gunpowder.</span>")
to_chat(user, span_notice("You load [src] with gunpowder."))
return
if(has_enough_alt_fuel)
powder_keg.reagents.trans_id_to(src, /datum/reagent/fuel, amount = charge_size)
to_chat(user, "<span class='notice'>You load [src] with welding fuel.</span>")
to_chat(user, span_notice("You load [src] with welding fuel."))
return
if(anchorable_cannon && used_item.tool_behaviour == TOOL_WRENCH)
if(default_unfasten_wrench(user, used_item, time = 2 SECONDS))
@@ -122,11 +122,11 @@
if(used_alt_fuel)
fires_before_deconstruction--
if(prob(explode_chance))
visible_message("<span class='warning'>[src] explodes!</span>")
visible_message(span_warning("[src] explodes!"))
explosion(src, heavy_impact_range = 1, light_impact_range = 5, flame_range = 5)
return
if(fires_before_deconstruction <= 0)
visible_message("<span class='warning'>[src] falls apart from operation!</span>")
visible_message(span_warning("[src] falls apart from operation!"))
qdel(src)
/obj/structure/cannon/trash/Destroy()
@@ -32,16 +32,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/fence/handrail/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)
@@ -17,12 +17,12 @@
return TRUE
if(istype(item, /obj/item/carpentry/glue))
to_chat(user,"<span class='notice'>You glue the bricks to the floor.</span>")
to_chat(user,span_notice("You glue the bricks to the floor."))
anchored = TRUE
return TRUE
if(istype(item, /obj/item/crowbar))
to_chat(user,"<span class='notice'>You pry the bricks from the floor.</span>")
to_chat(user,span_notice("You pry the bricks from the floor."))
anchored = FALSE
return TRUE
@@ -78,9 +78,9 @@
add_fingerprint(user)
if(istype(P, /obj/item/wrench))
if (!(item_flags & IN_INVENTORY))
to_chat(user, "<span class='notice'>You start to fasten the frame to the floor and celing...</span>")
to_chat(user, span_notice("You start to fasten the frame to the floor and celing..."))
if(P.use_tool(src, user, 8 SECONDS, volume=50))
to_chat(user, "<span class='notice'>You construct the stripper pole!</span>")
to_chat(user, span_notice("You construct the stripper pole!"))
var/obj/structure/pole/C = new
C.loc = loc
del(src)
@@ -89,9 +89,9 @@
/obj/structure/pole/attackby(obj/item/P, mob/user, params) //un-erecting a pole. :(
add_fingerprint(user)
if(istype(P, /obj/item/wrench))
to_chat(user, "<span class='notice'>You start to unfastening the frame...</span>")
to_chat(user, span_notice("You start to unfastening the frame..."))
if(P.use_tool(src, user, 8 SECONDS, volume=50))
to_chat(user, "<span class='notice'>You take down the stripper pole!</span>")
to_chat(user, span_notice("You take down the stripper pole!"))
var/obj/item/polepack/C = new
C.loc = loc
del(src)
@@ -36,7 +36,7 @@
petrified_mob = L
if(L.buckled)
L.buckled.unbuckle_mob(L,force=1)
L.visible_message("<span class='warning'>[L]'s skin rapidly turns to stone!</span>", "<span class='warning'>Your skin abruptly hardens as you turn to stone once more!</span>")
L.visible_message(span_warning("[L]'s skin rapidly turns to stone!"), span_warning("Your skin abruptly hardens as you turn to stone once more!"))
dir = L.dir
transform = L.transform
pixel_x = L.pixel_x
@@ -76,7 +76,7 @@
. = ..()
if (petrified_mob)
SEND_SIGNAL(petrified_mob, COMSIG_PARENT_EXAMINE, user, .)
. -= "<span class='notice'><i>You examine [src] closer, but find nothing of interest...</i></span>"
. -= span_notice("<i>You examine [src] closer, but find nothing of interest...</i>")
/obj/structure/statue/gargoyle/handle_atom_del(atom/A)
if(A == petrified_mob)
@@ -119,7 +119,7 @@
/obj/structure/statue/gargoyle/deconstruct(disassembled = TRUE)
deconstructed = TRUE
visible_message("<span class='danger'>[src] shatters!</span>")
visible_message(span_danger("[src] shatters!"))
qdel(src)
/obj/structure/statue/gargoyle/attackby(obj/item/W, mob/living/user, params)
@@ -137,7 +137,7 @@
user.visible_message(span_notice("[user] is slicing apart the [name]."), \
span_notice("You are slicing apart the [name]..."))
if (petrified_mob)
to_chat(petrified_mob, "<span class='userdanger'>You are being sliced apart by [user]!</span>")
to_chat(petrified_mob, span_userdanger("You are being sliced apart by [user]!"))
if(W.use_tool(src, user, 40, volume=50))
user.visible_message(span_notice("[user] slices apart the [name]."), \
span_notice("You slice apart the [name]!"))
@@ -22,9 +22,9 @@
if (toConstruct)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
to_chat(user, span_warning("You need one [material.name] sheet to do this!"))
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
to_chat(user, span_notice("You start adding [material] to [src]..."))
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(toConstruct)
else
@@ -54,9 +54,9 @@
if (toConstruct)
if(material.get_amount() < 1)
to_chat(user, "<span class='warning'>You need one [material.name] sheet to do this!</span>")
to_chat(user, span_warning("You need one [material.name] sheet to do this!"))
return
to_chat(user, "<span class='notice'>You start adding [material] to [src]...</span>")
to_chat(user, span_notice("You start adding [material] to [src]..."))
if(do_after(user, 20, target = src) && material.use(1))
make_new_table(toConstruct)
else