@dreadwood-types/types 0.1.137 → 0.1.139

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +43 -43
  2. package/dist/blacksmithing.d.ts +20 -3
  3. package/dist/blacksmithing.d.ts.map +1 -1
  4. package/dist/blacksmithing.js +10 -3
  5. package/dist/blacksmithing.js.map +1 -1
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/constants.js +10 -0
  8. package/dist/constants.js.map +1 -1
  9. package/dist/emotes.d.ts +43 -0
  10. package/dist/emotes.d.ts.map +1 -0
  11. package/dist/emotes.js +24 -0
  12. package/dist/emotes.js.map +1 -0
  13. package/dist/energy.d.ts +31 -0
  14. package/dist/energy.d.ts.map +1 -0
  15. package/dist/energy.js +54 -0
  16. package/dist/energy.js.map +1 -0
  17. package/dist/expandedContracts.d.ts +745 -0
  18. package/dist/expandedContracts.d.ts.map +1 -0
  19. package/dist/expandedContracts.js +232 -0
  20. package/dist/expandedContracts.js.map +1 -0
  21. package/dist/index.d.ts +9 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +9 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/landmarks.d.ts +2 -0
  26. package/dist/landmarks.d.ts.map +1 -1
  27. package/dist/landmarks.js.map +1 -1
  28. package/dist/legacy.d.ts +82 -0
  29. package/dist/legacy.d.ts.map +1 -0
  30. package/dist/legacy.js +82 -0
  31. package/dist/legacy.js.map +1 -0
  32. package/dist/messages.d.ts +22 -1
  33. package/dist/messages.d.ts.map +1 -1
  34. package/dist/messages.js.map +1 -1
  35. package/dist/oddJobs.d.ts +5 -1
  36. package/dist/oddJobs.d.ts.map +1 -1
  37. package/dist/oddJobs.js +3 -1
  38. package/dist/oddJobs.js.map +1 -1
  39. package/dist/quests.js +1 -1
  40. package/dist/quests.js.map +1 -1
  41. package/dist/starterExpansion.d.ts +10 -0
  42. package/dist/starterExpansion.d.ts.map +1 -0
  43. package/dist/starterExpansion.js +18 -0
  44. package/dist/starterExpansion.js.map +1 -0
  45. package/dist/starterTown.d.ts +91 -0
  46. package/dist/starterTown.d.ts.map +1 -0
  47. package/dist/starterTown.js +27 -0
  48. package/dist/starterTown.js.map +1 -0
  49. package/dist/storyPlaces.d.ts +57 -1
  50. package/dist/storyPlaces.d.ts.map +1 -1
  51. package/dist/storyPlaces.js +11 -1
  52. package/dist/storyPlaces.js.map +1 -1
  53. package/dist/storyQuests.d.ts +1 -1
  54. package/dist/storyQuests.d.ts.map +1 -1
  55. package/dist/storyQuests.js +8 -7
  56. package/dist/storyQuests.js.map +1 -1
  57. package/dist/surfaceChart.d.ts +1 -1
  58. package/dist/surfaceChart.d.ts.map +1 -1
  59. package/dist/surfaceChart.js +11 -11
  60. package/dist/surfaceChart.js.map +1 -1
  61. package/dist/worldEvents.js +1 -1
  62. package/package.json +8 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emotes.js","sourceRoot":"","sources":["../src/emotes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE;IACpD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE;IACtD,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;IAClD,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE;IAClD,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE;IAChD,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,EAAE;CAC7C,CAAC;AAIX,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC;AACzE,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,IAAe;IAC7C,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;IAC5C,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACpC,CAAC;AAED,yGAAyG;AACzG,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Energy: a 0-100 bar that running spends and rest gives back (James, 2026-10-08).
3
+ * Session-only (not saved): everyone joins full. The server owns it and sends the
4
+ * bar to its owner only; the client shows it only while it is changing.
5
+ */
6
+ export declare const ENERGY_MAX = 100;
7
+ /** Spent per second of running. 200 s of running from full. */
8
+ export declare const ENERGY_RUN_DRAIN_PER_SEC = 0.5;
9
+ /** Regained per second walking, standing still and sitting. */
10
+ export declare const ENERGY_WALK_REGEN_PER_SEC = 0.25;
11
+ export declare const ENERGY_STILL_REGEN_PER_SEC = 0.5;
12
+ export declare const ENERGY_SIT_REGEN_PER_SEC = 5;
13
+ /** Running will not start below this, so a toggle cannot flicker at empty. */
14
+ export declare const ENERGY_MIN_TO_RUN = 5;
15
+ /** Sitting out of a fight heals this many times faster than standing. */
16
+ export declare const SIT_HEAL_MULTIPLIER = 3;
17
+ export type EnergyActivity = 'running' | 'walking' | 'still' | 'sitting';
18
+ /** Rate in energy per second (negative while running). */
19
+ export declare function energyRate(activity: EnergyActivity): number;
20
+ /** Energy after `seconds` of `activity`, clamped to 0..ENERGY_MAX. */
21
+ export declare function stepEnergy(energy: number, seconds: number, activity: EnergyActivity): number;
22
+ /** True while the bar is worth showing: it is below full, or the player is running. */
23
+ export declare function energyBarVisible(energy: number, running: boolean): boolean;
24
+ /** Why a player may not sit right now, or null when they may. */
25
+ export declare function sitRefusal(state: {
26
+ moving: boolean;
27
+ inCombat: boolean;
28
+ busy: boolean;
29
+ dead: boolean;
30
+ }): string | null;
31
+ //# sourceMappingURL=energy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energy.d.ts","sourceRoot":"","sources":["../src/energy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,MAAM,CAAC;AAC9B,+DAA+D;AAC/D,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAC9C,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAC1C,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEzE,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,CAW3D;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,MAAM,CAI5F;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAE1E;AAED,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAMhB"}
package/dist/energy.js ADDED
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Energy: a 0-100 bar that running spends and rest gives back (James, 2026-10-08).
3
+ * Session-only (not saved): everyone joins full. The server owns it and sends the
4
+ * bar to its owner only; the client shows it only while it is changing.
5
+ */
6
+ export const ENERGY_MAX = 100;
7
+ /** Spent per second of running. 200 s of running from full. */
8
+ export const ENERGY_RUN_DRAIN_PER_SEC = 0.5;
9
+ /** Regained per second walking, standing still and sitting. */
10
+ export const ENERGY_WALK_REGEN_PER_SEC = 0.25;
11
+ export const ENERGY_STILL_REGEN_PER_SEC = 0.5;
12
+ export const ENERGY_SIT_REGEN_PER_SEC = 5;
13
+ /** Running will not start below this, so a toggle cannot flicker at empty. */
14
+ export const ENERGY_MIN_TO_RUN = 5;
15
+ /** Sitting out of a fight heals this many times faster than standing. */
16
+ export const SIT_HEAL_MULTIPLIER = 3;
17
+ /** Rate in energy per second (negative while running). */
18
+ export function energyRate(activity) {
19
+ switch (activity) {
20
+ case 'running':
21
+ return -ENERGY_RUN_DRAIN_PER_SEC;
22
+ case 'walking':
23
+ return ENERGY_WALK_REGEN_PER_SEC;
24
+ case 'still':
25
+ return ENERGY_STILL_REGEN_PER_SEC;
26
+ case 'sitting':
27
+ return ENERGY_SIT_REGEN_PER_SEC;
28
+ }
29
+ }
30
+ /** Energy after `seconds` of `activity`, clamped to 0..ENERGY_MAX. */
31
+ export function stepEnergy(energy, seconds, activity) {
32
+ if (!Number.isFinite(energy))
33
+ return ENERGY_MAX;
34
+ if (!Number.isFinite(seconds) || seconds <= 0)
35
+ return Math.min(ENERGY_MAX, Math.max(0, energy));
36
+ return Math.min(ENERGY_MAX, Math.max(0, energy + energyRate(activity) * seconds));
37
+ }
38
+ /** True while the bar is worth showing: it is below full, or the player is running. */
39
+ export function energyBarVisible(energy, running) {
40
+ return running || energy < ENERGY_MAX - 0.5;
41
+ }
42
+ /** Why a player may not sit right now, or null when they may. */
43
+ export function sitRefusal(state) {
44
+ if (state.dead)
45
+ return 'You cannot rest right now.';
46
+ if (state.inCombat)
47
+ return 'You cannot rest in a fight.';
48
+ if (state.moving)
49
+ return 'Stop moving first.';
50
+ if (state.busy)
51
+ return 'Finish what you are doing first.';
52
+ return null;
53
+ }
54
+ //# sourceMappingURL=energy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"energy.js","sourceRoot":"","sources":["../src/energy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAC9B,+DAA+D;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,+DAA+D;AAC/D,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAC9C,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAC1C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AACnC,yEAAyE;AACzE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAIrC,0DAA0D;AAC1D,MAAM,UAAU,UAAU,CAAC,QAAwB;IACjD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,SAAS;YACZ,OAAO,CAAC,wBAAwB,CAAC;QACnC,KAAK,SAAS;YACZ,OAAO,yBAAyB,CAAC;QACnC,KAAK,OAAO;YACV,OAAO,0BAA0B,CAAC;QACpC,KAAK,SAAS;YACZ,OAAO,wBAAwB,CAAC;IACpC,CAAC;AACH,CAAC;AAED,sEAAsE;AACtE,MAAM,UAA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