+ 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:
16
core/user.js
16
core/user.js
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user