Skip to content

Commit

Permalink
Build script fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Oct 28, 2024
1 parent fafdba2 commit e75d98d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 150 deletions.
32 changes: 32 additions & 0 deletions data/bso_items.json
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,39 @@
"73222": "Offhand dice plushie",
"73223": "Tidal collector (i)",
"73224": "Pernix components",
"73250": "Sinister crate (s7)",
"73251": "Sinister crate key (s7)",
"73252": "Mumpkin",
"73253": "Mumpkin (demonic)",
"73254": "Mumpkin (pumpkin)",
"73255": "Mumpkin (dead)",
"73256": "Puzzle box (kuro)",
"73257": "Pumpkinhead boxhat",
"73258": "White hween mask",
"73259": "Deathless victims",
"73260": "Pumpkin cloak",
"73261": "Venomous cloak",
"73262": "Bloody cloak",
"73263": "Purple cloak",
"73264": "Dark cloak",
"73265": "White cloak",
"73266": "Pumpkin sweater",
"73267": "Sinister sweater",
"73268": "Pumpkin carving knife",
"73270": "Deathtouched tart",
"73271": "Jack-o-lantern",
"73272": "Zombie cow plushie",
"73273": "Pumpkin parasol",
"73274": "Halloween cracker",
"73275": "Monster in a backpack",
"73276": "Vampyric hween mask",
"73277": "Demonic hween mask",
"73278": "Zombie hween mask",
"73279": "Heirloom pumpkin",
"73301": "Spookling token",
"73302": "Miniature pumpkin head",
"88888": "Bucket of dung",
"88889": "Polterpup",
"121234": "Burnt celebratory cake",
"121521": "Celebratory cake with candle",
"122001": "Lit celebratory cake",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"creatables": "tsx ./scripts/renderCreatablesFile.ts",
"generate:robochimp": "prisma generate --no-hints --schema prisma/robochimp.prisma",
"============BUILDING": "============",
"build": "tsx ./scripts/build.ts",
"build": "yarn build:esbuild",
"gen": "concurrently --raw \"prisma generate --no-hints\" \"yarn generate:robochimp\" && echo \"Generated Prisma Client\"",
"build:tsc": "tsc -p src",
"build:esbuild": "concurrently --raw \"yarn build:main\" \"yarn build:workers\"",
Expand Down
148 changes: 0 additions & 148 deletions scripts/build.ts

This file was deleted.

21 changes: 20 additions & 1 deletion scripts/spritesheet.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { promises as fs } from 'node:fs';
import { promises as fs, writeFileSync } from 'node:fs';
import * as path from 'node:path';
import { Stopwatch } from '@oldschoolgg/toolkit/structures';
import Spritesmith from 'spritesmith';
Expand All @@ -7,9 +7,11 @@ import '../src/lib/safeglobals';
import { isFunction, uniqueArr } from 'e';
import { Bank, Items } from 'oldschooljs';
import { ALL_OBTAINABLE_ITEMS } from '../src/lib/allObtainableItems';
import { customItems } from '../src/lib/customItems/util';
import { allCLItems } from '../src/lib/data/Collections';
import Buyables from '../src/lib/data/buyables/buyables';
import Createables from '../src/lib/data/createables';
import { itemNameFromID } from '../src/lib/util';

const stopwatch = new Stopwatch();

Expand Down Expand Up @@ -134,6 +136,23 @@ async function main() {
).catch(err => console.error(`Failed to make BSO spritesheet: ${err.message}`));

stopwatch.check('Finished');

writeFileSync(
'data/bso_items.json',
JSON.stringify(
customItems.reduce(
(acc, id) => {
acc[id] = itemNameFromID(id)!;
return acc;
},
{} as Record<number, string>
),
null,
4
),
'utf-8'
);

process.exit();
}

Expand Down

0 comments on commit e75d98d

Please sign in to comment.