WIP on user achievements

* Hook up events for testing
* Start to plug in experimental interrupt
This commit is contained in:
Bryan Ashby 2019-01-02 22:13:42 -07:00
parent c5a72c7356
commit a34dab6a73
5 changed files with 156 additions and 2 deletions

View file

@ -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) {