Autoplay after power restoration when emagged.

This commit is contained in:
Rob Nelson
2014-04-19 20:03:33 -04:00
committed by ZomgPonies
parent 6e7ec7ff21
commit ac5fcf31a5
+12 -9
View File
@@ -89,6 +89,8 @@ var/global/loopModeNames=list(
/obj/machinery/media/jukebox/power_change()
..()
if(emagged && !(stat & (NOPOWER|BROKEN)))
playing = 1
update_icon()
/obj/machinery/media/jukebox/update_icon()
@@ -138,16 +140,17 @@ var/global/loopModeNames=list(
/obj/machinery/media/jukebox/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
playlist_id = "emagged"
last_reload=world.time
playlist=null
if(istype(W, /obj/item/weapon/card/emag))
current_song=0
loop_mode = JUKEMODE_SHUFFLE
emagged = 1
user.visible_message("[user.name] emags the [src.name].","\red You short out the [src.name].")
update_icon()
update_music()
if(!emagged)
playlist_id = "emagged"
last_reload=world.time
playlist=null
loop_mode = JUKEMODE_SHUFFLE
emagged = 1
user.visible_message("[user.name] emags the [src.name].","\red You short out the [src.name].")
update_icon()
update_music()
return
/obj/machinery/media/jukebox/Topic(href, href_list)