Incorporate Neerti preferences

This commit is contained in:
Cerebulon
2021-08-11 02:07:02 +01:00
parent 3e735591b6
commit 8a1a14a4fa
2 changed files with 13 additions and 3 deletions

View File

@@ -285,6 +285,13 @@ var/list/_client_preferences_by_type
var/datum/plane_holder/PH = preference_mob.plane_holder var/datum/plane_holder/PH = preference_mob.plane_holder
PH.set_vis(VIS_STATUS, enabled) PH.set_vis(VIS_STATUS, enabled)
/datum/client_preference/show_lore_news
description = "Lore News Popup"
key = "NEWS_POPUP"
enabled_by_default = TRUE
enabled_description = "Popup New On Login"
disabled_description = "Do Nothing"
/******************** /********************
* Staff Preferences * * Staff Preferences *
********************/ ********************/

View File

@@ -72,14 +72,17 @@
output += "<p>[href(src, list("give_feedback" = 1), "Give Feedback")]</p>" output += "<p>[href(src, list("give_feedback" = 1), "Give Feedback")]</p>"
if(GLOB.news_data.station_newspaper) if(GLOB.news_data.station_newspaper)
output += "<a href='byond://?src=\ref[src];open_station_news=1'>Show [using_map.station_name] News</A>" if(client.prefs.lastlorenews == GLOB.news_data.newsindex)
output += "<a href='byond://?src=\ref[src];open_station_news=1'>Show [using_map.station_name] News</A>"
else
output += "<a href='byond://?src=\ref[src];open_station_news=1'>Show [using_map.station_name] News (NEW!)</A>"
output += "</div>" output += "</div>"
if (client.prefs.lastlorenews == GLOB.news_data.newsindex) if (client.prefs.lastlorenews == GLOB.news_data.newsindex)
client.seen_news = 1 client.seen_news = 1
if(GLOB.news_data.station_newspaper && !client.seen_news) 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) show_latest_news(GLOB.news_data.station_newspaper)
client.prefs.lastnews = GLOB.news_data.newsindex client.prefs.lastnews = GLOB.news_data.newsindex
SScharacter_setup.queue_preferences_save(client.prefs) SScharacter_setup.queue_preferences_save(client.prefs)