diff --git a/mods/tutorial/init.lua b/mods/tutorial/init.lua index 1d69e64..69c9d7e 100644 --- a/mods/tutorial/init.lua +++ b/mods/tutorial/init.lua @@ -122,7 +122,6 @@ minetest.register_abm( { ) - -- Number of gold ingots/lumps tutorial.gold = 13 @@ -1050,7 +1049,15 @@ tutorial.cupselbox = { } } +function tutorial.goldinfo(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("This golden cup has been awarded for finishing the tutorial.")) +end +function tutorial.diamondinfo(pos) + local meta = minetest.get_meta(pos) + meta:set_string("infotext", S("This diamond cup has been awarded for collecting all hidden diamonds.")) +end --[[ awarded for collecting all gold ingots ]] minetest.register_node("tutorial:cup_gold", { @@ -1060,7 +1067,8 @@ minetest.register_node("tutorial:cup_gold", { drawtype = "nodebox", node_box = tutorial.cupnodebox, selection_box = tutorial.cupselbox, - groups = { immortal = 1 } + groups = { immortal = 1 }, + on_construct = tutorial.goldinfo, }) --[[ awarded for collecting all diamonds ]] @@ -1071,10 +1079,25 @@ minetest.register_node("tutorial:cup_diamond", { drawtype = "nodebox", node_box = tutorial.cupnodebox, selection_box = tutorial.cupselbox, - groups = { immortal = 1 } + groups = { immortal = 1 }, + on_construct = tutorial.diamondinfo, }) +--[[ +minetest.register_abm({ + nodenames = {"tutorial:cup_gold"}, + interval = 5, + chance = 1, + action = tutorial.goldinfo, +}) +minetest.register_abm({ + nodenames = {"tutorial:cup_diamond"}, + interval = 5, + chance = 1, + action = tutorial.diamondinfo, +}) +]] --[[ This function shows a simple dialog window with scrollable text name: name of the player to show the formspec to diff --git a/mods/tutorial/locale/de.txt b/mods/tutorial/locale/de.txt index bcb1805..f967d96 100644 --- a/mods/tutorial/locale/de.txt +++ b/mods/tutorial/locale/de.txt @@ -65,6 +65,8 @@ You have collected all hidden diamonds! = Sie haben alle versteckten Diamanten g # Awards golden cup = Goldpokal diamond cup = Diamantpokal +This golden cup has been awarded for finishing the tutorial. = Dieser Goldpokal wurde für das Beenden der Einführung vergeben. +This diamond cup has been awarded for collecting all hidden diamonds. = Dieser Diamantpokal wurde für das Aufsammeln aller versteckten Diamanten vergeben. # Kick message You have voluntarily exited the tutorial. = Sie haben die Einführung freiwillig verlassen. diff --git a/mods/tutorial/locale/fr.txt b/mods/tutorial/locale/fr.txt index 91a9cdc..78ed97d 100644 --- a/mods/tutorial/locale/fr.txt +++ b/mods/tutorial/locale/fr.txt @@ -65,6 +65,8 @@ You have collected all hidden diamonds! = Vous avez trouvé tous les diamants ca # Awards golden cup = Coupe en or diamond cup = Coupe en diamant +This golden cup has been awarded for finishing the tutorial. +This diamond cup has been awarded for collecting all hidden diamonds. # Kick message You have voluntarily exited the tutorial. = Vous avez volontairement quitté le tutoriel. diff --git a/mods/tutorial/locale/id.txt b/mods/tutorial/locale/id.txt index 387b512..db536d0 100644 --- a/mods/tutorial/locale/id.txt +++ b/mods/tutorial/locale/id.txt @@ -65,6 +65,8 @@ You have collected all hidden diamonds! = Kamu telah mengumpulkan semua berlian # Awards golden cup = cangkir emas diamond cup = cangkir berlian +This golden cup has been awarded for finishing the tutorial. +This diamond cup has been awarded for collecting all hidden diamonds. # Kick message You have voluntarily exited the tutorial. = Kamu dengan sukarela keluar dari tutorial. diff --git a/mods/tutorial/locale/template.txt b/mods/tutorial/locale/template.txt index 54f7af0..dc18fdc 100644 --- a/mods/tutorial/locale/template.txt +++ b/mods/tutorial/locale/template.txt @@ -65,6 +65,8 @@ You have collected all hidden diamonds! # Awards golden cup diamond cup +This golden cup has been awarded for finishing the tutorial. +This diamond cup has been awarded for collecting all hidden diamonds. # Kick message You have voluntarily exited the tutorial.