Sweet Dreams Advancement
parent
2a62936fe7
commit
17e2f05971
|
@ -187,6 +187,13 @@ awards.register_achievement("mcl:postMortal", {
|
||||||
icon = "mcl_totems_totem.png",
|
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.)
|
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||||
|
|
||||||
if non_pc_achievements then
|
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
|
-- save respawn position when entering bed
|
||||||
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
||||||
minetest.chat_send_player(name, S("New respawn position set!"))
|
minetest.chat_send_player(name, S("New respawn position set!"))
|
||||||
|
awards.unlock(player:get_player_name(), "mcl:sweetDreams")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- No sleeping if too far away
|
-- No sleeping if too far away
|
||||||
|
|
Loading…
Reference in New Issue