-
Notifications
You must be signed in to change notification settings - Fork 95
Feature/crafting hide tanning #346
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
Merged
Tynarus
merged 14 commits into
runejs:feature/crafting-skill
from
SchauweM:feature/crafting-hide-tanning
Sep 30, 2021
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fdbd11d
Updated lock file
SchauweM ac0f0fb
Added Ellis tanner NPC
SchauweM d6b435a
Changed format of unhandled interactions where the id was not clear
SchauweM b20d796
Added cyan color
SchauweM 8882de5
Added constants for the tanning interface & hides
SchauweM 2e78294
Added interface logic
SchauweM 01b7784
Fixed "hasCoins" bug where if the coins were in slot 0, return false
SchauweM e70caf2
Add removeCoins(amount) to Player Actor
SchauweM 8b73676
Finish up logic of tanning hides
SchauweM 3c8eb93
Removed unused imports
SchauweM d8963d3
Changed hasCoins to has hasEnoughCoins and added the generic message
SchauweM 25dbbd3
Forgot to push hasEnoughCoins in this check
SchauweM 6dee343
Removed the default message for more flexibility in other plugins
SchauweM 0ad3f14
Fixed semicolons
SchauweM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,5 +13,8 @@ | |
| }, | ||
| "rs:alkharid_karim": { | ||
| "game_id": 543 | ||
| }, | ||
| "rs:tanner_ellis": { | ||
| "game_id": 2824 | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
src/plugins/skills/crafting/tanning-hides/tanning-hides-constants.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,133 @@ | ||
| import { Item } from '@engine/world/items/item'; | ||
| import { widgets } from '@engine/config'; | ||
| import { itemIds } from '@engine/world/config/item-ids'; | ||
|
|
||
| interface TanableHide { | ||
| hideId: number; | ||
| requiredLevel: number; | ||
| ingredients: Item; | ||
| output: Item & { label: string }; | ||
| cost: number; | ||
| } | ||
|
|
||
| interface TanButton { | ||
| shouldTakeInput: boolean; | ||
| count: number; | ||
| hide: TanableHide; | ||
| } | ||
|
|
||
| const COWHIDE_LEATHER: TanableHide = { | ||
| hideId: itemIds.hides.cowhide, | ||
| requiredLevel: 1, | ||
| ingredients: { itemId: itemIds.hides.cowhide, amount: 1 }, | ||
| output: { label: `Soft leather`, itemId: itemIds.leather.leather, amount: 1 }, | ||
| cost: 1, | ||
| } | ||
|
|
||
| const COWHIDE_HARDLEATHER: TanableHide = { | ||
| hideId: itemIds.hides.cowhide, | ||
| requiredLevel: 28, | ||
| ingredients: { itemId: itemIds.hides.cowhide, amount: 1 }, | ||
| output: { label: `Hard leather`, itemId: itemIds.leather.hard_leather, amount: 1 }, | ||
| cost: 3, | ||
| } | ||
|
|
||
| const SNAKEHIDE: TanableHide = { | ||
| hideId: itemIds.hides.snake_hide, | ||
| requiredLevel: 45, | ||
| ingredients: { itemId: itemIds.hides.snake_hide, amount: 1 }, | ||
| output: { label: `Snakeskin`, itemId: itemIds.leather.snakeskin, amount: 1 }, | ||
| cost: 15, | ||
| } | ||
|
|
||
| const SNAKEHIDE_TEMPLE_TREKKING: TanableHide = { | ||
| hideId: itemIds.hides.snake_hide_temple_trekking, | ||
| requiredLevel: 45, | ||
| ingredients: { itemId: itemIds.hides.snake_hide_temple_trekking, amount: 1 }, | ||
| output: { label: `Snakeskin`, itemId: itemIds.leather.snakeskin, amount: 1 }, | ||
| cost: 20, | ||
| } | ||
|
|
||
| const GREEN_D_HIDE: TanableHide = { | ||
| hideId: itemIds.hides.green_dragonhide, | ||
| requiredLevel: 57, | ||
| ingredients: { itemId: itemIds.hides.green_dragonhide, amount: 1 }, | ||
| output: { label: `Green d'hide`, itemId: itemIds.leather.green_d_leather, amount: 1 }, | ||
| cost: 20, | ||
| } | ||
|
|
||
| const BLUE_D_HIDE: TanableHide = { | ||
| hideId: itemIds.hides.blue_dragonhide, | ||
| requiredLevel: 66, | ||
| ingredients: { itemId: itemIds.hides.blue_dragonhide, amount: 1 }, | ||
| output: { label: `Blue d'hide`, itemId: itemIds.leather.blue_d_leather, amount: 1 }, | ||
| cost: 20, | ||
| } | ||
|
|
||
| const RED_D_HIDE: TanableHide = { | ||
| hideId: itemIds.hides.red_dragonhide, | ||
| requiredLevel: 73, | ||
| ingredients: { itemId: itemIds.hides.red_dragonhide, amount: 1 }, | ||
| output: { label: `Red d'hide`, itemId: itemIds.leather.red_d_leather, amount: 1 }, | ||
| cost: 20, | ||
| } | ||
|
|
||
| const BLACK_D_HIDE: TanableHide = { | ||
| hideId: itemIds.hides.black_dragonhide, | ||
| requiredLevel: 79, | ||
| ingredients: { itemId: itemIds.hides.black_dragonhide, amount: 1 }, | ||
| output: { label: `Black d'hide`, itemId: itemIds.leather.black_d_leather, amount: 1 }, | ||
| cost: 20, | ||
| } | ||
|
|
||
| /** | ||
| * Defines the widget model and item slots. | ||
| */ | ||
| export const widgetModelSlots = [ | ||
| { slotId: 100, titleLabel: 108, costLabel: 116, item: COWHIDE_LEATHER }, | ||
| { slotId: 101, titleLabel: 109, costLabel: 117, item: COWHIDE_HARDLEATHER }, | ||
| { slotId: 102, titleLabel: 110, costLabel: 118, item: SNAKEHIDE }, | ||
| { slotId: 103, titleLabel: 111, costLabel: 119, item: SNAKEHIDE_TEMPLE_TREKKING }, | ||
| { slotId: 104, titleLabel: 112, costLabel: 120, item: GREEN_D_HIDE }, | ||
| { slotId: 105, titleLabel: 113, costLabel: 121, item: BLUE_D_HIDE }, | ||
| { slotId: 106, titleLabel: 114, costLabel: 122, item: RED_D_HIDE }, | ||
| { slotId: 107, titleLabel: 115, costLabel: 123, item: BLACK_D_HIDE } | ||
| ]; | ||
|
|
||
| /** | ||
| * Defines the widget button ids. | ||
| */ | ||
| export const widgetButtonIds: Map<number, TanButton> = new Map<number, TanButton>([ | ||
| [148, { shouldTakeInput: false, count: 1, hide: COWHIDE_LEATHER }], | ||
| [140, { shouldTakeInput: false, count: 5, hide: COWHIDE_LEATHER }], | ||
| [132, { shouldTakeInput: true, count: 0, hide: COWHIDE_LEATHER }], | ||
| [124, { shouldTakeInput: false, count: 0, hide: COWHIDE_LEATHER }], | ||
| [149, { shouldTakeInput: false, count: 1, hide: COWHIDE_HARDLEATHER }], | ||
| [141, { shouldTakeInput: false, count: 5, hide: COWHIDE_HARDLEATHER }], | ||
| [133, { shouldTakeInput: true, count: 0, hide: COWHIDE_HARDLEATHER }], | ||
| [125, { shouldTakeInput: false, count: 0, hide: COWHIDE_HARDLEATHER }], | ||
| [150, { shouldTakeInput: false, count: 1, hide: SNAKEHIDE }], | ||
| [142, { shouldTakeInput: false, count: 5, hide: SNAKEHIDE }], | ||
| [134, { shouldTakeInput: true, count: 0, hide: SNAKEHIDE }], | ||
| [126, { shouldTakeInput: false, count: 0, hide: SNAKEHIDE }], | ||
| [151, { shouldTakeInput: false, count: 1, hide: SNAKEHIDE_TEMPLE_TREKKING }], | ||
| [143, { shouldTakeInput: false, count: 5, hide: SNAKEHIDE_TEMPLE_TREKKING }], | ||
| [135, { shouldTakeInput: true, count: 0, hide: SNAKEHIDE_TEMPLE_TREKKING }], | ||
| [127, { shouldTakeInput: false, count: 0, hide: SNAKEHIDE_TEMPLE_TREKKING }], | ||
| [152, { shouldTakeInput: false, count: 1, hide: GREEN_D_HIDE }], | ||
| [144, { shouldTakeInput: false, count: 5, hide: GREEN_D_HIDE }], | ||
| [136, { shouldTakeInput: true, count: 0, hide: GREEN_D_HIDE }], | ||
| [128, { shouldTakeInput: false, count: 0, hide: GREEN_D_HIDE }], | ||
| [153, { shouldTakeInput: false, count: 1, hide: BLUE_D_HIDE }], | ||
| [145, { shouldTakeInput: false, count: 5, hide: BLUE_D_HIDE }], | ||
| [137, { shouldTakeInput: true, count: 0, hide: BLUE_D_HIDE }], | ||
| [129, { shouldTakeInput: false, count: 0, hide: BLUE_D_HIDE }], | ||
| [154, { shouldTakeInput: false, count: 1, hide: RED_D_HIDE }], | ||
| [146, { shouldTakeInput: false, count: 5, hide: RED_D_HIDE }], | ||
| [138, { shouldTakeInput: true, count: 0, hide: RED_D_HIDE }], | ||
| [130, { shouldTakeInput: false, count: 0, hide: RED_D_HIDE }], | ||
| [155, { shouldTakeInput: false, count: 1, hide: BLACK_D_HIDE }], | ||
| [147, { shouldTakeInput: false, count: 5, hide: BLACK_D_HIDE }], | ||
| [139, { shouldTakeInput: true, count: 0, hide: BLACK_D_HIDE }], | ||
| [131, { shouldTakeInput: false, count: 0, hide: BLACK_D_HIDE }], | ||
| ]); | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.