diff --git a/code/modules/media/jukebox.dm b/code/modules/media/jukebox.dm index ce97be063c6..7456419b2f6 100644 --- a/code/modules/media/jukebox.dm +++ b/code/modules/media/jukebox.dm @@ -39,6 +39,21 @@ str += ", from '[album]'" return str + proc/displaytitle() + if(artist==""&&title=="") + return "\[NO TAGS\]" + var/str="" + if(artist!="") + str += "[artist]" + else + str += "Unattributed" + str += " - " + if(title!="") + str += "\"[title]\"" + else + str += "Untitled" + return str + var/global/loopModeNames=list( JUKEMODE_SHUFFLE = "Shuffle", @@ -96,7 +111,10 @@ var/global/loopModeNames=list( /obj/machinery/media/jukebox/update_icon() overlays = 0 if(stat & (NOPOWER|BROKEN)) - icon_state = "jukebox2-nopower" + if(stat & BROKEN) + icon_state = "jukebox2-broken" + else + icon_state = "jukebox2-nopower" stop_playing() return icon_state = "jukebox2" @@ -110,7 +128,14 @@ var/global/loopModeNames=list( return world.time > last_reload + JUKEBOX_RELOAD_COOLDOWN /obj/machinery/media/jukebox/attack_hand(var/mob/user) - if(stat & (NOPOWER|BROKEN) || emagged) + if(stat & NOPOWER) + usr << "\red You don't see anything to mess with." + return + if(stat & BROKEN && playlist!=null) + user.visible_message("\red [user.name] smacks the side of \the [src.name].","\red You hammer the side of \the [src.name].") + playlist=null + playing=emagged + update_icon() return var/t = "

Jukebox Interface

" t += "Power: [playing?"On":"Off"]
" @@ -122,7 +147,9 @@ var/global/loopModeNames=list( t += "Playlist: " for(var/plid in playlists) t += "[playlists[plid]]" - t += "
" + else + t += "Please wait before changing playlists." + t += "
" if(current_song) var/datum/song_info/song=playlist[current_song] t += "Current song: [song.artist] - [song.title]
" @@ -130,7 +157,7 @@ var/global/loopModeNames=list( var/i for(i = 1,i <= playlist.len,i++) var/datum/song_info/song=playlist[i] - t += "#[i][song.artist] - [song.title][song.album]" + t += "#[i][song.displaytitle()][song.album]" t += "" user.set_machine(src) var/datum/browser/popup = new (user,"jukebox",name,420,700) @@ -149,14 +176,16 @@ var/global/loopModeNames=list( loop_mode = JUKEMODE_SHUFFLE emagged = 1 playing = 1 - user.visible_message("[user.name] emags the [src.name].","\red You short out the [src.name].") + user.visible_message("[user.name] slides something into the [src.name]'s card-reader.","\red You short out the [src.name].") update_icon() update_music() return /obj/machinery/media/jukebox/Topic(href, href_list) ..() - if(emagged) return + if(emagged) + usr << "\red You touch the bluescreened menu. Nothing happens. You feel dumber." + return if (href_list["power"]) playing=!playing @@ -203,9 +232,14 @@ var/global/loopModeNames=list( var/songdata = reader.read_value() for(var/list/record in songdata) playlist += new /datum/song_info(record) + if(playlist.len==0) + visible_message("\icon[src] \The [src] buzzes, unable to update its playlist.","You hear a buzz.") + stat &= BROKEN + update_icon() + return visible_message("\icon[src] \The [src] beeps, and the menu on its front fills with [playlist.len] items.","You hear a beep.") else - //testing("Failed to update playlist: Response null.") + testing("[src] failed to update playlist: Response null.") stat &= BROKEN update_icon() return diff --git a/html/browser/common.css b/html/browser/common.css index 9755dd54017..49f3fdd6e94 100644 --- a/html/browser/common.css +++ b/html/browser/common.css @@ -25,6 +25,22 @@ a, a:link, a:visited, a:active, .linkOn, .linkOff cursor:default; } +a.nobg, a.nobg:link, a.nobg:visited, a.nobg:active +{ + color: #ffffff; + text-decoration: none; + background: transparent; + border: none; + padding: 0px; + margin: 0px; + cursor:default; + font-weight:bold; +} +a.nobg:hover +{ + color:#40628a; +} + a:hover { color: #40628a; diff --git a/icons/obj/jukebox.dmi b/icons/obj/jukebox.dmi index 02b3f7cb451..b4c938fb4f5 100644 Binary files a/icons/obj/jukebox.dmi and b/icons/obj/jukebox.dmi differ