mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-05 04:07:23 +02:00
WIP on user achievements
* Hook up events for testing * Start to plug in experimental interrupt
This commit is contained in:
parent
c5a72c7356
commit
a34dab6a73
5 changed files with 156 additions and 2 deletions
|
@ -120,11 +120,14 @@ class StatLog {
|
|||
|
||||
//
|
||||
// User specific stats
|
||||
// These are simply convience methods to the user's properties
|
||||
// These are simply convenience methods to the user's properties
|
||||
//
|
||||
setUserStat(user, statName, statValue, cb) {
|
||||
// note: cb is optional in PersistUserProperty
|
||||
return user.persistProperty(statName, statValue, cb);
|
||||
user.persistProperty(statName, statValue, cb);
|
||||
|
||||
const Events = require('./events.js'); // we need to late load currently
|
||||
return Events.emit(Events.getSystemEvents().UserStatUpdate, { user, statName, statValue } );
|
||||
}
|
||||
|
||||
getUserStat(user, statName) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue