From e013dd567d6cbcaa5b0608d8ae8c91e623237d09 Mon Sep 17 00:00:00 2001 From: Cerebulon Date: Thu, 19 Aug 2021 07:37:22 +0100 Subject: [PATCH] Generate news index from list --- code/modules/lore_codex/news_data/main.dm | 6 +++++- code/modules/mob/new_player/new_player.dm | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/lore_codex/news_data/main.dm b/code/modules/lore_codex/news_data/main.dm index eb1ec4a607..16270733cf 100644 --- a/code/modules/lore_codex/news_data/main.dm +++ b/code/modules/lore_codex/news_data/main.dm @@ -112,7 +112,11 @@ /datum/lore/codex/page/about_news, ) - var/newsindex = "103" //Update with number of latest article + var/newsindex + +/datum/lore/codex/category/main_news/New() + ..() + newsindex = LAZYLEN(children) /datum/lore/codex/page/about_news name = "About the Publisher" diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 0ba8b4d147..512df98a92 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -84,7 +84,7 @@ if(GLOB.news_data.station_newspaper && !client.seen_news && client.is_preference_enabled(/datum/client_preference/show_lore_news)) show_latest_news(GLOB.news_data.station_newspaper) - client.prefs.lastnews = GLOB.news_data.newsindex + client.prefs.lastlorenews = GLOB.news_data.newsindex SScharacter_setup.queue_preferences_save(client.prefs) panel = new(src, "Welcome","Welcome", 500, 480, src)