1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 16:20:38 +01:00
server-nalc/mods/awards
2015-07-24 23:09:08 +02:00
..
sounds Change rights in the repository (755) 2015-05-26 23:37:16 +02:00
textures compress textures, fix preview shields 2015-07-24 23:09:08 +02: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 added button to show awards 2015-07-20 23:28:46 +02:00
depends.txt Change rights in the repository (755) 2015-05-26 23:37:16 +02:00
init.lua Removed whitespaces 2015-06-10 19:03:32 +02:00
readme.md Merge server to github 2014-12-11 18:53:00 +01:00
triggers.lua Removed whitespaces 2015-06-10 19:03:32 +02: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