API:TomeIsPlayerTitleUnlocked
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns whether the player has unlocked a title.
unlocked = TomeIsPlayerTitleUnlocked(titleId)
Arguments
- titleId
number– Title id.
Returns
- unlocked
boolean–trueif the title is unlocked;falseif it is locked or the id is unknown.
Details
- Unknown ids return
falsewithout an error. - This is the same test that decides whether TomeGetPlayerTitleData returns data and whether TomeSetActivePlayerTitle accepts the title.
- The stock UI never calls this function.
Errors
None besides the Invalid Parameters argument check.
Example
A minimal example built from the signature:
if( TomeIsPlayerTitleUnlocked( titleId ) ) then
TomeSetActivePlayerTitle( titleId )
end
