API:PregameHasROCChanged
From RoR Wiki
UI Lua API · Pregame functions
Version: WAR 1.4.8
Returns whether the Rules of Conduct file differs from the one the player last accepted.
changed = PregameHasROCChanged()
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/ROC.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 ROC value stored in the user settings. Any difference returns
true. - The file name is the one PregameGetROCFileName returns.
Errors
None.
Example
From interfacecore/source/eularocwindow.lua, after the EULA was accepted:
BroadcastEvent( SystemData.Events.PREGAME_EULA_ACCEPTED )
if ( PregameHasROCChanged() )
then
currentMode = MODE_ROC
SetupWindowForCurrentMode( false )
else
-- ...
