1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2024-12-28 19:50:37 +01:00

Check for existance of default mod

This commit is contained in:
Wuzzy 2016-09-01 18:28:37 +02:00 committed by rubenwardy
parent 90bf9b061a
commit a04f3df1e2

218
init.lua
View File

@ -30,41 +30,6 @@ dofile(minetest.get_modpath("awards").."/unified_inventory.lua")
dofile(minetest.get_modpath("awards").."/triggers.lua")
awards.set_intllib(S)
-- Light it up
awards.register_achievement("award_lightitup",{
title = S("Light It Up"),
description = S("Place 100 torches."),
icon = "awards_novicebuilder.png^awards_level1.png",
trigger = {
type = "place",
node = "default:torch",
target = 100
}
})
-- Light ALL the things!
awards.register_achievement("award_well_lit",{
title = S("Well Lit"),
description = S("Place 1,000 torches."),
icon = "awards_novicebuilder.png^awards_level2.png",
trigger = {
type = "place",
node = "default:torch",
target = 1000
}
})
awards.register_achievement("award_meselamp",{
title = S("Really Well Lit"),
description = S("Craft 10 mese lamps."),
icon = "default_meselamp.png",
trigger = {
type = "craft",
item = "default:meselamp",
target = 10
}
})
-- Saint-Maclou
if minetest.get_modpath("moreblocks") then
awards.register_achievement("award_saint_maclou",{
@ -142,6 +107,42 @@ if minetest.get_modpath("fire") then
end
end
if minetest.get_modpath("default") then
-- Light it up
awards.register_achievement("award_lightitup",{
title = S("Light It Up"),
description = S("Place 100 torches."),
icon = "awards_novicebuilder.png^awards_level1.png",
trigger = {
type = "place",
node = "default:torch",
target = 100
}
})
-- Light ALL the things!
awards.register_achievement("award_well_lit",{
title = S("Well Lit"),
description = S("Place 1,000 torches."),
icon = "awards_novicebuilder.png^awards_level2.png",
trigger = {
type = "place",
node = "default:torch",
target = 1000
}
})
awards.register_achievement("award_meselamp",{
title = S("Really Well Lit"),
description = S("Craft 10 mese lamps."),
icon = "default_meselamp.png",
trigger = {
type = "craft",
item = "default:meselamp",
target = 10
}
})
awards.register_achievement("awards_stonebrick", {
title = S("Outpost"),
description = S("Craft 200 stone bricks."),
@ -359,8 +360,6 @@ awards.register_achievement("award_meseblock", {
}
})
-- You're a copper
awards.register_achievement("award_youre_a_copper", {
title = S("Youre a copper"),
@ -528,65 +527,6 @@ awards.register_achievement("awards_snowblock", {
}
})
if minetest.get_modpath("farming") then
awards.register_achievement("awards_farmer", {
title = S("Farming Skills Aquired"),
description = S("Harvest a fully grown wheat plant."),
icon = "farming_wheat_8.png^awards_level1.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 1
}
})
awards.register_achievement("awards_farmer2", {
title = S("Field Worker"),
description = S("Harvest 25 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level2.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 25
}
})
awards.register_achievement("awards_farmer3", {
title = S("Aspiring Farmer"),
description = S("Harvest 125 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level3.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 125
}
})
awards.register_achievement("awards_farmer4", {
title = S("Wheat Magnate"),
description = S("Harvest 625 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level4.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 625
}
})
end
if minetest.get_modpath("wool") and minetest.get_modpath("farming") then
awards.register_achievement("awards_wool", {
title = S("Wool Over Your Eyes"),
description = S("Craft 250 white wool."),
icon = "wool_white.png",
trigger = {
type = "craft",
item = "wool:white",
target = 250
}
})
end
awards.register_achievement("awards_gold_ore", {
title = S("First Gold Find"),
description = S("Mine your first gold ore."),
@ -656,19 +596,6 @@ awards.register_achievement("awards_mossycobble", {
}
})
if minetest.get_modpath("vessels") then
awards.register_achievement("award_vessels_shelf", {
title = S("Glasser"),
icon = "vessels_shelf.png",
description = S("Craft 14 vessels shelves."),
trigger = {
type = "craft",
item= "vessels:shelf",
target = 14
}
})
end
awards.register_achievement("award_furnace", {
title = S("Smelter"),
description = S("Craft 10 furnaces."),
@ -756,6 +683,79 @@ awards.register_achievement("award_steelladder", {
target = 40
}
})
end
if minetest.get_modpath("vessels") then
awards.register_achievement("award_vessels_shelf", {
title = S("Glasser"),
icon = "vessels_shelf.png",
description = S("Craft 14 vessels shelves."),
trigger = {
type = "craft",
item= "vessels:shelf",
target = 14
}
})
end
if minetest.get_modpath("farming") then
awards.register_achievement("awards_farmer", {
title = S("Farming Skills Aquired"),
description = S("Harvest a fully grown wheat plant."),
icon = "farming_wheat_8.png^awards_level1.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 1
}
})
awards.register_achievement("awards_farmer2", {
title = S("Field Worker"),
description = S("Harvest 25 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level2.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 25
}
})
awards.register_achievement("awards_farmer3", {
title = S("Aspiring Farmer"),
description = S("Harvest 125 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level3.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 125
}
})
awards.register_achievement("awards_farmer4", {
title = S("Wheat Magnate"),
description = S("Harvest 625 fully grown wheat plants."),
icon = "farming_wheat_8.png^awards_level4.png",
trigger = {
type = "dig",
node = "farming:wheat_8",
target = 625
}
})
end
if minetest.get_modpath("wool") and minetest.get_modpath("farming") then
awards.register_achievement("awards_wool", {
title = S("Wool Over Your Eyes"),
description = S("Craft 250 white wool."),
icon = "wool_white.png",
trigger = {
type = "craft",
item = "wool:white",
target = 250
}
})
end
if minetest.get_modpath("beds") then
awards.register_achievement("award_bed", {