refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+6 -6
View File
@@ -19,23 +19,23 @@
// Pairing
/obj/item/juke_remote/proc/pair_juke(obj/machinery/media/jukebox/juke, mob/user)
if(paired_juke)
to_chat(user, "<span class='warning'>The [src] is already paired to [paired_juke == juke ? "that" : "a different"] jukebox.</span>")
to_chat(user, span_warning("The [src] is already paired to [paired_juke == juke ? "that" : "a different"] jukebox."))
return
paired_juke = juke
LAZYDISTINCTADD(paired_juke.remotes, src)
to_chat(user, "<span class='notice'>You pair the [src] to the [juke].</span>")
to_chat(user, span_notice("You pair the [src] to the [juke]."))
icon_state = "[initial(icon_state)]_ready"
/obj/item/juke_remote/proc/unpair_juke(mob/user)
if(!paired_juke)
to_chat(user, "<span class='warning'>The [src] isn't paired to anything.</span>")
to_chat(user, span_warning("The [src] isn't paired to anything."))
return
LAZYREMOVE(paired_juke.remotes, src)
paired_juke = null
icon_state = initial(icon_state)
unanchor()
detach_area()
to_chat(user, "<span class='notice'>You unpair the [src].</span>")
to_chat(user, span_notice("You unpair the [src]."))
icon_state = "[initial(icon_state)]"
/obj/item/juke_remote/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
@@ -93,7 +93,7 @@
A.media_source = paired_juke
update_music()
return TRUE
/obj/item/juke_remote/proc/detach_area()
if(!our_area || (paired_juke && our_area.media_source != paired_juke))
return
@@ -108,4 +108,4 @@
// Send update to clients.
for(var/mob/M in mobs_in_area(our_area))
if(M?.client)
M.update_music()
M.update_music()
+2 -2
View File
@@ -60,7 +60,7 @@
/client/proc/set_new_volume(var/mob/user)
if(QDELETED(src.media) || !istype(src.media))
to_chat(user, "<span class='warning'>You have no media datum to change, if you're not in the lobby tell an admin.</span>")
to_chat(user, span_warning("You have no media datum to change, if you're not in the lobby tell an admin."))
return
var/value = input(usr, "Choose your Jukebox volume.", "Jukebox volume", media.volume)
value = round(max(0, min(100, value)))
@@ -141,7 +141,7 @@
return
if(!owner.prefs.read_preference(/datum/preference/toggle/play_jukebox) && url != "")
return // Don't send anything other than a cancel to people with SOUND_STREAMING pref disabled
MP_DEBUG("<span class='good'>Sending update to mediapanel ([url], [(world.time - start_time) / 10], [volume * source_volume])...</span>")
MP_DEBUG(span_good("Sending update to mediapanel ([url], [(world.time - start_time) / 10], [volume * source_volume])..."))
owner << output(list2params(list(url, (world.time - start_time) / 10, volume * source_volume)), "[WINDOW_ID]:SetMusic")
/datum/media_manager/proc/push_music(var/targetURL, var/targetStartTime, var/targetVolume)
+5 -5
View File
@@ -54,7 +54,7 @@
STOP_PROCESSING(SSobj, src)
if(deployed_headpods)
restore_headpods()
to_chat(listener, "<span class='notice'>You are no longer wearing the [src]'s headphones.</span>")
to_chat(listener, span_notice("You are no longer wearing the [src]'s headphones."))
listener = null
update_icon()
@@ -63,7 +63,7 @@
remove_listener()
listener = L
START_PROCESSING(SSobj, src)
to_chat(L, "<span class='notice'>You put the [src]'s headphones on and power it up, preparing to listen to some <b>sick tunes</b>.</span>")
to_chat(L, span_notice("You put the [src]'s headphones on and power it up, preparing to listen to some <b>sick tunes</b>."))
update_icon()
/obj/item/walkpod/proc/update_music()
@@ -73,7 +73,7 @@
if(L == listener && check_listener())
tgui_interact(L)
else if(loc == L) // at least they're holding it
to_chat(L, "<span class='warning'>Turn on the [src] first.</span>")
to_chat(L, span_warning("Turn on the [src] first."))
/obj/item/walkpod/attack_self(mob/living/L)
if(!istype(L) || loc != L)
@@ -230,7 +230,7 @@
if(!istype(L))
return
if(deployed_headpods)
to_chat(usr, "<span class='warning'>The HeadPods are already deployed!</span>")
to_chat(usr, span_warning("The HeadPods are already deployed!"))
return
deployed_headpods = new ()
L.put_in_any_hand_if_possible(deployed_headpods)
@@ -247,7 +247,7 @@
return
if(listener)
to_chat(listener, "<span class='notice'>The headphone cable reunites the [deployed_headpods] with the [src] by retracting inwards.</span>")
to_chat(listener, span_notice("The headphone cable reunites the [deployed_headpods] with the [src] by retracting inwards."))
if(istype(potential_holder))
potential_holder.unEquip(deployed_headpods, force = TRUE)