From 8f7ac1e5a26c0cdd4c4bbf51dc18b74fe0e5920d Mon Sep 17 00:00:00 2001 From: PrairieAstronomer Date: Fri, 1 Jul 2022 13:11:26 -0600 Subject: [PATCH] Not Quite 'Nine' Lives Advancement --- mods/HUD/mcl_achievements/init.lua | 6 ++++++ mods/ITEMS/mcl_beds/respawn_anchor.lua | 3 +++ 2 files changed, 9 insertions(+) diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index 84ef88243..53b3a453a 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -206,6 +206,12 @@ awards.register_achievement("mcl:sweetDreams", { icon = "mcl_beds_bed_red.png", }) +awards.register_achievement("mcl:notQuiteNineLives", { + title = S('Not Quite "Nine" Lives'), + description = S("Charge a Respawn Anchor to the maximum."), + icon = "respawn_anchor_side4.png", +}) + -- Triggered in mobs_mc awards.register_achievement("mcl:whatAdeal", { title = S("What A Deal!"), diff --git a/mods/ITEMS/mcl_beds/respawn_anchor.lua b/mods/ITEMS/mcl_beds/respawn_anchor.lua index a19a986ce..bb36fe9d0 100644 --- a/mods/ITEMS/mcl_beds/respawn_anchor.lua +++ b/mods/ITEMS/mcl_beds/respawn_anchor.lua @@ -39,6 +39,9 @@ for i=0,4 do elseif string.match(node.name, "mcl_beds:respawn_anchor_charged_") then minetest.chat_send_player(player.get_player_name(player), S"New respawn position set!") mcl_spawn.set_spawn_pos(player, pos, nil) + if i == 4 then + awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives") + end end end