mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
Achievements: Fix mineWood, add Cow Tipper
This commit is contained in:
parent
3539eac6b4
commit
cf1be05710
@ -14,8 +14,12 @@ item_drop_settings.drop_single_item = false --if true, the drop control dro
|
||||
|
||||
local check_pickup_achievements = function(object, player)
|
||||
local itemname = ItemStack(object:get_luaentity().itemstring):get_name()
|
||||
if itemname == "mcl_mobitems:blaze_rod" then
|
||||
if minetest.get_item_group(itemname, "tree") ~= 0 then
|
||||
awards.unlock(player:get_player_name(), "mcl:mineWood")
|
||||
elseif itemname == "mcl_mobitems:blaze_rod" then
|
||||
awards.unlock(player:get_player_name(), "mcl:blazeRod")
|
||||
elseif itemname == "mcl_mobitems:leather" then
|
||||
awards.unlock(player:get_player_name(), "mcl:killCow")
|
||||
elseif itemname == "mcl_core:diamond" then
|
||||
awards.unlock(player:get_player_name(), "mcl:diamonds")
|
||||
end
|
||||
|
@ -17,16 +17,6 @@ awards.register_achievement("mcl_buildWorkBench", {
|
||||
target = 1
|
||||
}
|
||||
})
|
||||
awards.register_achievement("mcl_mineWood", {
|
||||
title = S("Getting Wood"),
|
||||
description = S("Punch a tree to get oak wood."),
|
||||
icon = "default_tree.png",
|
||||
trigger = {
|
||||
type = "dig",
|
||||
node = "mcl_core:tree",
|
||||
target = 1
|
||||
}
|
||||
})
|
||||
awards.register_achievement("mcl:buildPickaxe", {
|
||||
title = S("Time to Mine!"),
|
||||
description = S("Use a crafting table to craft a wooden pickaxe from wooden planks and sticks."),
|
||||
@ -107,12 +97,6 @@ awards.register_achievement("mcl:buildSword", {
|
||||
}
|
||||
})
|
||||
|
||||
awards.register_achievement("mcl:diamonds", {
|
||||
title = S("DIAMONDS!"),
|
||||
description = S("Pick up a diamond from the floor."),
|
||||
icon = "default_stone.png^default_mineral_diamond.png",
|
||||
})
|
||||
|
||||
awards.register_achievement("mcl:bookcase", {
|
||||
title = S("Librarian"),
|
||||
icon = "default_bookshelf.png",
|
||||
@ -123,12 +107,30 @@ awards.register_achievement("mcl:bookcase", {
|
||||
}
|
||||
})
|
||||
|
||||
-- Item pickup achievements: These are awarded when picking up a certain item.
|
||||
-- The achivements are manually given in the mod mcl_item_entity.
|
||||
awards.register_achievement("mcl:diamonds", {
|
||||
title = S("DIAMONDS!"),
|
||||
description = S("Pick up a diamond from the floor."),
|
||||
icon = "default_stone.png^default_mineral_diamond.png",
|
||||
})
|
||||
awards.register_achievement("mcl:blazeRod", {
|
||||
title = S("Into Fire"),
|
||||
description = S("Pick up a blaze rod from the floor."),
|
||||
icon = "mcl_mobitems_blaze_rod.png",
|
||||
})
|
||||
|
||||
awards.register_achievement("mcl:killCow", {
|
||||
title = S("Cow Tipper"),
|
||||
description = S("Pick up leather from the floor."),
|
||||
icon = "mcl_mobitems_leather.png",
|
||||
})
|
||||
awards.register_achievement("mcl:mineWood", {
|
||||
title = S("Getting Wood"),
|
||||
description = S("Pick up a wood item from the ground.\nHint: Punch a tree trunk until it pops out as an item."),
|
||||
icon = "default_tree.png",
|
||||
})
|
||||
|
||||
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||
|
||||
awards.register_achievement("mcl:n_placeDispenser", {
|
||||
|
Loading…
Reference in New Issue
Block a user