forked from MineClone5/MineClone5
Sweet Dreams Advancement
This commit is contained in:
parent
2a08c60602
commit
d4828f8993
|
@ -206,6 +206,13 @@ awards.register_achievement("mcl:postMortal", {
|
|||
icon = "mcl_totems_totem.png",
|
||||
})
|
||||
|
||||
-- Triggered in mcl_beds
|
||||
awards.register_achievement("mcl:sweetDreams", {
|
||||
title = S("Sweet Dreams"),
|
||||
description = S("Sleep in a bed to change your respawn point."),
|
||||
icon = "mcl_beds_bed_red.png",
|
||||
})
|
||||
|
||||
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||
|
||||
if non_pc_achievements then
|
||||
|
|
|
@ -76,6 +76,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
|||
-- save respawn position when entering bed
|
||||
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
||||
minetest.chat_send_player(name, S("New respawn position set!"))
|
||||
awards.unlock(player:get_player_name(), "mcl:sweetDreams")
|
||||
end
|
||||
|
||||
-- No sleeping if too far away
|
||||
|
|
Loading…
Reference in New Issue