summaryrefslogtreecommitdiff
path: root/api.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-08-30 14:08:19 +0200
committerrubenwardy <rubenwardy@gmail.com>2016-09-01 16:22:37 +0100
commit13eb5dcdaefebbbef3b73fe5350752ed89e19a3f (patch)
treef474b4f629fb1cd1744dffeccc84a69872e7cad8 /api.lua
parent67946bf0c4767284fa3d557d5fed6104f7bec904 (diff)
Add optional default description for triggers
Diffstat (limited to 'api.lua')
-rw-r--r--api.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/api.lua b/api.lua
index 3dc9620..1d47014 100644
--- a/api.lua
+++ b/api.lua
@@ -140,6 +140,11 @@ function awards.register_achievement(name, def)
-- Add Award
awards.def[name] = def
+
+ local tdef = awards.def[name]
+ if def.description == nil and tdef.getDefaultDescription then
+ def.description = tdef:getDefaultDescription()
+ end
end
function awards.enable(name)