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