Merge branch 'ach2'

This commit is contained in:
Wuzzy 2019-09-22 12:34:40 +02:00
commit c5f0323a97
36 changed files with 205 additions and 373 deletions

View File

@ -331,8 +331,37 @@ minetest.register_on_player_receive_fields(receive_fields)
-- Below are the default achievements
--
-- Digging wood
achievements.register_achievement(
"timber",
{
title = S("Timber"),
description = S("Dig a tree trunk."),
times = 1,
dignode = "group:tree",
})
-- Tools
achievements.register_achievement(
"first_pickaxe",
{
title = S("My First Pickaxe"),
description = S("Craft a pickaxe."),
times = 1,
craftitem = "group:pickaxe",
})
achievements.register_achievement(
"hardened_miner",
{
title = S("Hardened Miner"),
description = S("Craft a carbon steel pickaxe."),
times = 1,
craftitem = "default:pick_carbon_steel",
})
achievements.register_achievement(
"off_to_battle",
{
@ -342,151 +371,34 @@ achievements.register_achievement(
craftitem = "default:broadsword",
})
achievements.register_achievement(
"hardened_miner",
{
title = S("Hardened Miner"),
description = S("Craft 3 carbon steel pickaxes."),
times = 3,
craftitem = "default:pick_carbon_steel",
})
-- Dirt/soil
achievements.register_achievement(
"drain_the_swamp",
{
title = S("Drain the Swamp"),
description = S("Dig 30 swamp dirt."),
times = 30,
dignode = "default:swamp_dirt",
})
-- Placing planks
achievements.register_achievement(
"plunks",
{
title = S("Plunks"),
description = S("Place 10 planks."),
times = 10,
placenode = "group:planks",
})
achievements.register_achievement(
"carpenter",
{
title = S("Carpenter"),
description = S("Place 100 planks."),
times = 100,
placenode = "group:planks",
})
achievements.register_achievement(
"pro_carpenter",
{
title = S("Pro Carpenter"),
description = S("Place 500 planks."),
times = 500,
placenode = "group:planks",
})
-- Stone
achievements.register_achievement(
"mineority",
{
title = S("Mineority"),
description = S("Mine 20 stone."),
times = 20,
dignode = "group:stone",
description = S("Mine a stone."),
times = 1,
dignode = "default:stone",
})
achievements.register_achievement(
"rockin",
"smelting_room",
{
title = S("Rockin'"),
description = S("Mine 200 stone."),
times = 200,
dignode = "group:stone",
title = S("Smelting Room"),
description = S("Craft a furnace."),
times = 1,
craftitem = "default:furnace",
})
achievements.register_achievement(
"rocksolid",
{
title = S("Rock Solid"),
description = S("Mine 1000 stone."),
times = 1000,
dignode = "group:stone",
})
achievements.register_achievement(
"cave_builder",
{
title = S("Cave Builder"),
description = S("Place 60 stone."),
times = 60,
placenode = "default:stone",
})
-- Digging wood
achievements.register_achievement(
"timber",
{
title = S("Timber"),
description = S("Dig 10 tree trunks."),
times = 10,
dignode = "group:tree",
})
achievements.register_achievement(
"timberer",
{
title = S("Timberer"),
description = S("Dig 100 tree trunks."),
times = 100,
dignode = "group:tree",
})
achievements.register_achievement(
"timbererest",
{
title = S("Timbererest"),
description = S("Dig 500 tree trunks."),
times = 500,
dignode = "group:tree",
})
-- Crafting bricks
achievements.register_achievement(
"builder",
{
title = S("Builder"),
description = S("Craft 180 brick blocks."),
times = 180,
craftitem = "default:brick",
})
-- Plants/farming
-- Biomes
achievements.register_achievement(
"gardener",
{
title = S("Gardener"),
description = S("Plant 10 flowers."),
times = 10,
placenode = "default:flower",
})
achievements.register_achievement(
"master_gardener",
{
title = S("Master Gardener"),
description = S("Plant 100 flowers."),
times = 100,
description = S("Plant a flower."),
times = 1,
placenode = "default:flower",
})
@ -499,66 +411,35 @@ achievements.register_achievement(
dignode = "default:dry_grass",
})
achievements.register_achievement(
"drain_the_swamp",
{
title = S("Drain the Swamp"),
description = S("Dig some swamp dirt."),
times = 1,
dignode = "default:swamp_dirt",
})
-- Farming
achievements.register_achievement(
"fertile",
{
title = S("Fertile"),
description = S("Craft 100 bags of fertilizer."),
times = 100,
description = S("Craft a bag of fertilizer."),
times = 1,
craftitem = "default:fertilizer",
})
-- Crafting reinforced blocks
achievements.register_achievement(
"master_carpenter",
{
title = S("Master Carpenter"),
description = S("Craft 200 reinforced frames."),
times = 200,
craftitem = "default:reinforced_frame",
})
achievements.register_achievement(
"master_stonemason",
{
title = S("Master Stonemason"),
description = S("Craft 200 reinforced cobble."),
times = 200,
craftitem = "default:reinforced_cobble",
})
-- Crafting sand-related materials
achievements.register_achievement(
"sandman",
{
title = S("Sandman"),
description = S("Craft 60 compressed sandstone."),
times = 60,
craftitem = "default:compressed_sandstone",
})
-- Literature
achievements.register_achievement(
"librarian",
{
title = S("Librarian"),
description = S("Craft 10 bookshelves."),
times = 10,
description = S("Craft a bookshelf."),
times = 1,
craftitem = "default:bookshelf",
})
-- Misc.
achievements.register_achievement(
"smelting_room",
{
title = S("Smelting Room"),
description = S("Craft 20 furnaces."),
times = 20,
craftitem = "default:furnace",
})
default.log("mod:achievements", "loaded")

View File

@ -7,47 +7,22 @@ Missing=Fehlt
Off to Battle=Auf in die Schlacht
Craft a broadsword.=Fertigen Sie ein Breitschwert.
Hardened Miner=Abgehärteter Bergarbeiter
Craft 3 carbon steel pickaxes.=Fertigen Sie 3 Karbonstahlspitzhacken.
Craft a carbon steel pickaxe.=Fertigen Sie eine Karbonstahlspitzhacke.
Drain the Swamp=Sumpf trockenlegen
Dig 30 swamp dirt.=Graben Sie 30 Sumpferde.
Plunks=Plonk!
Place 10 planks.=Platzieren Sie 10 Planken.
Carpenter=Schreiner
Place 100 planks.=Platzieren Sie 100 Planken.
Pro Carpenter=Profischreiner
Master Carpenter=Schreinermeister
Place 500 planks.=Platzieren Sie 500 Planken.
Dig some swamp dirt.=Graben Sie etwas Sumpferde.
Mineority=Bergbaby
Mine 20 stone.=Graben Sie 20 Stein.
Rockin'=Steinig
Mine 200 stone.=Graben Sie 200 Stein.
Rock Solid=Felsenfest
Mine 1000 stone.=Graben Sie 1000 Stein.
Cave Builder=Höhlenerbauer
Place 60 stone.=Platzieren Sie 60 Stein.
Timber=Auf dem Holzweg
Dig 10 tree trunks.=Bauen Sie 10 Baumstämme ab.
Timberer=Der Baum, mein Feind
Dig 100 tree trunks.=Bauen Sie 100 Baumstämme ab.
Timbererest=Holz, mein ganzer Stolz
Dig 500 tree trunks.=Bauen Sie 500 Baumstämme ab.
Builder=Baumeister
Craft 180 brick blocks.=Fertigen Sie 180 Ziegelblöcke.
Mine a stone.=Graben Sie einen Stein.
Timber=Bauholz
Dig a tree trunk.=Bauen Sie einen Baumstamm ab.
Gardener=Gärtner
Plant 10 flowers.=Pflanzen Sie 10 Blumen.
Master Gardener=Gärtnermeister
Plant 100 flowers.=Pflanzen Sie 100 Blumen.
Plant a flower.=Pflanzen Sie eine Blume.
Dry Lands=Trockenland
Collect dry grass.=Sammeln Sie trockenes Gras auf.
Fertile=Fruchtbar
Craft 100 bags of fertilizer.=Fertigen Sie 100 Beutel mit Dünger.
Master Carpenter=Schreinermeister
Craft 200 reinforced frames.=Fertigen Sie 200 verstärkte Rahmen.
Master Stonemason=Steinmetzmeister
Craft 200 reinforced cobble.=Fertigen Sie 200 verstärkte Pflastersteine.
Sandman=Sandmann
Craft 60 compressed sandstone.=Fertigen Sie 60 Kompaktsandstein.
Craft a bag of fertilizer.=Fertigen Sie einen Beutel mit Dünger.
Librarian=Bibliothekar
Craft 10 bookshelves.=Fertigen Sie 10 Bücherregale.
Craft a bookshelf.=Fertigen Sie ein Bücherregal.
Smelting Room=Schmelzraum
Craft 20 furnaces.=Fertigen Sie 20 Öfen.
Craft a furnace.=Fertigen Sie einen Ofen.
My First Pickaxe=Meine erste Spitzhacke
Craft a pickaxe.=Fertigen Sie eine Spitzhacke.

View File

@ -7,47 +7,22 @@ Missing=
Off to Battle=
Craft a broadsword.=
Hardened Miner=
Craft 3 carbon steel pickaxes.=
Craft a carbon steel pickaxe.=
Drain the Swamp=
Dig 30 swamp dirt.=
Plunks=
Place 10 planks.=
Carpenter=
Place 100 planks.=
Pro Carpenter=
Master Carpenter=
Place 500 planks.=
Dig somme swamp dirt.=
Mineority=
Mine 20 stone.=
Rockin'=
Mine 200 stone.=
Rock Solid=
Mine 1000 stone.=
Cave Builder=
Place 60 stone.=
Mine a stone.=
Timber=
Dig 10 tree trunks.=
Timberer=
Dig 100 tree trunks.=
Timbererest=
Dig 500 tree trunks.=
Builder=
Craft 180 brick blocks.=
Dig a tree trunk.=
Gardener=
Plant 10 flowers.=
Master Gardener=
Plant 100 flowers.=
Plant a flower.=
Dry Lands=
Collect dry grass.=
Fertile=
Craft 100 bags of fertilizer.=
Master Carpenter=
Craft 200 reinforced frames.=
Master Stonemason=
Craft 200 reinforced cobble.=
Sandman=
Craft 60 compressed sandstone.=
Craft a bag of fertilizer.=
Librarian=
Craft 10 bookshelves.=
Craft a bookshelf.=
Smelting Room=
Craft 20 furnaces.=
Craft a furnace.=
My First Pickaxe=
Craft a pickaxe.=

View File

@ -101,10 +101,15 @@ function armor.get_groups(player)
local inv = player:get_inventory()
local ach_ok = true
for slot_index, slot in ipairs(armor.slots) do
local itemstack = inv:get_stack("armor", slot_index)
local itemname = itemstack:get_name()
if itemstack:get_name() ~= "armor:"..slot.."_bronze" then
ach_ok = false
end
if armor.is_armor(itemname) then
local item = minetest.registered_items[itemname]
@ -124,9 +129,11 @@ function armor.get_groups(player)
break
end
end
end
end
if ach_ok then
achievements.trigger_achievement(player, "full_armor")
end
-- If full set of same armor material, then boost armor by 10%
@ -264,19 +271,18 @@ end
achievements.register_achievement(
"armored",
{
title = S("Armored"),
title = S("Armor Smith"),
description = S("Craft a piece of armor."),
times = 1,
craftitem = "group:is_armor",
})
achievements.register_achievement(
"warrior",
"full_armor",
{
title = S("Warrior"),
description = S("Craft 10 pieces of armor."),
times = 10,
craftitem = "group:is_armor",
title = S("Skin of Bronze"),
description = S("Equip a full suit of bronze armor."),
times = 1,
})
default.log("mod:armor", "loaded")

View File

@ -3,10 +3,6 @@ Helmet=Helm
Chestplate=Brustplatte
Boots=Stiefel
Chainmail Sheet=Kettenpanzerplane
Armored=Gepanzert
Craft a piece of armor.=Fertigen Sie einen Rüstungsgegenstand.
Warrior=Krieger
Craft 10 pieces of armor.=Fertigen Sie 10 Rüstungsgegenstände.
Wooden Helmet=Holzhelm
Wooden Chestplate=Holzbrustplatte
Wooden Boots=Holzstiefel
@ -22,3 +18,7 @@ Carbon Steel Boots=Karbonstahlstiefel
Bronze Helmet=Bronzehelm
Bronze Chestplate=Bronzebrustplatte
Bronze Boots=Bronzestiefel
Armor Smith=Rüstungsschmied
Craft a piece of armor.=Fertigen Sie ein Rüstungsteil.
Skin of Bronze=Haut aus Bronze
Equip a full suit of bronze armor.=Tragen sie eine vollständige Bronzerüstung.

View File

@ -1,12 +1,4 @@
# textdomain: armor
Helmet=
Chestplate=
Boots=
Chainmail Sheet=
Armored=
Craft a piece of armor.=
Warrior=
Craft 10 pieces of armor.=
Wooden Helmet=
Wooden Chestplate=
Wooden Boots=
@ -22,3 +14,11 @@ Carbon Steel Boots=
Bronze Helmet=
Bronze Chestplate=
Bronze Boots=
Helmet=
Chestplate=
Boots=
Chainmail Sheet=
Armor Smith=
Craft a piece of armor.=
Skin of Bronze=
Equip a full suit of bronze armor.=

View File

@ -1,2 +1 @@
default
achievements

View File

@ -62,15 +62,4 @@ minetest.register_on_player_receive_fields(
player:set_wielded_item(itemstack)
end)
-- Achievements
achievements.register_achievement(
"scribe",
{
title = S("Scribe"),
description = S("Craft a book."),
times = 1,
craftitem = "default:book",
})
default.log("mod:book", "loaded")

View File

@ -6,37 +6,28 @@ local S = minetest.get_translator("farming")
achievements.register_achievement(
"farmer",
{
title = S("Farmer"),
description = S("Plant 20 wheat seeds."),
times = 20,
placenode = "farming:wheat_1",
title = S("Wannabe Farmer"),
description = S("Plant a seed and watch it grow."),
times = 1,
placenode = "group:seed",
})
achievements.register_achievement(
"master_farmer",
"wheat_farmer",
{
title = S("Master Farmer"),
description = S("Plant 200 wheat seeds."),
times = 200,
placenode = "farming:wheat_1",
title = S("Wheat Farmer"),
description = S("Harvest a fully-grown wheat plant."),
times = 1,
dignode = "farming:wheat_4",
})
achievements.register_achievement(
"cotton_farmer",
{
title = S("Cotton Farmer"),
description = S("Plant 10 cotton seeds."),
times = 10,
placenode = "farming:cotton_1",
})
achievements.register_achievement(
"master_cotton_farmer",
{
title = S("Master Cotton Farmer"),
description = S("Plant 100 cotton seeds."),
times = 100,
placenode = "farming:cotton_1",
description = S("Harvest a fully-grown cotton plant."),
times = 1,
dignode = "farming:cotton_4",
})
default.log("achievements", "loaded")

View File

@ -1,12 +1,10 @@
# textdomain: farming
Farmer=Bauer
Plant 20 wheat seeds.=Pflanzen Sie 20 Weizensamen.
Master Farmer=Meisterbauer
Plant 200 wheat seeds.=Pflanzen Sie 200 Weizensamen.
Wannabe Farmer=Möchtegernbauer
Wheat Farmer=Weizenbauer
Cotton Farmer=Baumwollfarmer
Plant 10 cotton seeds.=Pflanzen Sie 10 Baumwollsamen.
Master Cotton Farmer=Meisterbaumwollfarmer
Plant 100 cotton seeds.=Pflanzen Sie 100 Baumwollsamen.
Plant a seed and watch it grow.=Pflanzen Sie einen Samen und lassen Sie ihn wachsen.
Harvest a fully-grown wheat plant.=Ernten Sie eine reife Weizenpflanze.
Harvest a fully-grown cotton plant.=Ernten Sie eine reife Baumwollpflanze.
Cotton=Baumwolle
Wheat=Weizen
Flour=Mehl

View File

@ -1,12 +1,10 @@
# textdomain: farming
Farmer=
Plant 20 wheat seeds.=
Master Farmer=
Plant 200 wheat seeds.=
Wannabe Farmer=
Wheat Farmer=
Cotton Farmer=
Plant 10 cotton seeds.=
Master Cotton Farmer=
Plant 100 cotton seeds.=
Plant a seed and watch it grow.=
Harvest a fully-grown wheat plant.=
Harvest a fully-grown cotton plant.=
Cotton=
Wheat=
Flour=

View File

@ -26,7 +26,7 @@ minetest.register_node(
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5+(4/16), 0.5}
},
groups = {dig_immediate=2, attached_node=1},
groups = {dig_immediate=2, attached_node=1, seed=1},
sounds=default.node_sound_leaves_defaults()
}
)
@ -135,7 +135,7 @@ minetest.register_node(
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5+(4/16), 0.5}
},
groups = {dig_immediate=2, attached_node=1},
groups = {dig_immediate=2, attached_node=1, seed=1},
sounds=default.node_sound_leaves_defaults()
}
)

View File

@ -265,6 +265,7 @@ minetest.register_on_player_receive_fields(
inv:add_item("gold_trade_out", trade[3])
inv:remove_item("gold_trade_in", trade[1])
inv:remove_item("gold_trade_in", trade[2])
achievements.trigger_achievement(player, "trader")
end
end
end
@ -346,17 +347,16 @@ achievements.register_achievement(
"trader",
{
title = S("Trader"),
description = S("Craft a trading book."),
description = S("Trade with a villager."),
times = 1,
craftitem = "gold:trading_book",
})
achievements.register_achievement(
"gold_rush",
{
title = S("Gold Rush"),
description = S("Dig 60 gold ore."),
times = 60,
description = S("Dig a gold ore."),
times = 1,
dignode = "gold:stone_with_gold",
})

View File

@ -11,6 +11,6 @@ Gold Lump=Goldklumpen
Gold Ingot=Goldbarren
Stone with Gold=Stein mit Gold
Trader=Händler
Craft a trading book.=Fertigen Sie ein Handelsbuch.
Trade with a villager.=Handeln Sie mit einem Dorfbewohner.
Gold Rush=Goldrausch
Dig 60 gold ore.=Graben Sie 60 Golderz.
Dig a gold ore.=Graben Sie ein Golzerz.

View File

@ -11,6 +11,6 @@ Gold Lump=
Gold Ingot=
Stone with Gold=
Trader=
Craft a trading book.=
Trade with a villager.=
Gold Rush=
Dig 60 gold ore.=
Dig a gold ore.=

View File

@ -272,11 +272,12 @@ achievements.register_achievement(
})
achievements.register_achievement(
"master_jeweler",
"secret_of_jewels",
{
title = S("Master Jeweler"),
description = S("Jewel 10 tools."),
times = 10,
title = S("The Secret of Jewels"),
description = S("Discover the origin of jewels."),
times = 1,
dignode = "jewels:jewel_ore",
})
-- The tool jewel definitions

View File

@ -13,8 +13,8 @@ Jeweler's Workbench=Juwelierswerkbank
Jewel Ore=Juwelenerz
Jeweler=Juwelier
Jewel a tool.=Besetzen Sie ein Werkzeug mit einem Juwel.
Master Jeweler=Juweliersmeister
Jewel 10 tools.=Besetzen Sie 10 Werkzeuge mit Juwelen.
Jeweled Pommel Broadsword=Prügelbreitschwert (Juwel)
Jeweled Pommel&Guard Broadsword=Prügel- und Wächterbreitschwert (Juwel)
Serrated Broadsword=Gezacktes Breitschwert
The Secret of Jewels=Das Geheimnis der Juwelen
Discover the origin of jewels.=Entdecken Sie den Ursprung der Juwelen.

View File

@ -13,8 +13,8 @@ Jeweler's Workbench=
Jewel Ore=
Jeweler=
Jewel a tool.=
Master Jeweler=
Jewel 10 tools.=
The Secret of Jewels=
Discover the origin of jewels.=
Jeweled Pommel Broadsword=
Jeweled Pommel&Guard Broadsword=
Serrated Broadsword=

View File

@ -110,6 +110,7 @@ minetest.register_tool(
burglar,
minetest.colorize("#0f0", S("You have broken the lock!")))
end
achievements.trigger_achievement(player, "burglar")
minetest.sound_play({name="locks_unlock",gain=0.8},{pos=pos, max_hear_distance=16})
else
-- Failure!
@ -279,9 +280,8 @@ achievements.register_achievement(
"burglar",
{
title = S("Burglar"),
description = S("Craft a lock pick."),
description = S("Break into a locked chest."),
times = 1,
craftitem = "locks:pick",
})
default.log("mod:locks", "loaded")

View File

@ -12,4 +12,4 @@ Locked Chest (cracked open) (Owned by @1)=Abgeschlossene Truhe (geknackt) (Eigen
Locksmith=Schlossmacher
Craft a lock.=Fertigen Sie ein Schloss.
Burglar=Räuber
Craft a lock pick.=Fertigen Sie einen Dietrich.
Break into a locked chest.=Knacken Sie eine abgeschlossene Truhe.

View File

@ -12,4 +12,4 @@ Locked Chest (cracked open) (Owned by @1)=
Locksmith=
Craft a lock.=
Burglar=
Craft a lock pick.=
Break into a locked chest.=

View File

@ -200,8 +200,8 @@ achievements.register_achievement(
"enlightened",
{
title = S("Enlightened"),
description = S("Place 9 lumien crystals."),
times = 9,
description = S("Place a lumien crystal."),
times = 1,
placenode = "lumien:crystal_off",
})

View File

@ -4,4 +4,4 @@ Lumien Crystal=Lumienkristall
Lumien Block=Lumienblock
Stone with Lumien=Stein mit Lumien
Enlightened=Erleuchtung
Place 9 lumien crystals.=Platzieren Sie 9 Lumienkristalle.
Place a lumien crystal.=Platzieren Sie einen Lumienkristall.

View File

@ -4,4 +4,4 @@ Lumien Crystal=
Lumien Block=
Stone with Lumien=
Enlightened=
Place 9 lumien crystals.=
Place a lumien crystal.=

View File

@ -11,8 +11,8 @@ achievements.register_achievement(
-- have at least one food item in their drop table
-- (no matter how unlikely).
title = S("Hunter"),
description = S("Kill 5 animals for food."),
times = 5,
description = S("Kill an animal for food."),
times = 1,
})
local peaceful_only = minetest.settings:get_bool("only_peaceful_mobs") or false
@ -42,3 +42,11 @@ achievements.register_achievement(
description = S("Tame an animal."),
times = 1,
})
achievements.register_achievement(
"smalltalk",
{
title = S("Smalltalk"),
description = S("Visit a village and have a friendly chat with a villager."),
times = 1,
})

View File

@ -1,6 +1,6 @@
# textdomain: mobs
Hunter=Jäger
Kill 5 animals for food.=Töten Sie 5 Tiere für Nahrung.
Kill an animal for food.=Töten Sie ein Tier für Nahrung.
Bomb has Been Defused!=Bombe wurde entschärft!
Kill a mine turtle.=Töten Sie eine Minenschildkröte.
Ranger=Waldhüter
@ -91,3 +91,5 @@ TNT needs to be ignited by a flint and steel.=TNT muss mit Feuerstein und Stahl
Sleeping makes the night go past in the blink of an eye.=Im Schlaf vergeht die Nacht wie im Fluge.
Isn't it stressful to carry this heavy bed around?=Ist es nicht anstrengend, dieses schwere Bett mit dir herumzuschleppen?
Get this thing out of my face!=Nimm dieses Ding aus meinem Gesicht!
Smalltalk=Gerede
Visit a village and have a friendly chat with a villager.=Besuchen Sie ein Dorf und haben Sie ein nettes Gespräch mit einem Dorfbewohner.

View File

@ -1,6 +1,6 @@
# textdomain: mobs
Hunter=
Kill 5 animals for food.=
Kill an animal for food.=
Bomb has Been Defused!=
Kill a mine turtle.=
Ranger=
@ -94,3 +94,5 @@ TNT needs to be ignited by a flint and steel.=
Sleeping makes the night go past in the blink of an eye.=
Isn't it stressful to carry this heavy bed around?=
Get this thing out of my face!=
Smalltalk=
Visit a village and have a friendly chat with a villager.=

View File

@ -151,6 +151,8 @@ for _, npc_type_table in pairs(npc_types) do
return
end
achievements.trigger_achievement(clicker, "smalltalk")
-- Feed to heal npc
local hp = self.object:get_hp()

View File

@ -1,4 +1,3 @@
default
util
crafting
achievements

View File

@ -206,15 +206,4 @@ crafting.register_craft(
}
})
-- Achievements
achievements.register_achievement(
"musician",
{
title = S("Sound Engineer"),
description = S("Craft a music player."),
times = 1,
craftitem = "music:player",
})
default.log("mod:music", "loaded")

View File

@ -81,7 +81,16 @@ minetest.register_entity(
physical = false,
pointable = false,
automatic_face_movement_dir = -90,
attached = nil,
start_y = nil,
on_activate = function(self, staticdata, dtime_s)
if dtime_s == 0 then
local pos = self.object:get_pos()
self.start_y = pos.y
end
end,
on_step = function(self, dtime)
local pos = self.object:get_pos()
local under = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z})
@ -143,6 +152,12 @@ minetest.register_entity(
if self.attached ~= nil then
default.player_attached[self.attached] = false
local player = minetest.get_player_by_name(self.attached)
if player and self.start_y ~= nil then
if self.start_y - self.object:get_pos().y > 100 then
achievements.trigger_achievement(player, "sky_diver")
end
end
self.object:set_detach()
end
@ -169,9 +184,8 @@ achievements.register_achievement(
"sky_diver",
{
title = S("Skydiver"),
description = S("Craft 5 parachutes."),
times = 5,
craftitem = "parachute:parachute",
description = S("Descend over 100 blocks with a parachute."),
times = 1,
})
default.log("mod:parachute", "loaded")

View File

@ -1,5 +1,5 @@
# textdomain: parachute
Parachute=Fallschirm
Skydiver=Fallschirmspringer
Craft 5 parachutes.=Fertigen Sie 5 Fallschirme.
Descend over 100 blocks with a parachute.=Sinken Sie über 100 Blöcke mit einem Fallschirm ab.
Cannot open parachute on ground!=Fallschirm kann nicht auf dem Boden geöffnet werden!

View File

@ -1,5 +1,5 @@
# textdomain: parachute
Parachute=
Skydiver=
Craft 5 parachutes.=
Descend over 100 blocks with a parachute.=
Cannot open parachute on ground!=

View File

@ -264,6 +264,7 @@ minetest.register_node(
local itemname = puncher:get_wielded_item():get_name()
if itemname == "default:flint_and_steel" then
achievements.trigger_achievement(puncher, "boom")
tnt.burn(pos)
end
end,
@ -323,20 +324,22 @@ minetest.register_craft(
local title, desc
if tnt_enable then
title = S("Boom!")
desc = S("Craft TNT.")
achievements.register_achievement(
"boom",
{
title = S("Boom!"),
description = S("Ignite TNT."),
times = 1,
})
else
title = S("Boom?")
desc = S("Craft defused TNT.")
achievements.register_achievement(
"boom",
{
title = S("Boom?"),
description = S("Craft defused TNT."),
times = 1,
craftitem = "tnt:tnt",
})
end
achievements.register_achievement(
"boom",
{
title = title,
description = desc,
times = 1,
craftitem = "tnt:tnt",
})
default.log("mod:tnt", "loaded")

View File

@ -3,5 +3,5 @@ TNT=
TNT (defused)=
Boom!=
Boom?=
Craft TNT.=
Ignite TNT.=
Craft defused TNT.=

View File

@ -3,5 +3,5 @@ TNT=TNT
TNT (defused)=TNT (entschärft)
Boom!=Bumm!
Boom?=Bumm?
Craft TNT.=Fertigen Sie TNT.
Ignite TNT.=Entzünden Sie TNT.
Craft defused TNT.=Fertigen Sie entschärftes TNT.