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

[TESTED]Clean while Farming: Korulsi & subtext #5755

Open
wants to merge 5 commits into
base: bso
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions src/lib/bankImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@

// BSO exclusive misc
[i('Athelas'), 'athelas'],
[i('Korulsi'), 'korulsi'],
[i('Grimy korulsi'), 'korulsi'],
[i('Athelas seed'), 'athelas'],
[i('Mysterious seed'), 'mysterious'],
[i('Mango seed'), 'mango'],
Expand Down Expand Up @@ -422,7 +424,7 @@
}
}

const cachedImage = this.itemIconImagesCache.get(itemID);

Check warning on line 427 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'itemID' is already declared in the upper scope on line 24 column 8

Check warning on line 427 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'itemID' is already declared in the upper scope on line 24 column 8
if (cachedImage) return cachedImage;

const isOnDisk = this.itemIconsList.has(itemID);
Expand Down Expand Up @@ -456,7 +458,7 @@

const image = await loadImage(imageBuffer);

this.itemIconsList.add(itemID);

Check warning on line 461 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'itemID' is already declared in the upper scope on line 24 column 8

Check warning on line 461 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'itemID' is already declared in the upper scope on line 24 column 8
this.itemIconImagesCache.set(itemID, image);
}

Expand Down Expand Up @@ -533,7 +535,7 @@
currentContract.matchingPlantedCrop &&
currentContract.matchingPlantedCrop.ready
);

Check warning on line 538 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7

Check warning on line 538 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7
let backgroundImage = background.image!;
if (bankBgId === 29 && isFarmingContractReadyToHarvest) {
backgroundImage = this.alternateImages.find(i => i.bgId === 29)!.image;
Expand All @@ -545,10 +547,10 @@
const hasBgSprite = Boolean(this.bgSpriteList[background.name.toLowerCase()]);
const bgSprite = hasBgSprite ? this.bgSpriteList[background.name.toLowerCase()] : this.bgSpriteList.default;

return {

Check warning on line 550 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7

Check warning on line 550 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7
uniqueSprite: hasBgSprite,
sprite: bgSprite,
background,

Check warning on line 553 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7

Check warning on line 553 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7
backgroundImage
};
}
Expand Down Expand Up @@ -583,7 +585,7 @@
xLoc = 2 + 6 + (compact ? 9 : 20) + (i % itemsPerRow) * itemWidthSize;
let [item, quantity] = items[i];
const itemImage = await this.getItemImage(item.id, user);
const itemHeight = compact ? itemImage.height / 1 : itemImage.height;

Check warning on line 588 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7

Check warning on line 588 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

'i' is already declared in the upper scope on line 78 column 7
const itemWidth = compact ? itemImage.width / 1 : itemImage.width;
const isNewCLItem =
flags.has('showNewCL') && currentCL && !currentCL.has(item.id) && allCLItems.includes(item.id);
Expand Down Expand Up @@ -651,19 +653,19 @@
bottomItemText = weightings[item.id];
}

const forcedShortName = forcedShortNameMap.get(item.id);

Check warning on line 656 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Unexpected value in conditional. A boolean expression is required

Check warning on line 656 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Unexpected value in conditional. A boolean expression is required
if (forcedShortName && !bottomItemText) {
ctx.font = '10px Smallest Pixel-7';
bottomItemText = forcedShortName.toUpperCase();
}

Check warning on line 661 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Unexpected number value in conditional. An explicit zero/NaN check is required

Check warning on line 661 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Unexpected number value in conditional. An explicit zero/NaN check is required
if (bottomItemText) {
let text =
typeof bottomItemText === 'number' ? toKMB(bottomItemText) : bottomItemText.toString().slice(0, 8);
ctx.fillStyle = 'black';
fillTextXTimesInCtx(ctx, text, floor(xLoc), yLoc + distanceFromTop);
ctx.fillStyle =
typeof bottomItemText === 'string' ? 'white' : generateHexColorForCashStack(bottomItemText);

Check warning on line 668 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v18.12.0 - ubuntu-latest

Unexpected value in conditional. A boolean expression is required

Check warning on line 668 in src/lib/bankImage.ts

View workflow job for this annotation

GitHub Actions / Node v20 - ubuntu-latest

Unexpected value in conditional. A boolean expression is required
fillTextXTimesInCtx(ctx, text, floor(xLoc - 1), yLoc + distanceFromTop - 1);
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/lib/skilling/skills/farming/herbPlants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ const herbPlants: Plant[] = [
aliases: ['korulsi seed'],
inputItems: new Bank({ 'Korulsi seed': 1 }),
outputCrop: itemID('Grimy korulsi'),
cleanHerbCrop: itemID('Korulsi'),
herbXp: 25,
herbLvl: 110,
petChance: 97_364,
seedType: 'herb',
growthTime: 85,
Expand Down
Loading