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
|
@ -1004,7 +1004,7 @@ function peg$parse(input, options) {
|
|||
TW : function termWidth() {
|
||||
return !isNaN(value) && _.get(client, 'term.termWidth', 0) >= value;
|
||||
},
|
||||
ID : function isUserId(value) {
|
||||
ID : function isUserId() {
|
||||
if(!user) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1024,6 +1024,20 @@ function peg$parse(input, options) {
|
|||
const midnight = now.clone().startOf('day')
|
||||
const minutesPastMidnight = now.diff(midnight, 'minutes');
|
||||
return !isNaN(value) && minutesPastMidnight >= value;
|
||||
},
|
||||
AC : function achievementCount() {
|
||||
if(!user) {
|
||||
return false;
|
||||
}
|
||||
const count = user.getPropertyAsNumber(UserProps.AchievementTotalCount) || 0;
|
||||
return !isNan(value) && points >= value;
|
||||
},
|
||||
AP : function achievementPoints() {
|
||||
if(!user) {
|
||||
return false;
|
||||
}
|
||||
const points = user.getPropertyAsNumber(UserProps.AchievementTotalPoints) || 0;
|
||||
return !isNan(value) && points >= value;
|
||||
}
|
||||
}[acsCode](value);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue