API:TomeIsAchievementsEntryUnlocked
From RoR Wiki
UI Lua API · Tome functions
Version: WAR 1.4.8
Returns whether the player has unlocked (completed) an achievement entry in the Tome of Knowledge.
unlocked = TomeIsAchievementsEntryUnlocked(entryId)
Arguments
- entryId
number– Achievement entry id.
Returns
- unlocked
boolean–trueif the entry is unlocked;falseif it is locked or the id is unknown.
Details
- Unknown ids return
falsewithout an error. - The argument check is shared with TomeGetAchievementsEntryData: if the argument is missing or not a number, the Invalid Parameters message names that function.
- The stock UI never calls this function. It uses the
isUnlockedfield of the entries from TomeGetAchievementsSubTypeData instead. - Exactly one argument must be passed.
Errors
None besides the Invalid Parameters argument check.
Example
A minimal example built from the signature:
if TomeIsAchievementsEntryUnlocked( entryId ) then
local entryData = TomeGetAchievementsEntryData( entryId )
end
