1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-09 12:00:17 +01:00
server-nalc/mods/awards
Robin De Sousa d5d8cee307 Added four sounds to MT, without the code to activate them :
mana : added a teleportation sound using the mirror
death_messages : added a death sound for player dying and a death sound for other players seeing him die
awards : added an award obtention sound
2015-04-01 18:19:45 +02:00
..
sounds Added four sounds to MT, without the code to activate them : 2015-04-01 18:19:45 +02:00
textures Merge server to github 2014-12-11 18:53:00 +01:00
.gitattributes Merge server to github 2014-12-11 18:53:00 +01:00
.gitignore Merge server to github 2014-12-11 18:53:00 +01:00
api.lua Merge server to github 2014-12-11 18:53:00 +01:00
init.lua Passage de globales en locales 2015-01-11 21:25:25 +01:00
readme.md Merge server to github 2014-12-11 18:53:00 +01:00
triggers.lua Merge server to github 2014-12-11 18:53:00 +01:00

Awards

by Andrew "Rubenwardy" Ward, GPL 3.0 or later.

This mod adds achievements to Minetest.

Majority of awards are back ported from Calinou's old fork in Carbone, under same license.

Code Reference

The API

  • awards.register_achievement(name,data_table)
    • name
    • desciption
    • sound [optional]
    • image [optional]
    • trigger [optional] [table]
      • type - "dig", "place", "death", "chat" or "join"
      • (for dig/place type) node - the nodes name
      • (for all types) target - how many to dig / place
    • secret [optional] - if true, then player needs to unlock to find out what it is.
  • awards.give_achievement(name,award)
    • -- gives an award to a player
  • awards.register_onDig(func(player,data))
    • -- return award name or null
  • awards.register_onPlace(func(player,data))
    • -- return award name or null
  • awards.register_onDeath(func(player,data))
    • -- return award name or null
  • awards.register_onChat(func(player,data))
    • -- return award name or null
  • awards.register_onJoin(func(player,data))
    • -- return award name or null

Player Data

A list of data referenced/hashed by the player's name.

  • player name
    • name [string]
    • count [table] - dig counter
      • modname [table]
        • itemname [int]
    • place [table] - place counter
      • modname [table]
        • itemname [int]
    • deaths
    • chats
    • joins