Skip to content

Commit

Permalink
Fix clothing code
Browse files Browse the repository at this point in the history
  • Loading branch information
colecrouter committed Apr 9, 2024
1 parent d6e02d0 commit 60d1d58
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 26 deletions.
18 changes: 5 additions & 13 deletions src/routes/(edit)/inventory/BigItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,11 @@
// Clothes weren't items until 1.4, they were a character property before then.
// https://stardewvalleywiki.com/Version_History#1.4
if (lookupItem._type === 'Shirt') {
if (item.clothesType === 0) {
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
} else if (item.clothesType === 1) {
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
}
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
}
}
}
Expand Down
18 changes: 5 additions & 13 deletions src/routes/(edit)/inventory/SmallItem.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,11 @@
// Clothes weren't items until 1.4, they were a character property before then.
// https://stardewvalleywiki.com/Version_History#1.4
if (lookupItem._type === 'Shirt') {
if (item.clothesType === 0) {
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
} else if (item.clothesType === 1) {
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
}
const sprite = lookupItem.SpriteIndex;
lookupItem = {
...lookupItem,
SpriteIndex: sprite,
} satisfies ItemInformation;
}
}
} else {
Expand Down

0 comments on commit 60d1d58

Please sign in to comment.