-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSlightlyImprovedGameplay.lua
More file actions
33 lines (28 loc) · 1.05 KB
/
SlightlyImprovedGameplay.lua
File metadata and controls
33 lines (28 loc) · 1.05 KB
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
29
30
31
32
33
-- Slightly Improved™ Gameplay
-- The MIT License © 2016 Arthur Corenzan
local NAMESPACE = "SlightlyImprovedGameplay"
local defaultSavedVars =
{
mailSendDefaultMode = MAIL_SEND_MODE_COD,
compactPaperDoll = true,
noWorldmapWayshrines = true,
isTrashWarnerEnabled = true,
isFenceWarnerEnabled = true,
improveItemTooltip = true,
oldMailThreshold = 2,
chatAutoCompleteEnabled = true,
}
EVENT_MANAGER:RegisterForEvent(NAMESPACE, EVENT_ADD_ON_LOADED, function(eventCode, addOnName)
if (addOnName == NAMESPACE) then
local savedVars = ZO_SavedVars:New(NAMESPACE.."_SavedVars", 1, nil, defaultSavedVars)
do
local mt = getmetatable(savedVars)
local __newindex = mt.__newindex
function mt.__newindex(self, key, value)
CALLBACK_MANAGER:FireCallbacks(NAMESPACE.."_OnSavedVarChanged", key, value, self[key])
__newindex(self, key, value)
end
end
CALLBACK_MANAGER:FireCallbacks(NAMESPACE.."_OnAddOnLoaded", savedVars)
end
end)