Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use localized text for crop names, seed names, and descriptions #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const OASIS_STOCK_IDS = [478, 486, 494, 802];

const OUTPUT_PATH = path.resolve(__dirname, 'parsed-crop-data.json');
const CROPS_PATH = path.resolve(__dirname, 'Crops.xnb');
const OBJECT_INFORMATION_PATH = path.resolve(__dirname, 'ObjectInformation.xnb');
const OBJECT_INFORMATION_PATH = path.resolve(__dirname, fs.readdirSync(__dirname).filter(file => file.match(/ObjectInformation(\.[a-z]{2}\-[A-Z]{2})?\.xnb/))[0] || "ObjectInformation.xnb");

// Check Stardew Valley data files exist
[CROPS_PATH, OBJECT_INFORMATION_PATH].forEach((filePath) => {
Expand Down Expand Up @@ -73,10 +73,10 @@ Object.keys(crops.content).forEach((key) => {
const crop = {};

/**
* Crop's name
* Crop's name (localized)
* @type {string}
*/
crop.name = cropInfoData[0];
crop.name = cropInfoData[4];

/**
* Crop's description
Expand Down Expand Up @@ -190,10 +190,10 @@ Object.keys(crops.content).forEach((key) => {
crop.seed = {};

/**
* Seed's name
* Seed's name (localized)
* @type {string}
*/
crop.seed.name = seedInfoData[0];
crop.seed.name = seedInfoData[4];

/**
* Seed's description
Expand Down