add changelog to new_player splash menu (#6613)

This commit is contained in:
Raeschen
2023-07-18 16:13:58 +02:00
committed by GitHub
parent 03d4594f04
commit 45b9acb1a0
5 changed files with 29 additions and 13 deletions

View File

@@ -27,10 +27,11 @@
debug_log = start_log("[log_path]-debug.log")
//VOREStation Edit End
// CHOMPedit Start - Better Changelogs
var/latest_changelog = file("/html/changelogs_ch/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml")
//changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently //Chomp REMOVE
//ChompADD Start - Better Changelogs
var/latest_changelog = file("html/changelogs_ch/archive/" + time2text(world.timeofday, "YYYY-MM") + ".yml")
changelog_hash = fexists(latest_changelog) ? md5(latest_changelog) : 0 //for telling if the changelog has changed recently
// CHOMPedit End
//ChompADD End
if(byond_version < RECOMMENDED_VERSION)
to_world_log("Your server's byond version does not meet the recommended requirements for this server. Please update BYOND")

View File

@@ -440,13 +440,11 @@
if(!GLOB.changelog_tgui)
GLOB.changelog_tgui = new /datum/changelog()
GLOB.changelog_tgui.tgui_interact(usr)
/*
// CHOMPedit END
if(prefs.lastchangelog != changelog_hash)
prefs.lastchangelog = changelog_hash
SScharacter_setup.queue_preferences_save(prefs)
winset(src, "rpane.changelog", "background-color=none;font-style=;")
*/ // CHOMPedit End
// winset(src, "rpane.changelog", "background-color=none;font-style=;") //ChompREMOVE
/mob/verb/observe()
set name = "Observe"

View File

@@ -68,9 +68,9 @@
output += "<p><a href='byond://?src=\ref[src];showpoll=1'>Show Player Polls</A></p>"
if(client.check_for_new_server_news())
output += "<p><b><a href='byond://?src=\ref[src];shownews=1'>Show Game Updates</A> (NEW!)</b></p>"
output += "<p><b><a href='byond://?src=\ref[src];shownews=1'>Show Server News</A><br>(NEW!)</b></p>" //ChompEDIT 'Game updates' --> 'Server news'
else
output += "<p><a href='byond://?src=\ref[src];shownews=1'>Show Game Updates</A></p>"
output += "<p><a href='byond://?src=\ref[src];shownews=1'>Show Server News</A></p>" //ChompEDIT 'Game updates' --> 'Server news'
if(SSsqlite.can_submit_feedback(client))
output += "<p>[href(src, list("give_feedback" = 1), "Give Feedback")]</p>"
@@ -81,6 +81,13 @@
else
output += "<p><b><a href='byond://?src=\ref[src];open_station_news=1'>Show [using_map.station_name] News (NEW!)</A></b></p>"
//ChompEDIT start: Show Changelog
if(client.prefs.lastchangelog == changelog_hash)
output += "<p><a href='byond://?src=\ref[src];open_changelog=1'>Show Changelog</A></p>"
else
output += "<p><b><a href='byond://?src=\ref[src];open_changelog=1'>Show Changelog</A><br>(NEW!)</b></p>"
//ChompEDIT End
output += "</div>"
if (client.prefs.lastlorenews == GLOB.news_data.newsindex)
@@ -91,7 +98,7 @@
client.prefs.lastlorenews = GLOB.news_data.newsindex
SScharacter_setup.queue_preferences_save(client.prefs)
panel = new(src, "Welcome","Welcome", 210, 300, src) // VOREStation Edit
panel = new(src, "Welcome","Welcome", 210, 320, src) // VOREStation Edit //ChompEDIT, height 300 -> 320
panel.set_window_options("can_close=0")
panel.set_content(output)
panel.open()
@@ -350,6 +357,14 @@
else
client.feedback_form = new(client)
//ChompEDIT START
if(href_list["open_changelog"])
client.prefs.lastchangelog = changelog_hash
SScharacter_setup.queue_preferences_save(client.prefs)
client.changes()
return
//ChompEDIT END
/mob/new_player/proc/handle_server_news()
if(!client)
return

View File

@@ -186,9 +186,11 @@ export class Changelog extends Component {
</p>
<p>
{'Visit our wiki '}
<a href="https://wiki.vore-station.net/Main_Page">here</a>
<a href="https://wiki.chompstation13.net/index.php/Chomp_Station_Wiki">
here
</a>
{', check out our discord server '}
<a href="https://discord.gg/BaZnwYpAzc">here</a>.
<a href="https://discord.com/invite/chompers">here</a>.
</p>
{dateDropdown}
</Section>

File diff suppressed because one or more lines are too long