What A Deal! Advancement

This commit is contained in:
PrairieAstronomer 2022-06-11 13:18:25 -06:00
parent 17e2f05971
commit b544fb819d
2 changed files with 12 additions and 0 deletions

View file

@ -985,6 +985,11 @@ local trade_inventory = {
elseif listname == "output" then elseif listname == "output" then
if not trader_exists(player:get_player_name()) then if not trader_exists(player:get_player_name()) then
return 0 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 end
-- Only allow taking full stack -- Only allow taking full stack
local count = stack:get_count() local count = stack:get_count()

View file

@ -194,6 +194,13 @@ awards.register_achievement("mcl:sweetDreams", {
icon = "mcl_beds_bed_red.png", 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",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then if non_pc_achievements then