mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Changelog Overhaul (#13051)
* Changelog Overhaul * SQL Update * This is why I hate merge conflicts * Comment Correction * Farie Fixes + Tested with blank DB * Colours + Titles * Colour tweaks * I fell victim to my own CI Chains! * Cleans up the remains of the old changelogs * Fixes formatting * Kyet Changes * Date
This commit is contained in:
@@ -79,7 +79,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
var/last_id
|
||||
|
||||
//game-preferences
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/lastchangelog = "1" //Saved changlog timestamp (unix epoch) to detect if there was a change. Dont set this to 0 unless you want the last changelog date to be 4x longer than the expected lifespan of the universe.
|
||||
var/exp
|
||||
var/ooccolor = "#b82e00"
|
||||
var/list/be_special = list() //Special role selection
|
||||
|
||||
@@ -491,18 +491,3 @@
|
||||
load_character(C,pick(saves))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/SetChangelog(client/C,hash)
|
||||
lastchangelog=hash
|
||||
var/datum/preferences/P = GLOB.preferences_datums[C.ckey]
|
||||
if(P.toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;font-style=none")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastchangelog='[lastchangelog]' WHERE ckey='[C.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
to_chat(C, "Couldn't update your last seen changelog, please try again later.")
|
||||
return
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user