Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeIsBestiarySpeciesUnlocked

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Returns whether the player has unlocked a bestiary species.

unlocked = TomeIsBestiarySpeciesUnlocked(speciesId)

Arguments

speciesId
number – Species id.

Returns

unlocked
boolean – true if the species is unlocked; false if it is locked or the id is unknown.

Details

  • Unknown ids return false without an error.
  • The argument check is shared with TomeGetBestiarySpeciesData: if the argument is missing or not a number, the Invalid Parameters message names that function.

Errors

None besides the Invalid Parameters argument check.

Example

From ea_tomeofknowledge/source/tomewindow_bestiary.lua:

function TomeWindow.ShowBestiarySpecies( id )
    -- Is the species unlocked?
    if( TomeIsBestiarySpeciesUnlocked(id) ~= true ) then
        return
    end

    TomeWindow.UpdateBestiarySpecies( id )
    TomeWindow.OnViewEntry( GameData.Tome.SECTION_BESTIARY, id )
end

See also