mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
+ 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:
parent
091a9ae2c7
commit
2788c37492
12 changed files with 149 additions and 27 deletions
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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue