From 7f156db0df8a77793635a32db5aee474a5c26eea Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Wed, 4 Apr 2018 23:01:50 +0100 Subject: Add check for nyancat mod before registering the award Fixes #44 --- awards.lua | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'awards.lua') diff --git a/awards.lua b/awards.lua index a6e9784..ccf9e2e 100644 --- a/awards.lua +++ b/awards.lua @@ -347,19 +347,6 @@ if minetest.get_modpath("default") then } }) - -- Found a Nyan cat! - awards.register_achievement("award_nyanfind", { - secret = true, - title = S("A Cat in a Pop-Tart?!"), - description = S("Mine a nyan cat."), - icon = "nyancat_front.png", - trigger = { - type = "dig", - node = "default:nyancat", - target = 1 - } - }) - -- Mini Miner awards.register_achievement("award_mine2", { title = S("Mini Miner"), @@ -907,3 +894,18 @@ minetest.after(0, function() }, }) end) + +if minetest.get_modpath("nyancat") then + -- Found a Nyan cat! + awards.register_achievement("award_nyanfind", { + secret = true, + title = S("A Cat in a Pop-Tart?!"), + description = S("Mine a nyan cat."), + icon = "nyancat_front.png", + trigger = { + type = "dig", + node = "nyancat:nyancat", + target = 1 + } + }) +end -- cgit v1.2.3