Skip to content

Commit 72ae782

Browse files
committed
Use loot
1 parent 8e1990d commit 72ae782

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/commands/inventar.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,41 +149,44 @@ export default class InventarCommand implements ApplicationCommand {
149149
}
150150

151151
type CircleItem = { path: string; target: Vec2; size?: Vec2 };
152-
const lookup: Record<string, CircleItem> = {
153-
"bb-cheddar": {
152+
const lookup: Partial<Record<lootDataService.LootKindId, CircleItem>> = {
153+
[lootDataService.LootKind.BABYBEL_CHEDDAR]: {
154154
path: "assets/inventory/bb-cheddar.png",
155155
target: new Vec2(42, 200),
156156
size: new Vec2(40, 40),
157157
},
158-
"bb-emmentaler": {
158+
[lootDataService.LootKind.BABYBEL_EMMENTALER]: {
159159
path: "assets/inventory/bb-emmentaler.png",
160160
target: new Vec2(61, 120),
161161
size: new Vec2(40, 40),
162162
},
163-
"bb-gouda": {
163+
[lootDataService.LootKind.BABYBEL_GOUDA]: {
164164
path: "assets/inventory/bb-gouda.png",
165165
target: new Vec2(337, 120),
166166
size: new Vec2(40, 40),
167167
},
168-
"bb-light": { path: "assets/inventory/bb-light.png", target: new Vec2(337, 276) },
169-
"bb-original": {
168+
[lootDataService.LootKind.BABYBEL_LIGHT]: {
169+
path: "assets/inventory/bb-light.png",
170+
target: new Vec2(337, 276),
171+
},
172+
[lootDataService.LootKind.BABYBEL_ORIGINAL]: {
170173
path: "assets/inventory/bb-original.png",
171174
target: new Vec2(200, 200),
172175
size: new Vec2(40, 40),
173176
},
174-
"bb-protein": {
177+
[lootDataService.LootKind.BABYBEL_PROTEIN]: {
175178
path: "assets/inventory/bb-protein.png",
176179
target: new Vec2(61, 276),
177180
size: new Vec2(40, 40),
178181
},
179-
"bb-vegan": {
182+
[lootDataService.LootKind.BABYBEL_VEGAN]: {
180183
path: "assets/inventory/bb-vegan.png",
181184
target: new Vec2(200, 353),
182185
size: new Vec2(40, 40),
183186
},
184187
};
185188

186-
async function drawBbCircle(contents: Set<string>) {
189+
async function drawBbCircle(contents: Set<lootDataService.LootKindId>) {
187190
const circle = await fs.readFile("assets/inventory/bb-circle.png");
188191
const circleImage = await loadImage(circle);
189192

0 commit comments

Comments
 (0)