/
Bindings.lua
28 lines (24 loc) · 1.07 KB
/
Bindings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- Local instances of Global tables --
local PA = PersonalAssistant
local PAC = PA.Constants
local PAHF = PA.HelperFunctions
local PAMF = PA.MenuFunctions
-- ---------------------------------------------------------------------------------------------------------------------
local function loadProfile(profileNo)
if profileNo > 0 and profileNo <= PAC.GENERAL.MAX_PROFILES then
local activeProfile = PAMF.PAGeneral.getActiveProfile()
if activeProfile ~= profileNo then
PAMF.PAGeneral.setActiveProfile(profileNo)
-- then inform player
PAHF.println(SI_PA_CHAT_GENERAL_ACTIVE_PROFILE_ACTIVE, PA.SavedVars.General[PA.activeProfile].name)
end
end
end
-- ---------------------------------------------------------------------------------------------------------------------
-- Export
PA.Bindings = {
loadProfile = loadProfile
}
for i = 1, PAC.GENERAL.MAX_PROFILES do
ZO_CreateStringId(table.concat({"SI_BINDING_NAME_ACTIVATE_PROFILE_", tostring(i)}), table.concat({GetString(SI_PA_KB_LOAD_PROFILE), " ", tostring(i)}))
end