0
0
Fork 0

Add achievement for building a Nether portal

This commit is contained in:
Wuzzy 2017-09-15 18:03:37 +02:00
parent efdf87adae
commit 602058716f
3 changed files with 14 additions and 0 deletions

View File

@ -161,6 +161,13 @@ awards.register_achievement("mcl:snipeSkeleton", {
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.)
if non_pc_achievements then

View File

@ -5,4 +5,5 @@ mcl_fire
mcl_nether
mcl_end
mcl_particles
awards?
doc?

View File

@ -455,6 +455,12 @@ minetest.override_item("mcl_core:obsidian", {
local portal_placed = make_portal(pos)
if portal_placed and minetest.get_modpath("doc") then
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
local node = minetest.get_node(pointed_thing.above)
if node.name ~= "mcl_portals:portal" then