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
+2 -2
View File
@@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(fusion_cores)
/obj/machinery/power/fusion_core/attackby(var/obj/item/W, var/mob/user)
if(owned_field)
to_chat(user,"<span class='warning'>Shut \the [src] off first!</span>")
to_chat(user,span_warning("Shut \the [src] off first!"))
return
if(default_deconstruction_screwdriver(user, W))
@@ -166,4 +166,4 @@ GLOBAL_LIST_EMPTY(fusion_cores)
if(!owned_field)
return FALSE
owned_field.plasma_temperature = field_temperature
return TRUE
return TRUE
@@ -57,7 +57,7 @@
cur_viewed_device = null
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
to_chat(user, span_warning("This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool."))
return
if(cur_viewed_device && (cur_viewed_device.id_tag != id_tag || get_dist(src, cur_viewed_device) > scan_range))
+12 -12
View File
@@ -206,21 +206,21 @@
else
if(percent_unstable > 0.1 && prob(percent_unstable*100))
if(plasma_temperature < 2000)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
visible_message(span_danger("\The [src] ripples uneasily, like a disturbed pond."))
else
var/flare
var/fuel_loss
var/rupture
if(percent_unstable > 0.2)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
visible_message(span_danger("\The [src] ripples uneasily, like a disturbed pond."))
flare = prob(25)
else if(percent_unstable > 0.5)
visible_message("<span class='danger'>\The [src] undulates violently, shedding plumes of plasma!</span>")
visible_message(span_danger("\The [src] undulates violently, shedding plumes of plasma!"))
flare = prob(50)
fuel_loss = prob(20)
rupture = prob(5)
else if(percent_unstable > 0.8)
visible_message("<span class='danger'>\The [src] is wracked by a series of horrendous distortions, buckling and twisting like a living thing!</span>")
visible_message(span_danger("\The [src] is wracked by a series of horrendous distortions, buckling and twisting like a living thing!"))
flare = 1
fuel_loss = prob(50)
rupture = prob(25)
@@ -260,11 +260,11 @@
critical += 0.6
if(critical >= 25 && prob(percent_unstable*100))
if (critical >= 90)
visible_message("<span class='danger'>\The [src] rumbles and quivers violently, threatening to break free!</span>")
visible_message(span_danger("\The [src] rumbles and quivers violently, threatening to break free!"))
else if(critical >= 50)
visible_message("<span class='danger'>\The [src] rumbles and quivers energetically, the walls distorting slightly.</span>")
visible_message(span_danger("\The [src] rumbles and quivers energetically, the walls distorting slightly."))
else if(critical >= 25)
visible_message("<span class='danger'>\The [src] rumbles and quivers slightly, vibrating the deck.</span>")
visible_message(span_danger("\The [src] rumbles and quivers slightly, vibrating the deck."))
*/
/obj/effect/fusion_em_field/proc/ChangeFieldStrength(var/new_strength)
var/calc_size = 1
@@ -353,7 +353,7 @@
continue
log_debug("R-UST DEBUG: [AM] is [AM.type]")
AM.visible_message("<span class='danger'>The field buckles visibly around \the [AM]!</span>")
AM.visible_message(span_danger("The field buckles visibly around \the [AM]!"))
tick_instability += rand(15,30)
AM.emp_act(empsev)
@@ -580,7 +580,7 @@
light_min_power = 30
light_min_range = 30
light_max_range = 30
visible_message("<span class='danger'>\The [src] flares to eye-searing brightness!</span>")
visible_message(span_danger("\The [src] flares to eye-searing brightness!"))
sleep(60)
temp_color()
//plasma_temperature -= lost_plasma
@@ -589,7 +589,7 @@
/obj/effect/fusion_em_field/proc/Rupture()
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
visible_message(span_danger("\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!"))
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
@@ -616,7 +616,7 @@
return
/obj/effect/fusion_em_field/proc/MRC() //spews electromagnetic pulses in an area around the core.
visible_message("<span class='danger'>\The [src] glows an extremely bright pink and flares out of existance!</span>")
visible_message(span_danger("\The [src] glows an extremely bright pink and flares out of existance!"))
global_announcer.autosay("Warning! Magnetic Resonance Cascade detected! Brace for electronic system distruption.", "Field Stability Monitor")
set_light(15, 15, "#ff00d8")
var/list/things_in_range = range(15, owned_core)
@@ -667,7 +667,7 @@
return
/obj/effect/fusion_em_field/proc/BluespaceQuenchEvent() //!!FUN!! causes a number of explosions in an area around the core. Will likely destory or heavily damage the reactor.
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
visible_message(span_danger("\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!"))
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), CEILING(plasma_temperature/1000, 1), CEILING(plasma_temperature/300, 1))
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
@@ -20,10 +20,10 @@
/obj/machinery/fusion_fuel_compressor/proc/do_special_fuel_compression(var/obj/item/thing, var/mob/user)
if(istype(thing) && thing.reagents && thing.reagents.total_volume && thing.is_open_container())
if(thing.reagents.reagent_list.len > 1)
to_chat(user, "<span class='warning'>The contents of \the [thing] are impure and cannot be used as fuel.</span>")
to_chat(user, span_warning("The contents of \the [thing] are impure and cannot be used as fuel."))
return 1
if(thing.reagents.total_volume < 300)
to_chat(user, "<span class='warning'>You need at least three hundred units of material to form a fuel rod.</span>")
to_chat(user, span_warning("You need at least three hundred units of material to form a fuel rod."))
return 1
var/datum/reagent/R = thing.reagents.reagent_list[1]
visible_message("<b>\The [src]</b> compresses the contents of \the [thing] into a new fuel assembly.")
@@ -52,10 +52,10 @@
var/obj/item/stack/material/M = thing
var/datum/material/mat = M.get_material()
if(!mat.is_fusion_fuel)
to_chat(user, "<span class='warning'>It would be pointless to make a fuel rod out of [mat.use_name].</span>")
to_chat(user, span_warning("It would be pointless to make a fuel rod out of [mat.use_name]."))
return
if(M.get_amount() < FUSION_ROD_SHEET_AMT)
to_chat(user, "<span class='warning'>You need at least 25 [mat.sheet_plural_name] to make a fuel rod.</span>")
to_chat(user, span_warning("You need at least 25 [mat.sheet_plural_name] to make a fuel rod."))
return
var/obj/item/fuel_assembly/F = new(get_turf(src), mat.name)
visible_message("<b>\The [src]</b> compresses the [mat.use_name] into a new fuel assembly.")
@@ -67,4 +67,4 @@
return ..()
#undef FUSION_ROD_SHEET_AMT
#undef FUSION_ROD_SHEET_AMT
@@ -47,7 +47,7 @@
return
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
to_chat(user, span_warning("This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool."))
return
var/dat = "<B>Reactor Core Fuel Control #[id_tag]</B><BR>"
@@ -52,7 +52,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
if(istype(W, /obj/item/fuel_assembly))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off before playing with the fuel rod!</span>")
to_chat(user, span_warning("Shut \the [src] off before playing with the fuel rod!"))
return
if(cur_assembly)
@@ -71,7 +71,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
if(W.has_tool_quality(TOOL_WRENCH) || W.has_tool_quality(TOOL_SCREWDRIVER) || W.has_tool_quality(TOOL_CROWBAR) || istype(W, /obj/item/storage/part_replacer))
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off first!</span>")
to_chat(user, span_warning("Shut \the [src] off first!"))
return
if(default_unfasten_wrench(user, W))
return
@@ -87,7 +87,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
/obj/machinery/fusion_fuel_injector/attack_hand(mob/user)
if(injecting)
to_chat(user, "<span class='warning'>Shut \the [src] off before playing with the fuel rod!</span>")
to_chat(user, span_warning("Shut \the [src] off before playing with the fuel rod!"))
return
if(cur_assembly)
@@ -97,7 +97,7 @@ GLOBAL_LIST_EMPTY(fuel_injectors)
cur_assembly = null
return
else
to_chat(user, "<span class='warning'>There is no fuel rod in \the [src].</span>")
to_chat(user, span_warning("There is no fuel rod in \the [src]."))
return
/obj/machinery/fusion_fuel_injector/proc/BeginInjecting()
@@ -44,7 +44,7 @@
return
if(!id_tag)
to_chat(user, "<span class='warning'>This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool.</span>")
to_chat(user, span_warning("This console has not been assigned an ident tag. Please contact your system administrator or conduct a manual update with a standard multitool."))
return
var/dat = "<td><b>Gyrotron controller #[id_tag]</b>"
@@ -92,7 +92,7 @@
if(href_list["modifypower"])
var/new_val = input(usr, "Enter new emission power level (1 - 50)", "Modifying power level", G.mega_energy) as num
if(!new_val)
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
to_chat(usr, span_warning("That's not a valid number."))
return 1
G.mega_energy = CLAMP(new_val, 1, 50)
G.update_active_power_usage(G.mega_energy * 1500)
@@ -102,7 +102,7 @@
if(href_list["modifyrate"])
var/new_val = input(usr, "Enter new emission delay between 1 and 10 seconds.", "Modifying emission rate", G.rate) as num
if(!new_val)
to_chat(usr, "<span class='warning'>That's not a valid number.</span>")
to_chat(usr, span_warning("That's not a valid number."))
return 1
G.rate = CLAMP(new_val, 1, 10)
updateUsrDialog()