API:PregameHasEULAChanged
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns whether the End User License Agreement file differs from the one the player last accepted.
changed = PregameHasEULAChanged()
Arguments
None.
Returns
- changed
boolean–trueif the file's stamp differs from the value saved in the user settings.
Details
- The client looks up
data/strings/<LANG>/pregame/EULA.txtin the game archives, with<LANG>replaced by the client language, and reads a stamp value from its archive entry. A missing file gives 0. - That value is compared with the EULA value stored in the user settings. Any difference returns
true. - The file name is the one PregameGetEULAFileName returns.
- The stock UI shows its EULA window when this returns
true, and broadcastsSystemData.Events.PREGAME_EULA_ACCEPTEDwhen the player accepts.
Errors
None.
Example
From interfacecore/source/eularocwindow.lua:
function EA_Window_EULAROCPopup.Show()
local shouldShow = false
if ( PregameHasEULAChanged() or SystemData.Territory.KOREA )
then
shouldShow = true
currentMode = MODE_EULA
elseif ( PregameHasROCChanged() )
then
shouldShow = true
currentMode = MODE_ROC
end
