mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-27 21:16:09 +02:00
Add PV[name,value] ACS check
This commit is contained in:
parent
9e9dc9af89
commit
dd08cd68e7
4 changed files with 19 additions and 1 deletions
|
@ -1055,6 +1055,14 @@ function peg$parse(input, options) {
|
|||
}
|
||||
const points = user.getPropertyAsNumber(UserProps.AchievementTotalPoints) || 0;
|
||||
return !isNan(value) && points >= value;
|
||||
},
|
||||
PV : function userPropValue() {
|
||||
if (!user || !Array.isArray(value) || value.length !== 2) {
|
||||
return false;
|
||||
}
|
||||
const [propName, propValue] = value;
|
||||
const actualPropValue = user.getProperty(propName);
|
||||
return actualPropValue === propValue;
|
||||
}
|
||||
}[acsCode](value);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue