add achievements
parent
0b3b37f733
commit
0b2c46d4c4
5
LICENSE
5
LICENSE
|
@ -13,6 +13,11 @@ chiptune_one | Chiptune One.wav | CarlosCarty | CC BY 3.0 https://creativeco
|
|||
==========================================================================================================================================================================
|
||||
|
||||
|
||||
magiccompass_wormball.png by zughy CC BY-SA 4.0 magiccompass_wormball.png
|
||||
wormball_win.png by zughy CC BY-SA 4.0 magiccompass_wormball.png, changes made
|
||||
|
||||
|
||||
|
||||
The other assests are CC0
|
||||
Models and Textures by MisterE
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ arena_lib.on_celebration('wormball', function(arena, winner_name)
|
|||
if # leaderboard == 0 then
|
||||
leaderboard [ 1 ] = { score , winner_name }
|
||||
new_highscore = true
|
||||
|
||||
else
|
||||
|
||||
local insert = true
|
||||
|
@ -95,8 +96,22 @@ arena_lib.on_celebration('wormball', function(arena, winner_name)
|
|||
|
||||
if new_highscore then
|
||||
arena_lib.HUD_send_msg_all("title", arena, 'New High Score!', 2 ,'sumo_win',0xAEAE00)
|
||||
minetest.after(5,function()
|
||||
if minetest.get_modpath("aes_xp") then
|
||||
--register some achievements
|
||||
aes_xp.add_achievement("Wormball Master", 50, 40, 0, "Beat the Highscore", "wormball_win.png")
|
||||
aes_xp.achieve(winner_name,"Wormball Master")
|
||||
end
|
||||
end)
|
||||
else
|
||||
arena_lib.HUD_send_msg_all("title", arena, 'Game Over!', 2 ,'sumo_win',0xAEAE00)
|
||||
minetest.after(5,function()
|
||||
if minetest.get_modpath("aes_xp") then
|
||||
--register some achievements
|
||||
aes_xp.add_achievement("Worming Along", 10, 3, 0, "Play a round of \nsingleplayer wormball", "magiccompass_wormball.png")
|
||||
aes_xp.achieve(winner_name,"Worming Along")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
minetest.after( 3 , function( arena , score , leaderboard )
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 195 B |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue