mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-04 06:22:38 +00:00
Prevents Lore News Pop-up On Every Connect
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
/datum/category_item/player_setup_item/player_global/settings/load_preferences(var/savefile/S)
|
||||
S["lastchangelog"] >> pref.lastchangelog
|
||||
S["lastnews"] >> pref.lastnews
|
||||
S["lastlorenews"] >> pref.lastlorenews
|
||||
S["default_slot"] >> pref.default_slot
|
||||
S["preferences"] >> pref.preferences_enabled
|
||||
S["preferences_disabled"] >> pref.preferences_disabled
|
||||
@@ -16,6 +17,7 @@
|
||||
/datum/category_item/player_setup_item/player_global/settings/save_preferences(var/savefile/S)
|
||||
S["lastchangelog"] << pref.lastchangelog
|
||||
S["lastnews"] << pref.lastnews
|
||||
S["lastlorenews"] << pref.lastlorenews
|
||||
S["default_slot"] << pref.default_slot
|
||||
S["preferences"] << pref.preferences_enabled
|
||||
S["preferences_disabled"] << pref.preferences_disabled
|
||||
|
||||
@@ -139,6 +139,7 @@ var/list/preferences_datums = list()
|
||||
var/datum/browser/panel
|
||||
|
||||
var/lastnews // Hash of last seen lobby news content.
|
||||
var/lastlorenews //ID of last seen lore news article.
|
||||
|
||||
var/examine_text_mode = 0 // Just examine text, include usage (description_info), switch to examine panel.
|
||||
var/multilingual_mode = 0 // Default behaviour, delimiter-key-space, delimiter-key-delimiter, off
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
/datum/lore/codex/page/about_news,
|
||||
)
|
||||
|
||||
var/newsindex = "103" //Update with number of latest article
|
||||
|
||||
/datum/lore/codex/page/about_news
|
||||
name = "About the Publisher"
|
||||
data = "The <i>Daedalus Pocket Newscaster</i> is produced and maintained by Occulum Broadcast, the foremost authority on media distribution \
|
||||
|
||||
@@ -76,8 +76,13 @@
|
||||
|
||||
output += "</div>"
|
||||
|
||||
if (client.prefs.lastlorenews == GLOB.news_data.newsindex)
|
||||
client.seen_news = 1
|
||||
|
||||
if(GLOB.news_data.station_newspaper && !client.seen_news)
|
||||
show_latest_news(GLOB.news_data.station_newspaper)
|
||||
client.prefs.lastnews = GLOB.news_data.newsindex
|
||||
SScharacter_setup.queue_preferences_save(client.prefs)
|
||||
|
||||
panel = new(src, "Welcome","Welcome", 500, 480, src)
|
||||
panel.set_window_options("can_close=0")
|
||||
|
||||
@@ -7,6 +7,7 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new)
|
||||
/datum/lore/news
|
||||
var/datum/feed_channel/station_newspaper
|
||||
var/datum/lore/codex/category/main_news/news_codex = new()
|
||||
var/newsindex
|
||||
|
||||
/datum/lore/news/New()
|
||||
..()
|
||||
@@ -17,6 +18,10 @@ GLOBAL_DATUM_INIT(news_data, /datum/lore/news, new)
|
||||
break
|
||||
spawn(300) // Yes, again.
|
||||
fill_codex_news()
|
||||
if (!news_codex.newsindex)
|
||||
return
|
||||
else
|
||||
newsindex = news_codex.newsindex
|
||||
|
||||
/datum/lore/news/proc/fill_codex_news()
|
||||
if(!news_network)
|
||||
|
||||
Reference in New Issue
Block a user