1
0
mirror of https://github.com/one-among-us/data.git synced 2025-02-22 22:28:45 +08:00

[+] Add switcher to skip age-calc

This commit is contained in:
Elihuso Quigley 2025-02-08 10:10:44 +08:00
parent 9b5d17d2ee
commit 7742a6f066
3 changed files with 5 additions and 2 deletions

View File

@ -6,5 +6,6 @@
"trigger": ["Aniloviraw"],
"switch": [
["Anilovr", "Aniloviraw"]
]
],
"skipAges": ["cheonwoomaeng"]
}

View File

@ -36,6 +36,7 @@ const notShowOnHomeList = hdata.notShowOnHome;
const actualHide = hdata.actualHide;
const trigger = hdata.trigger;
const switchPair = hdata.switch;
const skipAges = hdata.skipAges;
async function buildBlurCode() {
const blurCode = {};
@ -92,7 +93,7 @@ function buildPeopleInfoAndList() {
const sortKey = info.info?.died ?? mdMeta.info?.died ?? '0'
// Add age
if (info.info && info.info.died && info.info.born)
if (info.info && info.info.died && info.info.born && (!skipAges.includes(dirname)))
{
try { info.info.age = Math.abs(moment(info.info.died).diff(info.info.born, 'years', false)) }
catch (e) { console.log(`Unable to calculate age for ${dirname}`) }

View File

@ -5,6 +5,7 @@ export interface HData {
actualHide: string[];
trigger: string[];
switch: [string, string][];
skipAges: string[];
}
export interface PeopleMeta {