Add in achievement.
This commit is contained in:
parent
aec16ee62e
commit
5378aae09e
|
@ -1,3 +1,9 @@
|
||||||
|
---
|
||||||
|
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
||||||
|
--- Created by michieal.
|
||||||
|
--- DateTime: 11/19/22 7:13 AM
|
||||||
|
---
|
||||||
|
|
||||||
---
|
---
|
||||||
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
--- Generated by EmmyLua(https://github.com/EmmyLua)
|
||||||
--- Created by michieal.
|
--- Created by michieal.
|
||||||
|
@ -46,7 +52,7 @@ local hamburger_def = {
|
||||||
on_place = minetest.item_eat(8),
|
on_place = minetest.item_eat(8),
|
||||||
on_secondary_use = minetest.item_eat(8),
|
on_secondary_use = minetest.item_eat(8),
|
||||||
groups = { food = 2, eatable = 8 },
|
groups = { food = 2, eatable = 8 },
|
||||||
_mcl_saturation = 12.8,
|
_mcl_saturation = 13.8,
|
||||||
}
|
}
|
||||||
|
|
||||||
if not enable_burger then
|
if not enable_burger then
|
||||||
|
@ -62,6 +68,23 @@ else
|
||||||
minetest.register_craftitem("mcl_hamburger:hamburger", hamburger_alt)
|
minetest.register_craftitem("mcl_hamburger:hamburger", hamburger_alt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function register_achievements()
|
||||||
|
|
||||||
|
awards.register_achievement("mcl_hamburger:hamburger", {
|
||||||
|
title = S("Burger Time!"),
|
||||||
|
description = S("Craft a Hamburger."),
|
||||||
|
icon = "mcl_hamburger.png",
|
||||||
|
trigger = {
|
||||||
|
type = "craft",
|
||||||
|
item = "mcl_hamburger:hamburger",
|
||||||
|
target = 1
|
||||||
|
},
|
||||||
|
type = "Advancement",
|
||||||
|
group = "Overworld",
|
||||||
|
})
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
if enable_burger then
|
if enable_burger then
|
||||||
-- make the villagers follow the item
|
-- make the villagers follow the item
|
||||||
minetest.registered_entities["mobs_mc:villager"].nofollow = false
|
minetest.registered_entities["mobs_mc:villager"].nofollow = false
|
||||||
|
@ -69,4 +92,7 @@ if enable_burger then
|
||||||
table.insert(minetest.registered_entities["mobs_mc:villager"].follow,"mcl_hamburger:hamburger")
|
table.insert(minetest.registered_entities["mobs_mc:villager"].follow,"mcl_hamburger:hamburger")
|
||||||
-- register the item and crafting recipe.
|
-- register the item and crafting recipe.
|
||||||
mcl_hamburger.register_burger_craft("mcl_mobitems:cooked_beef")
|
mcl_hamburger.register_burger_craft("mcl_mobitems:cooked_beef")
|
||||||
|
-- add in the super cool achievement(s)!
|
||||||
|
register_achievements()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue