From 1a6acf8e90537c87e08ff9392d82335e6cbfba0f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 2 Oct 2014 11:22:30 +0200 Subject: [PATCH] Add golden cup and diamond cup as awards The golden cup is awarded for collecting all gold ingots and thus finishing the tutorial. The diamond cup is awarded for collecting all hidden diamonds. --- .../textures/default_diamond_block.png | Bin 0 -> 442 bytes mods/default/textures/default_gold_block.png | Bin 693 -> 421 bytes mods/tutorial/init.lua | 46 ++++++++++++++++-- mods/tutorial/locale/template.txt | 4 +- 4 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 mods/default/textures/default_diamond_block.png diff --git a/mods/default/textures/default_diamond_block.png b/mods/default/textures/default_diamond_block.png new file mode 100644 index 0000000000000000000000000000000000000000..8177f327bdc5acf052c1951dc137dbcaf5a972db GIT binary patch literal 442 zcmV;r0Y(0aP)s1zlIBOLf40q3=ag^r zj0D;{Nv+zOCtByp10W(hzRfcMoFeQ=#C2+4at$SHth&jU^|G1V&XrDOzD;kNI~H0Kza=xIWbm}rdA zYzP1#9<>d!=l(>-avZ$A-KRX)F&w+D)>VS{&8(RXfPvJc>i}|Y@=R%P@IIwDg}9$x zj{U5a5Qh&{Ef9(5(Q1k*2cJ`N-qWvo1m-S!i{YLpfbqU<&)S+<7unlkIuiRFA|n1S zJH7IL^~3*r1G*gZ(z|qNwVL+mcukQ3IwCtx+0!fUS3gWIypJxIKit$Vy^-khhj*1r k@09Z850@9-4(ame9|xOWv}TQA2><{907*qoM6N<$g5cuMYXATM literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_gold_block.png b/mods/default/textures/default_gold_block.png index d36b0a56a51f3a41c653ec936b5786c0d353db59..f2678b575eb276f93a6b097bc486fff6a4514c14 100644 GIT binary patch delta 396 zcmV;70dxMf1*HR!BYy#GNklH9;06 z2#1-WZ`E#H%)G+)(e&$EK40W>lx+=vz=T@i4gjD}lj4E$UXCq+t!U98jEnyf9zQWS z(m?jBVe6zBVvKPdk+1HQ;<+bw_)-Y7unDz*H>BA#Cr8p(>VI-+oS)@b(iqF*mhwGM zb{L9jqNES_PuQMJ9D7Xz)2@V`Tbt^YbSg=0r=7%@0}4HoM!@qGE9T~gy;*t7t#*4 zvv1C*fl`^Oe}4mtuxNP}+pBy>xWOO5?2sQOKbyI59T8(q01)mV zKmZsCDSYT?<=B#EE6OHd|2Lm+|NpdG01)N{p#srzBu?{GMj(UU=Iegb%Wtx{B8QLngJW?cYg|Kyt+Br?+$>i6uJHF z*R%TTd3uy-Vp#=rBlf0g8uF|9!X=}fTSQ8M`ttX;$9%o;^##5Em_=?A_CO=>(1*Pw zEo`1<53=a8=_$Q?hv>kvFNdRq#QglCZCWEYFHDhZLohq1Gg1erbnMZS=5XsngT?ZU zKc9Sp70!nmdw-@|#BEM#9;+^V-`^Us5X-PsULqNz*J<&=!M*w1DrJC0BsEGxrY*Z= zYWFOFW*Y&`EKs4pcc0gljvpHG04dpM@}N;erD+cuxM@PzI5r`hVEq|4i%)WYQiQUJ zcFRT1Nz`4S#3RM#YLj&~VYxHyojN4}r4VC;xn-nwb$=N*Rt{T~vX#iD#{PGIxs+ie zU9G2JLaPfkcjfft@A5RH`?GX{X4(b`jXZS2m}STH>H|6n!Wwo07O1-xNhh60v#_rH z_bak#C~e$1PHHv*5&00YLF)lXpdJA6(cL}^s%vl(Oj5zG5GrVJB_u&MLT~^-8K7s=g5TFgT1}v(w=6(^HHQxV&a0`tH6-*oc7GS8t zJJ=r9|KYDck&MBHCGQ6iECqI zRc034%_y7O^07*qoM6N<$ Ef~XihZ~y=R diff --git a/mods/tutorial/init.lua b/mods/tutorial/init.lua index 7603505..45eb5f1 100644 --- a/mods/tutorial/init.lua +++ b/mods/tutorial/init.lua @@ -765,14 +765,14 @@ tutorial.texts.first_diamond = diamonds. Can you find them all? The first diamond may have been easy to collect, but the remaining 11 diamonds probably won't be that easy. -There won't be any special event or bonus, however, if you manage to collect all -diamonds, apart from feeling special, maybe. ;-)]] +If you manage to find them all, you will be awarded a symbolic prize.]] tutorial.texts.last_diamond = [[Congratulations! You have collected all the diamonds of Tutorial World! -You can feel special now.]] +To recognize this achievement, you have been awarded with a diamond cup. It has been placed in +the Good-Bye Room for you.]] tutorial.texts.controls = @@ -972,6 +972,44 @@ minetest.register_node("tutorial:waterfall_off", { end }) + +--[[ Tutorial cups, awarded for achievements ]] +tutorial.cupnodebox = { + type = "fixed", + fixed = { + {-0.3,-0.5,-0.3,0.3,-0.4,0.3}, -- stand + {-0.1,-0.4,-0.1,0.1,0,0.1}, -- handle + {-0.3,0,-0.3,0.3,0.1,0.3}, -- cup (lower part) + -- the 4 sides of the upper part + {-0.2,0.1,-0.3,0.2,0.5,-0.2}, + {-0.2,0.1,0.2,0.2,0.5,0.3}, + {-0.3,0.1,-0.3,-0.2,0.5,0.3}, + {0.2,0.1,-0.3,0.3,0.5,0.3}, + } +} + +--[[ awarded for collecting all gold ingots ]] +minetest.register_node("tutorial:cup_gold", { + description = S("golden cup"), + tiles = { "default_gold_block.png" }, + paramtype = "light", + drawtype = "nodebox", + node_box = tutorial.cupnodebox, + groups = { immortal = 1 } +}) + +--[[ awarded for collecting all diamonds ]] +minetest.register_node("tutorial:cup_diamond", { + description = S("diamond cup"), + tiles = { "default_diamond_block.png" }, + paramtype = "light", + drawtype = "nodebox", + node_box = tutorial.cupnodebox, + groups = { immortal = 1 } +}) + + + --[[ This function shows a simple dialog window with scrollable text name: name of the player to show the formspec to caption: Caption of the dialog window (not escaped) @@ -1090,6 +1128,7 @@ minetest.register_globalstep(function(dtime) minetest.show_formspec(name, "tutorial_last_gold", formspec) + minetest.set_node({x=19,y=2,z=72}, {name="tutorial:cup_gold"}) tutorial.state.last_gold = true state_changed = true end @@ -1115,6 +1154,7 @@ minetest.register_globalstep(function(dtime) S("You have collected all hidden diamonds!"), tutorial.texts.last_diamond ) + minetest.set_node({x=19,y=2,z=74}, {name="tutorial:cup_diamond"}) tutorial.state.last_diamond = true state_changed = true end diff --git a/mods/tutorial/locale/template.txt b/mods/tutorial/locale/template.txt index 12fb5b6..f394196 100644 --- a/mods/tutorial/locale/template.txt +++ b/mods/tutorial/locale/template.txt @@ -143,10 +143,10 @@ At the bottom of the screen you see 8 squares. This is called the 'hotbar'.\nThe Careful! These spikes hurt you when you stand inside, so don't walk into them.\nTry to walk around and get the gold ingot.\n\nThey damage you every second you stand in them.\n\nThis is one of the many ways you can get hurt in Minetest. # Tutorial text: last_diamond -Congratulations!\nYou have collected all the diamonds of Tutorial World!\n\nYou can feel special now. +Congratulations!\nYou have collected all the diamonds of Tutorial World!\n\nTo recognize this achievement, you have been awarded with a diamond cup. It has been placed in\nthe Good-Bye Room for you. # Tutorial text: first_diamond -Great, you have found and collected a hidden diamond! In Tutorial World, there are 12 hidden\ndiamonds. Can you find them all? The first diamond may have been easy to collect, but the\nremaining 11 diamonds probably won't be that easy.\n\nThere won't be any special event or bonus, however, if you manage to collect all\ndiamonds, apart from feeling special, maybe. ;-) +Great, you have found and collected a hidden diamond! In Tutorial World, there are 12 hidden\ndiamonds. Can you find them all? The first diamond may have been easy to collect, but the\nremaining 11 diamonds probably won't be that easy.\n\nIf you manage to find them all, you will be awarded a symbolic prize. # Tutorial text: dive To get to the other side, you have to dive here. Don't worry, the tunnel is not\nlong. But don't stay too long in the water, or else you take damage.\nAt the bottom of the pool lies a gold ingot. Try to get it!\n\n Swim forwards: [W]\n Swim backwards: [S]\n Swim leftwards: [A]\n Swim rightwards: [D]\n Swim upwards: [Space]\n Swim downwards: [Shift]