From 13eb5dcdaefebbbef3b73fe5350752ed89e19a3f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 30 Aug 2016 14:08:19 +0200 Subject: Add optional default description for triggers --- api.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'api.lua') 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) -- cgit v1.2.3