From c6da0a69de420fb78ca3c1874683e26311d22c2b Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 3 Sep 2019 23:05:19 +0200 Subject: [PATCH] Remove mineturtle achievement if peaceful only --- mods/mobs/achievements.lua | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/mods/mobs/achievements.lua b/mods/mobs/achievements.lua index b99e36e..e058681 100644 --- a/mods/mobs/achievements.lua +++ b/mods/mobs/achievements.lua @@ -15,13 +15,17 @@ achievements.register_achievement( times = 5, }) -achievements.register_achievement( - "bomb_has_been_defused", - { - title = S("Bomb has Been Defused!"), - description = S("Kill a mine turtle."), - times = 1, -}) +local peaceful_only = minetest.settings:get_bool("only_peaceful_mobs") or false + +if not peaceful_only then + achievements.register_achievement( + "bomb_has_been_defused", + { + title = S("Bomb has Been Defused!"), + description = S("Kill a mine turtle."), + times = 1, + }) +end achievements.register_achievement( "ranger",