Show raw api
{
"functions": [
{
"name": "check",
"desc": "Return true if the unlock was added and false otherwise",
"params": [
{
"name": "id",
"desc": "unlock identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if specified unlock is set",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 20,
"path": "../../res/data/script/lib/system/unlock.lua"
}
},
{
"name": "add",
"desc": "Add the given unlock to the user save",
"params": [
{
"name": "id",
"desc": "unlock identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if the unlock was not added before",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 30,
"path": "../../res/data/script/lib/system/unlock.lua"
}
},
{
"name": "remove",
"desc": "Remove the given unlock from the current user save",
"params": [
{
"name": "id",
"desc": "unlock identifier",
"lua_type": "string"
}
],
"returns": [
{
"desc": "true if an unlock was removed",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 40,
"path": "../../res/data/script/lib/system/unlock.lua"
}
},
{
"name": "clear",
"desc": "Clear all unlocks from the current user save",
"params": [],
"returns": [
{
"desc": "true if any unlock was removed",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 49,
"path": "../../res/data/script/lib/system/unlock.lua"
}
}
],
"properties": [],
"types": [],
"name": "Unlock",
"desc": "The unlock interface\n\n```lua\nUnlock.add(\"rogue\")\nif Unlock.check(\"rogue\") then\n Unlock.remove(\"rogue\")\nend\n```",
"source": {
"line": 12,
"path": "../../res/data/script/lib/system/unlock.lua"
}
}