Skip to content

Return of Reckoning

Wiki

RoR Wiki

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 – true if the file's stamp differs from the value saved in the user settings.

Details

  • The client looks up data/strings/<LANG>/pregame/EULA.txt in 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 broadcasts SystemData.Events.PREGAME_EULA_ACCEPTED when 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

See also