Module core.libraries.meska.skills.server
Metrics-Skill-Achievement Framework (MESKA)
The skill-system core functions.
Module Overview
Functions
| meska.skills.loadFor(ply[, cb]) | Fetches player skills from db. |
| meska.skills.capLevels(ply, min, max) | Caps all levels by meska.conf.defaults[skill]. |
| meska.skills.announceLevel(ply, skill, level) | Announces a level-up to player. |
| meska.skills.getProductsBySkillLevel(ply, skill) | Gets eligable products by skill and level. |
| meska.skills.getProductsBySkillFilter(ply, skill, filter) | Gets eligable products by skill and filter. |
| meska.skills.setup(skill, config) | Setup a new meska skill. |
- meska.skills.loadFor(ply[, cb])
-
Fetches player skills from db.
Parameters:
- ply Player Entity.
- cb func Callback Function. (optional)
- meska.skills.capLevels(ply, min, max)
-
Caps all levels by meska.conf.defaults[skill].
Parameters:
- ply Player Entity.
- min Minimum level.
- max Maximum level.
- meska.skills.announceLevel(ply, skill, level)
-
Announces a level-up to player.
Parameters:
- ply Player Entity.
- skill The skill.
- level The level.
- meska.skills.getProductsBySkillLevel(ply, skill)
-
Gets eligable products by skill and level.
Parameters:
- ply Player Entity.
- skill The skill.
Returns:
-
[table|nil] Products table or nil.
- meska.skills.getProductsBySkillFilter(ply, skill, filter)
-
Gets eligable products by skill and filter.
Parameters:
- ply Player Entity.
- skill The skill.
- filter The filter.
Returns:
-
[table|nil] Products table or nil.
- meska.skills.setup(skill, config)
-
Setup a new meska skill.
Parameters:
- skill The skill name.
- config Skill configuration.