[mcl_achievements] Add mcl:stoneAge, mcl:hotStuff, mcl:obsidian

This commit is contained in:
kay27 2021-03-28 04:32:57 +04:00
parent 61c9d065fb
commit 54e7529754
3 changed files with 30 additions and 0 deletions

View file

@ -238,3 +238,20 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
awards.show_to(name, name, nil, false)
end
end)
awards.register_achievement("mcl:stoneAge", {
title = S("Stone Age"),
description = S("Mine a stone with new pickaxe."),
icon = "default_cobble.png",
})
awards.register_achievement("mcl:hotStuff", {
title = S("Hot Stuff"),
description = S("Put lava in a bucket."),
icon = "bucket_lava.png",
})
awards.register_achievement("mcl:obsidian", {
title = S("Ice Bucket Challenge"),
description = S("Obtain an obsidian block."),
icon = "default_obsidian.png",
})

View file

@ -207,6 +207,9 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", {
-- Fill bucket, but not in Creative Mode
if not minetest.is_creative_enabled(user:get_player_name()) then
new_bucket = ItemStack({name = liquiddef.itemname})
if liquiddef.itemname == "mcl_buckets:bucket_lava" and awards and awards.unlock and user and user:is_player() then
awards.unlock(user:get_player_name(), "mcl:hotStuff")
end
end
minetest.add_node(pointed_thing.under, {name="air"})

View file

@ -33,6 +33,11 @@ minetest.register_node("mcl_core:stone", {
_mcl_blast_resistance = 6,
_mcl_hardness = 1.5,
_mcl_silk_touch_drop = true,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
if awards and awards.unlock and digger and digger:is_player() then
awards.unlock(digger:get_player_name(), "mcl:stoneAge")
end
end,
})
minetest.register_node("mcl_core:stone_with_coal", {
@ -814,6 +819,11 @@ minetest.register_node("mcl_core:obsidian", {
groups = {pickaxey=5, building_block=1, material_stone=1},
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
if awards and awards.unlock and digger and digger:is_player() then
awards.unlock(digger:get_player_name(), "mcl:obsidian")
end
end,
})
minetest.register_node("mcl_core:ice", {