From 63073095224d492ec1b289dcde92de68426c4219 Mon Sep 17 00:00:00 2001 From: Glazelf Date: Fri, 29 Sep 2023 23:21:14 +0200 Subject: [PATCH] console log --- src/helpers/monsterDataHelper.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/helpers/monsterDataHelper.tsx b/src/helpers/monsterDataHelper.tsx index 40a5303..683f83d 100644 --- a/src/helpers/monsterDataHelper.tsx +++ b/src/helpers/monsterDataHelper.tsx @@ -1,23 +1,26 @@ // @ts-ignore import monsters from '../../objects/monsters'; +import synthesis from '../../util/synthesis'; const monsterKeys = Object.keys(monsters).sort(); const getMonsterListByParent = (parent: string) => { + console.log(parent) if (parent && parent.indexOf('_') === 0) { + const familyKeys = monsterKeys.filter((monsterName) => monsters[monsterName].family === parent); return familyKeys.map((monster_key) => monsters[monster_key].name); } else { const parentData = monsters[parent]; return parentData ? [parentData.name] : undefined; - } -} + }; +}; const monsterNames = () => monsterKeys.map((monster_key) => monsters[monster_key].name); const getMonsterByName = (name: string) => { const key = monsterKeys.filter((monsterName) => monsters[monsterName].name === name)[0]; return monsters[key]; -} +}; export { getMonsterByName, getMonsterListByParent, monsterNames }; \ No newline at end of file