/mob/dead/observer/verb/read_news() set name = "Read Newscaster" set desc = "Open a list of available news channels" set category = "Ghost" var/datum/browser/B = new(src, "ghost_news_list", "Channel List", 450, 600) B.set_content(render_news_channel_list()) B.open() /mob/dead/observer/Topic(href, href_list) . = ..() if(href_list["show_news_channel"]) var/datum/D = locate(href_list["show_news_channel"]) if(istype(D, /datum/news/feed_channel)) //safety render_news_channel(D) /mob/dead/observer/proc/render_news_channel_list() var/datum/news_network/news_network = GLOB.news_network var/list/content = list() for(var/i in news_network.network_channels) var/datum/news/feed_channel/FC = i content += "[FC.channel_name] ([length(FC.messages)] messages)[FC.locked? " (LOCKED)":""][FC.censored? " (CENSORED)":""][FC.is_admin_channel? " (ADMIN)":""]" return content.Join("
") /mob/dead/observer/proc/render_news_channel(datum/news/feed_channel/FC) var/list/content = list() content += "[FC.channel_name]: \[created by: [FC.returnAuthor(-1)]\]
" if(FC.censored) content += "ATTENTION: This channel has been deemed as threatening to the welfare of the station, and marked with a Nanotrasen D-Notice.
" content += "No further feed story additions are allowed while the D-Notice is in effect.

" if(!length(FC.messages)) content += "This channel is empty.
" else for(var/i in FC.messages) var/datum/news/feed_message/FM = i content += "-[FM.returnBody(-1)]
" if(FM.img) src << browse_rsc(FM.img, "tmp_photo[i].png") content += "
" if(FM.caption) content += "[FM.caption]
" content += "
" content += "\[Story by [FM.returnAuthor(-1)] \] - ([FM.time_stamp])
" content += "[FM.comments.len] comment[FM.comments.len > 1 ? "s" : ""]
" for(var/c in FM.comments) var/datum/news/feed_comment/comment = c content += "[comment.body]
[comment.author] [comment.time_stamp]
" if(FM.locked) content += "Comments locked
" var/datum/browser/popup = new(src, "ghost_news_channel", 450, 900) popup.set_content(content.Join("")) popup.open()