From 2845cd79b7cd8427efd0a4f69e62fd522ba01e56 Mon Sep 17 00:00:00 2001 From: PrairieAstronomer Date: Fri, 1 Jul 2022 14:37:02 -0600 Subject: [PATCH] Local Brewery Advancement --- mods/HUD/mcl_achievements/init.lua | 7 +++++++ mods/HUD/mcl_achievements/locale/template.txt | 2 ++ mods/ITEMS/mcl_brewing/init.lua | 3 +++ 3 files changed, 12 insertions(+) diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index c6235963a8..424cc1364b 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -246,6 +246,13 @@ awards.register_achievement("mcl:seriousDedication", { icon = "farming_tool_netheritehoe.png", }) +-- Triggered in mcl_brewing +awards.register_achievement("mcl:localBrewery", { + title = S("Local Brewery"), + description = S("Brew a Potion.\nHint: Take a potion or glass bottle out of the brewing stand."), + icon = "mcl_potions_potion_overlay.png^[colorize:#F82423:"..tostring(127).."^mcl_potions_potion_bottle.png", +}) + -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) if non_pc_achievements then diff --git a/mods/HUD/mcl_achievements/locale/template.txt b/mods/HUD/mcl_achievements/locale/template.txt index 240d97a28f..1fd4bc7185 100644 --- a/mods/HUD/mcl_achievements/locale/template.txt +++ b/mods/HUD/mcl_achievements/locale/template.txt @@ -69,3 +69,5 @@ Country Lode,@nTake Me Home= Use a compass on a Lodestone.= Serious Dedication= Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.= +Local Brewery= +Brew a Potion.@nHint: Take a potion or glass bottle out of the brewing stand.= diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index 2ff2a806f0..9c68794306 100644 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -369,6 +369,9 @@ local function allow_take(pos, listname, index, stack, player) minetest.record_protection_violation(pos, name) return 0 else + if listname == "stand" then + awards.unlock(name, "mcl:localBrewery") + end return stack:get_count() end end