mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 09:34:52 +01:00
refactors most spans
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
to_chat(src, "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>")
|
||||
|
||||
if(!lying && (!shoes || !(shoes.item_flags & NOSLIP)) && (!species || !(species.flags & NOSLIP)) && prob(current_size*5))
|
||||
to_chat(src, "<span class='danger'>A strong gravitational force slams you to the ground!</span>")
|
||||
to_chat(src, span_danger("A strong gravitational force slams you to the ground!"))
|
||||
Weaken(current_size)
|
||||
..()
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
investigate_log("turned <font color='green'>on</font> by [user.key]","singulo")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The controls are locked!</span>")
|
||||
to_chat(user, span_warning("The controls are locked!"))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be firmly secured to the floor first.</span>")
|
||||
to_chat(user, span_warning("\The [src] needs to be firmly secured to the floor first."))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
src.anchored = FALSE
|
||||
disconnect_from_network()
|
||||
if(2)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be unwelded from the floor.</span>")
|
||||
to_chat(user, span_warning("\The [src] needs to be unwelded from the floor."))
|
||||
update_icon() // VOREStation Add
|
||||
return
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
return
|
||||
switch(state)
|
||||
if(0)
|
||||
to_chat(user, "<span class='warning'>\The [src] needs to be wrenched to the floor.</span>")
|
||||
to_chat(user, span_warning("\The [src] needs to be wrenched to the floor."))
|
||||
if(1)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
@@ -201,7 +201,7 @@
|
||||
to_chat(user, "You weld [src] to the floor.")
|
||||
connect_to_network()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
|
||||
to_chat(user, span_warning("You need more welding fuel to complete this task."))
|
||||
if(2)
|
||||
if (WT.remove_fuel(0,user))
|
||||
playsound(src, WT.usesound, 50, 1)
|
||||
@@ -214,39 +214,39 @@
|
||||
to_chat(user, "You cut [src] free from the floor.")
|
||||
disconnect_from_network()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more welding fuel to complete this task.</span>")
|
||||
to_chat(user, span_warning("You need more welding fuel to complete this task."))
|
||||
update_icon() // VOREStation Add
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/stack/material) && W.get_material_name() == MAT_STEEL)
|
||||
var/amt = CEILING(( initial(integrity) - integrity)/10, 1)
|
||||
if(!amt)
|
||||
to_chat(user, "<span class='notice'>\The [src] is already fully repaired.</span>")
|
||||
to_chat(user, span_notice("\The [src] is already fully repaired."))
|
||||
return
|
||||
var/obj/item/stack/P = W
|
||||
if(!P.can_use(amt))
|
||||
to_chat(user, "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>")
|
||||
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin repairing \the [src]...</span>")
|
||||
to_chat(user, span_notice("You begin repairing \the [src]..."))
|
||||
if(do_after(user, 30))
|
||||
if(P.use(amt))
|
||||
to_chat(user, "<span class='notice'>You have repaired \the [src].</span>")
|
||||
to_chat(user, span_notice("You have repaired \the [src]."))
|
||||
integrity = initial(integrity)
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't have enough sheets to repair this! You need at least [amt] sheets.</span>")
|
||||
to_chat(user, span_warning("You don't have enough sheets to repair this! You need at least [amt] sheets."))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
|
||||
if(emagged)
|
||||
to_chat(user, "<span class='warning'>The lock seems to be broken.</span>")
|
||||
to_chat(user, span_warning("The lock seems to be broken."))
|
||||
return
|
||||
if(src.allowed(user))
|
||||
src.locked = !src.locked
|
||||
to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]")
|
||||
update_icon() // VOREStation Add
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Access denied.</span>")
|
||||
to_chat(user, span_warning("Access denied."))
|
||||
return
|
||||
..()
|
||||
return
|
||||
@@ -255,7 +255,7 @@
|
||||
if(!emagged)
|
||||
locked = 0
|
||||
emagged = 1
|
||||
user.visible_message("[user.name] emags [src].","<span class='warning'>You short out the lock.</span>")
|
||||
user.visible_message("[user.name] emags [src].",span_warning("You short out the lock."))
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/emitter/bullet_act(var/obj/item/projectile/P)
|
||||
@@ -271,10 +271,10 @@
|
||||
integrity = between(0, integrity + amount, initial(integrity))
|
||||
if(integrity == 0)
|
||||
if(powernet && avail(active_power_usage)) // If it's powered, it goes boom if killed.
|
||||
visible_message(src, "<span class='danger'>\The [src] explodes violently!</span>", "<span class='danger'>You hear an explosion!</span>")
|
||||
visible_message(src, span_danger("\The [src] explodes violently!"), span_danger("You hear an explosion!"))
|
||||
explosion(get_turf(src), 1, 2, 4)
|
||||
else
|
||||
src.visible_message("<span class='danger'>\The [src] crumples apart!</span>", "<span class='warning'>You hear metal collapsing.</span>")
|
||||
src.visible_message(span_danger("\The [src] crumples apart!"), span_warning("You hear metal collapsing."))
|
||||
if(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -282,19 +282,19 @@
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(0)
|
||||
. += "<span class='warning'>It is not secured in place!</span>"
|
||||
. += span_warning("It is not secured in place!")
|
||||
if(1)
|
||||
. += "<span class='warning'>It has been bolted down securely, but not welded into place.</span>"
|
||||
. += span_warning("It has been bolted down securely, but not welded into place.")
|
||||
if(2)
|
||||
. += "<span class='notice'>It has been bolted down securely and welded down into place.</span>"
|
||||
. += span_notice("It has been bolted down securely and welded down into place.")
|
||||
var/integrity_percentage = round((integrity / initial(integrity)) * 100)
|
||||
switch(integrity_percentage)
|
||||
if(0 to 30)
|
||||
. += "<span class='danger'>It is close to falling apart!</span>"
|
||||
. += span_danger("It is close to falling apart!")
|
||||
if(31 to 70)
|
||||
. += "<span class='danger'>It is damaged.</span>"
|
||||
. += span_danger("It is damaged.")
|
||||
if(77 to 99)
|
||||
. += "<span class='warning'>It is slightly damaged.</span>"
|
||||
. += span_warning("It is slightly damaged.")
|
||||
|
||||
//R-UST port
|
||||
/obj/machinery/power/emitter/proc/get_initial_fire_delay()
|
||||
|
||||
@@ -44,11 +44,11 @@ field_generator power level display
|
||||
. = ..()
|
||||
switch(state)
|
||||
if(0)
|
||||
. += "<span class='warning'>It is not secured in place!</span>"
|
||||
. += span_warning("It is not secured in place!")
|
||||
if(1)
|
||||
. += "<span class='warning'>It has been bolted down securely, but not welded into place.</span>"
|
||||
. += span_warning("It has been bolted down securely, but not welded into place.")
|
||||
if(2)
|
||||
. += "<span class='notice'>It has been bolted down securely and welded down into place.</span>"
|
||||
. += span_notice("It has been bolted down securely and welded down into place.")
|
||||
|
||||
/obj/machinery/field_generator/update_icon()
|
||||
cut_overlays()
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
/obj/machinery/the_singularitygen/examine()
|
||||
. = ..()
|
||||
if(anchored)
|
||||
. += "<span class='notice'>It has been securely bolted down and is ready for operation.</span>"
|
||||
. += span_notice("It has been securely bolted down and is ready for operation.")
|
||||
else
|
||||
. += "<span class='warning'>It is not secured!</span>"
|
||||
. += span_warning("It is not secured!")
|
||||
|
||||
/obj/machinery/the_singularitygen/process()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -41,12 +41,12 @@
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
visible_message("<b>\The [user]</b> adjusts \the [src]'s mechanisms.")
|
||||
if(panel_open && do_after(user, 30))
|
||||
to_chat(user, "<span class='notice'>\The [src] looks like it could be modified.</span>")
|
||||
to_chat(user, span_notice("\The [src] looks like it could be modified."))
|
||||
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
to_chat(user, "<span class='cult'>\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..</span>")
|
||||
to_chat(user, span_cult("\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow.."))
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src]'s mechanisms look secure.</span>")
|
||||
to_chat(user, span_notice("\The [src]'s mechanisms look secure."))
|
||||
if(istype(W, /obj/item/smes_coil/super_io) && panel_open)
|
||||
visible_message("<b>\The [user]</b> begins to modify \the [src] with \the [W].")
|
||||
if(do_after(user, 300))
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
|
||||
/obj/machinery/particle_accelerator/control_box/proc/is_interactive(mob/user)
|
||||
if(!interface_control)
|
||||
to_chat(user, "<span class='alert'>ERROR: Request timed out. Check wire contacts.</span>")
|
||||
to_chat(user, span_alert("ERROR: Request timed out. Check wire contacts."))
|
||||
return FALSE
|
||||
if(construction_state != 3)
|
||||
return FALSE
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
/obj/machinery/particle_smasher/examine(mob/user)
|
||||
. = ..()
|
||||
if(Adjacent(user))
|
||||
. += "<span class='notice'>\The [src] contains:</span>"
|
||||
. += span_notice("\The [src] contains:")
|
||||
for(var/obj/item/I in contents)
|
||||
. += "<span class='notice'>\the [I]</span>"
|
||||
. += span_notice("\the [I]")
|
||||
|
||||
/obj/machinery/particle_smasher/atmosanalyze(var/mob/user)
|
||||
return list("<span class='notice'>\The [src] reads an energy level of [energy].</span>")
|
||||
return list(span_notice("\The [src] reads an energy level of [energy]."))
|
||||
|
||||
/obj/machinery/particle_smasher/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(W.type == /obj/item/analyzer)
|
||||
@@ -55,14 +55,14 @@
|
||||
else if(istype(W, /obj/item/stack/material))
|
||||
var/obj/item/stack/material/M = W
|
||||
if(M.uses_charge)
|
||||
to_chat(user, "<span class='notice'>You cannot fill \the [src] with a synthesizer!</span>")
|
||||
to_chat(user, span_notice("You cannot fill \the [src] with a synthesizer!"))
|
||||
return
|
||||
target = M.split(1)
|
||||
target.forceMove(src)
|
||||
update_icon()
|
||||
else if(istype(W, beaker_type))
|
||||
if(reagent_container)
|
||||
to_chat(user, "<span class='notice'>\The [src] already has a container attached.</span>")
|
||||
to_chat(user, span_notice("\The [src] already has a container attached."))
|
||||
return
|
||||
if(isrobot(user) && istype(W.loc, /obj/item/gripper))
|
||||
var/obj/item/gripper/G = W.loc
|
||||
@@ -71,7 +71,7 @@
|
||||
user.drop_from_inventory(W)
|
||||
reagent_container = W
|
||||
reagent_container.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You add \the [reagent_container] to \the [src].</span>")
|
||||
to_chat(user, span_notice("You add \the [reagent_container] to \the [src]."))
|
||||
update_icon()
|
||||
return
|
||||
else if(W.has_tool_quality(TOOL_WRENCH))
|
||||
@@ -88,7 +88,7 @@
|
||||
update_icon()
|
||||
return
|
||||
else if(istype(W, /obj/item/card/id))
|
||||
to_chat(user, "<span class='notice'>Swiping \the [W] on \the [src] doesn't seem to do anything...</span>")
|
||||
to_chat(user, span_notice("Swiping \the [W] on \the [src] doesn't seem to do anything..."))
|
||||
return ..()
|
||||
else if(((isrobot(user) && istype(W.loc, /obj/item/gripper)) || (!isrobot(user) && W.canremove)) && storage.len < max_storage)
|
||||
if(isrobot(user) && istype(W.loc, /obj/item/gripper))
|
||||
@@ -182,7 +182,7 @@
|
||||
return
|
||||
|
||||
if(successful_craft)
|
||||
visible_message("<span class='warning'>\The [src] fizzles.</span>")
|
||||
visible_message(span_warning("\The [src] fizzles."))
|
||||
if(prob(33)) // Why are you blasting it after it's already done!
|
||||
SSradiation.radiate(src, 10 + round(src.energy / 60, 1))
|
||||
energy = max(0, energy - 30)
|
||||
|
||||
@@ -135,7 +135,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
overlays = 0
|
||||
if(chained)
|
||||
overlays = "chain_s1"
|
||||
visible_message("<span class='notice'>The singularity has shrunk to a rather pitiful size.</span>")
|
||||
visible_message(span_notice("The singularity has shrunk to a rather pitiful size."))
|
||||
if (STAGE_TWO) //1 to 3 does not check for the turfs if you put the gens right next to a 1x1 then its going to eat them.
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
@@ -153,9 +153,9 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
if(chained)
|
||||
overlays = "chain_s3"
|
||||
if(growing)
|
||||
visible_message("<span class='notice'>The singularity noticeably grows in size.</span>")
|
||||
visible_message(span_notice("The singularity noticeably grows in size."))
|
||||
else
|
||||
visible_message("<span class='notice'>The singularity has shrunk to a less powerful size.</span>")
|
||||
visible_message(span_notice("The singularity has shrunk to a less powerful size."))
|
||||
if (STAGE_THREE)
|
||||
if ((check_turfs_in(1, 2)) && (check_turfs_in(2, 2)) && (check_turfs_in(4, 2)) && (check_turfs_in(8, 2)))
|
||||
name = "gravitational singularity"
|
||||
@@ -174,9 +174,9 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
if(chained)
|
||||
overlays = "chain_s5"
|
||||
if(growing)
|
||||
visible_message("<span class='notice'>The singularity expands to a reasonable size.</span>")
|
||||
visible_message(span_notice("The singularity expands to a reasonable size."))
|
||||
else
|
||||
visible_message("<span class='notice'>The singularity has returned to a safe size.</span>")
|
||||
visible_message(span_notice("The singularity has returned to a safe size."))
|
||||
if(STAGE_FOUR)
|
||||
if ((check_turfs_in(1, 3)) && (check_turfs_in(2, 3)) && (check_turfs_in(4, 3)) && (check_turfs_in(8, 3)))
|
||||
name = "gravitational singularity"
|
||||
@@ -195,9 +195,9 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
if(chained)
|
||||
overlays = "chain_s7"
|
||||
if(growing)
|
||||
visible_message("<span class='warning'>The singularity expands to a dangerous size.</span>")
|
||||
visible_message(span_warning("The singularity expands to a dangerous size."))
|
||||
else
|
||||
visible_message("<span class='notice'>Miraculously, the singularity reduces in size, and can be contained.</span>")
|
||||
visible_message(span_notice("Miraculously, the singularity reduces in size, and can be contained."))
|
||||
if(STAGE_FIVE) //This one also lacks a check for gens because it eats everything.
|
||||
name = "gravitational singularity"
|
||||
desc = "A gravitational singularity."
|
||||
@@ -213,9 +213,9 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
if(chained)
|
||||
overlays = "chain_s9"
|
||||
if(growing)
|
||||
visible_message("<span class='danger'><font size='2'>The singularity has grown out of control!</font></span>")
|
||||
visible_message(span_danger("<font size='2'>The singularity has grown out of control!</font>"))
|
||||
else
|
||||
visible_message("<span class='warning'>The singularity miraculously reduces in size and loses its supermatter properties.</span>")
|
||||
visible_message(span_warning("The singularity miraculously reduces in size and loses its supermatter properties."))
|
||||
if(STAGE_SUPER)//SUPERSINGULO
|
||||
name = "super gravitational singularity"
|
||||
desc = "A gravitational singularity with the properties of supermatter. <b>It has the power to destroy worlds.</b>"
|
||||
@@ -230,7 +230,7 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
event_chance = 25 //Events will fire off more often.
|
||||
if(chained)
|
||||
overlays = "chain_s9"
|
||||
visible_message("<span class='sinister'><font size='3'>You witness the creation of a destructive force that cannot possibly be stopped by human hands.</font></span>")
|
||||
visible_message(span_sinister("<font size='3'>You witness the creation of a destructive force that cannot possibly be stopped by human hands.</font>"))
|
||||
|
||||
if (current_size == allowed_size)
|
||||
investigate_log("<font color='red'>grew to size [current_size].</font>", I_SINGULO)
|
||||
@@ -431,10 +431,10 @@ GLOBAL_LIST_BOILERPLATE(all_singularities, /obj/singularity)
|
||||
return
|
||||
else
|
||||
to_chat(H, "<span class=\"warning\">You look directly into The [src.name], but your eyewear does absolutely nothing to protect you from it!</span>")
|
||||
to_chat(M, "<span class='danger'>You look directly into The [src.name] and feel [current_size == STAGE_SUPER ? "helpless" : "weak"].</span>")
|
||||
to_chat(M, span_danger("You look directly into The [src.name] and feel [current_size == STAGE_SUPER ? "helpless" : "weak"]."))
|
||||
M.apply_effect(3, STUN)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("<span class='danger'>[] stares blankly at The []!</span>", M, src), 1)
|
||||
O.show_message(span_danger("[M] stares blankly at The [src]!"), 1)
|
||||
|
||||
/obj/singularity/proc/emp_area()
|
||||
if(current_size != STAGE_SUPER)
|
||||
|
||||
Reference in New Issue
Block a user