mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 13:53:45 +01:00
Merge pull request 'New Advancements' (#2303) from PrairieAstronomer/MineClone2:PrairieWind_advancements into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2303
This commit is contained in:
commit
00e94c81c4
@ -985,6 +985,11 @@ local trade_inventory = {
|
||||
elseif listname == "output" then
|
||||
if not trader_exists(player:get_player_name()) then
|
||||
return 0
|
||||
-- Begin Award Code
|
||||
-- May need to be moved if award gets unlocked in the wrong cases.
|
||||
elseif trader_exists(player:get_player_name()) then
|
||||
awards.unlock(player:get_player_name(), "mcl:whatAdeal")
|
||||
-- End Award Code
|
||||
end
|
||||
-- Only allow taking full stack
|
||||
local count = stack:get_count()
|
||||
|
@ -101,6 +101,17 @@ awards.register_achievement("mcl:bookcase", {
|
||||
}
|
||||
})
|
||||
|
||||
awards.register_achievement("mcl:buildIronPickaxe", {
|
||||
title = S("Isn't It Iron Pick"),
|
||||
description = S("Craft a iron pickaxe using sticks and iron."),
|
||||
icon = "default_tool_steelpick.png",
|
||||
trigger = {
|
||||
type = "craft",
|
||||
item = "mcl_tools:pick_iron",
|
||||
target = 1
|
||||
}
|
||||
})
|
||||
|
||||
-- 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", {
|
||||
@ -163,6 +174,47 @@ awards.register_achievement("mcl:buildNetherPortal", {
|
||||
icon = "default_obsidian.png",
|
||||
})
|
||||
|
||||
awards.register_achievement("mcl:enterEndPortal", {
|
||||
title = S("The End?"),
|
||||
description = S("Or the beginning?\nHint: Enter an end portal."),
|
||||
icon = "mcl_end_end_stone.png",
|
||||
})
|
||||
|
||||
-- Triggered in mcl_totems
|
||||
awards.register_achievement("mcl:postMortal", {
|
||||
title = S("Postmortal"),
|
||||
description = S("Use a Totem of Undying to cheat death."),
|
||||
icon = "mcl_totems_totem.png",
|
||||
})
|
||||
|
||||
-- Triggered in mcl_beds
|
||||
awards.register_achievement("mcl:sweetDreams", {
|
||||
title = S("Sweet Dreams"),
|
||||
description = S("Sleep in a bed to change your respawn point."),
|
||||
icon = "mcl_beds_bed_red.png",
|
||||
})
|
||||
|
||||
-- Triggered in mobs_mc
|
||||
awards.register_achievement("mcl:whatAdeal", {
|
||||
title = S("What A Deal!"),
|
||||
description = S("Successfully trade with a Villager."),
|
||||
icon = "mcl_core_emerald.png",
|
||||
})
|
||||
|
||||
-- Triggered in mcl_fishing
|
||||
awards.register_achievement("mcl:fishyBusiness", {
|
||||
title = S("Fishy Business"),
|
||||
description = S("Catch a fish. \nHint: Catch a fish, salmon, clownfish, or pufferfish."),
|
||||
icon = "mcl_fishing_fishing_rod.png",
|
||||
})
|
||||
|
||||
-- Triggered in mcl_compass
|
||||
awards.register_achievement("mcl:countryLode", {
|
||||
title = S("Country Lode,\nTake Me Home"),
|
||||
description = S("Use a compass on a Lodestone."),
|
||||
icon = "lodestone_side4.png",
|
||||
})
|
||||
|
||||
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
|
||||
|
||||
if non_pc_achievements then
|
||||
|
@ -76,6 +76,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||
-- save respawn position when entering bed
|
||||
if spawn_mod and mcl_spawn.set_spawn_pos(player, bed_pos, nil) then
|
||||
minetest.chat_send_player(name, S("New respawn position set!"))
|
||||
awards.unlock(player:get_player_name(), "mcl:sweetDreams")
|
||||
end
|
||||
|
||||
-- No sleeping if too far away
|
||||
|
@ -189,6 +189,7 @@ minetest.register_globalstep(function(dtime)
|
||||
|
||||
if string_find(stack:get_name(), "_lodestone") then
|
||||
stack:set_name("mcl_compass:" .. compass_frame .. "_lodestone")
|
||||
awards.unlock(player:get_player_name(), "mcl:countryLode")
|
||||
else
|
||||
stack:set_name("mcl_compass:" .. compass_frame)
|
||||
end
|
||||
|
@ -75,6 +75,7 @@ local fish = function(itemstack, player, pointed_thing)
|
||||
stacks_min = 1,
|
||||
stacks_max = 1,
|
||||
}, pr)
|
||||
awards.unlock(player:get_player_name(), "mcl:fishyBusiness")
|
||||
elseif r <= junk_value then
|
||||
-- Junk
|
||||
items = mcl_loot.get_loot({
|
||||
@ -124,6 +125,9 @@ local fish = function(itemstack, player, pointed_thing)
|
||||
local inv = player:get_inventory()
|
||||
if inv:room_for_item("main", item) then
|
||||
inv:add_item("main", item)
|
||||
if item:get_name() == "mcl_mobitems:leather" then
|
||||
awards.unlock(player:get_player_name(), "mcl:killCow")
|
||||
end
|
||||
else
|
||||
minetest.add_item(pos, item)
|
||||
end
|
||||
|
@ -241,7 +241,7 @@ function mcl_portals.end_portal_teleport(pos, node)
|
||||
end
|
||||
|
||||
mcl_portals.end_teleport(obj, objpos)
|
||||
|
||||
awards.unlock(obj:get_player_name(), "mcl:enterEndPortal")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -51,6 +51,7 @@ mcl_damage.register_modifier(function(obj, damage, reason)
|
||||
obj:set_wielded_item(wield)
|
||||
end
|
||||
end
|
||||
awards.unlock(obj:get_player_name(), "mcl:postMortal")
|
||||
|
||||
-- Effects
|
||||
minetest.sound_play({name = "mcl_totems_totem", gain = 1}, {pos=ppos, max_hear_distance = 16}, true)
|
||||
|
Loading…
Reference in New Issue
Block a user