Add achievement for building a Nether portal
This commit is contained in:
parent
efdf87adae
commit
602058716f
3 changed files with 14 additions and 0 deletions
|
@ -161,6 +161,13 @@ awards.register_achievement("mcl:snipeSkeleton", {
|
||||||
icon = "mcl_throwing_bow.png",
|
icon = "mcl_throwing_bow.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Triggered in mcl_portals
|
||||||
|
awards.register_achievement("mcl:buildNetherPortal", {
|
||||||
|
title = S("Into the Nether"),
|
||||||
|
description = S("Use obsidian and flint and steel to construct a Nether portal."),
|
||||||
|
icon = "default_obsidian.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
|
||||||
|
|
|
@ -5,4 +5,5 @@ mcl_fire
|
||||||
mcl_nether
|
mcl_nether
|
||||||
mcl_end
|
mcl_end
|
||||||
mcl_particles
|
mcl_particles
|
||||||
|
awards?
|
||||||
doc?
|
doc?
|
||||||
|
|
|
@ -455,6 +455,12 @@ minetest.override_item("mcl_core:obsidian", {
|
||||||
local portal_placed = make_portal(pos)
|
local portal_placed = make_portal(pos)
|
||||||
if portal_placed and minetest.get_modpath("doc") then
|
if portal_placed and minetest.get_modpath("doc") then
|
||||||
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal")
|
doc.mark_entry_as_revealed(user:get_player_name(), "nodes", "mcl_portals:portal")
|
||||||
|
|
||||||
|
-- Achievement for finishing a Nether portal TO the Nether
|
||||||
|
local _, dim = mcl_util.y_to_layer(pos.y)
|
||||||
|
if minetest.get_modpath("awards") and dim ~= "nether" and user:is_player() then
|
||||||
|
awards.unlock(user:get_player_name(), "mcl:buildNetherPortal")
|
||||||
|
end
|
||||||
else
|
else
|
||||||
local node = minetest.get_node(pointed_thing.above)
|
local node = minetest.get_node(pointed_thing.above)
|
||||||
if node.name ~= "mcl_portals:portal" then
|
if node.name ~= "mcl_portals:portal" then
|
||||||
|
|
Reference in a new issue