mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user