+ ACS: AC for achievement count check

+ ACS: AP for achievement point check
+ User minutes used on the system are now tracked
+ MCI: TO for total time spent online system (friendly format)
* Fix up a couple ACS bugs with |value|
* Fix formatting of achievement text
+ Add more achievements
* Fix achievement duration formatting
This commit is contained in:
Bryan Ashby 2019-01-10 20:34:52 -07:00
parent 091a9ae2c7
commit 2788c37492
12 changed files with 149 additions and 27 deletions

View file

@ -443,6 +443,22 @@ module.exports = class User {
);
}
setProperty(propName, propValue) {
this.properties[propName] = propValue;
}
incrementProperty(propName, incrementBy) {
incrementBy = incrementBy || 1;
let newValue = parseInt(this.getProperty(propName));
if(newValue) {
newValue += incrementBy;
} else {
newValue = incrementBy;
}
this.setProperty(propName, newValue);
return newValue;
}
getProperty(propName) {
return this.properties[propName];
}