Refactors most spans into span procs (#59645)

Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
Watermelon914
2021-06-14 13:03:53 -07:00
committed by GitHub
parent b9982f6970
commit 375a20e49b
1676 changed files with 15455 additions and 15226 deletions
+115 -115
View File
@@ -338,10 +338,10 @@
else
. += "The cover is closed."
. += "<span class='notice'>Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.</span>"
. += span_notice("Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.")
if(issilicon(user))
. += "<span class='notice'>Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].</span>"
. += span_notice("Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].")
// update the APC icon to show the three base states
// also add overlays for indicator lights
@@ -469,32 +469,32 @@
if (opened)
if (has_electronics == APC_ELECTRONICS_INSTALLED)
if (terminal)
to_chat(user, "<span class='warning'>Disconnect the wires first!</span>")
to_chat(user, span_warning("Disconnect the wires first!"))
return
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You attempt to remove the power control board...</span>" )
to_chat(user, span_notice("You attempt to remove the power control board...") )
if(W.use_tool(src, user, 50))
if (has_electronics == APC_ELECTRONICS_INSTALLED)
has_electronics = APC_ELECTRONICS_MISSING
if (machine_stat & BROKEN)
user.visible_message("<span class='notice'>[user.name] breaks the power control board inside [src.name]!</span>",\
"<span class='notice'>You break the charred power control board and remove the remains.</span>",
"<span class='hear'>You hear a crack.</span>")
user.visible_message(span_notice("[user.name] breaks the power control board inside [src.name]!"),\
span_notice("You break the charred power control board and remove the remains."),
span_hear("You hear a crack."))
return
else if (obj_flags & EMAGGED)
obj_flags &= ~EMAGGED
user.visible_message("<span class='notice'>[user.name] discards an emagged power control board from [src.name]!</span>",\
"<span class='notice'>You discard the emagged power control board.</span>")
user.visible_message(span_notice("[user.name] discards an emagged power control board from [src.name]!"),\
span_notice("You discard the emagged power control board."))
return
else if (malfhack)
user.visible_message("<span class='notice'>[user.name] discards a strangely programmed power control board from [src.name]!</span>",\
"<span class='notice'>You discard the strangely programmed board.</span>")
user.visible_message(span_notice("[user.name] discards a strangely programmed power control board from [src.name]!"),\
span_notice("You discard the strangely programmed board."))
malfai = null
malfhack = 0
return
else
user.visible_message("<span class='notice'>[user.name] removes the power control board from [src.name]!</span>",\
"<span class='notice'>You remove the power control board.</span>")
user.visible_message(span_notice("[user.name] removes the power control board from [src.name]!"),\
span_notice("You remove the power control board."))
new /obj/item/electronics/apc(loc)
return
else if (opened!=APC_COVER_REMOVED)
@@ -504,10 +504,10 @@
return
else if (!(machine_stat & BROKEN))
if(coverlocked && !(machine_stat & MAINT)) // locked...
to_chat(user, "<span class='warning'>The cover is locked and cannot be opened!</span>")
to_chat(user, span_warning("The cover is locked and cannot be opened!"))
return
else if (panel_open)
to_chat(user, "<span class='warning'>Exposed wires prevents you from opening it!</span>")
to_chat(user, span_warning("Exposed wires prevents you from opening it!"))
return
else
opened = APC_COVER_OPENED
@@ -520,7 +520,7 @@
. = TRUE
if(opened)
if(cell)
user.visible_message("<span class='notice'>[user] removes \the [cell] from [src]!</span>", "<span class='notice'>You remove \the [cell].</span>")
user.visible_message(span_notice("[user] removes \the [cell] from [src]!"), span_notice("You remove \the [cell]."))
var/turf/T = get_turf(user)
cell.forceMove(T)
cell.update_appearance()
@@ -534,22 +534,22 @@
has_electronics = APC_ELECTRONICS_SECURED
set_machine_stat(machine_stat & ~MAINT)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You screw the circuit electronics into place.</span>")
to_chat(user, span_notice("You screw the circuit electronics into place."))
if (APC_ELECTRONICS_SECURED)
has_electronics = APC_ELECTRONICS_INSTALLED
set_machine_stat(machine_stat | MAINT)
W.play_tool_sound(src)
to_chat(user, "<span class='notice'>You unfasten the electronics.</span>")
to_chat(user, span_notice("You unfasten the electronics."))
else
to_chat(user, "<span class='warning'>There is nothing to secure!</span>")
to_chat(user, span_warning("There is nothing to secure!"))
return
update_appearance()
else if(obj_flags & EMAGGED)
to_chat(user, "<span class='warning'>The interface is broken!</span>")
to_chat(user, span_warning("The interface is broken!"))
return
else
panel_open = !panel_open
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"]."))
update_appearance()
/obj/machinery/power/apc/wirecutter_act(mob/living/user, obj/item/W)
@@ -564,18 +564,18 @@
if (opened && !has_electronics && !terminal)
if(!W.tool_start_check(user, amount=3))
return
user.visible_message("<span class='notice'>[user.name] welds [src].</span>", \
"<span class='notice'>You start welding the APC frame...</span>", \
"<span class='hear'>You hear welding.</span>")
user.visible_message(span_notice("[user.name] welds [src]."), \
span_notice("You start welding the APC frame..."), \
span_hear("You hear welding."))
if(W.use_tool(src, user, 50, volume=50, amount=3))
if ((machine_stat & BROKEN) || opened==APC_COVER_REMOVED)
new /obj/item/stack/sheet/iron(loc)
user.visible_message("<span class='notice'>[user.name] cuts [src] apart with [W].</span>",\
"<span class='notice'>You disassembled the broken APC frame.</span>")
user.visible_message(span_notice("[user.name] cuts [src] apart with [W]."),\
span_notice("You disassembled the broken APC frame."))
else
new /obj/item/wallframe/apc(loc)
user.visible_message("<span class='notice'>[user.name] cuts [src] from the wall with [W].</span>",\
"<span class='notice'>You cut the APC frame from the wall.</span>")
user.visible_message(span_notice("[user.name] cuts [src] from the wall with [W]."),\
span_notice("You cut the APC frame from the wall."))
qdel(src)
return TRUE
@@ -594,7 +594,7 @@
if(shock_source && metal && (panel_open || opened)) //Now you're cooking with electricity
if(electrocute_mob(user, shock_source, src, siemens_coeff = 1, dist_check = TRUE))//People with insulated gloves just attack the APC normally. They're just short of magical anyway
do_sparks(5, TRUE, src)
user.visible_message("<span class='notice'>[user.name] shoves [W] into the internal components of [src], erupting into a cascade of sparks!</span>")
user.visible_message(span_notice("[user.name] shoves [W] into the internal components of [src], erupting into a cascade of sparks!"))
if(shock_source == cell)//If the shock is coming from the cell just fully discharge it, because it's funny
cell.use(cell.charge)
return
@@ -604,17 +604,17 @@
if (istype(W, /obj/item/stock_parts/cell) && opened)
if(cell)
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
to_chat(user, span_warning("There is a power cell already installed!"))
return
else
if (machine_stat & MAINT)
to_chat(user, "<span class='warning'>There is no connector for your power cell!</span>")
to_chat(user, span_warning("There is no connector for your power cell!"))
return
if(!user.transferItemToLoc(W, src))
return
cell = W
user.visible_message("<span class='notice'>[user.name] inserts the power cell to [src.name]!</span>",\
"<span class='notice'>You insert the power cell.</span>")
user.visible_message(span_notice("[user.name] inserts the power cell to [src.name]!"),\
span_notice("You insert the power cell."))
chargecount = 0
update_appearance()
else if (W.GetID())
@@ -624,21 +624,21 @@
if(!host_turf)
CRASH("attackby on APC when it's not on a turf")
if (host_turf.intact)
to_chat(user, "<span class='warning'>You must remove the floor plating in front of the APC first!</span>")
to_chat(user, span_warning("You must remove the floor plating in front of the APC first!"))
return
else if (terminal)
to_chat(user, "<span class='warning'>This APC is already wired!</span>")
to_chat(user, span_warning("This APC is already wired!"))
return
else if (!has_electronics)
to_chat(user, "<span class='warning'>There is nothing to wire!</span>")
to_chat(user, span_warning("There is nothing to wire!"))
return
var/obj/item/stack/cable_coil/C = W
if(C.get_amount() < 10)
to_chat(user, "<span class='warning'>You need ten lengths of cable for APC!</span>")
to_chat(user, span_warning("You need ten lengths of cable for APC!"))
return
user.visible_message("<span class='notice'>[user.name] adds cables to the APC frame.</span>", \
"<span class='notice'>You start adding cables to the APC frame...</span>")
user.visible_message(span_notice("[user.name] adds cables to the APC frame."), \
span_notice("You start adding cables to the APC frame..."))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 20, target = src))
if (C.get_amount() < 10 || !C)
@@ -650,41 +650,41 @@
do_sparks(5, TRUE, src)
return
C.use(10)
to_chat(user, "<span class='notice'>You add cables to the APC frame.</span>")
to_chat(user, span_notice("You add cables to the APC frame."))
make_terminal()
terminal.connect_to_network()
else if (istype(W, /obj/item/electronics/apc) && opened)
if (has_electronics)
to_chat(user, "<span class='warning'>There is already a board inside the [src]!</span>")
to_chat(user, span_warning("There is already a board inside the [src]!"))
return
else if (machine_stat & BROKEN)
to_chat(user, "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>")
to_chat(user, span_warning("You cannot put the board inside, the frame is damaged!"))
return
user.visible_message("<span class='notice'>[user.name] inserts the power control board into [src].</span>", \
"<span class='notice'>You start to insert the power control board into the frame...</span>")
user.visible_message(span_notice("[user.name] inserts the power control board into [src]."), \
span_notice("You start to insert the power control board into the frame..."))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 10, target = src))
if(!has_electronics)
has_electronics = APC_ELECTRONICS_INSTALLED
locked = FALSE
to_chat(user, "<span class='notice'>You place the power control board inside the frame.</span>")
to_chat(user, span_notice("You place the power control board inside the frame."))
qdel(W)
else if(istype(W, /obj/item/electroadaptive_pseudocircuit) && opened)
var/obj/item/electroadaptive_pseudocircuit/P = W
if(!has_electronics)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
to_chat(user, span_warning("[src]'s frame is too damaged to support a circuit."))
return
if(!P.adapt_circuit(user, 50))
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
"<span class='notice'>You adapt a power control board and click it into place in [src]'s guts.</span>")
user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \
span_notice("You adapt a power control board and click it into place in [src]'s guts."))
has_electronics = APC_ELECTRONICS_INSTALLED
locked = FALSE
else if(!cell)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
to_chat(user, span_warning("There's no connector for a power cell."))
return
if(!P.adapt_circuit(user, 500))
return
@@ -692,32 +692,32 @@
C.forceMove(src)
cell = C
chargecount = 0
user.visible_message("<span class='notice'>[user] fabricates a weak power cell and places it into [src].</span>", \
"<span class='warning'>Your [P.name] whirrs with strain as you create a weak power cell and place it into [src]!</span>")
user.visible_message(span_notice("[user] fabricates a weak power cell and places it into [src]."), \
span_warning("Your [P.name] whirrs with strain as you create a weak power cell and place it into [src]!"))
update_appearance()
else
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
to_chat(user, span_warning("[src] has both electronics and a cell."))
return
else if (istype(W, /obj/item/wallframe/apc) && opened)
if (!(machine_stat & BROKEN || opened==APC_COVER_REMOVED || obj_integrity < max_integrity)) // There is nothing to repair
to_chat(user, "<span class='warning'>You found no reason for repairing this APC!</span>")
to_chat(user, span_warning("You found no reason for repairing this APC!"))
return
if (!(machine_stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
user.visible_message("<span class='notice'>[user.name] replaces missing APC's cover.</span>", \
"<span class='notice'>You begin to replace APC's cover...</span>")
user.visible_message(span_notice("[user.name] replaces missing APC's cover."), \
span_notice("You begin to replace APC's cover..."))
if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame
to_chat(user, "<span class='notice'>You replace missing APC's cover.</span>")
to_chat(user, span_notice("You replace missing APC's cover."))
qdel(W)
opened = APC_COVER_OPENED
update_appearance()
return
if (has_electronics)
to_chat(user, "<span class='warning'>You cannot repair this APC until you remove the electronics still inside!</span>")
to_chat(user, span_warning("You cannot repair this APC until you remove the electronics still inside!"))
return
user.visible_message("<span class='notice'>[user.name] replaces the damaged APC frame with a new one.</span>", \
"<span class='notice'>You begin to replace the damaged APC frame...</span>")
user.visible_message(span_notice("[user.name] replaces the damaged APC frame with a new one."), \
span_notice("You begin to replace the damaged APC frame..."))
if(do_after(user, 50, target = src))
to_chat(user, "<span class='notice'>You replace the damaged APC frame with a new one.</span>")
to_chat(user, span_notice("You replace the damaged APC frame with a new one."))
qdel(W)
set_machine_stat(machine_stat & ~BROKEN)
obj_integrity = max_integrity
@@ -734,16 +734,16 @@
if(the_rcd.upgrade & RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
to_chat(user, span_warning("[src]'s frame is too damaged to support a circuit."))
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 20, "cost" = 1)
else if(!cell)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
to_chat(user, span_warning("There's no connector for a power cell."))
return FALSE
return list("mode" = RCD_UPGRADE_SIMPLE_CIRCUITS, "delay" = 50, "cost" = 10) //16 for a wall
else
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
to_chat(user, span_warning("[src] has both electronics and a cell."))
return FALSE
return FALSE
@@ -752,27 +752,27 @@
if(RCD_UPGRADE_SIMPLE_CIRCUITS)
if(!has_electronics)
if(machine_stat & BROKEN)
to_chat(user, "<span class='warning'>[src]'s frame is too damaged to support a circuit.</span>")
to_chat(user, span_warning("[src]'s frame is too damaged to support a circuit."))
return
user.visible_message("<span class='notice'>[user] fabricates a circuit and places it into [src].</span>", \
"<span class='notice'>You adapt a power control board and click it into place in [src]'s guts.</span>")
user.visible_message(span_notice("[user] fabricates a circuit and places it into [src]."), \
span_notice("You adapt a power control board and click it into place in [src]'s guts."))
has_electronics = TRUE
locked = TRUE
return TRUE
else if(!cell)
if(machine_stat & MAINT)
to_chat(user, "<span class='warning'>There's no connector for a power cell.</span>")
to_chat(user, span_warning("There's no connector for a power cell."))
return FALSE
var/obj/item/stock_parts/cell/crap/empty/C = new(src)
C.forceMove(src)
cell = C
chargecount = 0
user.visible_message("<span class='notice'>[user] fabricates a weak power cell and places it into [src].</span>", \
"<span class='warning'>Your [the_rcd.name] whirrs with strain as you create a weak power cell and place it into [src]!</span>")
user.visible_message(span_notice("[user] fabricates a weak power cell and places it into [src]."), \
span_warning("Your [the_rcd.name] whirrs with strain as you create a weak power cell and place it into [src]!"))
update_appearance()
return TRUE
else
to_chat(user, "<span class='warning'>[src] has both electronics and a cell.</span>")
to_chat(user, span_warning("[src] has both electronics and a cell."))
return FALSE
return FALSE
@@ -785,25 +785,25 @@
/obj/machinery/power/apc/proc/togglelock(mob/living/user)
if(obj_flags & EMAGGED)
to_chat(user, "<span class='warning'>The interface is broken!</span>")
to_chat(user, span_warning("The interface is broken!"))
else if(opened)
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
to_chat(user, span_warning("You must close the cover to swipe an ID card!"))
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel!</span>")
to_chat(user, span_warning("You must close the panel!"))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
to_chat(user, span_warning("Nothing happens!"))
else
if(allowed(usr) && !wires.is_cut(WIRE_IDSCAN) && !malfhack)
locked = !locked
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] the APC interface.</span>")
to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] the APC interface."))
update_appearance()
updateUsrDialog()
else
to_chat(user, "<span class='warning'>Access denied.</span>")
to_chat(user, span_warning("Access denied."))
/obj/machinery/power/apc/proc/toggle_nightshift_lights(mob/living/user)
if(last_nightshift_switch > world.time - 100) //~10 seconds between each toggle to prevent spamming
to_chat(usr, "<span class='warning'>[src]'s night lighting circuit breaker is still cycling!</span>")
to_chat(usr, span_warning("[src]'s night lighting circuit breaker is still cycling!"))
return
last_nightshift_switch = world.time
set_nightshift(!nightshift_lights)
@@ -825,23 +825,23 @@
if(opened != APC_COVER_REMOVED)
opened = APC_COVER_REMOVED
coverlocked = FALSE
visible_message("<span class='warning'>The APC cover is knocked down!</span>")
visible_message(span_warning("The APC cover is knocked down!"))
update_appearance()
/obj/machinery/power/apc/emag_act(mob/user)
if(!(obj_flags & EMAGGED) && !malfhack)
if(opened)
to_chat(user, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
to_chat(user, span_warning("You must close the cover to swipe an ID card!"))
else if(panel_open)
to_chat(user, "<span class='warning'>You must close the panel first!</span>")
to_chat(user, span_warning("You must close the panel first!"))
else if(machine_stat & (BROKEN|MAINT))
to_chat(user, "<span class='warning'>Nothing happens!</span>")
to_chat(user, span_warning("Nothing happens!"))
else
flick("apc-spark", src)
playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
locked = FALSE
to_chat(user, "<span class='notice'>You emag the APC interface.</span>")
to_chat(user, span_notice("You emag the APC interface."))
update_appearance()
@@ -860,47 +860,47 @@
if((E.drain_time < world.time) && LAZYACCESS(modifiers, RIGHT_CLICK) && stomach)
if(H.combat_mode)
if(cell.charge <= (cell.maxcharge / 2)) // ethereals can't drain APCs under half charge, this is so that they are forced to look to alternative power sources if the station is running low
to_chat(H, "<span class='warning'>The APC's syphon safeties prevent you from draining power!</span>")
to_chat(H, span_warning("The APC's syphon safeties prevent you from draining power!"))
return
if(stomach.crystal_charge > charge_limit)
to_chat(H, "<span class='warning'>Your charge is full!</span>")
to_chat(H, span_warning("Your charge is full!"))
return
E.drain_time = world.time + APC_DRAIN_TIME
to_chat(H, "<span class='notice'>You start channeling some power through the APC into your body.</span>")
to_chat(H, span_notice("You start channeling some power through the APC into your body."))
if(do_after(user, APC_DRAIN_TIME, target = src))
if(cell.charge <= (cell.maxcharge / 2) || (stomach.crystal_charge > charge_limit))
return
if(istype(stomach))
to_chat(H, "<span class='notice'>You receive some charge from the APC.</span>")
to_chat(H, span_notice("You receive some charge from the APC."))
stomach.adjust_charge(APC_POWER_GAIN)
cell.charge -= APC_POWER_GAIN
else
to_chat(H, "<span class='warning'>You can't receive charge from the APC!</span>")
to_chat(H, span_warning("You can't receive charge from the APC!"))
return
else
if(cell.charge >= cell.maxcharge - APC_POWER_GAIN)
to_chat(H, "<span class='warning'>The APC can't receive anymore power!</span>")
to_chat(H, span_warning("The APC can't receive anymore power!"))
return
if(stomach.crystal_charge < APC_POWER_GAIN)
to_chat(H, "<span class='warning'>Your charge is too low!</span>")
to_chat(H, span_warning("Your charge is too low!"))
return
E.drain_time = world.time + APC_DRAIN_TIME
to_chat(H, "<span class='notice'>You start channeling power through your body into the APC.</span>")
to_chat(H, span_notice("You start channeling power through your body into the APC."))
if(do_after(user, APC_DRAIN_TIME, target = src))
if((cell.charge >= (cell.maxcharge - APC_POWER_GAIN)) || (stomach.crystal_charge < APC_POWER_GAIN))
to_chat(H, "<span class='warning'>You can't transfer power to the APC!</span>")
to_chat(H, span_warning("You can't transfer power to the APC!"))
return
if(istype(stomach))
to_chat(H, "<span class='notice'>You transfer some power to the APC.</span>")
to_chat(H, span_notice("You transfer some power to the APC."))
stomach.adjust_charge(-APC_POWER_GAIN)
cell.charge += APC_POWER_GAIN
else
to_chat(H, "<span class='warning'>You can't transfer power to the APC!</span>")
to_chat(H, span_warning("You can't transfer power to the APC!"))
return
if(opened && (!issilicon(user)))
if(cell)
user.visible_message("<span class='notice'>[user] removes \the [cell] from [src]!</span>", "<span class='notice'>You remove \the [cell].</span>")
user.visible_message(span_notice("[user] removes \the [cell] from [src]!"), span_notice("You remove \the [cell]."))
user.put_in_hands(cell)
cell.update_appearance()
src.cell = null
@@ -1011,7 +1011,7 @@
) \
)
if(!loud)
to_chat(user, "<span class='danger'>\The [src] has eee disabled!</span>")
to_chat(user, span_danger("\The [src] has eee disabled!"))
return FALSE
return TRUE
@@ -1034,7 +1034,7 @@
if("lock")
if(usr.has_unlimited_silicon_privilege)
if((obj_flags & EMAGGED) || (machine_stat & (BROKEN|MAINT)))
to_chat(usr, "<span class='warning'>The APC does not respond to the command!</span>")
to_chat(usr, span_warning("The APC does not respond to the command!"))
else
locked = !locked
update_appearance()
@@ -1109,9 +1109,9 @@
if(get_malf_status(malf) != 1)
return
if(malf.malfhacking)
to_chat(malf, "<span class='warning'>You are already hacking an APC!</span>")
to_chat(malf, span_warning("You are already hacking an APC!"))
return
to_chat(malf, "<span class='notice'>Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process.</span>")
to_chat(malf, span_notice("Beginning override of APC systems. This takes some time, and you cannot perform other actions during the process."))
malf.malfhack = src
malf.malfhacking = addtimer(CALLBACK(malf, /mob/living/silicon/ai/.proc/malfhacked, src), 600, TIMER_STOPPABLE)
@@ -1123,10 +1123,10 @@
if(!istype(malf))
return
if(istype(malf.loc, /obj/machinery/power/apc)) // Already in an APC
to_chat(malf, "<span class='warning'>You must evacuate your current APC first!</span>")
to_chat(malf, span_warning("You must evacuate your current APC first!"))
return
if(!malf.can_shunt)
to_chat(malf, "<span class='warning'>You cannot shunt!</span>")
to_chat(malf, span_warning("You cannot shunt!"))
return
if(!is_station_level(z))
return
@@ -1157,7 +1157,7 @@
occupier.parent.cancel_camera()
qdel(occupier)
else
to_chat(occupier, "<span class='danger'>Primary core damaged, unable to return core processes.</span>")
to_chat(occupier, span_danger("Primary core damaged, unable to return core processes."))
if(forced)
occupier.forceMove(drop_location())
occupier.death()
@@ -1168,19 +1168,19 @@
/obj/machinery/power/apc/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(card.AI)
to_chat(user, "<span class='warning'>[card] is already occupied!</span>")
to_chat(user, span_warning("[card] is already occupied!"))
return
if(!occupier)
to_chat(user, "<span class='warning'>There's nothing in [src] to transfer!</span>")
to_chat(user, span_warning("There's nothing in [src] to transfer!"))
return
if(!occupier.mind || !occupier.client)
to_chat(user, "<span class='warning'>[occupier] is either inactive or destroyed!</span>")
to_chat(user, span_warning("[occupier] is either inactive or destroyed!"))
return
if(!occupier.parent.stat)
to_chat(user, "<span class='warning'>[occupier] is refusing all attempts at transfer!</span>" )
to_chat(user, span_warning("[occupier] is refusing all attempts at transfer!") )
return
if(transfer_in_progress)
to_chat(user, "<span class='warning'>There's already a transfer in progress!</span>")
to_chat(user, span_warning("There's already a transfer in progress!"))
return
if(interaction != AI_TRANS_TO_CARD || occupier.stat)
return
@@ -1188,30 +1188,30 @@
if(!T)
return
transfer_in_progress = TRUE
user.visible_message("<span class='notice'>[user] slots [card] into [src]...</span>", "<span class='notice'>Transfer process initiated. Sending request for AI approval...</span>")
user.visible_message(span_notice("[user] slots [card] into [src]..."), span_notice("Transfer process initiated. Sending request for AI approval..."))
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
SEND_SOUND(occupier, sound('sound/misc/notice2.ogg')) //To alert the AI that someone's trying to card them if they're tabbed out
if(tgui_alert(occupier, "[user] is attempting to transfer you to \a [card.name]. Do you consent to this?", "APC Transfer", list("Yes - Transfer Me", "No - Keep Me Here")) == "No - Keep Me Here")
to_chat(user, "<span class='danger'>AI denied transfer request. Process terminated.</span>")
to_chat(user, span_danger("AI denied transfer request. Process terminated."))
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, TRUE)
transfer_in_progress = FALSE
return
if(user.loc != T)
to_chat(user, "<span class='danger'>Location changed. Process terminated.</span>")
to_chat(occupier, "<span class='warning'>[user] moved away! Transfer canceled.</span>")
to_chat(user, span_danger("Location changed. Process terminated."))
to_chat(occupier, span_warning("[user] moved away! Transfer canceled."))
transfer_in_progress = FALSE
return
to_chat(user, "<span class='notice'>AI accepted request. Transferring stored intelligence to [card]...</span>")
to_chat(occupier, "<span class='notice'>Transfer starting. You will be moved to [card] shortly.</span>")
to_chat(user, span_notice("AI accepted request. Transferring stored intelligence to [card]..."))
to_chat(occupier, span_notice("Transfer starting. You will be moved to [card] shortly."))
if(!do_after(user, 50, target = src))
to_chat(occupier, "<span class='warning'>[user] was interrupted! Transfer canceled.</span>")
to_chat(occupier, span_warning("[user] was interrupted! Transfer canceled."))
transfer_in_progress = FALSE
return
if(!occupier || !card)
transfer_in_progress = FALSE
return
user.visible_message("<span class='notice'>[user] transfers [occupier] to [card]!</span>", "<span class='notice'>Transfer complete! [occupier] is now stored in [card].</span>")
to_chat(occupier, "<span class='notice'>Transfer complete! You've been stored in [user]'s [card.name].</span>")
user.visible_message(span_notice("[user] transfers [occupier] to [card]!"), span_notice("Transfer complete! [occupier] is now stored in [card]."))
to_chat(occupier, span_notice("Transfer complete! You've been stored in [user]'s [card.name]."))
occupier.forceMove(card)
card.AI = occupier
occupier.parent.shunted = FALSE
+22 -22
View File
@@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/structure/cable/proc/on_rat_eat(mob/living/simple_animal/hostile/regalrat/king)
SIGNAL_HANDLER
if(avail())
king.apply_damage(10)
playsound(king, 'sound/effects/sparks2.ogg', 100, TRUE)
@@ -166,7 +166,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
if(W.tool_behaviour == TOOL_WIRECUTTER)
if (shock(user, 50))
return
user.visible_message("<span class='notice'>[user] cuts the cable.</span>", "<span class='notice'>You cut the cable.</span>")
user.visible_message(span_notice("[user] cuts the cable."), span_notice("You cut the cable."))
investigate_log("was cut by [key_name(usr)] in [AREACOORD(src)]", INVESTIGATE_WIRES)
deconstruct()
return
@@ -180,9 +180,9 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/structure/cable/proc/get_power_info()
if(powernet?.avail > 0)
return "<span class='danger'>Total power: [DisplayPower(powernet.avail)]\nLoad: [DisplayPower(powernet.load)]\nExcess power: [DisplayPower(surplus())]</span>"
return span_danger("Total power: [DisplayPower(powernet.avail)]\nLoad: [DisplayPower(powernet.load)]\nExcess power: [DisplayPower(surplus())]")
else
return "<span class='danger'>The cable is not powered.</span>"
return span_danger("The cable is not powered.")
// Items usable on a cable :
@@ -462,16 +462,16 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/item/stack/cable_coil/suicide_act(mob/user)
if(locate(/obj/structure/chair/stool) in get_turf(user))
user.visible_message("<span class='suicide'>[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
else
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return(OXYLOSS)
/obj/item/stack/cable_coil/proc/check_menu(mob/living/user)
if(!istype(user))
return FALSE
if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return FALSE
if(user.incapacitated() || !user.Adjacent(src))
return FALSE
@@ -548,7 +548,7 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting && affecting.status == BODYPART_ROBOTIC)
if(user == H)
user.visible_message("<span class='notice'>[user] starts to fix some of the wires in [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name].</span>")
user.visible_message(span_notice("[user] starts to fix some of the wires in [H]'s [affecting.name]."), span_notice("You start fixing some of the wires in [H == user ? "your" : "[H]'s"] [affecting.name]."))
if(!do_mob(user, H, 50))
return
if(item_heal_robotic(H, user, 0, 15))
@@ -576,20 +576,20 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
return
if(!isturf(T) || T.intact || !T.can_have_cabling())
to_chat(user, "<span class='warning'>You can only lay cables on catwalks and plating!</span>")
to_chat(user, span_warning("You can only lay cables on catwalks and plating!"))
return
if(get_amount() < 1) // Out of cable
to_chat(user, "<span class='warning'>There is no cable left!</span>")
to_chat(user, span_warning("There is no cable left!"))
return
if(get_dist(T,user) > 1) // Too far
to_chat(user, "<span class='warning'>You can't lay cable at a place that far away!</span>")
to_chat(user, span_warning("You can't lay cable at a place that far away!"))
return
for(var/obj/structure/cable/C in T)
if(C.cable_layer & target_layer)
to_chat(user, "<span class='warning'>There's already a cable at that position!</span>")
to_chat(user, span_warning("There's already a cable at that position!"))
return
var/obj/structure/cable/C = new target_type(T)
@@ -708,10 +708,10 @@ GLOBAL_LIST_INIT(wire_node_generating_types, typecacheof(list(/obj/structure/gri
/obj/structure/cable/multilayer/examine(mob/user)
. += ..()
. += "<span class='notice'>L1:[cable_layer & CABLE_LAYER_1 ? "Connect" : "Disconnect"].</span>"
. += "<span class='notice'>L2:[cable_layer & CABLE_LAYER_2 ? "Connect" : "Disconnect"].</span>"
. += "<span class='notice'>L3:[cable_layer & CABLE_LAYER_3 ? "Connect" : "Disconnect"].</span>"
. += "<span class='notice'>M:[machinery_layer & MACHINERY_LAYER_1 ? "Connect" : "Disconnect"].</span>"
. += span_notice("L1:[cable_layer & CABLE_LAYER_1 ? "Connect" : "Disconnect"].")
. += span_notice("L2:[cable_layer & CABLE_LAYER_2 ? "Connect" : "Disconnect"].")
. += span_notice("L3:[cable_layer & CABLE_LAYER_3 ? "Connect" : "Disconnect"].")
. += span_notice("M:[machinery_layer & MACHINERY_LAYER_1 ? "Connect" : "Disconnect"].")
GLOBAL_LIST(hub_radial_layer_list)
@@ -736,16 +736,16 @@ GLOBAL_LIST(hub_radial_layer_list)
switch(layer_result)
if("Layer 1")
CL = CABLE_LAYER_1
to_chat(user, "<span class='warning'>You toggle L1 connection.</span>")
to_chat(user, span_warning("You toggle L1 connection."))
if("Layer 2")
CL = CABLE_LAYER_2
to_chat(user, "<span class='warning'>You toggle L2 connection.</span>")
to_chat(user, span_warning("You toggle L2 connection."))
if("Layer 3")
CL = CABLE_LAYER_3
to_chat(user, "<span class='warning'>You toggle L3 connection.</span>")
to_chat(user, span_warning("You toggle L3 connection."))
if("Machinery")
machinery_layer ^= MACHINERY_LAYER_1
to_chat(user, "<span class='warning'>You toggle machinery connection.</span>")
to_chat(user, span_warning("You toggle machinery connection."))
cut_cable_from_powernet(FALSE)
@@ -761,7 +761,7 @@ GLOBAL_LIST(hub_radial_layer_list)
if(!istype(user))
return FALSE
if(!ISADVANCEDTOOLUSER(user))
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return FALSE
if(user.incapacitated() || !user.Adjacent(src))
return FALSE
@@ -776,7 +776,7 @@ GLOBAL_LIST(hub_radial_layer_list)
auto_propagate_cut_cable(src) // update the powernets
/obj/structure/cable/multilayer/CtrlClick(mob/living/user)
to_chat(user, "<span class='warning'>You pust reset button.</span>")
to_chat(user, span_warning("You pust reset button."))
addtimer(CALLBACK(src, .proc/Reload), 10, TIMER_UNIQUE) //spam protect
// This is a mapping aid. In order for this to be placed on a map and function, all three layers need to have their nodes active
+7 -7
View File
@@ -98,12 +98,12 @@
/obj/item/stock_parts/cell/examine(mob/user)
. = ..()
if(rigged)
. += "<span class='danger'>This power cell seems to be faulty!</span>"
. += span_danger("This power cell seems to be faulty!")
else
. += "The charge meter reads [round(src.percent() )]%."
/obj/item/stock_parts/cell/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return (FIRELOSS)
/obj/item/stock_parts/cell/proc/on_reagent_change(datum/reagents/holder, ...)
@@ -169,22 +169,22 @@
if((E.drain_time > world.time) || !stomach)
return
if(charge < CELL_POWER_DRAIN)
to_chat(H, "<span class='warning'>[src] doesn't have enough power!</span>")
to_chat(H, span_warning("[src] doesn't have enough power!"))
return
if(stomach.crystal_charge > charge_limit)
to_chat(H, "<span class='warning'>Your charge is full!</span>")
to_chat(H, span_warning("Your charge is full!"))
return
to_chat(H, "<span class='notice'>You begin clumsily channeling power from [src] into your body.</span>")
to_chat(H, span_notice("You begin clumsily channeling power from [src] into your body."))
E.drain_time = world.time + CELL_DRAIN_TIME
if(do_after(user, CELL_DRAIN_TIME, target = src))
if((charge < CELL_POWER_DRAIN) || (stomach.crystal_charge > charge_limit))
return
if(istype(stomach))
to_chat(H, "<span class='notice'>You receive some charge from [src], wasting some in the process.</span>")
to_chat(H, span_notice("You receive some charge from [src], wasting some in the process."))
stomach.adjust_charge(CELL_POWER_GAIN)
charge -= CELL_POWER_DRAIN //you waste way more than you receive, so that ethereals cant just steal one cell and forget about hunger
else
to_chat(H, "<span class='warning'>You can't receive charge from [src]!</span>")
to_chat(H, span_warning("You can't receive charge from [src]!"))
return
+5 -5
View File
@@ -17,7 +17,7 @@
if(istype(O, /obj/item/stack/cable_coil) && state == FLOODLIGHT_NEEDS_WIRES)
var/obj/item/stack/S = O
if(S.use(5))
to_chat(user, "<span class='notice'>You wire [src].</span>")
to_chat(user, span_notice("You wire [src]."))
name = "wired [name]"
desc = "A bare metal frame looking vaguely like a floodlight. Requires securing with a screwdriver."
icon_state = "floodlight_c2"
@@ -27,7 +27,7 @@
to_chat(user, "You need 5 cables to wire [src].")
return
if(O.tool_behaviour == TOOL_SCREWDRIVER && state == FLOODLIGHT_NEEDS_SECURING)
to_chat(user, "<span class='notice'>You fasten the wiring and electronics in [src].</span>")
to_chat(user, span_notice("You fasten the wiring and electronics in [src]."))
name = "secured [name]"
desc = "A bare metal frame that looks like a floodlight. Requires a light tube to complete."
icon_state = "floodlight_c3"
@@ -36,7 +36,7 @@
if(istype(O, /obj/item/light/tube))
var/obj/item/light/tube/L = O
if(state == FLOODLIGHT_NEEDS_LIGHTS && L.status != 2) //Ready for a light tube, and not broken.
to_chat(user, "<span class='notice'>You put lights in [src].</span>")
to_chat(user, span_notice("You put lights in [src]."))
new /obj/machinery/power/floodlight(loc)
qdel(src)
qdel(O)
@@ -47,7 +47,7 @@
var/obj/item/lightreplacer/L = O
if(state == FLOODLIGHT_NEEDS_LIGHTS && L.CanUse(user))
L.Use(user)
to_chat(user, "<span class='notice'>You put lights in [src].</span>")
to_chat(user, span_notice("You put lights in [src]."))
new /obj/machinery/power/floodlight(loc)
qdel(src)
return
@@ -105,7 +105,7 @@
if(4)
setting_text = "high power"
if(user)
to_chat(user, "<span class='notice'>You set [src] to [setting_text].</span>")
to_chat(user, span_notice("You set [src] to [setting_text]."))
/obj/machinery/power/floodlight/attackby(obj/item/O, mob/user, params)
if(O.tool_behaviour == TOOL_WRENCH)
+3 -3
View File
@@ -195,7 +195,7 @@
if(!anchored)
kill_circs()
connect_to_network()
to_chat(user, "<span class='notice'>You [anchored?"secure":"unsecure"] [src].</span>")
to_chat(user, span_notice("You [anchored?"secure":"unsecure"] [src]."))
return TRUE
/obj/machinery/power/generator/multitool_act(mob/living/user, obj/item/I)
@@ -203,7 +203,7 @@
if(!anchored)
return
find_circs()
to_chat(user, "<span class='notice'>You update [src]'s circulator links.</span>")
to_chat(user, span_notice("You update [src]'s circulator links."))
return TRUE
/obj/machinery/power/generator/screwdriver_act(mob/user, obj/item/I)
@@ -211,7 +211,7 @@
return TRUE
panel_open = !panel_open
I.play_tool_sound(src)
to_chat(user, "<span class='notice'>You [panel_open?"open":"close"] the panel on [src].</span>")
to_chat(user, span_notice("You [panel_open?"open":"close"] the panel on [src]."))
return TRUE
/obj/machinery/power/generator/crowbar_act(mob/user, obj/item/I)
+5 -5
View File
@@ -205,7 +205,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
switch(broken_state)
if(GRAV_NEEDS_SCREWDRIVER)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
to_chat(user, "<span class='notice'>You secure the screws of the framework.</span>")
to_chat(user, span_notice("You secure the screws of the framework."))
I.play_tool_sound(src)
broken_state++
update_appearance()
@@ -213,7 +213,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
if(GRAV_NEEDS_WELDING)
if(I.tool_behaviour == TOOL_WELDER)
if(I.use_tool(src, user, 0, volume=50, amount=1))
to_chat(user, "<span class='notice'>You mend the damaged framework.</span>")
to_chat(user, span_notice("You mend the damaged framework."))
broken_state++
update_appearance()
return
@@ -222,16 +222,16 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
var/obj/item/stack/sheet/plasteel/PS = I
if(PS.get_amount() >= 10)
PS.use(10)
to_chat(user, "<span class='notice'>You add the plating to the framework.</span>")
to_chat(user, span_notice("You add the plating to the framework."))
playsound(src.loc, 'sound/machines/click.ogg', 75, TRUE)
broken_state++
update_appearance()
else
to_chat(user, "<span class='warning'>You need 10 sheets of plasteel!</span>")
to_chat(user, span_warning("You need 10 sheets of plasteel!"))
return
if(GRAV_NEEDS_WRENCH)
if(I.tool_behaviour == TOOL_WRENCH)
to_chat(user, "<span class='notice'>You secure the plating to the framework.</span>")
to_chat(user, span_notice("You secure the plating to the framework."))
I.play_tool_sound(src)
set_fix()
return
+46 -46
View File
@@ -37,7 +37,7 @@
return
var/area/A = get_area(user)
if(!IS_DYNAMIC_LIGHTING(A))
to_chat(user, "<span class='warning'>You cannot place [src] in this area!</span>")
to_chat(user, span_warning("You cannot place [src] in this area!"))
return
return TRUE
@@ -87,11 +87,11 @@
else
. += "The casing has no power cell for backup power."
else
. += "<span class='danger'>This casing doesn't support power cells for backup power.</span>"
. += span_danger("This casing doesn't support power cells for backup power.")
/obj/structure/light_construct/attack_hand(mob/user, list/modifiers)
if(cell)
user.visible_message("<span class='notice'>[user] removes [cell] from [src]!</span>", "<span class='notice'>You remove [cell].</span>")
user.visible_message(span_notice("[user] removes [cell] from [src]!"), span_notice("You remove [cell]."))
user.put_in_hands(cell)
cell.update_appearance()
cell = null
@@ -101,7 +101,7 @@
/obj/structure/light_construct/attack_tk(mob/user)
if(!cell)
return
to_chat(user, "<span class='notice'>You telekinetically remove [cell].</span>")
to_chat(user, span_notice("You telekinetically remove [cell]."))
var/obj/item/stock_parts/cell/cell_reference = cell
cell = null
cell_reference.forceMove(drop_location())
@@ -112,37 +112,37 @@
add_fingerprint(user)
if(istype(W, /obj/item/stock_parts/cell))
if(!cell_connectors)
to_chat(user, "<span class='warning'>This [name] can't support a power cell!</span>")
to_chat(user, span_warning("This [name] can't support a power cell!"))
return
if(HAS_TRAIT(W, TRAIT_NODROP))
to_chat(user, "<span class='warning'>[W] is stuck to your hand!</span>")
to_chat(user, span_warning("[W] is stuck to your hand!"))
return
if(cell)
to_chat(user, "<span class='warning'>There is a power cell already installed!</span>")
to_chat(user, span_warning("There is a power cell already installed!"))
else if(user.temporarilyRemoveItemFromInventory(W))
user.visible_message("<span class='notice'>[user] hooks up [W] to [src].</span>", \
"<span class='notice'>You add [W] to [src].</span>")
user.visible_message(span_notice("[user] hooks up [W] to [src]."), \
span_notice("You add [W] to [src]."))
playsound(src, 'sound/machines/click.ogg', 50, TRUE)
W.forceMove(src)
cell = W
add_fingerprint(user)
return
else if (istype(W, /obj/item/light))
to_chat(user, "<span class='warning'>This [name] isn't finished being setup!</span>")
to_chat(user, span_warning("This [name] isn't finished being setup!"))
return
switch(stage)
if(1)
if(W.tool_behaviour == TOOL_WRENCH)
if(cell)
to_chat(user, "<span class='warning'>You have to remove the cell first!</span>")
to_chat(user, span_warning("You have to remove the cell first!"))
return
else
to_chat(user, "<span class='notice'>You begin deconstructing [src]...</span>")
to_chat(user, span_notice("You begin deconstructing [src]..."))
if (W.use_tool(src, user, 30, volume=50))
new /obj/item/stack/sheet/iron(drop_location(), sheets_refunded)
user.visible_message("<span class='notice'>[user.name] deconstructs [src].</span>", \
"<span class='notice'>You deconstruct [src].</span>", "<span class='hear'>You hear a ratchet.</span>")
user.visible_message(span_notice("[user.name] deconstructs [src]."), \
span_notice("You deconstruct [src]."), span_hear("You hear a ratchet."))
playsound(src, 'sound/items/deconstruct.ogg', 75, TRUE)
qdel(src)
return
@@ -152,28 +152,28 @@
if(coil.use(1))
icon_state = "[fixture_type]-construct-stage2"
stage = 2
user.visible_message("<span class='notice'>[user.name] adds wires to [src].</span>", \
"<span class='notice'>You add wires to [src].</span>")
user.visible_message(span_notice("[user.name] adds wires to [src]."), \
span_notice("You add wires to [src]."))
else
to_chat(user, "<span class='warning'>You need one length of cable to wire [src]!</span>")
to_chat(user, span_warning("You need one length of cable to wire [src]!"))
return
if(2)
if(W.tool_behaviour == TOOL_WRENCH)
to_chat(usr, "<span class='warning'>You have to remove the wires first!</span>")
to_chat(usr, span_warning("You have to remove the wires first!"))
return
if(W.tool_behaviour == TOOL_WIRECUTTER)
stage = 1
icon_state = "[fixture_type]-construct-stage1"
new /obj/item/stack/cable_coil(drop_location(), 1, "red")
user.visible_message("<span class='notice'>[user.name] removes the wiring from [src].</span>", \
"<span class='notice'>You remove the wiring from [src].</span>", "<span class='hear'>You hear clicking.</span>")
user.visible_message(span_notice("[user.name] removes the wiring from [src]."), \
span_notice("You remove the wiring from [src]."), span_hear("You hear clicking."))
W.play_tool_sound(src, 100)
return
if(W.tool_behaviour == TOOL_SCREWDRIVER)
user.visible_message("<span class='notice'>[user.name] closes [src]'s casing.</span>", \
"<span class='notice'>You close [src]'s casing.</span>", "<span class='hear'>You hear screwing.</span>")
user.visible_message(span_notice("[user.name] closes [src]'s casing."), \
span_notice("You close [src]'s casing."), span_hear("You hear screwing."))
W.play_tool_sound(src, 75)
switch(fixture_type)
if("tube")
@@ -526,7 +526,7 @@
// attempt to insert light
else if(istype(W, /obj/item/light))
if(status == LIGHT_OK)
to_chat(user, "<span class='warning'>There is a [fitting] already inserted!</span>")
to_chat(user, span_warning("There is a [fitting] already inserted!"))
else
src.add_fingerprint(user)
var/obj/item/light/L = W
@@ -537,9 +537,9 @@
src.add_fingerprint(user)
if(status != LIGHT_EMPTY)
drop_light_tube(user)
to_chat(user, "<span class='notice'>You replace [L].</span>")
to_chat(user, span_notice("You replace [L]."))
else
to_chat(user, "<span class='notice'>You insert [L].</span>")
to_chat(user, span_notice("You insert [L]."))
status = L.status
switchcount = L.switchcount
rigged = L.rigged
@@ -552,17 +552,17 @@
if(on && rigged)
explode()
else
to_chat(user, "<span class='warning'>This type of light requires a [fitting]!</span>")
to_chat(user, span_warning("This type of light requires a [fitting]!"))
// attempt to stick weapon into light socket
else if(status == LIGHT_EMPTY)
if(W.tool_behaviour == TOOL_SCREWDRIVER) //If it's a screwdriver open it.
W.play_tool_sound(src, 75)
user.visible_message("<span class='notice'>[user.name] opens [src]'s casing.</span>", \
"<span class='notice'>You open [src]'s casing.</span>", "<span class='hear'>You hear a noise.</span>")
user.visible_message(span_notice("[user.name] opens [src]'s casing."), \
span_notice("You open [src]'s casing."), span_hear("You hear a noise."))
deconstruct()
else
to_chat(user, "<span class='userdanger'>You stick \the [W] into the light socket!</span>")
to_chat(user, span_userdanger("You stick \the [W] into the light socket!"))
if(has_power() && (W.flags_1 & CONDUCT_1))
do_sparks(3, TRUE, src)
if (prob(75))
@@ -651,7 +651,7 @@
if(!has_emergency_power(pwr))
return FALSE
if(cell.charge > 300) //it's meant to handle 120 W, ya doofus
visible_message("<span class='warning'>[src] short-circuits from too powerful of a power cell!</span>")
visible_message(span_warning("[src] short-circuits from too powerful of a power cell!"))
burn_out()
return FALSE
cell.use(pwr)
@@ -679,7 +679,7 @@
/obj/machinery/light/attack_ai(mob/user)
no_emergency = !no_emergency
to_chat(user, "<span class='notice'>Emergency lights for this fixture have been [no_emergency ? "disabled" : "enabled"].</span>")
to_chat(user, span_notice("Emergency lights for this fixture have been [no_emergency ? "disabled" : "enabled"]."))
update(FALSE)
return
@@ -694,7 +694,7 @@
add_fingerprint(user)
if(status == LIGHT_EMPTY)
to_chat(user, "<span class='warning'>There is no [fitting] in this light!</span>")
to_chat(user, span_warning("There is no [fitting] in this light!"))
return
// make it burn hands unless you're wearing heat insulated gloves or have the RESISTHEAT/RESISTHEATHANDS traits
@@ -709,14 +709,14 @@
var/obj/item/organ/stomach/ethereal/stomach = H.getorganslot(ORGAN_SLOT_STOMACH)
if((E.drain_time > world.time) || !stomach)
return
to_chat(H, "<span class='notice'>You start channeling some power through the [fitting] into your body.</span>")
to_chat(H, span_notice("You start channeling some power through the [fitting] into your body."))
E.drain_time = world.time + LIGHT_DRAIN_TIME
if(do_after(user, LIGHT_DRAIN_TIME, target = src))
if(istype(stomach))
to_chat(H, "<span class='notice'>You receive some charge from the [fitting].</span>")
to_chat(H, span_notice("You receive some charge from the [fitting]."))
stomach.adjust_charge(LIGHT_POWER_GAIN)
else
to_chat(H, "<span class='warning'>You can't receive charge from the [fitting]!</span>")
to_chat(H, span_warning("You can't receive charge from the [fitting]!"))
return
if(H.gloves)
@@ -727,26 +727,26 @@
prot = 1
if(prot > 0 || HAS_TRAIT(user, TRAIT_RESISTHEAT) || HAS_TRAIT(user, TRAIT_RESISTHEATHANDS))
to_chat(user, "<span class='notice'>You remove the light [fitting].</span>")
to_chat(user, span_notice("You remove the light [fitting]."))
else if(istype(user) && user.dna.check_mutation(TK))
to_chat(user, "<span class='notice'>You telekinetically remove the light [fitting].</span>")
to_chat(user, span_notice("You telekinetically remove the light [fitting]."))
else
var/obj/item/bodypart/affecting = H.get_bodypart("[(user.active_hand_index % 2 == 0) ? "r" : "l" ]_arm")
if(affecting?.receive_damage( 0, 5 )) // 5 burn damage
H.update_damage_overlays()
if(HAS_TRAIT(user, TRAIT_LIGHTBULB_REMOVER))
to_chat(user, "<span class='notice'>You feel like you're burning, but you can push through.</span>")
to_chat(user, span_notice("You feel like you're burning, but you can push through."))
if(!do_after(user, 5 SECONDS, target = src))
return
if(affecting?.receive_damage( 0, 10 )) // 10 more burn damage
H.update_damage_overlays()
to_chat(user, "<span class='notice'>You manage to remove the light [fitting], shattering it in process.</span>")
to_chat(user, span_notice("You manage to remove the light [fitting], shattering it in process."))
break_light_tube()
else
to_chat(user, "<span class='warning'>You try to remove the light [fitting], but you burn your hand on it!</span>")
to_chat(user, span_warning("You try to remove the light [fitting], but you burn your hand on it!"))
return
else
to_chat(user, "<span class='notice'>You remove the light [fitting].</span>")
to_chat(user, span_notice("You remove the light [fitting]."))
// create a light tube/bulb item and put it in the user's hand
drop_light_tube(user)
@@ -773,10 +773,10 @@
/obj/machinery/light/attack_tk(mob/user)
if(status == LIGHT_EMPTY)
to_chat(user, "<span class='warning'>There is no [fitting] in this light!</span>")
to_chat(user, span_warning("There is no [fitting] in this light!"))
return
to_chat(user, "<span class='notice'>You telekinetically remove the light [fitting].</span>")
to_chat(user, span_notice("You telekinetically remove the light [fitting]."))
// create a light tube/bulb item and put it in the user's hand
var/obj/item/light/light_tube = drop_light_tube()
return light_tube.attack_tk(user)
@@ -865,10 +865,10 @@
/obj/item/light/suicide_act(mob/living/carbon/user)
if (status == LIGHT_BROKEN)
user.visible_message("<span class='suicide'>[user] begins to stab [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] begins to stab [user.p_them()]self with \the [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return BRUTELOSS
else
user.visible_message("<span class='suicide'>[user] begins to eat \the [src]! It looks like [user.p_theyre()] not very bright!</span>")
user.visible_message(span_suicide("[user] begins to eat \the [src]! It looks like [user.p_theyre()] not very bright!"))
shatter()
return BRUTELOSS
@@ -975,7 +975,7 @@
/obj/item/light/proc/shatter()
if(status == LIGHT_OK || status == LIGHT_BURNED)
visible_message("<span class='danger'>[src] shatters.</span>","<span class='hear'>You hear a small glass object shatter.</span>")
visible_message(span_danger("[src] shatters."),span_hear("You hear a small glass object shatter."))
status = LIGHT_BROKEN
force = 5
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, TRUE)
+1 -1
View File
@@ -29,7 +29,7 @@
/obj/machinery/computer/monitor/secret/examine(mob/user)
. = ..()
. += "<span class='notice'>It's operating system seems quite outdated... It doesn't seem like it'd be compatible with the latest remote NTOS monitoring systems.</span>"
. += span_notice("It's operating system seems quite outdated... It doesn't seem like it'd be compatible with the latest remote NTOS monitoring systems.")
/obj/machinery/computer/monitor/Initialize()
. = ..()
+2 -2
View File
@@ -15,6 +15,6 @@
/obj/structure/cable/multilayer/examine(mob/user)
. += ..()
var/turf/T = get_turf(src)
. += "<span class='notice'>[locate(/obj/structure/cable/multilayer/multiz) in (SSmapping.get_turf_below(T)) ? "Detected" : "Undetected"] hub UP.</span>"
. += "<span class='notice'>[locate(/obj/structure/cable/multilayer/multiz) in (SSmapping.get_turf_above(T)) ? "Detected" : "Undetected"] hub DOWN.</span>"
. += span_notice("[locate(/obj/structure/cable/multilayer/multiz) in (SSmapping.get_turf_below(T)) ? "Detected" : "Undetected"] hub UP.")
. += span_notice("[locate(/obj/structure/cable/multilayer/multiz) in (SSmapping.get_turf_above(T)) ? "Detected" : "Undetected"] hub DOWN.")
+12 -12
View File
@@ -133,14 +133,14 @@ By design, d1 is the smallest direction and d2 is the highest
else if(istype(W, /obj/item/stack/pipe_cleaner_coil))
var/obj/item/stack/pipe_cleaner_coil/coil = W
if (coil.get_amount() < 1)
to_chat(user, "<span class='warning'>Not enough pipe cleaner!</span>")
to_chat(user, span_warning("Not enough pipe cleaner!"))
return
coil.pipe_cleaner_join(src, user)
add_fingerprint(user)
/obj/structure/pipe_cleaner/proc/cut_pipe_cleaner(mob/user)
user.visible_message("<span class='notice'>[user] pulls up the pipe cleaner.</span>", "<span class='notice'>You pull up the pipe cleaner.</span>")
user.visible_message(span_notice("[user] pulls up the pipe cleaner."), span_notice("You pull up the pipe cleaner."))
stored.add_fingerprint(user)
investigate_log("was pulled up by [key_name(usr)] in [AREACOORD(src)]", INVESTIGATE_WIRES)
deconstruct()
@@ -233,9 +233,9 @@ By design, d1 is the smallest direction and d2 is the highest
/obj/item/stack/pipe_cleaner_coil/suicide_act(mob/user)
if(locate(/obj/structure/chair/stool) in get_turf(user))
user.visible_message("<span class='suicide'>[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is making a noose with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
else
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message(span_suicide("[user] is strangling [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return(OXYLOSS)
/obj/item/stack/pipe_cleaner_coil/Initialize(mapload, new_amount = null, list/mat_override=null, mat_amt=1, param_color = null)
@@ -299,15 +299,15 @@ By design, d1 is the smallest direction and d2 is the highest
return
if(!isturf(T) || !T.can_have_cabling())
to_chat(user, "<span class='warning'>You can only lay pipe cleaners on a solid floor!</span>")
to_chat(user, span_warning("You can only lay pipe cleaners on a solid floor!"))
return
if(get_amount() < 1) // Out of pipe_cleaner
to_chat(user, "<span class='warning'>There is no pipe cleaner left!</span>")
to_chat(user, span_warning("There is no pipe cleaner left!"))
return
if(get_dist(T,user) > 1) // Too far
to_chat(user, "<span class='warning'>You can't lay pipe cleaner at a place that far away!</span>")
to_chat(user, span_warning("You can't lay pipe cleaner at a place that far away!"))
return
var/dirn
@@ -321,7 +321,7 @@ By design, d1 is the smallest direction and d2 is the highest
for(var/obj/structure/pipe_cleaner/LC in T)
if(LC.d2 == dirn && LC.d1 == 0)
to_chat(user, "<span class='warning'>There's already a pipe leaner at that position!</span>")
to_chat(user, span_warning("There's already a pipe leaner at that position!"))
return
var/obj/structure/pipe_cleaner/C = get_new_pipe_cleaner(T)
@@ -349,7 +349,7 @@ By design, d1 is the smallest direction and d2 is the highest
return
if(get_dist(C, user) > 1) // make sure it's close enough
to_chat(user, "<span class='warning'>You can't lay pipe cleaner at a place that far away!</span>")
to_chat(user, span_warning("You can't lay pipe cleaner at a place that far away!"))
return
@@ -365,7 +365,7 @@ By design, d1 is the smallest direction and d2 is the highest
if((C.d1 == dirn || C.d2 == dirn) && !forceddir)
if(!U.can_have_cabling()) //checking if it's a plating or catwalk
if (showerror)
to_chat(user, "<span class='warning'>You can only lay pipe cleaners on catwalks and plating!</span>")
to_chat(user, span_warning("You can only lay pipe cleaners on catwalks and plating!"))
return
else
// pipe_cleaner is pointing at us, we're standing on an open tile
@@ -376,7 +376,7 @@ By design, d1 is the smallest direction and d2 is the highest
for(var/obj/structure/pipe_cleaner/LC in U) // check to make sure there's not a pipe_cleaner there already
if(LC.d1 == fdirn || LC.d2 == fdirn)
if (showerror)
to_chat(user, "<span class='warning'>There's already a pipe cleaner at that position!</span>")
to_chat(user, span_warning("There's already a pipe cleaner at that position!"))
return
var/obj/structure/pipe_cleaner/NC = get_new_pipe_cleaner(U)
@@ -407,7 +407,7 @@ By design, d1 is the smallest direction and d2 is the highest
continue
if((LC.d1 == nd1 && LC.d2 == nd2) || (LC.d1 == nd2 && LC.d2 == nd1) ) // make sure no pipe_cleaner matches either direction
if (showerror)
to_chat(user, "<span class='warning'>There's already a pipe cleaner at that position!</span>")
to_chat(user, span_warning("There's already a pipe cleaner at that position!"))
return
+9 -9
View File
@@ -119,11 +119,11 @@
/obj/machinery/power/port_gen/pacman/examine(mob/user)
. = ..()
. += "<span class='notice'>The generator has [sheets] units of [sheet_name] fuel left, producing [DisplayPower(power_gen)] per cycle.</span>"
. += span_notice("The generator has [sheets] units of [sheet_name] fuel left, producing [DisplayPower(power_gen)] per cycle.")
if(anchored)
. += "<span class='notice'>It is anchored to the ground.</span>"
. += span_notice("It is anchored to the ground.")
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Fuel efficiency increased by <b>[(consumption*100)-100]%</b>.</span>"
. += span_notice("The status display reads: Fuel efficiency increased by <b>[(consumption*100)-100]%</b>.")
/obj/machinery/power/port_gen/pacman/HasFuel()
if(sheets >= 1 / (time_per_sheet / power_output) - sheet_left)
@@ -187,9 +187,9 @@
var/obj/item/stack/addstack = O
var/amount = min((max_sheets - sheets), addstack.amount)
if(amount < 1)
to_chat(user, "<span class='notice'>The [src.name] is full!</span>")
to_chat(user, span_notice("The [src.name] is full!"))
return
to_chat(user, "<span class='notice'>You add [amount] sheets to the [src.name].</span>")
to_chat(user, span_notice("You add [amount] sheets to the [src.name]."))
sheets += amount
addstack.use(amount)
return
@@ -197,10 +197,10 @@
if(O.tool_behaviour == TOOL_WRENCH)
if(!anchored && !isinspace())
set_anchored(TRUE)
to_chat(user, "<span class='notice'>You secure the generator to the floor.</span>")
to_chat(user, span_notice("You secure the generator to the floor."))
else if(anchored)
set_anchored(FALSE)
to_chat(user, "<span class='notice'>You unsecure the generator from the floor.</span>")
to_chat(user, span_notice("You unsecure the generator from the floor."))
playsound(src, 'sound/items/deconstruct.ogg', 50, TRUE)
return
@@ -208,9 +208,9 @@
panel_open = !panel_open
O.play_tool_sound(src)
if(panel_open)
to_chat(user, "<span class='notice'>You open the access panel.</span>")
to_chat(user, span_notice("You open the access panel."))
else
to_chat(user, "<span class='notice'>You close the access panel.</span>")
to_chat(user, span_notice("You close the access panel."))
return
else if(default_deconstruction_crowbar(O))
return
+3 -3
View File
@@ -39,7 +39,7 @@
/obj/machinery/power/rtg/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Power generation now at <b>[power_gen*0.001]</b>kW.</span>"
. += span_notice("The status display reads: Power generation now at <b>[power_gen*0.001]</b>kW.")
/obj/machinery/power/rtg/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I))
@@ -72,8 +72,8 @@
if(going_kaboom)
return
going_kaboom = TRUE
visible_message("<span class='danger'>\The [src] lets out a shower of sparks as it starts to lose stability!</span>",\
"<span class='hear'>You hear a loud electrical crack!</span>")
visible_message(span_danger("\The [src] lets out a shower of sparks as it starts to lose stability!"),\
span_hear("You hear a loud electrical crack!"))
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
tesla_zap(src, 5, power_gen * 0.05)
addtimer(CALLBACK(GLOBAL_PROC, .proc/explosion, src, 2, 3, 4, null, 8), 10 SECONDS) // Not a normal explosion.
+1 -1
View File
@@ -38,7 +38,7 @@
if(!isliving(user))
return
var/mob/living/jedi = user
to_chat(jedi, "<span class='userdanger'>You don't feel like you are real anymore.</span>")
to_chat(jedi, span_userdanger("You don't feel like you are real anymore."))
jedi.dust_animation()
jedi.spawn_dust()
addtimer(CALLBACK(src, /atom/proc/attack_hand, jedi), 0.5 SECONDS)
+15 -15
View File
@@ -64,11 +64,11 @@
if(!anchored)
return
if(locked)
to_chat(user, "<span class='warning'>The controls are locked!</span>")
to_chat(user, span_warning("The controls are locked!"))
return
toggle_power()
user.visible_message("<span class='notice'>[user.name] turns the [src.name] [active? "on":"off"].</span>", \
"<span class='notice'>You turn the [src.name] [active? "on":"off"].</span>")
user.visible_message(span_notice("[user.name] turns the [src.name] [active? "on":"off"]."), \
span_notice("You turn the [src.name] [active? "on":"off"]."))
var/datum/gas_mixture/tank_mix = loaded_tank.return_air()
var/fuel
if(loaded_tank)
@@ -80,7 +80,7 @@
if(!loaded_tank)
return ..()
if(!silent)
to_chat(user, "<span class='warning'>Remove the plasma tank first!</span>")
to_chat(user, span_warning("Remove the plasma tank first!"))
return FAILED_UNFASTEN
@@ -96,13 +96,13 @@
/obj/machinery/power/rad_collector/attackby(obj/item/item, mob/user, params)
if(istype(item, /obj/item/tank/internals/plasma))
if(!anchored)
to_chat(user, "<span class='warning'>[src] needs to be secured to the floor first!</span>")
to_chat(user, span_warning("[src] needs to be secured to the floor first!"))
return TRUE
if(loaded_tank)
to_chat(user, "<span class='warning'>There's already a plasma tank loaded!</span>")
to_chat(user, span_warning("There's already a plasma tank loaded!"))
return TRUE
if(panel_open)
to_chat(user, "<span class='warning'>Close the maintenance panel first!</span>")
to_chat(user, span_warning("Close the maintenance panel first!"))
return TRUE
if(!user.transferItemToLoc(item, src))
return
@@ -110,12 +110,12 @@
update_appearance()
else if(item.GetID())
if(!allowed(user))
to_chat(user, "<span class='danger'>Access denied.</span>")
to_chat(user, span_danger("Access denied."))
if(!active)
to_chat(user, "<span class='warning'>The controls can only be locked when \the [src] is active!</span>")
to_chat(user, span_warning("The controls can only be locked when \the [src] is active!"))
return TRUE
locked = !locked
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the controls.</span>")
to_chat(user, span_notice("You [locked ? "lock" : "unlock"] the controls."))
return TRUE
else
return ..()
@@ -131,7 +131,7 @@
if(!loaded_tank)
default_deconstruction_screwdriver(user, icon_state, icon_state, item)
return TRUE
to_chat(user, "<span class='warning'>Remove the plasma tank first!</span>")
to_chat(user, span_warning("Remove the plasma tank first!"))
return TRUE
/obj/machinery/power/rad_collector/crowbar_act(mob/living/user, obj/item/I)
@@ -139,11 +139,11 @@
if(!locked)
eject()
return TRUE
to_chat(user, "<span class='warning'>The controls are locked!</span>")
to_chat(user, span_warning("The controls are locked!"))
return TRUE
if(default_deconstruction_crowbar(I))
return TRUE
to_chat(user, "<span class='warning'>There isn't a tank loaded!</span>")
to_chat(user, span_warning("There isn't a tank loaded!"))
return TRUE
/obj/machinery/power/rad_collector/return_analyzable_air()
@@ -154,12 +154,12 @@
/obj/machinery/power/rad_collector/examine(mob/user)
. = ..()
if(!active)
. += "<span class='notice'><b>[src]'s display displays the words:</b> \"Power production mode. Please insert <b>Plasma</b>.\"</span>"
. += span_notice("<b>[src]'s display displays the words:</b> \"Power production mode. Please insert <b>Plasma</b>.\"")
// stored_energy is converted directly to watts every SSmachines.wait * 0.1 seconds.
// Therefore, its units are joules per SSmachines.wait * 0.1 seconds.
// So joules = stored_energy * SSmachines.wait * 0.1
var/joules = stored_energy * SSmachines.wait * 0.1
. += "<span class='notice'>[src]'s display states that it has stored <b>[DisplayJoules(joules)]</b>, and is processing <b>[DisplayPower(RAD_COLLECTOR_OUTPUT)]</b>.</span>"
. += span_notice("[src]'s display states that it has stored <b>[DisplayJoules(joules)]</b>, and is processing <b>[DisplayPower(RAD_COLLECTOR_OUTPUT)]</b>.")
/obj/machinery/power/rad_collector/obj_break(damage_flag)
. = ..()
@@ -63,7 +63,7 @@
qdel(src)
return
if(ismegafauna(user))
user.visible_message("<span class='warning'>[user] glows fiercely as the containment field flickers out!</span>")
user.visible_message(span_warning("[user] glows fiercely as the containment field flickers out!"))
FG1.calc_power(INFINITY) //rip that 'containment' field
user.adjustHealth(-user.obj_damage)
else
@@ -133,9 +133,9 @@
if(prob(20))
user.Stun(40)
user.take_overall_damage(0, shock_damage)
user.visible_message("<span class='danger'>[user.name] is shocked by the [src.name]!</span>", \
"<span class='userdanger'>Energy pulse detected, system damaged!</span>", \
"<span class='hear'>You hear an electrical crack.</span>")
user.visible_message(span_danger("[user.name] is shocked by the [src.name]!"), \
span_userdanger("Energy pulse detected, system damaged!"), \
span_hear("You hear an electrical crack."))
user.updatehealth()
bump_field(user)
+30 -30
View File
@@ -115,22 +115,22 @@
/obj/machinery/power/emitter/examine(mob/user)
. = ..()
if(welded)
. += "<span class='info'>It's moored firmly to the floor. You can unsecure its moorings with a <b>welder</b>.</span>"
. += span_info("It's moored firmly to the floor. You can unsecure its moorings with a <b>welder</b>.")
else if(anchored)
. += "<span class='info'>It's currently anchored to the floor. You can secure its moorings with a <b>welder</b>, or remove it with a <b>wrench</b>.</span>"
. += span_info("It's currently anchored to the floor. You can secure its moorings with a <b>welder</b>, or remove it with a <b>wrench</b>.")
else
. += "<span class='info'>It's not anchored to the floor. You can secure it in place with a <b>wrench</b>.</span>"
. += span_info("It's not anchored to the floor. You can secure it in place with a <b>wrench</b>.")
if(!in_range(user, src) && !isobserver(user))
return
if(!active)
. += "<span class='notice'>Its status display is currently turned off.</span>"
. += span_notice("Its status display is currently turned off.")
else if(!powered)
. += "<span class='notice'>Its status display is glowing faintly.</span>"
. += span_notice("Its status display is glowing faintly.")
else
. += "<span class='notice'>Its status display reads: Emitting one beam every <b>[DisplayTimeText(fire_delay)]</b>.</span>"
. += "<span class='notice'>Power consumption at <b>[DisplayPower(active_power_usage)]</b>.</span>"
. += span_notice("Its status display reads: Emitting one beam every <b>[DisplayTimeText(fire_delay)]</b>.")
. += span_notice("Power consumption at <b>[DisplayPower(active_power_usage)]</b>.")
/obj/machinery/power/emitter/ComponentInitialize()
. = ..()
@@ -139,7 +139,7 @@
/obj/machinery/power/emitter/proc/can_be_rotated(mob/user, rotation_type)
if(!anchored)
return TRUE
to_chat(user, "<span class='warning'>It is fastened to the floor!</span>")
to_chat(user, span_warning("It is fastened to the floor!"))
return FALSE
/obj/machinery/power/emitter/should_have_node()
@@ -164,13 +164,13 @@
/obj/machinery/power/emitter/interact(mob/user)
add_fingerprint(user)
if(!welded)
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
to_chat(user, span_warning("[src] needs to be firmly secured to the floor first!"))
return FALSE
if(!powernet)
to_chat(user, "<span class='warning'>\The [src] isn't connected to a wire!</span>")
to_chat(user, span_warning("\The [src] isn't connected to a wire!"))
return FALSE
if(locked || !allow_switch_interact)
to_chat(user, "<span class='warning'>The controls are locked!</span>")
to_chat(user, span_warning("The controls are locked!"))
return FALSE
if(active)
@@ -180,7 +180,7 @@
shot_number = 0
fire_delay = maximum_fire_delay
to_chat(user, "<span class='notice'>You turn [active ? "on" : "off"] [src].</span>")
to_chat(user, span_notice("You turn [active ? "on" : "off"] [src]."))
message_admins("Emitter turned [active ? "ON" : "OFF"] by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(src)]")
log_game("Emitter turned [active ? "ON" : "OFF"] by [key_name(user)] in [AREACOORD(src)]")
investigate_log("turned [active ? "<font color='green'>ON</font>" : "<font color='red'>OFF</font>"] by [key_name(user)] at [AREACOORD(src)]", INVESTIGATE_SINGULO)
@@ -189,7 +189,7 @@
/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/user, list/modifiers)
if(ismegafauna(user) && anchored)
set_anchored(FALSE)
user.visible_message("<span class='warning'>[user] rips [src] free from its moorings!</span>")
user.visible_message(span_warning("[user] rips [src] free from its moorings!"))
else
. = ..()
if(. && !anchored)
@@ -263,12 +263,12 @@
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user, silent)
if(active)
if(!silent)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
to_chat(user, span_warning("Turn \the [src] off first!"))
return FAILED_UNFASTEN
else if(welded)
if(!silent)
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
to_chat(user, span_warning("[src] is welded to the floor!"))
return FAILED_UNFASTEN
return ..()
@@ -281,35 +281,35 @@
/obj/machinery/power/emitter/welder_act(mob/living/user, obj/item/item)
..()
if(active)
to_chat(user, "<span class='warning'>Turn [src] off first!</span>")
to_chat(user, span_warning("Turn [src] off first!"))
return TRUE
if(welded)
if(!item.tool_start_check(user, amount=0))
return TRUE
user.visible_message("<span class='notice'>[user.name] starts to cut the [name] free from the floor.</span>", \
"<span class='notice'>You start to cut [src] free from the floor...</span>", \
"<span class='hear'>You hear welding.</span>")
user.visible_message(span_notice("[user.name] starts to cut the [name] free from the floor."), \
span_notice("You start to cut [src] free from the floor..."), \
span_hear("You hear welding."))
if(!item.use_tool(src, user, 20, 1, 50))
return FALSE
welded = FALSE
to_chat(user, "<span class='notice'>You cut [src] free from the floor.</span>")
to_chat(user, span_notice("You cut [src] free from the floor."))
disconnect_from_network()
update_cable_icons_on_turf(get_turf(src))
return TRUE
if(!anchored)
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
to_chat(user, span_warning("[src] needs to be wrenched to the floor!"))
return TRUE
if(!item.tool_start_check(user, amount=0))
return TRUE
user.visible_message("<span class='notice'>[user.name] starts to weld the [name] to the floor.</span>", \
"<span class='notice'>You start to weld [src] to the floor...</span>", \
"<span class='hear'>You hear welding.</span>")
user.visible_message(span_notice("[user.name] starts to weld the [name] to the floor."), \
span_notice("You start to weld [src] to the floor..."), \
span_hear("You hear welding."))
if(!item.use_tool(src, user, 20, 1, 50))
return FALSE
welded = TRUE
to_chat(user, "<span class='notice'>You weld [src] to the floor.</span>")
to_chat(user, span_notice("You weld [src] to the floor."))
connect_to_network()
update_cable_icons_on_turf(get_turf(src))
return TRUE
@@ -330,16 +330,16 @@
/obj/machinery/power/emitter/attackby(obj/item/item, mob/user, params)
if(item.GetID())
if(obj_flags & 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(!allowed(user))
to_chat(user, "<span class='danger'>Access denied.</span>")
to_chat(user, span_danger("Access denied."))
return
if(!active)
to_chat(user, "<span class='warning'>The controls can only be locked when \the [src] is online!</span>")
to_chat(user, span_warning("The controls can only be locked when \the [src] is online!"))
return
locked = !locked
to_chat(user, "<span class='notice'>You [src.locked ? "lock" : "unlock"] the controls.</span>")
to_chat(user, span_notice("You [src.locked ? "lock" : "unlock"] the controls."))
return
if(is_wire_tool(item) && panel_open)
@@ -388,7 +388,7 @@
locked = FALSE
obj_flags |= EMAGGED
if(user)
user.visible_message("<span class='warning'>[user.name] emags [src].</span>", "<span class='notice'>You short out the lock.</span>")
user.visible_message(span_warning("[user.name] emags [src]."), span_notice("You short out the lock."))
/obj/machinery/power/emitter/prototype
@@ -76,18 +76,18 @@ no power level overlay is currently in the overlays list.
if(state == FG_WELDED)
if(get_dist(src, user) <= 1)//Need to actually touch the thing to turn it on
if(active >= FG_CHARGING)
to_chat(user, "<span class='warning'>You are unable to turn off [src] once it is online!</span>")
to_chat(user, span_warning("You are unable to turn off [src] once it is online!"))
return 1
else
user.visible_message("<span class='notice'>[user] turns on [src].</span>", \
"<span class='notice'>You turn on [src].</span>", \
"<span class='hear'>You hear heavy droning.</span>")
user.visible_message(span_notice("[user] turns on [src]."), \
span_notice("You turn on [src]."), \
span_hear("You hear heavy droning."))
turn_on()
investigate_log("<font color='green'>activated</font> by [key_name(user)].", INVESTIGATE_SINGULO)
add_fingerprint(user)
else
to_chat(user, "<span class='warning'>[src] needs to be firmly secured to the floor first!</span>")
to_chat(user, span_warning("[src] needs to be firmly secured to the floor first!"))
/obj/machinery/field/generator/set_anchored(anchorvalue)
. = ..()
@@ -100,12 +100,12 @@ no power level overlay is currently in the overlays list.
/obj/machinery/field/generator/can_be_unfasten_wrench(mob/user, silent)
if(active)
if(!silent)
to_chat(user, "<span class='warning'>Turn \the [src] off first!</span>")
to_chat(user, span_warning("Turn \the [src] off first!"))
return FAILED_UNFASTEN
else if(state == FG_WELDED)
if(!silent)
to_chat(user, "<span class='warning'>[src] is welded to the floor!</span>")
to_chat(user, span_warning("[src] is welded to the floor!"))
return FAILED_UNFASTEN
return ..()
@@ -118,32 +118,32 @@ no power level overlay is currently in the overlays list.
/obj/machinery/field/generator/welder_act(mob/living/user, obj/item/I)
. = ..()
if(active)
to_chat(user, "<span class='warning'>[src] needs to be off!</span>")
to_chat(user, span_warning("[src] needs to be off!"))
return TRUE
switch(state)
if(FG_UNSECURED)
to_chat(user, "<span class='warning'>[src] needs to be wrenched to the floor!</span>")
to_chat(user, span_warning("[src] needs to be wrenched to the floor!"))
if(FG_SECURED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("<span class='notice'>[user] starts to weld [src] to the floor.</span>", \
"<span class='notice'>You start to weld \the [src] to the floor...</span>", \
"<span class='hear'>You hear welding.</span>")
user.visible_message(span_notice("[user] starts to weld [src] to the floor."), \
span_notice("You start to weld \the [src] to the floor..."), \
span_hear("You hear welding."))
if(I.use_tool(src, user, 20, volume=50) && state == FG_SECURED)
state = FG_WELDED
to_chat(user, "<span class='notice'>You weld the field generator to the floor.</span>")
to_chat(user, span_notice("You weld the field generator to the floor."))
if(FG_WELDED)
if(!I.tool_start_check(user, amount=0))
return TRUE
user.visible_message("<span class='notice'>[user] starts to cut [src] free from the floor.</span>", \
"<span class='notice'>You start to cut \the [src] free from the floor...</span>", \
"<span class='hear'>You hear welding.</span>")
user.visible_message(span_notice("[user] starts to cut [src] free from the floor."), \
span_notice("You start to cut \the [src] free from the floor..."), \
span_hear("You hear welding."))
if(I.use_tool(src, user, 20, volume=50) && state == FG_WELDED)
state = FG_SECURED
to_chat(user, "<span class='notice'>You cut \the [src] free from the floor.</span>")
to_chat(user, span_notice("You cut \the [src] free from the floor."))
return TRUE
@@ -151,7 +151,7 @@ no power level overlay is currently in the overlays list.
/obj/machinery/field/generator/attack_animal(mob/living/simple_animal/user, list/modifiers)
if(user.environment_smash & ENVIRONMENT_SMASH_RWALLS && active == FG_OFFLINE && state != FG_UNSECURED)
set_anchored(FALSE)
user.visible_message("<span class='warning'>[user] rips [src] free from its moorings!</span>")
user.visible_message(span_warning("[user] rips [src] free from its moorings!"))
else
..()
if(!anchored)
@@ -223,7 +223,7 @@ no power level overlay is currently in the overlays list.
check_power_level()
return TRUE
else
visible_message("<span class='danger'>The [name] shuts down!</span>", "<span class='hear'>You hear something shutting down.</span>")
visible_message(span_danger("The [name] shuts down!"), span_hear("You hear something shutting down."))
turn_off()
investigate_log("ran out of power and <font color='red'>deactivated</font>", INVESTIGATE_SINGULO)
power = 0
+6 -6
View File
@@ -52,7 +52,7 @@
singularity_size = NARSIE_SINGULARITY_SIZE, \
))
send_to_playing_players("<span class='narsie'>NAR'SIE HAS RISEN</span>")
send_to_playing_players(span_narsie("NAR'SIE HAS RISEN"))
sound_to_playing_players('sound/creatures/narsie_rises.ogg')
var/area/area = get_area(src)
@@ -90,7 +90,7 @@
INVOKE_ASYNC(GLOBAL_PROC, .proc/begin_the_end)
/obj/narsie/Destroy()
send_to_playing_players("<span class='narsie'>\"<b>[pick("Nooooo...", "Not die. How-", "Die. Mort-", "Sas tyen re-")]\"</b></span>")
send_to_playing_players(span_narsie("\"<b>[pick("Nooooo...", "Not die. How-", "Die. Mort-", "Sas tyen re-")]\"</b>"))
sound_to_playing_players('sound/magic/demon_dies.ogg', 50)
var/list/all_cults = list()
@@ -132,7 +132,7 @@
for (var/mob/living/carbon/victim in viewers(NARSIE_CONSUME_RANGE, src))
if (victim.stat == CONSCIOUS)
if (!IS_CULTIST(victim))
to_chat(victim, "<span class='cultsmall'>You feel conscious thought crumble away in an instant as you gaze upon [src]...</span>")
to_chat(victim, span_cult("You feel conscious thought crumble away in an instant as you gaze upon [src]..."))
victim.apply_effect(NARSIE_MESMERIZE_EFFECT, EFFECT_STUN)
/// Narsie rewards her cultists with being devoured first, then picks a ghost to follow.
@@ -179,12 +179,12 @@
if (food == old_target)
return
to_chat(old_target, "<span class='cultsmall'>NAR'SIE HAS LOST INTEREST IN YOU.</span>")
to_chat(old_target, span_cult("NAR'SIE HAS LOST INTEREST IN YOU."))
singularity_component.target = food
if(ishuman(food))
to_chat(food, "<span class='cult'>NAR'SIE HUNGERS FOR YOUR SOUL.</span>")
to_chat(food, span_cult("NAR'SIE HUNGERS FOR YOUR SOUL."))
else
to_chat(food, "<span class='cult'>NAR'SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL.</span>")
to_chat(food, span_cult("NAR'SIE HAS CHOSEN YOU TO LEAD HER TO HER NEXT MEAL."))
/// Called to make Nar'Sie convert objects to cult stuff, or to eat
/obj/narsie/proc/consume(atom/target)
@@ -71,9 +71,9 @@
. = COMPONENT_CANCEL_ATTACK_CHAIN
var/mob/living/carbon/jedi = user
jedi.visible_message(
"<span class='danger'>[jedi]'s head begins to collapse in on itself!</span>",
"<span class='userdanger'>Your head feels like it's collapsing in on itself! This was really not a good idea!</span>",
"<span class='hear'>You hear something crack and explode in gore.</span>"
span_danger("[jedi]'s head begins to collapse in on itself!"),
span_userdanger("Your head feels like it's collapsing in on itself! This was really not a good idea!"),
span_hear("You hear something crack and explode in gore.")
)
jedi.Stun(3 SECONDS)
new /obj/effect/gibspawner/generic(get_turf(jedi), jedi)
@@ -377,8 +377,8 @@
/obj/singularity/proc/combust_mobs()
for(var/mob/living/carbon/C in urange(20, src, 1))
C.visible_message("<span class='warning'>[C]'s skin bursts into flame!</span>", \
"<span class='userdanger'>You feel an inner fire as your skin bursts into flames!</span>")
C.visible_message(span_warning("[C]'s skin bursts into flame!"), \
span_userdanger("You feel an inner fire as your skin bursts into flames!"))
C.adjust_fire_stacks(5)
C.IgniteMob()
return
@@ -395,12 +395,12 @@
if(istype(H.glasses, /obj/item/clothing/glasses/meson))
var/obj/item/clothing/glasses/meson/MS = H.glasses
if(MS.vision_flags == SEE_TURFS)
to_chat(H, "<span class='notice'>You look directly into the [src.name], good thing you had your protective eyewear on!</span>")
to_chat(H, span_notice("You look directly into the [src.name], good thing you had your protective eyewear on!"))
return
M.apply_effect(60, EFFECT_STUN)
M.visible_message("<span class='danger'>[M] stares blankly at the [src.name]!</span>", \
"<span class='userdanger'>You look directly into the [src.name] and feel weak.</span>")
M.visible_message(span_danger("[M] stares blankly at the [src.name]!"), \
span_userdanger("You look directly into the [src.name] and feel weak."))
return
+11 -11
View File
@@ -42,7 +42,7 @@
/obj/machinery/power/smes/examine(user)
. = ..()
if(!terminal)
. += "<span class='warning'>This SMES has no power terminal!</span>"
. += span_warning("This SMES has no power terminal!")
/obj/machinery/power/smes/Initialize()
. = ..()
@@ -92,10 +92,10 @@
if(term && term.dir == turn(dir, 180))
terminal = term
terminal.master = src
to_chat(user, "<span class='notice'>Terminal found.</span>")
to_chat(user, span_notice("Terminal found."))
break
if(!terminal)
to_chat(user, "<span class='alert'>No power terminal found.</span>")
to_chat(user, span_alert("No power terminal found."))
return
set_machine_stat(machine_stat & ~BROKEN)
update_appearance()
@@ -108,25 +108,25 @@
return
if(terminal) //is there already a terminal ?
to_chat(user, "<span class='warning'>This SMES already has a power terminal!</span>")
to_chat(user, span_warning("This SMES already has a power terminal!"))
return
if(!panel_open) //is the panel open ?
to_chat(user, "<span class='warning'>You must open the maintenance panel first!</span>")
to_chat(user, span_warning("You must open the maintenance panel first!"))
return
var/turf/T = get_turf(user)
if (T.intact) //is the floor plating removed ?
to_chat(user, "<span class='warning'>You must first remove the floor plating!</span>")
to_chat(user, span_warning("You must first remove the floor plating!"))
return
var/obj/item/stack/cable_coil/C = I
if(C.get_amount() < 10)
to_chat(user, "<span class='warning'>You need more wires!</span>")
to_chat(user, span_warning("You need more wires!"))
return
to_chat(user, "<span class='notice'>You start building the power terminal...</span>")
to_chat(user, span_notice("You start building the power terminal..."))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(do_after(user, 20, target = src))
@@ -138,8 +138,8 @@
return
if(!terminal)
C.use(10)
user.visible_message("<span class='notice'>[user.name] builds a power terminal.</span>",\
"<span class='notice'>You build the power terminal.</span>")
user.visible_message(span_notice("[user.name] builds a power terminal."),\
span_notice("You build the power terminal."))
//build the terminal and link it to the network
make_terminal(T)
@@ -169,7 +169,7 @@
/obj/machinery/power/smes/default_deconstruction_crowbar(obj/item/crowbar/C)
if(istype(C) && terminal)
to_chat(usr, "<span class='warning'>You must first remove the power terminal!</span>")
to_chat(usr, span_warning("You must first remove the power terminal!"))
return FALSE
return ..()
+11 -11
View File
@@ -72,10 +72,10 @@
/obj/machinery/power/solar/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
user.visible_message("<span class='notice'>[user] begins to take the glass off [src].</span>", "<span class='notice'>You begin to take the glass off [src]...</span>")
user.visible_message(span_notice("[user] begins to take the glass off [src]."), span_notice("You begin to take the glass off [src]..."))
if(I.use_tool(src, user, 50))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
user.visible_message("<span class='notice'>[user] takes the glass off [src].</span>", "<span class='notice'>You take the glass off [src].</span>")
user.visible_message(span_notice("[user] takes the glass off [src]."), span_notice("You take the glass off [src]."))
deconstruct(TRUE)
return TRUE
@@ -241,28 +241,28 @@
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
if(W.tool_behaviour == TOOL_WRENCH && isturf(loc))
if(isinspace())
to_chat(user, "<span class='warning'>You can't secure [src] here.</span>")
to_chat(user, span_warning("You can't secure [src] here."))
return
set_anchored(!anchored)
user.visible_message("<span class='notice'>[user] [anchored ? null : "un"]wrenches the solar assembly into place.</span>", "<span class='notice'>You [anchored ? null : "un"]wrench the solar assembly into place.</span>")
user.visible_message(span_notice("[user] [anchored ? null : "un"]wrenches the solar assembly into place."), span_notice("You [anchored ? null : "un"]wrench the solar assembly into place."))
W.play_tool_sound(src, 75)
return TRUE
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
if(!anchored)
to_chat(user, "<span class='warning'>You need to secure the assembly before you can add glass.</span>")
to_chat(user, span_warning("You need to secure the assembly before you can add glass."))
return
var/obj/item/stack/sheet/S = W
if(S.use(2))
glass_type = W.type
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
user.visible_message("<span class='notice'>[user] places the glass on the solar assembly.</span>", "<span class='notice'>You place the glass on the solar assembly.</span>")
user.visible_message(span_notice("[user] places the glass on the solar assembly."), span_notice("You place the glass on the solar assembly."))
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
else
new /obj/machinery/power/solar(get_turf(src), src)
else
to_chat(user, "<span class='warning'>You need two sheets of glass to put them into a solar panel!</span>")
to_chat(user, span_warning("You need two sheets of glass to put them into a solar panel!"))
return
return TRUE
@@ -272,13 +272,13 @@
return
tracker = TRUE
qdel(W)
user.visible_message("<span class='notice'>[user] inserts the electronics into the solar assembly.</span>", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
user.visible_message(span_notice("[user] inserts the electronics into the solar assembly."), span_notice("You insert the electronics into the solar assembly."))
return TRUE
else
if(W.tool_behaviour == TOOL_CROWBAR)
new /obj/item/electronics/tracker(src.loc)
tracker = FALSE
user.visible_message("<span class='notice'>[user] takes out the electronics from the solar assembly.</span>", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
user.visible_message(span_notice("[user] takes out the electronics from the solar assembly."), span_notice("You take out the electronics from the solar assembly."))
return TRUE
return ..()
@@ -408,7 +408,7 @@
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(I.use_tool(src, user, 20, volume=50))
if (src.machine_stat & BROKEN)
to_chat(user, "<span class='notice'>The broken glass falls out.</span>")
to_chat(user, span_notice("The broken glass falls out."))
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
new /obj/item/shard( src.loc )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
@@ -420,7 +420,7 @@
A.set_anchored(TRUE)
qdel(src)
else
to_chat(user, "<span class='notice'>You disconnect the monitor.</span>")
to_chat(user, span_notice("You disconnect the monitor."))
var/obj/structure/frame/computer/A = new /obj/structure/frame/computer( src.loc )
var/obj/item/circuitboard/computer/solar_control/M = new /obj/item/circuitboard/computer/solar_control( A )
for (var/obj/C in src)
+46 -46
View File
@@ -265,7 +265,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
. = ..()
var/immune = HAS_TRAIT(user, TRAIT_SUPERMATTER_MADNESS_IMMUNE) || (user.mind && HAS_TRAIT(user.mind, TRAIT_SUPERMATTER_MADNESS_IMMUNE))
if(isliving(user) && !immune && (get_dist(user, src) < HALLUCINATION_RANGE(power)))
. += "<span class='danger'>You get headaches just from looking at it.</span>"
. += span_danger("You get headaches just from looking at it.")
// SupermatterMonitor UI for ghosts only. Inherited attack_ghost will call this.
/obj/machinery/power/supermatter_crystal/ui_interact(mob/user, datum/tgui/ui)
@@ -413,9 +413,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
SEND_SOUND(victim, 'sound/magic/charge.ogg')
if (victim.z != z)
to_chat(victim, "<span class='boldannounce'>You hold onto \the [victim.loc] as hard as you can, as reality distorts around you. You feel safe.</span>")
to_chat(victim, span_boldannounce("You hold onto \the [victim.loc] as hard as you can, as reality distorts around you. You feel safe."))
continue
to_chat(victim, "<span class='boldannounce'>You feel reality distort for a moment...</span>")
to_chat(victim, span_boldannounce("You feel reality distort for a moment..."))
SEND_SIGNAL(victim, COMSIG_ADD_MOOD_EVENT, "delam", /datum/mood_event/delam)
@@ -461,7 +461,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(isclosedturf(local_turf))
var/turf/did_it_melt = local_turf.Melt()
if(!isclosedturf(did_it_melt)) //In case some joker finds way to place these on indestructible walls
visible_message("<span class='warning'>[src] melts through [local_turf]!</span>")
visible_message(span_warning("[src] melts through [local_turf]!"))
return
//We vary volume by power, and handle OH FUCK FUSION IN COOLING LOOP noises.
@@ -814,12 +814,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/gain = 100
investigate_log("Supermatter shard consumed by singularity.", INVESTIGATE_SINGULO)
message_admins("Singularity has consumed a supermatter shard and can now become stage six.")
visible_message("<span class='userdanger'>[src] is consumed by the singularity!</span>")
visible_message(span_userdanger("[src] is consumed by the singularity!"))
for(var/mob/hearing_mob as anything in GLOB.player_list)
if(hearing_mob.z != z)
continue
SEND_SOUND(hearing_mob, 'sound/effects/supermatter.ogg') //everyone goan know bout this
to_chat(hearing_mob, "<span class='boldannounce'>A horrible screeching fills your ears, and a wave of dread washes over you...</span>")
to_chat(hearing_mob, span_boldannounce("A horrible screeching fills your ears, and a wave of dread washes over you..."))
qdel(src)
return gain
@@ -829,19 +829,19 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
damage += blob.get_integrity() * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us
if(blob.get_integrity() > 100)
blob.visible_message("<span class='danger'>\The [blob] strikes at \the [src] and flinches away!</span>",
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
blob.visible_message(span_danger("\The [blob] strikes at \the [src] and flinches away!"),
span_hear("You hear a loud crack as you are washed with a wave of heat."))
blob.take_damage(100, BURN)
else
blob.visible_message("<span class='danger'>\The [blob] strikes at \the [src] and rapidly flashes to ash.</span>",
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
blob.visible_message(span_danger("\The [blob] strikes at \the [src] and rapidly flashes to ash."),
span_hear("You hear a loud crack as you are washed with a wave of heat."))
Consume(blob)
/obj/machinery/power/supermatter_crystal/attack_tk(mob/user)
if(!iscarbon(user))
return
var/mob/living/carbon/jedi = user
to_chat(jedi, "<span class='userdanger'>That was a really dense idea.</span>")
to_chat(jedi, span_userdanger("That was a really dense idea."))
jedi.ghostize()
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in jedi.internal_organs
if(rip_u)
@@ -863,8 +863,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
else
murder = user.attack_verb_continuous
dust_mob(user, \
"<span class='danger'>[user] unwisely [murder] [src], and [user.p_their()] body burns brilliantly before flashing into ash!</span>", \
"<span class='userdanger'>You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops.</span>", \
span_danger("[user] unwisely [murder] [src], and [user.p_their()] body burns brilliantly before flashing into ash!"), \
span_userdanger("You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops."), \
"simple animal attack")
/obj/machinery/power/supermatter_crystal/attack_robot(mob/user)
@@ -889,8 +889,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(!user.is_mouth_covered())
if(user.combat_mode)
dust_mob(user,
"<span class='danger'>As [user] tries to take a bite out of [src] everything goes silent before [user.p_their()] body starts to glow and burst into flames before flashing to ash.</span>",
"<span class='userdanger'>You try to take a bite out of [src], but find [p_them()] far too hard to get anywhere before everything starts burning and your ears fill with ringing!</span>",
span_danger("As [user] tries to take a bite out of [src] everything goes silent before [user.p_their()] body starts to glow and burst into flames before flashing to ash."),
span_userdanger("You try to take a bite out of [src], but find [p_them()] far too hard to get anywhere before everything starts burning and your ears fill with ringing!"),
"attempted bite"
)
return
@@ -898,8 +898,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/obj/item/organ/tongue/licking_tongue = user.getorganslot(ORGAN_SLOT_TONGUE)
if(licking_tongue)
dust_mob(user,
"<span class='danger'>As [user] hesitantly leans in and licks [src] everything goes silent before [user.p_their()] body starts to glow and burst into flames before flashing to ash!</span>",
"<span class='userdanger'>You tentatively lick [src], but you can't figure out what it tastes like before everything starts burning and your ears fill with ringing!</span>",
span_danger("As [user] hesitantly leans in and licks [src] everything goes silent before [user.p_their()] body starts to glow and burst into flames before flashing to ash!"),
span_userdanger("You tentatively lick [src], but you can't figure out what it tastes like before everything starts burning and your ears fill with ringing!"),
"attempted lick"
)
return
@@ -907,15 +907,15 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/obj/item/bodypart/head/forehead = user.get_bodypart(BODY_ZONE_HEAD)
if(forehead)
dust_mob(user,
"<span class='danger'>As [user]'s forehead bumps into [src], inducing a resonance... Everything goes silent before [user.p_their()] [forehead] flashes to ash!</span>",
"<span class='userdanger'>You feel your forehead bump into [src] and everything suddenly goes silent. As your head fills with ringing you come to realize that that was not a wise decision.</span>",
span_danger("As [user]'s forehead bumps into [src], inducing a resonance... Everything goes silent before [user.p_their()] [forehead] flashes to ash!"),
span_userdanger("You feel your forehead bump into [src] and everything suddenly goes silent. As your head fills with ringing you come to realize that that was not a wise decision."),
"failed lick"
)
return
dust_mob(user,
"<span class='danger'>[user] leans in and tries to lick [src], inducing a resonance... [user.p_their()] body starts to glow and burst into flames before flashing into dust!</span>",
"<span class='userdanger'>You lean in and try to lick [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>",
span_danger("[user] leans in and tries to lick [src], inducing a resonance... [user.p_their()] body starts to glow and burst into flames before flashing into dust!"),
span_userdanger("You lean in and try to lick [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\""),
"failed lick"
)
@@ -924,12 +924,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(nom.incorporeal_move || nom.status_flags & GODMODE) //try to keep supermatter sliver's + hemostat's dust conditions in sync with this too
return
if(!vis_msg)
vis_msg = "<span class='danger'>[nom] reaches out and touches [src], inducing a resonance... [nom.p_their()] body starts to glow and burst into flames before flashing into dust!</span>"
vis_msg = span_danger("[nom] reaches out and touches [src], inducing a resonance... [nom.p_their()] body starts to glow and burst into flames before flashing into dust!")
if(!mob_msg)
mob_msg = "<span class='userdanger'>You reach out and touch [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>"
mob_msg = span_userdanger("You reach out and touch [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"")
if(!cause)
cause = "contact"
nom.visible_message(vis_msg, mob_msg, "<span class='hear'>You hear an unearthly noise as a wave of heat washes over you.</span>")
nom.visible_message(vis_msg, mob_msg, span_hear("You hear an unearthly noise as a wave of heat washes over you."))
investigate_log("has been attacked ([cause]) by [key_name(nom)]", INVESTIGATE_SUPERMATTER)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
Consume(nom)
@@ -948,42 +948,42 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
which_hand = BODY_ZONE_R_ARM
var/obj/item/bodypart/dust_arm = user.get_bodypart(which_hand)
dust_arm.dismember()
user.visible_message("<span class='danger'>The [item] flashes out of existence on contact with \the [src], resonating with a horrible sound...</span>",\
"<span class='danger'>Oops! The [item] flashes out of existence on contact with \the [src], taking your arm with it! That was clumsy of you!</span>")
user.visible_message(span_danger("The [item] flashes out of existence on contact with \the [src], resonating with a horrible sound..."),\
span_danger("Oops! The [item] flashes out of existence on contact with \the [src], taking your arm with it! That was clumsy of you!"))
playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE)
Consume(dust_arm)
qdel(item)
return
if(cig.lit || user.combat_mode)
user.visible_message("<span class='danger'>A hideous sound echoes as [item] is ashed out on contact with \the [src]. That didn't seem like a good idea...</span>")
user.visible_message(span_danger("A hideous sound echoes as [item] is ashed out on contact with \the [src]. That didn't seem like a good idea..."))
playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE)
Consume(item)
radiation_pulse(src, 150, 4)
return ..()
else
cig.light()
user.visible_message("<span class='danger'>As [user] lights \their [item] on \the [src], silence fills the room...</span>",\
"<span class='danger'>Time seems to slow to a crawl as you touch \the [src] with \the [item].</span>\n<span class='notice'>\The [item] flashes alight with an eerie energy as you nonchalantly lift your hand away from \the [src]. Damn.</span>")
user.visible_message(span_danger("As [user] lights \their [item] on \the [src], silence fills the room..."),\
span_danger("Time seems to slow to a crawl as you touch \the [src] with \the [item].</span>\n<span class='notice'>\The [item] flashes alight with an eerie energy as you nonchalantly lift your hand away from \the [src]. Damn."))
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
radiation_pulse(src, 50, 3)
return
if(istype(item, /obj/item/scalpel/supermatter))
var/obj/item/scalpel/supermatter/scalpel = item
to_chat(user, "<span class='notice'>You carefully begin to scrape \the [src] with \the [item]...</span>")
to_chat(user, span_notice("You carefully begin to scrape \the [src] with \the [item]..."))
if(item.use_tool(src, user, 60, volume=100))
if (scalpel.usesLeft)
to_chat(user, "<span class='danger'>You extract a sliver from \the [src]. \The [src] begins to react violently!</span>")
to_chat(user, span_danger("You extract a sliver from \the [src]. \The [src] begins to react violently!"))
new /obj/item/nuke_core/supermatter_sliver(drop_location())
matter_power += 800
scalpel.usesLeft--
if (!scalpel.usesLeft)
to_chat(user, "<span class='notice'>A tiny piece of \the [item] falls off, rendering it useless!</span>")
to_chat(user, span_notice("A tiny piece of \the [item] falls off, rendering it useless!"))
else
to_chat(user, "<span class='warning'>You fail to extract a sliver from \The [src]! \the [item] isn't sharp enough anymore.</span>")
to_chat(user, span_warning("You fail to extract a sliver from \The [src]! \the [item] isn't sharp enough anymore."))
else if(user.dropItemToGround(item))
user.visible_message("<span class='danger'>As [user] touches \the [src] with \a [item], silence fills the room...</span>",\
"<span class='userdanger'>You touch \the [src] with \the [item], and everything suddenly goes silent.</span>\n<span class='notice'>\The [item] flashes into dust as you flinch away from \the [src].</span>",\
"<span class='hear'>Everything suddenly goes silent.</span>")
user.visible_message(span_danger("As [user] touches \the [src] with \a [item], silence fills the room..."),\
span_userdanger("You touch \the [src] with \the [item], and everything suddenly goes silent.</span>\n<span class='notice'>\The [item] flashes into dust as you flinch away from \the [src]."),\
span_hear("Everything suddenly goes silent."))
investigate_log("has been attacked ([item]) by [key_name(user)]", INVESTIGATE_SUPERMATTER)
Consume(item)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE)
@@ -991,8 +991,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
radiation_pulse(src, 150, 4)
else if(Adjacent(user)) //if the item is stuck to the person, kill the person too instead of eating just the item.
var/vis_msg = "<span class='danger'>[user] reaches out and touches [src] with [item], inducing a resonance... [item] starts to glow briefly before the light continues up to [user]'s body. [user.p_they(TRUE)] bursts into flames before flashing into dust!</span>"
var/mob_msg = "<span class='userdanger'>You reach out and touch [src] with [item]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>"
var/vis_msg = span_danger("[user] reaches out and touches [src] with [item], inducing a resonance... [item] starts to glow briefly before the light continues up to [user]'s body. [user.p_they(TRUE)] bursts into flames before flashing into dust!")
var/mob_msg = span_userdanger("You reach out and touch [src] with [item]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"")
dust_mob(user, vis_msg, mob_msg)
/obj/machinery/power/supermatter_crystal/wrench_act(mob/user, obj/item/tool)
@@ -1003,12 +1003,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/Bumped(atom/movable/hit_object)
if(isliving(hit_object))
hit_object.visible_message("<span class='danger'>\The [hit_object] slams into \the [src] inducing a resonance... [hit_object.p_their()] body starts to glow and burst into flames before flashing into dust!</span>",
"<span class='userdanger'>You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\"</span>",
"<span class='hear'>You hear an unearthly noise as a wave of heat washes over you.</span>")
hit_object.visible_message(span_danger("\The [hit_object] slams into \the [src] inducing a resonance... [hit_object.p_their()] body starts to glow and burst into flames before flashing into dust!"),
span_userdanger("You slam into \the [src] as your ears are filled with unearthly ringing. Your last thought is \"Oh, fuck.\""),
span_hear("You hear an unearthly noise as a wave of heat washes over you."))
else if(isobj(hit_object) && !iseffect(hit_object))
hit_object.visible_message("<span class='danger'>\The [hit_object] smacks into \the [src] and rapidly flashes to ash.</span>", null,
"<span class='hear'>You hear a loud crack as you are washed with a wave of heat.</span>")
hit_object.visible_message(span_danger("\The [hit_object] smacks into \the [src] and rapidly flashes to ash."), null,
span_hear("You hear a loud crack as you are washed with a wave of heat."))
else
return
@@ -1048,10 +1048,10 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
for(var/mob/living/near_mob in range(10))
investigate_log("has irradiated [key_name(near_mob)] after consuming [consumed_object].", INVESTIGATE_SUPERMATTER)
if(near_mob in view())
near_mob.show_message("<span class='danger'>As \the [src] slowly stops resonating, you find your skin covered in new radiation burns.</span>", MSG_VISUAL,
"<span class='danger'>The unearthly ringing subsides and you notice you have new radiation burns.</span>", MSG_AUDIBLE)
near_mob.show_message(span_danger("As \the [src] slowly stops resonating, you find your skin covered in new radiation burns."), MSG_VISUAL,
span_danger("The unearthly ringing subsides and you notice you have new radiation burns."), MSG_AUDIBLE)
else
near_mob.show_message("<span class='hear'>You hear an unearthly ringing and notice your skin is covered in fresh radiation burns.</span>", MSG_AUDIBLE)
near_mob.show_message(span_hear("You hear an unearthly ringing and notice your skin is covered in fresh radiation burns."), MSG_AUDIBLE)
//Do not blow up our internal radio
/obj/machinery/power/supermatter_crystal/contents_explosion(severity, target)
return
+4 -4
View File
@@ -43,14 +43,14 @@
if(isturf(loc))
var/turf/T = loc
if(T.intact)
to_chat(user, "<span class='warning'>You must first expose the power terminal!</span>")
to_chat(user, span_warning("You must first expose the power terminal!"))
return
if(master && !master.can_terminal_dismantle())
return
user.visible_message("<span class='notice'>[user.name] dismantles the power terminal from [master].</span>",
"<span class='notice'>You begin to cut the cables...</span>")
user.visible_message(span_notice("[user.name] dismantles the power terminal from [master]."),
span_notice("You begin to cut the cables..."))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
if(I.use_tool(src, user, 50))
@@ -62,7 +62,7 @@
return
new /obj/item/stack/cable_coil(drop_location(), 10)
to_chat(user, "<span class='notice'>You cut the cables and dismantle the power terminal.</span>")
to_chat(user, span_notice("You cut the cables and dismantle the power terminal."))
qdel(src)
/obj/machinery/power/terminal/wirecutter_act(mob/living/user, obj/item/I)
+1 -1
View File
@@ -36,7 +36,7 @@
/obj/machinery/power/tesla_coil/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Power generation at <b>[input_power_multiplier*100]%</b>.<br>Shock interval at <b>[zap_cooldown*0.1]</b> seconds.</span>"
. += span_notice("The status display reads: Power generation at <b>[input_power_multiplier*100]%</b>.<br>Shock interval at <b>[zap_cooldown*0.1]</b> seconds.")
/obj/machinery/power/tesla_coil/on_construction()
if(anchored)
+1 -1
View File
@@ -163,7 +163,7 @@
if(!iscarbon(user))
return
var/mob/living/carbon/jedi = user
to_chat(jedi, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
to_chat(jedi, span_userdanger("That was a shockingly dumb idea."))
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in jedi.internal_organs
jedi.ghostize(jedi)
if(rip_u)
+2 -2
View File
@@ -57,10 +57,10 @@
/obj/machinery/power/tracker/crowbar_act(mob/user, obj/item/I)
playsound(src.loc, 'sound/machines/click.ogg', 50, TRUE)
user.visible_message("<span class='notice'>[user] begins to take the glass off [src].</span>", "<span class='notice'>You begin to take the glass off [src]...</span>")
user.visible_message(span_notice("[user] begins to take the glass off [src]."), span_notice("You begin to take the glass off [src]..."))
if(I.use_tool(src, user, 50))
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
user.visible_message("<span class='notice'>[user] takes the glass off [src].</span>", "<span class='notice'>You take the glass off [src].</span>")
user.visible_message(span_notice("[user] takes the glass off [src]."), span_notice("You take the glass off [src]."))
deconstruct(TRUE)
return TRUE
+6 -6
View File
@@ -97,7 +97,7 @@
/obj/machinery/power/compressor/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Efficiency at <b>[efficiency*100]%</b>.</span>"
. += span_notice("The status display reads: Efficiency at <b>[efficiency*100]%</b>.")
/obj/machinery/power/compressor/attackby(obj/item/I, mob/user, params)
if(default_deconstruction_screwdriver(user, initial(icon_state), initial(icon_state), I))
@@ -108,10 +108,10 @@
inturf = get_step(src, dir)
locate_machinery()
if(turbine)
to_chat(user, "<span class='notice'>Turbine connected.</span>")
to_chat(user, span_notice("Turbine connected."))
set_machine_stat(machine_stat & ~BROKEN)
else
to_chat(user, "<span class='alert'>Turbine not connected.</span>")
to_chat(user, span_alert("Turbine not connected."))
obj_break()
return
@@ -183,7 +183,7 @@
/obj/machinery/power/turbine/examine(mob/user)
. = ..()
if(in_range(user, src) || isobserver(user))
. += "<span class='notice'>The status display reads: Productivity at <b>[productivity*100]%</b>.</span>"
. += span_notice("The status display reads: Productivity at <b>[productivity*100]%</b>.")
/obj/machinery/power/turbine/locate_machinery()
if(compressor)
@@ -238,10 +238,10 @@
outturf = get_step(src, dir)
locate_machinery()
if(compressor)
to_chat(user, "<span class='notice'>Compressor connected.</span>")
to_chat(user, span_notice("Compressor connected."))
set_machine_stat(machine_stat & ~BROKEN)
else
to_chat(user, "<span class='alert'>Compressor not connected.</span>")
to_chat(user, span_alert("Compressor not connected."))
obj_break()
return