From 6b59573f8aaf08ee2e0d89ba3be1e7e13b202c31 Mon Sep 17 00:00:00 2001 From: cib Date: Tue, 21 Feb 2012 00:13:06 +0100 Subject: [PATCH] Added timestamps to news. --- code/game/player/news.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/player/news.dm b/code/game/player/news.dm index b8359ffe70c..213cdfddd25 100644 --- a/code/game/player/news.dm +++ b/code/game/player/news.dm @@ -4,6 +4,7 @@ datum/news/var title // the title of the news body // a body with an exact explanation author // key of the author + date // date on which this was created datum/news_topic_handler Topic(href,href_list) @@ -41,6 +42,7 @@ proc/make_news(title, body, author) created.title = title created.body = body created.author = author + created.date = world.realtime news.Insert(1, created) @@ -135,7 +137,8 @@ client/proc/display_all_news_list() for(var/datum/news/N in news) if(!(N.ID in read_news)) read_news += N.ID - output += "[N.title]
" + var/date = time2text(N.date,"MM/DD") + output += "[date] [N.title]
" output += "[N.body]
" output += "authored by [N.author]
" output += "
"