X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Faos%2FSeed.js;h=3e6ac4af4e11bce9575ac8221fa0610016beb9af;hb=145eeff8f5111c716cc3c7e8be324967c68de5af;hp=efc113015eb2990217126043d395191305162e82;hpb=9eed96443825a454fa26fbcd70da9381a2115f69;p=alttp.git diff --git a/resources/js/components/aos/Seed.js b/resources/js/components/aos/Seed.js index efc1130..3e6ac4a 100644 --- a/resources/js/components/aos/Seed.js +++ b/resources/js/components/aos/Seed.js @@ -22,6 +22,49 @@ const applyPatch = (rom, patch, filename) => { } }; +const isDefaultSetting = (name, value) => { + switch (name) { + case 'area': + return value === 'Vanilla'; + case 'boss': + return value === 'Vanilla'; + case 'doublechaos': + return value === 'false'; + case 'enemy': + return value === 'Vanilla'; + case 'grahm': + return value === 'BookSouls'; + case 'itempool': + return value === 'Standard'; + case 'kicker': + return value === 'false'; + case 'levelexp': + return value === 'Vanilla'; + case 'logic': + return value === 'AreaTechTiers'; + case 'mapassist': + return value === 'false'; + case 'nodupes': + return value === 'false'; + case 'palette': + return value === 'Vanilla'; + case 'panther': + return value === 'Rand70Dup'; + case 'shopprice': + return value === 'Vanilla'; + case 'shopSouls': + return value === 'Vanilla'; + case 'startshop': + return value === 'Vanilla'; + case 'telestart': + return value === 'false'; + case 'weight': + return value === '2.5'; + default: + return false; + } +}; + const Seed = ({ patch, seed }) => { const { rom } = useAosBaseRom(); @@ -86,6 +129,24 @@ const Seed = ({ patch, seed }) => {

{i18n.t('aosSeeds.generator')}

{i18n.t(`aosSeeds.generators.${seed.generator}`)}

+ {seed.settings ? <> +

{i18n.t('aosSeeds.settings')}

+ + {Object.entries(seed.settings).map(([key, value]) => + + + {i18n.t(`aosSeeds.settingName.${key}`)} + +
+ {isDefaultSetting(key, value) ? + i18n.t(`aosSeeds.settingValue.${key}.${value}`) + : + {i18n.t(`aosSeeds.settingValue.${key}.${value}`)} + } + + )} +
+ : null} ; }; @@ -98,6 +159,8 @@ Seed.propTypes = { preset: PropTypes.string, race: PropTypes.bool, seed: PropTypes.string, + settings: PropTypes.shape({ + }), status: PropTypes.string, updated_at: PropTypes.string, }),