Skip to content

Commit

Permalink
sleeves fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Timidan committed Jul 23, 2024
1 parent e564e8a commit 443d469
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
45 changes: 45 additions & 0 deletions scripts/addMissingSleeves.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { Signer } from "ethers";
import { ethers, network, run } from "hardhat";
import { itemManagerAlt } from "./helperFunctions";
import {
bodyWearable,
BodyWearableOutput,
updateSleevesTaskForSvgType,
} from "./svgHelperFunctions";

async function main() {
let testing = ["hardhat", "localhost"].includes(network.name);
let signer: Signer;

const accounts = await ethers.getSigners();

if (testing) {
await network.provider.request({
method: "hardhat_impersonateAccount",
params: [itemManagerAlt],
});
signer = await ethers.provider.getSigner(itemManagerAlt);
} else if (network.name === "matic") {
signer = accounts[0];
} else {
throw Error("Incorrect network selected");
}

const sleeve = await updateSleevesTaskForSvgType([36], "front");
const wearableId = 248;
const output: BodyWearableOutput = bodyWearable(
`${wearableId}_UpOnlyShirt`,
"svgItems"
);

await run("updateSvgs", sleeve);
}

if (require.main === module) {
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});
}
1 change: 1 addition & 0 deletions svgs/svgItems/248_UpOnlyShirtLeft.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions svgs/svgItems/248_UpOnlyShirtLeftUp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions svgs/svgItems/248_UpOnlyShirtRight.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions svgs/svgItems/248_UpOnlyShirtRightUp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svgs/wearables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export const sleeveSvgs = [
sleeves("234_ShaamanPoncho"),
sleeves("241_WGMIShirt"),
sleeves("244_VNeckShirt"),
"248_UpOnlyShirt",
sleeves("248_UpOnlyShirt"),
"250_CoinGeckoTee",
"253_AastronautSuit",
"256_LilBubbleSpaceSuit",
Expand Down

0 comments on commit 443d469

Please sign in to comment.