BlueGit

timfa questward

Files

questward / shared / definitions / items.js

items.js

items.js 18.8 KiB Download Raw
1import { equipImageName, spriteImageName } from "./tileSprites.js";
2import { SkillId } from "./skills.js";
3import { MaterialTier, WoodTier } from "./materialTiers.js";
4import { AttackType } from "./attackTypes.js";
5import { EquipmentKind } from "./equipmentKinds.js";
6import { formatQuantity } from "../items/formatQuantity.js";
7import { formatOriginBreakdown } from "../items/origin.js";
8import { CraftingItemId, CRAFTING_ITEM_STUBS } from "./craftingItems.js";
9import { MetalItemId, METAL_ITEM_DEFINITIONS } from "./metalItems.js";
10import { WoodItemId, WOOD_ITEM_DEFINITIONS, isLogDebarked } from "./woodItems.js";
11import { ItemFamilyId } from "./tierFamilies.js";
12import { ArmourItemId, ARMOUR_ITEM_DEFINITIONS } from "./armourItems.js";
13import { ClothItemId, CLOTH_ITEM_DEFINITIONS } from "./clothItems.js";
14import { LeatherItemId, LEATHER_ITEM_DEFINITIONS } from "./leatherItems.js";
15import { LeatherArmourItemId, LEATHER_ARMOUR_ITEM_DEFINITIONS } from "./leatherArmourItems.js";
16import { WizardItemId, WIZARD_ITEM_DEFINITIONS } from "./wizardItems.js";
17import { DyeItemId, FLOWER_ITEM_DEFINITION, DYE_ITEM_DEFINITION, FLOWER_COLOR_DISPLAY } from "./dyes.js";
18import { HERB_ITEM_DEFINITIONS, HerbItemId } from "./herbs.js";
19import { RANGED_ITEM_DEFINITIONS, RangedItemId } from "./rangedItems.js";
20import { POTION_MAX_STACK } from "./alchemy.js";
21import { SpellbookItemId, SPELLBOOK_ITEM_DEFINITIONS } from "./spellItems.js";
22import { FISH_ITEM_DEFINITIONS, FishingToolItemId } from "./fishItems.js";
23import { GemItemId, GEM_ITEM_DEFINITIONS } from "./gemItems.js";
24import { JewelryItemId, JEWELRY_ITEM_DEFINITIONS } from "./jewelryItems.js";
25import { SwordItemId, SWORD_ITEM_DEFINITIONS } from "./swordItems.js";
26import { WarAxeItemId, WAR_AXE_ITEM_DEFINITIONS } from "./warAxeItems.js";
27import { EssenceItemId, ESSENCE_ITEM_DEFINITIONS } from "./essenceItems.js";
28
29export const ItemId = Object.freeze({
30 paper: 1,
31 apple: 2,
32 stick: 3,
33 blankCheque: 4,
34 /** Cotton shirt (ClothItemId.cottonShirt). */
35 clothShirt: 5,
36 letter: 6,
37 filledCheque: 7,
38 coins: 8,
39 ...CraftingItemId,
40 lantern: 26,
41 bones: 27,
42 skull: 28,
43 glassBottle: 29,
44 potion: 32,
45 recipePaper: 33,
46 egg: 275,
47 cookedEgg: 504,
48 burntEgg: 505,
49 ...SpellbookItemId,
50 ...MetalItemId,
51 ...WoodItemId,
52 ...FishingToolItemId,
53 ...ArmourItemId,
54 ...ClothItemId,
55 ...LeatherItemId,
56 ...LeatherArmourItemId,
57 ...WizardItemId,
58 ...DyeItemId,
59 ...HerbItemId,
60 ...RangedItemId,
61 ...GemItemId,
62 ...JewelryItemId,
63 ...SwordItemId,
64 ...WarAxeItemId
65});
66
67export const EQUIPMENT_SLOT = Object.freeze({
68 head: "head",
69 chest: "chest",
70 legs: "legs",
71 boots: "boots",
72 weapon: "weapon",
73 offhand: "offhand",
74 ring: "ring",
75 bracelet: "bracelet",
76 amulet: "amulet"
77});
78
79/**
80 * Back → front.
81 * Ring / bracelet sit under clothing; amulet draws over clothing / offhand.
82 */
83export const EQUIPMENT_DRAW_ORDER = Object.freeze([
84 EQUIPMENT_SLOT.boots,
85 EQUIPMENT_SLOT.ring,
86 EQUIPMENT_SLOT.bracelet,
87 EQUIPMENT_SLOT.chest,
88 EQUIPMENT_SLOT.weapon,
89 EQUIPMENT_SLOT.legs,
90 EQUIPMENT_SLOT.head,
91 EQUIPMENT_SLOT.offhand,
92 EQUIPMENT_SLOT.amulet
93]);
94
95export const DEFAULT_MAX_STACK = 99;
96export const BLANK_CHEQUE_CARRY_CAP = 99;
97export const COIN_MAX_STACK = 999_000_000_000;
98
99/** Coin sprite tiers (coins-<n>.png); pick the largest n where stack quantity >= n. */
100export const COIN_SPRITE_TIERS = Object.freeze([
101 1, 5, 15, 50, 150, 500, 1000, 1500, 2000, 5000, 10000, 20000, 50000,
102 1_000_000, 10_000_000, 50_000_000, 100_000_000, 500_000_000,
103 1_000_000_000, 10_000_000_000, 100_000_000_000, 1_000_000_000_000,
104 10_000_000_000_000, 100_000_000_000_000, 500_000_000_000_000,
105 999_999_999_999_999
106]);
107
108export const ITEM_DEFINITIONS = Object.freeze({
109 [ItemId.paper]: Object.freeze({
110 itemId: ItemId.paper,
111 key: "paper",
112 displayName: "Paper",
113 description: "Blank sheet of paper.",
114 seedValue: 2,
115 stackable: true,
116 maxStackSize: DEFAULT_MAX_STACK,
117 uniqueInstance: false,
118 category: "document"
119 }),
120 [ItemId.letter]: Object.freeze({
121 itemId: ItemId.letter,
122 key: "letter",
123 displayName: "Letter",
124 description: "A written letter.",
125 seedValue: 2,
126 stackable: false,
127 maxStackSize: 1,
128 uniqueInstance: true,
129 category: "document",
130 defaultState: "letter-opened",
131 marketplaceSellable: false,
132 marketplaceSellBlockedReason: "Letters cannot be sold on the marketplace."
133 }),
134 [ItemId.apple]: Object.freeze({
135 itemId: ItemId.apple,
136 key: "apple",
137 displayName: "Apple",
138 description: "Round and juicy!",
139 seedValue: 1,
140 stackable: true,
141 maxStackSize: DEFAULT_MAX_STACK,
142 uniqueInstance: false,
143 category: "food",
144 healing: 4
145 }),
146 [ItemId.egg]: Object.freeze({
147 itemId: ItemId.egg,
148 key: "egg",
149 displayName: "Egg",
150 description: "A fresh egg, still warm from the nest. Bake it in an oven before eating.",
151 seedValue: 1,
152 stackable: true,
153 maxStackSize: DEFAULT_MAX_STACK,
154 uniqueInstance: false,
155 category: "ingredient",
156 iconKey: "egg",
157 defaultState: "egg"
158 }),
159 [ItemId.cookedEgg]: Object.freeze({
160 itemId: ItemId.cookedEgg,
161 key: "cooked-egg",
162 displayName: "Cooked egg",
163 description: "An egg baked until firm, ready to eat.",
164 seedValue: 2,
165 stackable: true,
166 maxStackSize: DEFAULT_MAX_STACK,
167 uniqueInstance: false,
168 category: "food",
169 iconKey: "egg",
170 defaultState: "egg",
171 healing: 3
172 }),
173 [ItemId.burntEgg]: Object.freeze({
174 itemId: ItemId.burntEgg,
175 key: "burnt-egg",
176 displayName: "Burnt egg",
177 description: "An egg left too long in the oven — dry and inedible.",
178 seedValue: 1,
179 stackable: true,
180 maxStackSize: DEFAULT_MAX_STACK,
181 uniqueInstance: false,
182 category: "food",
183 iconKey: "egg",
184 defaultState: "egg"
185 }),
186 [ItemId.stick]: Object.freeze({
187 itemId: ItemId.stick,
188 key: "stick",
189 displayName: "Stick",
190 description: "A wooden stick. Simple and sturdy.",
191 seedValue: 3,
192 stackable: false,
193 maxStackSize: 1,
194 uniqueInstance: false,
195 category: "finished",
196 equipment: Object.freeze({
197 slot: EQUIPMENT_SLOT.weapon,
198 tier: WoodTier.pine,
199 kind: EquipmentKind.clubWeapon,
200 attack: Object.freeze({
201 mode: "melee",
202 rangeTiles: 1,
203 hitSkillId: SkillId.clubfighting,
204 damageSkillId: SkillId.strength,
205 attackType: AttackType.blunt,
206 cooldownMs: 700
207 })
208 })
209 }),
210 [ItemId.blankCheque]: Object.freeze({
211 itemId: ItemId.blankCheque,
212 key: "blank-cheque",
213 displayName: "Blank cheque",
214 description: "Bank stationery for writing cheques against deposited goods.",
215 seedValue: 5,
216 stackable: true,
217 maxStackSize: DEFAULT_MAX_STACK,
218 uniqueInstance: false,
219 category: "document",
220 marketplaceSellable: false,
221 marketplaceSellBlockedReason: "Blank cheques cannot be sold on the marketplace."
222 }),
223 [ItemId.filledCheque]: Object.freeze({
224 itemId: ItemId.filledCheque,
225 key: "filled-cheque",
226 displayName: "Cheque",
227 description: "A bearer cheque linked to reserved goods in the issuer's bank.",
228 seedValue: 5,
229 stackable: false,
230 maxStackSize: 1,
231 uniqueInstance: true,
232 category: "document",
233 defaultState: "filled-cheque",
234 marketplaceSellable: true
235 }),
236 [ItemId.coins]: Object.freeze({
237 itemId: ItemId.coins,
238 key: "coins",
239 displayName: "Coin",
240 displayNamePlural: "Coins",
241 description: "Hard currency of the realm.",
242 seedValue: 1,
243 stackable: true,
244 maxStackSize: COIN_MAX_STACK,
245 uniqueInstance: false,
246 category: "currency"
247 }),
248 [ItemId.lantern]: Object.freeze({
249 itemId: ItemId.lantern,
250 key: "lantern",
251 displayName: "Lantern",
252 description: "A handheld lamp that pushes back the night.",
253 seedValue: 12,
254 stackable: false,
255 maxStackSize: 1,
256 uniqueInstance: false,
257 category: "tool",
258 equipment: Object.freeze({
259 slot: EQUIPMENT_SLOT.offhand,
260 lightRadiusTiles: 6
261 })
262 }),
263 [ItemId.bones]: Object.freeze({
264 itemId: ItemId.bones,
265 key: "bones",
266 displayName: "Bones",
267 description: "Bones of a dead creature.",
268 seedValue: 1,
269 stackable: true,
270 maxStackSize: DEFAULT_MAX_STACK,
271 uniqueInstance: false,
272 category: "ingredient"
273 }),
274 [ItemId.skull]: Object.freeze({
275 itemId: ItemId.skull,
276 key: "skull",
277 displayName: "Skull",
278 description: "Unlucky.",
279 seedValue: 1,
280 stackable: true,
281 maxStackSize: DEFAULT_MAX_STACK,
282 uniqueInstance: false,
283 category: "misc"
284 }),
285 [ItemId.glassBottle]: Object.freeze({
286 itemId: ItemId.glassBottle,
287 key: "glass-bottle",
288 displayName: "Glass bottle",
289 description: "A clear bottle, ready to hold a brew or dye.",
290 seedValue: 2,
291 stackable: true,
292 maxStackSize: DEFAULT_MAX_STACK,
293 uniqueInstance: false,
294 category: "tool",
295 iconKey: "potion",
296 defaultState: "potion-0",
297 npcShopAllowed: true
298 }),
299 [ItemId.potion]: Object.freeze({
300 itemId: ItemId.potion,
301 key: "potion",
302 displayName: "Potion",
303 description: "A bottled brew. Sip with care.",
304 seedValue: 8,
305 stackable: true,
306 maxStackSize: POTION_MAX_STACK,
307 uniqueInstance: false,
308 category: "potion",
309 potion: true,
310 iconKey: "potion"
311 }),
312 [ItemId.recipePaper]: Object.freeze({
313 itemId: ItemId.recipePaper,
314 key: "recipe-paper",
315 displayName: "Recipe paper",
316 description: "An alchemy recipe written for a cauldron.",
317 seedValue: 2,
318 stackable: false,
319 maxStackSize: 1,
320 uniqueInstance: true,
321 category: "document",
322 defaultState: "recipe-paper",
323 iconKey: "paper"
324 }),
325 ...CRAFTING_ITEM_STUBS,
326 ...LEATHER_ITEM_DEFINITIONS,
327 ...LEATHER_ARMOUR_ITEM_DEFINITIONS,
328 ...WIZARD_ITEM_DEFINITIONS,
329 ...METAL_ITEM_DEFINITIONS,
330 ...WOOD_ITEM_DEFINITIONS,
331 ...ARMOUR_ITEM_DEFINITIONS,
332 ...CLOTH_ITEM_DEFINITIONS,
333 ...HERB_ITEM_DEFINITIONS,
334 ...RANGED_ITEM_DEFINITIONS,
335 ...SPELLBOOK_ITEM_DEFINITIONS,
336 ...FISH_ITEM_DEFINITIONS,
337 ...GEM_ITEM_DEFINITIONS,
338 ...JEWELRY_ITEM_DEFINITIONS,
339 ...SWORD_ITEM_DEFINITIONS,
340 ...WAR_AXE_ITEM_DEFINITIONS,
341 ...ESSENCE_ITEM_DEFINITIONS,
342 [DyeItemId.flower]: FLOWER_ITEM_DEFINITION,
343 [DyeItemId.dye]: DYE_ITEM_DEFINITION
344});
345
346export function itemDefinition (itemId)
347{
348 return ITEM_DEFINITIONS[itemId] ?? null;
349}
350
351/** Every defined item for editor pickers (shop stock, dev tools, …). */
352export function listAllItemPickerEntries ()
353{
354 return Object.values(ITEM_DEFINITIONS)
355 .filter((def) => def?.itemId != null)
356 .map((def) => ({
357 itemId: def.itemId,
358 displayName: def.displayName ?? String(def.itemId),
359 key: def.key ?? String(def.itemId)
360 }))
361 .sort((a, b) => a.displayName.localeCompare(b.displayName) || (a.itemId - b.itemId));
362}
363
364/** Garments that accept optional `instance.dyeColor` (tailor / cloth clothing). */
365export function isDyeableClothing (itemIdOrDef)
366{
367 const def = typeof itemIdOrDef === "number"
368 ? itemDefinition(itemIdOrDef)
369 : itemIdOrDef;
370 return !!def?.dyeable;
371}
372
373export { formatQuantity };
374
375export function itemDisplayName (stack, def = itemDefinition(stack?.itemId))
376{
377 if (!def)
378 { return "Item"; }
379 const qty = stack?.quantity ?? 1;
380 if (stack?.itemId === ItemId.coins)
381 { return qty === 1 ? (def.displayName ?? "Coin") : (def.displayNamePlural ?? "Coins"); }
382 if (stack?.itemId === ItemId.potion && stack.instance?.displayName)
383 { return stack.instance.displayName; }
384 if (stack?.itemId === ItemId.dye && stack.instance?.kind === "dye")
385 {
386 if (stack.instance.colorId && FLOWER_COLOR_DISPLAY[stack.instance.colorId])
387 { return `${FLOWER_COLOR_DISPLAY[stack.instance.colorId]} dye`; }
388 return "Dye";
389 }
390 if (stack?.itemId === ItemId.flower && stack.instance?.colorId)
391 {
392 return `${FLOWER_COLOR_DISPLAY[stack.instance.colorId] ?? "Flower"} flower`;
393 }
394 if (stack?.itemId === ItemId.recipePaper && stack.instance?.displayName)
395 {
396 return String(stack.instance.displayName).replace(/\s+Recipe$/u, " recipe");
397 }
398 if (stack?.itemId === CraftingItemId.tinderbox && stack.instance?.kind === "tinderbox")
399 {
400 const charges = Math.max(0, stack.instance.charges | 0);
401 return `${def.displayName} (${charges})`;
402 }
403 if (def.familyId === ItemFamilyId.log && isLogDebarked(stack))
404 { return `Debarked ${def.displayName}`; }
405 if (stack?.instance?.kind === "tipped-arrow" && stack.instance.element)
406 {
407 const el = String(stack.instance.element);
408 const label = el.charAt(0).toUpperCase() + el.slice(1);
409 return `${label} ${def.displayName ?? "arrow"}`;
410 }
411 return def.displayName ?? "Item";
412}
413
414export function stackDisplayLabel (stack)
415{
416 const name = itemDisplayName(stack);
417 const qty = stack?.quantity ?? 1;
418 if (qty <= 1)
419 { return name; }
420 return `${name} (${formatQuantity(qty)})`;
421}
422
423export function coinSpriteTierForQuantity (quantity)
424{
425 const qty = Math.max(0, Math.floor(Number(quantity) || 0));
426 let tier = COIN_SPRITE_TIERS[0];
427 for (const candidate of COIN_SPRITE_TIERS)
428 {
429 if (qty >= candidate)
430 { tier = candidate; }
431 else
432 { break; }
433 }
434 return tier;
435}
436
437/** Stack-aware description (letters include open state and author). */
438export function itemDescription (stack, { localCharacterId } = {})
439{
440 const def = itemDefinition(stack?.itemId);
441 if (!def)
442 { return ""; }
443 if (stack.itemId === ItemId.letter && stack.instance?.kind === "letter")
444 {
445 const state = stack.instance.opened === false ? "unopened" : "opened";
446 const authorId = stack.instance.authorCharacterId;
447 const byYou = authorId != null && Number(authorId) === Number(localCharacterId);
448 const author = byYou
449 ? "you"
450 : (stack.instance.authorDisplayName?.trim() || "someone");
451 return `An ${state} letter, written by ${author}.`;
452 }
453 if (stack.itemId === ItemId.filledCheque && stack.instance?.kind === "filled-cheque")
454 {
455 const reserved = itemDefinition(stack.instance.itemId);
456 const qty = stack.instance.quantity | 0;
457 const name = reserved?.displayName ?? "goods";
458 return `Bearer cheque for ${qty}× ${name}.`;
459 }
460 if (stack.itemId === ItemId.potion && stack.instance?.kind === "potion")
461 {
462 const name = stack.instance.displayName ?? "Potion";
463 return stack.instance.unstable
464 ? `${name}. The brew smells wrong — best sipped with caution.`
465 : `${name}. A carefully bottled draught.`;
466 }
467 if (stack.itemId === ItemId.recipePaper && stack.instance?.kind === "recipe-paper")
468 {
469 const authorId = stack.instance.authorCharacterId;
470 const byYou = authorId != null && Number(authorId) === Number(localCharacterId);
471 const author = byYou
472 ? "you"
473 : (stack.instance.authorDisplayName?.trim() || "someone");
474 return `Written by ${author}.`;
475 }
476 return def.description ?? "";
477}
478
479export function itemOriginSummary (stack)
480{
481 // Recipe papers already say "Written by …" in the description — avoid a duplicate origin line.
482 if (stack?.itemId === ItemId.recipePaper && stack.instance?.kind === "recipe-paper")
483 { return ""; }
484 return formatOriginBreakdown(stack);
485}
486
487export function itemDefaultState (def, instance = null)
488{
489 if (def?.familyId === ItemFamilyId.log && isLogDebarked({ instance }))
490 { return "log-debarked"; }
491 return def?.defaultState ?? def?.key ?? "paper";
492}
493
494export function itemSpriteName (itemId, instance = null, quantity = null)
495{
496 const def = itemDefinition(itemId);
497 if (!def)
498 { return spriteImageName("item", "paper", "paper"); }
499 if (itemId === ItemId.coins)
500 {
501 const tier = coinSpriteTierForQuantity(quantity ?? 1);
502 return spriteImageName("item", "coins", `coins-${tier}`);
503 }
504 if (itemId === ItemId.letter)
505 { return spriteImageName("item", "letter", letterVisualState(instance)); }
506 if (instance?.kind === "tipped-arrow")
507 { return spriteImageName("item", "arrow", "tipped-arrow"); }
508 const folderKey = def.iconKey ?? def.key;
509 return def.sprite ?? spriteImageName("item", folderKey, itemDefaultState(def, instance));
510}
511
512/** Stack-aware sprite key (coins use quantity tiers like inventory icons). */
513export function itemSpriteNameForStack (stack)
514{
515 if (!stack?.itemId)
516 { return itemSpriteName(null); }
517 return itemSpriteName(stack.itemId, stack.instance ?? null, stack.quantity);
518}
519
520export function itemEquipSprite (itemId)
521{
522 const def = itemDefinition(itemId);
523 if (!def)
524 { return null; }
525 const folderKey = def.iconKey ?? def.key;
526 const equipment = def.equipment;
527 if (equipment)
528 {
529 if (equipment.hideEquipSprite)
530 { return null; }
531 return equipment.equipSprite
532 ?? equipment.overlaySpriteId
533 ?? equipImageName("item", folderKey, itemDefaultState(def));
534 }
535 /** Inventory tools (e.g. tinderbox) may still show equip art during gather/firestarting. */
536 if (def.gatherEquipSprite)
537 { return equipImageName("item", folderKey, itemDefaultState(def)); }
538 return null;
539}
540
541/** Largest equipped light radius (e.g. lantern in offhand). Includes opal bracelet night vision. */
542export function equippedLightRadiusTiles (equipment)
543{
544 let best = 0;
545 for (const stack of Object.values(equipment?.slots ?? {}))
546 {
547 if (!stack)
548 { continue; }
549 const radius = itemDefinition(stack.itemId)?.equipment?.lightRadiusTiles ?? 0;
550 if (radius > best)
551 { best = radius; }
552 // Opal bracelet: same range as a torch (see OPAL_NIGHT_VISION_RANGE_TILES).
553 if ((stack.itemId | 0) === JewelryItemId.opalBracelet)
554 { best = Math.max(best, 8); }
555 }
556 return best;
557}
558
559/**
560 * Intensity for the entity light from equipment.
561 * Opal bracelet is half-bright when it is the sole (or stronger) light source.
562 */
563export function equippedLightIntensity (equipment)
564{
565 let itemLight = 0;
566 let hasOpal = false;
567 for (const stack of Object.values(equipment?.slots ?? {}))
568 {
569 if (!stack)
570 { continue; }
571 const radius = itemDefinition(stack.itemId)?.equipment?.lightRadiusTiles ?? 0;
572 if (radius > itemLight)
573 { itemLight = radius; }
574 if ((stack.itemId | 0) === JewelryItemId.opalBracelet)
575 { hasOpal = true; }
576 }
577 if (hasOpal && itemLight < 8)
578 { return 0.5; }
579 return 1;
580}
581
582export function letterVisualState (instance)
583{
584 return instance?.opened === false ? "letter-closed" : "letter-opened";
585}
586
587export function itemAssetPath (itemId, companion = null, instance = null)
588{
589 const def = itemDefinition(itemId);
590 if (def?.herb)
591 {
592 const suffix = companion ? `-${companion}` : "";
593 return `/assets/herbs/${def.key}${suffix}.png`;
594 }
595 const key = def?.iconKey ?? def?.key ?? "paper";
596 const state = itemId === ItemId.letter
597 ? letterVisualState(instance)
598 : itemDefaultState(def ?? { key }, instance);
599 const suffix = companion ? `-${companion}` : "";
600 return `/assets/items/${key}/${state}${suffix}.png`;
601}
602
603export function itemAssetPathForStack (stack)
604{
605 if (!stack)
606 { return itemAssetPath(null); }
607 if (stack.itemId === ItemId.coins)
608 {
609 const tier = coinSpriteTierForQuantity(stack.quantity);
610 return `/assets/items/coins/coins-${tier}.png`;
611 }
612 if (stack.itemId === ItemId.potion)
613 {
614 const fill = Math.max(1, Math.min(5, stack.instance?.fillLevel | 0 || 4));
615 return `/assets/items/potion/potion-${fill}.png`;
616 }
617 if (stack.itemId === ItemId.dye)
618 {
619 const fill = Math.max(1, Math.min(5, stack.instance?.fillLevel | 0 || 4));
620 return `/assets/items/potion/potion-${fill}.png`;
621 }
622 if (stack.itemId === ItemId.glassBottle)
623 { return `/assets/items/potion/potion-0.png`; }
624 if (stack.itemId === ItemId.flower)
625 { return `/assets/items/flower/flower.png`; }
626 if (stack.instance?.kind === "tipped-arrow")
627 { return `/assets/items/arrow/tipped-arrow.png`; }
628 return itemAssetPath(stack.itemId, null, stack.instance);
629}
630
631export const LETTER_MAX_BODY_CHARS = 2000;
632
633export const STARTER_ITEMS = Object.freeze([
634 Object.freeze({ itemId: ItemId.paper, quantity: 5 }),
635 Object.freeze({ itemId: ItemId.apple, quantity: 3 }),
636 Object.freeze({ itemId: ItemId.stick, quantity: 1 }),
637 Object.freeze({ itemId: ItemId.coins, quantity: 25 })
638]);