mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
Add achievement for building a Nether portal
This commit is contained in:
parent
efdf87adae
commit
602058716f
@ -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
|
||||
|
@ -5,4 +5,5 @@ mcl_fire
|
||||
mcl_nether
|
||||
mcl_end
|
||||
mcl_particles
|
||||
awards?
|
||||
doc?
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user