[MIRROR] refactors most spans (#9139)

Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-10-04 06:00:17 -07:00
committed by GitHub
parent 43ee646816
commit ab154b48b2
1511 changed files with 12497 additions and 12357 deletions

View File

@@ -108,12 +108,12 @@
if("remove_cell")
if(!battery)
to_chat(usr, "<span class='warning'>There's no power cell to remove from \the [src].</span>")
to_chat(usr, span_warning("There's no power cell to remove from \the [src]."))
return FALSE
var/turf/T = get_turf(src)
battery.forceMove(T)
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
to_chat(usr, "<span class='notice'>You pull \the [battery] out of \the [src]'s power supplier.</span>")
to_chat(usr, span_notice("You pull \the [battery] out of \the [src]'s power supplier."))
battery = null
return TRUE
@@ -141,9 +141,9 @@
if(D.accepting_refs)
D.afterattack(C, usr, TRUE)
else
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
to_chat(usr, span_warning("The Debugger's 'ref scanner' needs to be on."))
else
to_chat(usr, "<span class='warning'>You need a multitool/debugger set to 'ref' mode to do that.</span>")
to_chat(usr, span_warning("You need a multitool/debugger set to 'ref' mode to do that."))
return TRUE
if("remove_circuit")
@@ -175,7 +175,7 @@
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name this?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
if(src && input)
to_chat(M, "<span class='notice'>The machine now has a label reading '[input]'.</span>")
to_chat(M, span_notice("The machine now has a label reading '[input]'."))
name = input
/obj/item/electronic_assembly/proc/can_move()
@@ -229,21 +229,21 @@
// Returns true if the circuit made it inside.
/obj/item/electronic_assembly/proc/add_circuit(var/obj/item/integrated_circuit/IC, var/mob/user)
if(!opened)
to_chat(user, "<span class='warning'>\The [src] isn't opened, so you can't put anything inside. Try using a crowbar.</span>")
to_chat(user, span_warning("\The [src] isn't opened, so you can't put anything inside. Try using a crowbar."))
return FALSE
if(IC.w_class > src.w_class)
to_chat(user, "<span class='warning'>\The [IC] is way too big to fit into \the [src].</span>")
to_chat(user, span_warning("\The [IC] is way too big to fit into \the [src]."))
return FALSE
var/total_part_size = get_part_size()
var/total_complexity = get_part_complexity()
if((total_part_size + IC.size) > max_components)
to_chat(user, "<span class='warning'>You can't seem to add the '[IC.name]', as there's insufficient space.</span>")
to_chat(user, span_warning("You can't seem to add the '[IC.name]', as there's insufficient space."))
return FALSE
if((total_complexity + IC.complexity) > max_complexity)
to_chat(user, "<span class='warning'>You can't seem to add the '[IC.name]', since this setup's too complicated for the case.</span>")
to_chat(user, span_warning("You can't seem to add the '[IC.name]', since this setup's too complicated for the case."))
return FALSE
if(!IC.forceMove(src))
@@ -284,7 +284,7 @@
if(!user.unEquip(I) && !istype(user, /mob/living/silicon/robot)) //Robots cannot de-equip items in grippers.
return FALSE
if(add_circuit(I, user))
to_chat(user, "<span class='notice'>You slide \the [I] inside \the [src].</span>")
to_chat(user, span_notice("You slide \the [I] inside \the [src]."))
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
tgui_interact(user)
return TRUE
@@ -292,7 +292,7 @@
else if(I.has_tool_quality(TOOL_CROWBAR))
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
opened = !opened
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
to_chat(user, span_notice("You [opened ? "opened" : "closed"] \the [src]."))
update_icon()
return TRUE
@@ -312,17 +312,17 @@
else if(istype(I, /obj/item/cell/device))
if(!opened)
to_chat(user, "<span class='warning'>\The [src] isn't opened, so you can't put anything inside. Try using a crowbar.</span>")
to_chat(user, span_warning("\The [src] isn't opened, so you can't put anything inside. Try using a crowbar."))
return FALSE
if(battery)
to_chat(user, "<span class='warning'>\The [src] already has \a [battery] inside. Remove it first if you want to replace it.</span>")
to_chat(user, span_warning("\The [src] already has \a [battery] inside. Remove it first if you want to replace it."))
return FALSE
var/obj/item/cell/device/cell = I
user.drop_item(cell)
cell.forceMove(src)
battery = cell
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You slot \the [cell] inside \the [src]'s power supplier.</span>")
to_chat(user, span_notice("You slot \the [cell] inside \the [src]'s power supplier."))
tgui_interact(user)
return TRUE

View File

@@ -23,7 +23,7 @@
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
opened = !opened
EA.opened = opened
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
to_chat(user, span_notice("You [opened ? "opened" : "closed"] \the [src]."))
secured = 1
update_icon()
@@ -81,4 +81,3 @@
if(!CanInteract(user, state = GLOB.tgui_deep_inventory_state))
return 0
return 1

View File

@@ -209,12 +209,12 @@
return
var/turf/T = get_turf(user)
if(!istype(T, /turf/simulated/floor))
to_chat(user, "<span class='warning'>You cannot place \the [src] on this spot!</span>")
to_chat(user, span_warning("You cannot place \the [src] on this spot!"))
return
playsound(src, 'sound/machines/click.ogg', 75, 1)
user.visible_message("\The [user] attaches \the [src] to the wall.",
"<span class='notice'>You attach \the [src] to the wall.</span>",
"<span class='italics'>You hear clicking.</span>")
span_notice("You attach \the [src] to the wall."),
span_italics("You hear clicking."))
if(istype(user, /mob/living/silicon/robot)) //Robots cannot unequip/drop items, for Safety Reasons.
forceMove(T)
user.drop_item(T)

View File

@@ -70,7 +70,7 @@ a creative player the means to solve many problems. Circuits are held inside an
var/input = sanitizeSafe(tgui_input_text(usr, "What do you want to name the circuit?", "Rename", src.name, MAX_NAME_LEN), MAX_NAME_LEN)
if(src && input && assembly.check_interactivity(M))
to_chat(M, "<span class='notice'>The circuit '[src.name]' is now labeled '[input]'.</span>")
to_chat(M, span_notice("The circuit '[src.name]' is now labeled '[input]'."))
displayed_name = input
/obj/item/integrated_circuit/tgui_state(mob/user)
@@ -193,7 +193,7 @@ a creative player the means to solve many problems. Circuits are held inside an
if(pin)
debugger.write_data(pin, usr)
else
to_chat(usr, "<span class='warning'>You can't do a whole lot without the proper tools.</span>")
to_chat(usr, span_warning("You can't do a whole lot without the proper tools."))
return
if("scan")
@@ -202,9 +202,9 @@ a creative player the means to solve many problems. Circuits are held inside an
if(D.accepting_refs)
D.afterattack(src, usr, TRUE)
else
to_chat(usr, "<span class='warning'>The Debugger's 'ref scanner' needs to be on.</span>")
to_chat(usr, span_warning("The Debugger's 'ref scanner' needs to be on."))
else
to_chat(usr, "<span class='warning'>You need a multitool/debugger set to 'ref' mode to do that.</span>")
to_chat(usr, span_warning("You need a multitool/debugger set to 'ref' mode to do that."))
return
@@ -224,10 +224,10 @@ a creative player the means to solve many problems. Circuits are held inside an
/obj/item/integrated_circuit/proc/remove(mob/user)
var/obj/item/electronic_assembly/A = assembly
if(!A)
to_chat(user, "<span class='warning'>This circuit is not in an assembly!</span>")
to_chat(user, span_warning("This circuit is not in an assembly!"))
return
if(!removable)
to_chat(user, "<span class='warning'>\The [src] seems to be permanently attached to the case.</span>")
to_chat(user, span_warning("\The [src] seems to be permanently attached to the case."))
return
var/obj/item/electronic_assembly/ea = loc
@@ -237,7 +237,7 @@ a creative player the means to solve many problems. Circuits are held inside an
forceMove(T)
assembly = null
playsound(T, 'sound/items/Crowbar.ogg', 50, 1)
to_chat(user, "<span class='notice'>You pop \the [src] out of the case, and slide it out.</span>")
to_chat(user, span_notice("You pop \the [src] out of the case, and slide it out."))
if(istype(ea))
ea.tgui_interact(user)
@@ -291,4 +291,4 @@ a creative player the means to solve many problems. Circuits are held inside an
return
/obj/item/integrated_circuit/proc/on_unanchored()
return
return

View File

@@ -157,16 +157,16 @@ list[](
new_data = tgui_input_text(usr, "Now type in a string.","[src] string writing", istext(default) ? default : null, MAX_NAME_LEN)
new_data = sanitize(new_data,MAX_NAME_LEN)
if(istext(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
to_chat(user, span_notice("You input [new_data] into the pin."))
return new_data
if("number")
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", isnum(default) ? default : null, MAX_NAME_LEN)
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
to_chat(user, span_notice("You input [new_data] into the pin."))
return new_data
if("null")
if(holder.check_interactivity(user))
to_chat(user, "<span class='notice'>You clear the pin's memory.</span>")
to_chat(user, span_notice("You clear the pin's memory."))
return new_data
// Basically a null check
@@ -180,7 +180,7 @@ list[](
/datum/integrated_io/activate/ask_for_pin_data(mob/user) // This just pulses the pin.
holder.check_then_do_work(ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [holder]'s [src] pin.</span>")
to_chat(user, span_notice("You pulse \the [holder]'s [src] pin."))
/datum/integrated_io/activate
name = "activation pin"

View File

@@ -210,14 +210,14 @@
if(!debug)
if(!Adjacent(usr))
to_chat(usr, "<span class='notice'>You are too far away from \the [src].</span>")
to_chat(usr, span_notice("You are too far away from \the [src]."))
if(metal - cost < 0)
to_chat(usr, "<span class='warning'>You need [cost] metal to build that!.</span>")
to_chat(usr, span_warning("You need [cost] metal to build that!."))
return 1
metal -= cost
var/obj/item/built = new build_type(get_turf(loc))
usr.put_in_hands(built)
to_chat(usr, "<span class='notice'>[capitalize(built.name)] printed.</span>")
to_chat(usr, span_notice("[capitalize(built.name)] printed."))
playsound(src, 'sound/items/jaws_pry.ogg', 50, TRUE)
return TRUE

View File

@@ -5,7 +5,7 @@
/datum/integrated_io/char/ask_for_pin_data(mob/user)
var/new_data = tgui_input_text(usr, "Please type in one character.","[src] char writing")
if(holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data ? "new_data" : "NULL"] into the pin.</span>")
to_chat(user, span_notice("You input [new_data ? "new_data" : "NULL"] into the pin."))
write_data_to_pin(new_data)
/datum/integrated_io/char/write_data_to_pin(var/new_data)
@@ -24,4 +24,4 @@
push_data()
/datum/integrated_io/char/display_pin_type()
return IC_FORMAT_CHAR
return IC_FORMAT_CHAR

View File

@@ -5,7 +5,7 @@
/datum/integrated_io/color/ask_for_pin_data(mob/user)
var/new_data = input(usr, "Please select a color.","[src] color writing", data ? data : "#000000") as null|color
if(holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input a <font color='[new_data]'>new color</font> into the pin.</span>")
to_chat(user, span_notice("You input a <font color='[new_data]'>new color</font> into the pin."))
write_data_to_pin(new_data)
/datum/integrated_io/color/write_data_to_pin(var/new_data)
@@ -41,4 +41,4 @@
/datum/integrated_io/color/display_data(var/input)
if(!isnull(data))
return "(<font color='[data]'>[data]</font>)"
return ..()
return ..()

View File

@@ -16,7 +16,7 @@
Up = [UP],\n\
Down = [DOWN]","[src] dir writing")
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
to_chat(user, span_notice("You input [new_data] into the pin."))
write_data_to_pin(new_data)
/datum/integrated_io/dir/write_data_to_pin(var/new_data)
@@ -30,4 +30,4 @@
/datum/integrated_io/dir/display_data(var/input)
if(!isnull(data))
return "([dir2text(data)])"
return ..()
return ..()

View File

@@ -39,7 +39,7 @@
/datum/integrated_io/list/proc/remove_from_list_by_position(mob/user, var/position)
var/list/my_list = data
if(!my_list.len)
to_chat(user, "<span class='warning'>The list is empty, there's nothing to remove.</span>")
to_chat(user, span_warning("The list is empty, there's nothing to remove."))
return
if(!position)
return
@@ -50,7 +50,7 @@
/datum/integrated_io/list/proc/remove_from_list(mob/user, var/target_entry)
var/list/my_list = data
if(!my_list.len)
to_chat(user, "<span class='warning'>The list is empty, there's nothing to remove.</span>")
to_chat(user, span_warning("The list is empty, there's nothing to remove."))
return
if(!target_entry)
target_entry = tgui_input_list(usr, "Which piece of data do you want to remove?", "Remove", my_list)
@@ -60,7 +60,7 @@
/datum/integrated_io/list/proc/edit_in_list(mob/user, var/target_entry)
var/list/my_list = data
if(!my_list.len)
to_chat(user, "<span class='warning'>The list is empty, there's nothing to modify.</span>")
to_chat(user, span_warning("The list is empty, there's nothing to modify."))
return
if(!target_entry)
target_entry = tgui_input_list(usr, "Which piece of data do you want to edit?", "Edit", my_list)
@@ -72,7 +72,7 @@
/datum/integrated_io/list/proc/edit_in_list_by_position(mob/user, var/position)
var/list/my_list = data
if(!my_list.len)
to_chat(user, "<span class='warning'>The list is empty, there's nothing to modify.</span>")
to_chat(user, span_warning("The list is empty, there's nothing to modify."))
return
if(!position)
return
@@ -85,7 +85,7 @@
/datum/integrated_io/list/proc/swap_inside_list(mob/user, var/first_target, var/second_target)
var/list/my_list = data
if(my_list.len <= 1)
to_chat(user, "<span class='warning'>The list is empty, or too small to do any meaningful swapping.</span>")
to_chat(user, span_warning("The list is empty, or too small to do any meaningful swapping."))
return
if(!first_target)
first_target = tgui_input_list(usr, "Which piece of data do you want to swap? (1)", "Swap", my_list)
@@ -146,4 +146,3 @@
holder.interact(usr) // Refresh the main UI,
interact(usr) // and the list UI.

View File

@@ -6,7 +6,7 @@
/datum/integrated_io/number/ask_for_pin_data(mob/user)
var/new_data = tgui_input_number(usr, "Please type in a number.","[src] number writing")
if(isnum(new_data) && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data] into the pin.</span>")
to_chat(user, span_notice("You input [new_data] into the pin."))
write_data_to_pin(new_data)
/datum/integrated_io/number/write_data_to_pin(var/new_data)
@@ -15,4 +15,4 @@
holder.on_data_written()
/datum/integrated_io/number/display_pin_type()
return IC_FORMAT_NUMBER
return IC_FORMAT_NUMBER

View File

@@ -7,7 +7,7 @@
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(new_data && holder.check_interactivity(user) )
to_chat(user, "<span class='notice'>You input [new_data ? "new_data" : "NULL"] into the pin.</span>")
to_chat(user, span_notice("You input [new_data ? "new_data" : "NULL"] into the pin."))
write_data_to_pin(new_data)
/datum/integrated_io/string/write_data_to_pin(var/new_data)

View File

@@ -21,28 +21,28 @@
/obj/item/integrated_electronics/wirer/proc/wire(var/datum/integrated_io/io, mob/user)
if(!io.holder.assembly)
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
to_chat(user, span_warning("\The [io.holder] needs to be secured inside an assembly first."))
return
if(mode == WIRE)
selected_io = io
to_chat(user, "<span class='notice'>You attach a data wire to \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
to_chat(user, span_notice("You attach a data wire to \the [selected_io.holder]'s [selected_io.name] data channel."))
mode = WIRING
update_icon()
else if(mode == WIRING)
if(io == selected_io)
to_chat(user, "<span class='warning'>Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.</span>")
to_chat(user, span_warning("Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless."))
return
if(io.io_type != selected_io.io_type)
to_chat(user, "<span class='warning'>Those two types of channels are incompatible. The first is a [selected_io.io_type], \
while the second is a [io.io_type].</span>")
return
if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly)
to_chat(user, "<span class='warning'>Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly.</span>")
to_chat(user, span_warning("Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly."))
return
selected_io.linked |= io
io.linked |= selected_io
to_chat(user, "<span class='notice'>You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].</span>")
to_chat(user, span_notice("You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name]."))
mode = WIRE
update_icon()
selected_io.holder.interact(user) // This is to update the UI.
@@ -51,10 +51,10 @@
else if(mode == UNWIRE)
selected_io = io
if(!io.linked.len)
to_chat(user, "<span class='warning'>There is nothing connected to \the [selected_io] data channel.</span>")
to_chat(user, span_warning("There is nothing connected to \the [selected_io] data channel."))
selected_io = null
return
to_chat(user, "<span class='notice'>You prepare to detach a data wire from \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
to_chat(user, span_notice("You prepare to detach a data wire from \the [selected_io.holder]'s [selected_io.name] data channel."))
mode = UNWIRING
update_icon()
return
@@ -85,18 +85,18 @@
mode = UNWIRE
if(WIRING)
if(selected_io)
to_chat(user, "<span class='notice'>You decide not to wire the data channel.</span>")
to_chat(user, span_notice("You decide not to wire the data channel."))
selected_io = null
mode = WIRE
if(UNWIRE)
mode = WIRE
if(UNWIRING)
if(selected_io)
to_chat(user, "<span class='notice'>You decide not to disconnect the data channel.</span>")
to_chat(user, span_notice("You decide not to disconnect the data channel."))
selected_io = null
mode = UNWIRE
update_icon()
to_chat(user, "<span class='notice'>You set \the [src] to [mode].</span>")
to_chat(user, span_notice("You set \the [src] to [mode]."))
#undef WIRE
#undef WIRING
@@ -126,25 +126,25 @@
new_data = sanitizeSafe(new_data, MAX_MESSAGE_LEN, 0, 0)
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to \"[new_data]\".</span>")
to_chat(user, span_notice("You set \the [src]'s memory to \"[new_data]\"."))
if("number")
accepting_refs = 0
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", min_value=-INFINITY, round_value=FALSE)
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
data_to_write = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [new_data].</span>")
to_chat(user, span_notice("You set \the [src]'s memory to [new_data]."))
if("ref")
accepting_refs = 1
to_chat(user, "<span class='notice'>You turn \the [src]'s ref scanner on. Slide it across \
an object for a ref of that object to save it in memory.</span>")
if("null")
data_to_write = null
to_chat(user, "<span class='notice'>You set \the [src]'s memory to absolutely nothing.</span>")
to_chat(user, span_notice("You set \the [src]'s memory to absolutely nothing."))
/obj/item/integrated_electronics/debugger/afterattack(atom/target, mob/living/user, proximity)
if(accepting_refs && proximity)
data_to_write = WEAKREF(target)
visible_message("<span class='notice'>[user] slides \a [src]'s over \the [target].</span>")
visible_message(span_notice("[user] slides \a [src]'s over \the [target]."))
to_chat(user, "<span class='notice'>You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \
now off.</span>")
accepting_refs = 0
@@ -157,10 +157,10 @@
var/datum/weakref/w = data_to_write
var/atom/A = w.resolve()
data_to_show = A.name
to_chat(user, "<span class='notice'>You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].</span>")
to_chat(user, span_notice("You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder]."))
else if(io.io_type == PULSE_CHANNEL)
io.holder.check_then_do_work(ignore_power = TRUE)
to_chat(user, "<span class='notice'>You pulse \the [io.holder]'s [io].</span>")
to_chat(user, span_notice("You pulse \the [io.holder]'s [io]."))
io.holder.interact(user) // This is to update the UI.
@@ -175,7 +175,7 @@
/obj/item/multitool/attack_self(mob/user)
if(selected_io)
selected_io = null
to_chat(user, "<span class='notice'>You clear the wired connection from the multitool.</span>")
to_chat(user, span_notice("You clear the wired connection from the multitool."))
else
..()
update_icon()
@@ -198,41 +198,41 @@
/obj/item/multitool/proc/wire(var/datum/integrated_io/io, mob/user)
if(!io.holder.assembly)
to_chat(user, "<span class='warning'>\The [io.holder] needs to be secured inside an assembly first.</span>")
to_chat(user, span_warning("\The [io.holder] needs to be secured inside an assembly first."))
return
if(selected_io)
if(io == selected_io)
to_chat(user, "<span class='warning'>Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.</span>")
to_chat(user, span_warning("Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless."))
return
if(io.io_type != selected_io.io_type)
to_chat(user, "<span class='warning'>Those two types of channels are incompatible. The first is a [selected_io.io_type], \
while the second is a [io.io_type].</span>")
return
if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly)
to_chat(user, "<span class='warning'>Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly.</span>")
to_chat(user, span_warning("Both \the [io.holder] and \the [selected_io.holder] need to be inside the same assembly."))
return
selected_io.linked |= io
io.linked |= selected_io
to_chat(user, "<span class='notice'>You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].</span>")
to_chat(user, span_notice("You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name]."))
selected_io.holder.interact(user) // This is to update the UI.
selected_io = null
else
selected_io = io
to_chat(user, "<span class='notice'>You link \the multitool to \the [selected_io.holder]'s [selected_io.name] data channel.</span>")
to_chat(user, span_notice("You link \the multitool to \the [selected_io.holder]'s [selected_io.name] data channel."))
update_icon()
/obj/item/multitool/proc/unwire(var/datum/integrated_io/io1, var/datum/integrated_io/io2, mob/user)
if(!io1.linked.len || !io2.linked.len)
to_chat(user, "<span class='warning'>There is nothing connected to the data channel.</span>")
to_chat(user, span_warning("There is nothing connected to the data channel."))
return
if(!(io1 in io2.linked) || !(io2 in io1.linked) )
to_chat(user, "<span class='warning'>These data pins aren't connected!</span>")
to_chat(user, span_warning("These data pins aren't connected!"))
return
else
io1.linked.Remove(io2)
@@ -245,7 +245,7 @@
/obj/item/multitool/afterattack(atom/target, mob/living/user, proximity)
if(accepting_refs && toolmode == MULTITOOL_MODE_INTCIRCUITS && proximity)
weakref_wiring = WEAKREF(target)
visible_message("<span class='notice'>[user] slides \a [src]'s over \the [target].</span>")
visible_message(span_notice("[user] slides \a [src]'s over \the [target]."))
to_chat(user, "<span class='notice'>You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \
now off.</span>")
accepting_refs = 0

View File

@@ -20,7 +20,7 @@
/obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use.
to_chat(user, "<span class='notice'>You press the button labeled '[src.displayed_name]'.</span>")
to_chat(user, span_notice("You press the button labeled '[src.displayed_name]'."))
activate_pin(1)
/obj/item/integrated_circuit/input/toggle_button
@@ -38,7 +38,7 @@
set_pin_data(IC_OUTPUT, 1, !get_pin_data(IC_OUTPUT, 1))
push_data()
activate_pin(1)
to_chat(user, "<span class='notice'>You toggle the button labeled '[src.displayed_name]' [get_pin_data(IC_OUTPUT, 1) ? "on" : "off"].</span>")
to_chat(user, span_notice("You toggle the button labeled '[src.displayed_name]' [get_pin_data(IC_OUTPUT, 1) ? "on" : "off"]."))
/obj/item/integrated_circuit/input/numberpad
name = "number pad"

View File

@@ -32,13 +32,13 @@
if(istype(O, /obj/item/gun))
var/obj/item/gun/gun = O
if(installed_gun)
to_chat(user, "<span class='warning'>There's already a weapon installed.</span>")
to_chat(user, span_warning("There's already a weapon installed."))
return
user.drop_from_inventory(gun)
installed_gun = gun
size += gun.w_class
gun.forceMove(src)
to_chat(user, "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>")
to_chat(user, span_notice("You slide \the [gun] into the firing mechanism."))
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
else
..()
@@ -46,12 +46,12 @@
/obj/item/integrated_circuit/manipulation/weapon_firing/attack_self(var/mob/user)
if(installed_gun)
installed_gun.forceMove(get_turf(src))
to_chat(user, "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>")
to_chat(user, span_notice("You slide \the [installed_gun] out of the firing mechanism."))
size = initial(size)
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
installed_gun = null
else
to_chat(user, "<span class='notice'>There's no weapon to remove from the mechanism.</span>")
to_chat(user, span_notice("There's no weapon to remove from the mechanism."))
/obj/item/integrated_circuit/manipulation/weapon_firing/do_work()
if(!installed_gun)
@@ -160,9 +160,9 @@
/obj/item/integrated_circuit/manipulation/grenade/attackby(var/obj/item/grenade/G, var/mob/user)
if(istype(G))
if(attached_grenade)
to_chat(user, "<span class='warning'>There is already a grenade attached!</span>")
to_chat(user, span_warning("There is already a grenade attached!"))
else if(user.unEquip(G, force=1))
user.visible_message("<span class='warning'>\The [user] attaches \a [G] to \the [src]!</span>", "<span class='notice'>You attach \the [G] to \the [src].</span>")
user.visible_message(span_warning("\The [user] attaches \a [G] to \the [src]!"), span_notice("You attach \the [G] to \the [src]."))
attach_grenade(G)
G.forceMove(src)
else
@@ -170,7 +170,7 @@
/obj/item/integrated_circuit/manipulation/grenade/attack_self(var/mob/user)
if(attached_grenade)
user.visible_message("<span class='warning'>\The [user] removes \an [attached_grenade] from \the [src]!</span>", "<span class='notice'>You remove \the [attached_grenade] from \the [src].</span>")
user.visible_message(span_warning("\The [user] removes \an [attached_grenade] from \the [src]!"), span_notice("You remove \the [attached_grenade] from \the [src]."))
user.put_in_any_hand_if_possible(attached_grenade) || attached_grenade.dropInto(loc)
detach_grenade()
else

View File

@@ -100,26 +100,26 @@
new_data = sanitize(new_data,MAX_NAME_LEN)
if(istext(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [O.display_data(O.data)].</span>")
to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)]."))
if("number")
accepting_refs = 0
new_data = tgui_input_number(usr, "Now type in a number.","[src] number writing", MAX_NAME_LEN)
if(isnum(new_data) && CanInteract(user, GLOB.tgui_physical_state))
O.data = new_data
to_chat(user, "<span class='notice'>You set \the [src]'s memory to [O.display_data(O.data)].</span>")
to_chat(user, span_notice("You set \the [src]'s memory to [O.display_data(O.data)]."))
if("ref")
accepting_refs = 1
to_chat(user, "<span class='notice'>You turn \the [src]'s ref scanner on. Slide it across \
an object for a ref of that object to save it in memory.</span>")
if("null")
O.data = null
to_chat(user, "<span class='notice'>You set \the [src]'s memory to absolutely nothing.</span>")
to_chat(user, span_notice("You set \the [src]'s memory to absolutely nothing."))
/obj/item/integrated_circuit/memory/constant/afterattack(atom/target, mob/living/user, proximity)
if(accepting_refs && proximity)
var/datum/integrated_io/O = outputs[1]
O.data = WEAKREF(target)
visible_message("<span class='notice'>[user] slides \a [src]'s over \the [target].</span>")
visible_message(span_notice("[user] slides \a [src]'s over \the [target]."))
to_chat(user, "<span class='notice'>You set \the [src]'s memory to a reference to [O.display_data(O.data)]. The ref scanner is \
now off.</span>")
accepting_refs = 0

View File

@@ -43,7 +43,7 @@
var/list/nearby_things = range(0, get_turf(src))
for(var/mob/M in nearby_things)
var/obj/O = assembly ? assembly : src
to_chat(M, "<span class='notice'>[icon2html(O,M.client)] [stuff_to_display]</span>")
to_chat(M, span_notice("[icon2html(O,M.client)] [stuff_to_display]"))
/obj/item/integrated_circuit/output/screen/large
name = "large screen"
@@ -56,7 +56,7 @@
/obj/item/integrated_circuit/output/screen/large/do_work()
..()
var/obj/O = assembly ? loc : assembly
O.visible_message("<span class='notice'>[icon2html(O,viewers(O))] [stuff_to_display]</span>")
O.visible_message(span_notice("[icon2html(O,viewers(O))] [stuff_to_display]"))
/obj/item/integrated_circuit/output/light
name = "light"

View File

@@ -87,5 +87,5 @@
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
sparks.set_up(3, 0, get_turf(src))
sparks.start()
visible_message("<span class='warning'>\The [assembly] makes some sparks!</span>")
qdel(sparks)
visible_message(span_warning("\The [assembly] makes some sparks!"))
qdel(sparks)

View File

@@ -106,7 +106,7 @@
if(isliving(AM))
var/mob/living/L = AM
var/turf/T = get_turf(AM)
T.visible_message("<span class='warning'>[src] is trying to inject [L]!</span>")
T.visible_message(span_warning("[src] is trying to inject [L]!"))
sleep(3 SECONDS)
if(!L.can_be_injected_by(src))
activate_pin(3)
@@ -114,8 +114,8 @@
var/contained = reagents.get_reagents()
var/trans = reagents.trans_to_mob(L, transfer_amount, CHEM_BLOOD)
message_admins("[src] injected \the [L] with [trans]u of [contained].")
to_chat(AM, "<span class='notice'>You feel a tiny prick!</span>")
visible_message("<span class='warning'>[src] injects [L]!</span>")
to_chat(AM, span_notice("You feel a tiny prick!"))
visible_message(span_warning("[src] injects [L]!"))
else
reagents.trans_to(AM, transfer_amount)
else
@@ -163,14 +163,14 @@
on_reagent_change()
reagents.handle_reactions()
B = null
visible_message( "<span class='notice'>Machine takes a blood sample from [target].</span>")
visible_message( span_notice("Machine takes a blood sample from [target]."))
else
activate_pin(3)
return
else //if not mob
if(!target.reagents.total_volume)
visible_message( "<span class='notice'>[target] is empty.</span>")
visible_message( span_notice("[target] is empty."))
activate_pin(3)
return
target.reagents.trans_to_obj(src, tramount)