-
Notifications
You must be signed in to change notification settings - Fork 133
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
Wiki gear images #6181
Wiki gear images #6181
Conversation
Deploying oldschoolbot with Cloudflare Pages
|
@@ -1,9 +1,10 @@ | |||
import { readFileSync, writeFileSync } from 'node:fs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using fs.promises.readFile
and fs.promises.writeFile
for non-blocking I/O operations.
import { readFileSync, writeFileSync } from 'node:fs'; | |
import { promises as fs } from 'node:fs'; |
await writeFile(`./docs/public/images/gear/${imageKey}.png`, image as any); | ||
console.log(`Generated ${imageKey} gear image`); | ||
} | ||
console.log("x"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary console logs to clean up the code.
console.log("x"); |
console.log("z"); | ||
wtf.dump(); | ||
process.exit(0); | ||
wtf.dump(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the redundant wtf.dump()
call after process.exit(0)
as it will never be executed.
wtf.dump(); |
const gear = new Gear(); | ||
for (const id of itemIDs) gear.equip(getOSItem(id)); | ||
const image = await generateGearImage( | ||
{ user: { bankBackground: 1 }, farmingContract: () => null } as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid using any
type casting. Use a more specific type or interface for better type safety.
Description:
Changes:
Other checks: