From 6db2bcc56b6aa23f6321e2ea497f1e27f1b86a7e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 10 Mar 2017 00:25:31 +0100 Subject: [PATCH] Remove non-PC achievements for now --- mods/HUD/mcl_achievements/init.lua | 130 +++++++++++++++-------------- 1 file changed, 69 insertions(+), 61 deletions(-) diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index 9e4e79e562..4c78874bc9 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -1,3 +1,8 @@ +-- Settings + +-- If true, activates achievements from other Minecraft editions (XBox, PS, etc.) +local non_pc_achievement = false + local S if minetest.get_modpath("intllib") then S = intllib.Getter() @@ -157,69 +162,72 @@ awards.register_achievement("mcl:snipeSkeleton", { -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) -awards.register_achievement("mcl:n_placeDispenser", { - title = S("Dispense With This"), - description = S("Place a dispenser."), - icon = "mcl_dispensers_dispenser_front_horizontal.png", - trigger = { - type = "place", - node = "mcl_dispensers:dispenser", - target = 1 - } -}) +if non_pc_achievements then + awards.register_achievement("mcl:n_placeDispenser", { + title = S("Dispense With This"), + description = S("Place a dispenser."), + icon = "mcl_dispensers_dispenser_front_horizontal.png", + trigger = { + type = "place", + node = "mcl_dispensers:dispenser", + target = 1 + } + }) -awards.register_achievement("mcl:n_eatPorkchop", { - title = S("Pork Chop"), - description = S("Eat a cooked porkchop."), - icon = "mcl_mobitems_porkchop_cooked.png", - trigger = { - type = "eat", - item= "mcl_mobitems:cooked_porkchop", - target = 1, - } -}) -awards.register_achievement("mcl:n_eatRabbit", { - title = S("Rabbit Season"), - icon = "mcl_mobitems_rabbit_cooked.png", - description = S("Eat a cooked rabbit."), - trigger = { - type = "eat", - item= "mcl_mobitems:cooked_rabbit", - target = 1, - } -}) -awards.register_achievement("mcl:n_eatRottenFlesh", { - title = S("Iron Belly"), - description = S("Get really desperate and eat rotten flesh."), - icon = "mcl_mobitems_rotten_flesh.png", - trigger = { - type = "eat", - item= "mcl_mobitems:rotten_flesh", - target = 1, - } -}) -awards.register_achievement("mcl:n_placeFlowerpot", { - title = S("Pot Planter"), - description = S("Place a flower pot."), - icon = "mcl_flowerpots_flowerpot_inventory.png", - trigger = { - type = "place", - node = "mcl_flowerpots:flower_pot", - target = 1, - } -}) + -- FIXME: Eating achievements don't work when you have exactly one of these items on hand + awards.register_achievement("mcl:n_eatPorkchop", { + title = S("Pork Chop"), + description = S("Eat a cooked porkchop."), + icon = "mcl_mobitems_porkchop_cooked.png", + trigger = { + type = "eat", + item= "mcl_mobitems:cooked_porkchop", + target = 1, + } + }) + awards.register_achievement("mcl:n_eatRabbit", { + title = S("Rabbit Season"), + icon = "mcl_mobitems_rabbit_cooked.png", + description = S("Eat a cooked rabbit."), + trigger = { + type = "eat", + item= "mcl_mobitems:cooked_rabbit", + target = 1, + } + }) + awards.register_achievement("mcl:n_eatRottenFlesh", { + title = S("Iron Belly"), + description = S("Get really desperate and eat rotten flesh."), + icon = "mcl_mobitems_rotten_flesh.png", + trigger = { + type = "eat", + item= "mcl_mobitems:rotten_flesh", + target = 1, + } + }) + awards.register_achievement("mcl:n_placeFlowerpot", { + title = S("Pot Planter"), + description = S("Place a flower pot."), + icon = "mcl_flowerpots_flowerpot_inventory.png", + trigger = { + type = "place", + node = "mcl_flowerpots:flower_pot", + target = 1, + } + }) -awards.register_achievement("mcl:n_emeralds", { - title = S("The Haggler"), - -- TODO: Should also count emeralds bought from villagers - description = S("Mine 30 emerald ore."), - icon = "default_emerald.png", - trigger = { - type = "dig", - node = "mcl_core:stone_with_emerald", - target = 30, - } -}) + awards.register_achievement("mcl:n_emeralds", { + title = S("The Haggler"), + -- TODO: Should also count emeralds bought from villagers + description = S("Mine 30 emerald ore."), + icon = "default_emerald.png", + trigger = { + type = "dig", + node = "mcl_core:stone_with_emerald", + target = 30, + } + }) +end -- Show achievements formspec when the button was pressed minetest.register_on_player_receive_fields(function(player, formname, fields)