1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-03 17:10:27 +01:00
server-nalc/mods/awards
2015-05-26 23:37:16 +02:00
..
sounds Change rights in the repository (755) 2015-05-26 23:37:16 +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 Moved, renamed sounds, and added code for them 2015-04-04 15:24:20 +02:00
depends.txt Change rights in the repository (755) 2015-05-26 23:37:16 +02: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