API:LoadingScreenGetPatchNotesData
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns the patch note lines for patches released since the player's last login, for the patch notes loading screen.
patchNotesData = LoadingScreenGetPatchNotesData()
Arguments
None.
Returns
- patchNotesData
tableor nothing – A table with the fields below, or nothing when there are no patch notes to show.
| Key | Type | Meaning |
|---|---|---|
mainItems |
table |
Array of wstring lines, indexed from 1. The main bullet points.
|
secondaryItems |
table |
Array of wstring lines, indexed from 1. The lesser items.
|
Details
- The client reads
interfacecore/tome/loadingscreens/patchnotes.csv. Each row has a patch timestamp, a string file name, and two string id ranges: one for main bullets and one for lesser items. - Only rows whose timestamp is not older than the last login time stored in the user settings are used.
- For those rows the named string file is loaded from the client's loading screen string folder, and the strings in the id ranges are collected into
mainItemsandsecondaryItems. - If no line was collected, the function returns nothing, so the result can be tested with
if.
Errors
None.
Example
From ea_loadingscreen/source/loadingscreen.lua:
local loadingData = LoadingScreenGetCurrentData()
local patchNotesData = nil
if( SystemData.LoadingData.initialLoad )
then
patchNotesData = LoadingScreenGetPatchNotesData()
end
if( patchNotesData )
then
EA_Window_LoadingScreen.activeMode = EA_Window_LoadingScreen.MODE_PATCH_NOTES
From ea_loadingscreen/source/patchnotesloadingscreen.lua:
CreateNoteWindows( patchNotesData.mainItems ) CreateNoteWindows( patchNotesData.secondaryItems )
