@crowdedkingdoms/crowdyjs 18.11.0-dev.1 → 18.13.0-dev.1
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.
- package/MIGRATION.md +51 -0
- package/README.md +19 -1
- package/dist/generated/graphql-schema.d.ts +5 -5
- package/dist/generated/graphql-schema.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/kit/index.d.ts +11 -0
- package/dist/kit/index.d.ts.map +1 -1
- package/dist/kit/index.js +11 -0
- package/dist/kit/kit.d.ts +99 -2
- package/dist/kit/kit.d.ts.map +1 -1
- package/dist/kit/kit.js +128 -2
- package/dist/kit/modules/arenas.d.ts +87 -0
- package/dist/kit/modules/arenas.d.ts.map +1 -0
- package/dist/kit/modules/arenas.js +66 -0
- package/dist/kit/modules/encounters.d.ts +75 -0
- package/dist/kit/modules/encounters.d.ts.map +1 -0
- package/dist/kit/modules/encounters.js +57 -0
- package/dist/kit/modules/instances.d.ts +78 -0
- package/dist/kit/modules/instances.d.ts.map +1 -0
- package/dist/kit/modules/instances.js +72 -0
- package/dist/kit/modules/leaderboards.d.ts +79 -0
- package/dist/kit/modules/leaderboards.d.ts.map +1 -0
- package/dist/kit/modules/leaderboards.js +69 -0
- package/dist/kit/modules/market.d.ts +159 -0
- package/dist/kit/modules/market.d.ts.map +1 -0
- package/dist/kit/modules/market.js +141 -0
- package/dist/kit/modules/minigames.d.ts +59 -0
- package/dist/kit/modules/minigames.d.ts.map +1 -0
- package/dist/kit/modules/minigames.js +55 -0
- package/dist/kit/modules/player.d.ts +264 -0
- package/dist/kit/modules/player.d.ts.map +1 -0
- package/dist/kit/modules/player.js +258 -0
- package/dist/kit/modules/racing.d.ts +131 -0
- package/dist/kit/modules/racing.d.ts.map +1 -0
- package/dist/kit/modules/racing.js +113 -0
- package/dist/kit/modules/tables.d.ts +76 -0
- package/dist/kit/modules/tables.d.ts.map +1 -0
- package/dist/kit/modules/tables.js +73 -0
- package/dist/kit/modules/tactics.d.ts +79 -0
- package/dist/kit/modules/tactics.d.ts.map +1 -0
- package/dist/kit/modules/tactics.js +67 -0
- package/dist/kit/modules/territory.d.ts +92 -0
- package/dist/kit/modules/territory.d.ts.map +1 -0
- package/dist/kit/modules/territory.js +84 -0
- package/dist/kit/protocol.d.ts +2 -0
- package/dist/kit/protocol.d.ts.map +1 -1
- package/dist/kit/protocol.js +2 -0
- package/dist/kit/runtime.d.ts.map +1 -1
- package/dist/kit/runtime.js +6 -1
- package/dist/live-coding/assets/browser-authoring-index.json +1 -1
- package/dist/live-coding/assets/manifest.json +1 -1
- package/dist/live-coding/browser-authoring-index.generated.d.ts.map +1 -1
- package/dist/live-coding/browser-authoring-index.generated.js +4776 -149
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { HubState, PrivateState } from '../mirror.js';
|
|
2
|
+
const TOPIC = 'market';
|
|
3
|
+
/** One market hub's mirrors and calls, shared by its market, shop and trade handles. */
|
|
4
|
+
export class MarketCore {
|
|
5
|
+
constructor(runtime, nodeType, key) {
|
|
6
|
+
this.runtime = runtime;
|
|
7
|
+
this.nodeType = nodeType;
|
|
8
|
+
this.key = key;
|
|
9
|
+
this.view = new HubState(runtime, nodeType, key, TOPIC);
|
|
10
|
+
const source = { nodeType, key, topic: TOPIC };
|
|
11
|
+
this.orders = new PrivateState(runtime, { ...source, what: 'orders', read: () => runtime.call(nodeType, key, 'orders') });
|
|
12
|
+
this.trades = new PrivateState(runtime, { ...source, what: 'trades', read: () => runtime.call(nodeType, key, 'trades') });
|
|
13
|
+
}
|
|
14
|
+
change(method, args) {
|
|
15
|
+
return this.runtime.call(this.nodeType, this.key, method, args, { action: true });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Markets' order books (the `market` starter): {@link at} a market by its name. */
|
|
19
|
+
export class MarketsKit {
|
|
20
|
+
constructor(core) {
|
|
21
|
+
this.core = core;
|
|
22
|
+
}
|
|
23
|
+
at(key = 'town') {
|
|
24
|
+
return new MarketHandle(this.core(key));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A market's order books: limit orders matched at price-time priority. An order holds what it
|
|
29
|
+
* offers in the player's own hub until it fills or is cancelled; the market moves each fill
|
|
30
|
+
* between the two players' hubs.
|
|
31
|
+
*/
|
|
32
|
+
export class MarketHandle {
|
|
33
|
+
constructor(core) {
|
|
34
|
+
this.core = core;
|
|
35
|
+
}
|
|
36
|
+
get view() {
|
|
37
|
+
return this.core.view;
|
|
38
|
+
}
|
|
39
|
+
get orders() {
|
|
40
|
+
return this.core.orders;
|
|
41
|
+
}
|
|
42
|
+
async watch() {
|
|
43
|
+
const [view] = await Promise.all([this.core.view.start(), this.core.orders.start()]);
|
|
44
|
+
return view;
|
|
45
|
+
}
|
|
46
|
+
async unwatch() {
|
|
47
|
+
await Promise.all([this.core.view.stop(), this.core.orders.stop()]);
|
|
48
|
+
}
|
|
49
|
+
book(item) {
|
|
50
|
+
return this.core.runtime.call(this.core.nodeType, this.core.key, 'book', { item });
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Places a limit order; a buy holds `price * count` of the market's currency, a sell the items.
|
|
54
|
+
* @throws {KitError} `insufficient`, `limit` (open orders), `not_found` (no book), `unavailable`.
|
|
55
|
+
*/
|
|
56
|
+
order(order) {
|
|
57
|
+
return this.core.change('order', order);
|
|
58
|
+
}
|
|
59
|
+
/** Cancels an open order; what it still holds comes back. @throws {KitError} `not_found`. */
|
|
60
|
+
cancel(order) {
|
|
61
|
+
return this.core.change('cancel', { order });
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Markets' vendors (the `market` starter): {@link at} a market by its name. */
|
|
65
|
+
export class ShopsKit {
|
|
66
|
+
constructor(core) {
|
|
67
|
+
this.core = core;
|
|
68
|
+
}
|
|
69
|
+
at(key = 'town') {
|
|
70
|
+
return new ShopHandle(this.core(key));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** A market's vendors: fixed prices, stock that restocks, a limit per player. */
|
|
74
|
+
export class ShopHandle {
|
|
75
|
+
constructor(core) {
|
|
76
|
+
this.core = core;
|
|
77
|
+
}
|
|
78
|
+
get view() {
|
|
79
|
+
return this.core.view;
|
|
80
|
+
}
|
|
81
|
+
watch() {
|
|
82
|
+
return this.core.view.start();
|
|
83
|
+
}
|
|
84
|
+
unwatch() {
|
|
85
|
+
return this.core.view.stop();
|
|
86
|
+
}
|
|
87
|
+
vendors() {
|
|
88
|
+
return this.core.runtime.call(this.core.nodeType, this.core.key, 'vendors');
|
|
89
|
+
}
|
|
90
|
+
/** Buys `count` (one by default). @throws {KitError} `insufficient` (gold or stock), `limit`, `full`, `not_found`, `unavailable`. */
|
|
91
|
+
buy(vendor, item, count) {
|
|
92
|
+
return this.core.change('buy', count === undefined ? { vendor, item } : { vendor, item, count });
|
|
93
|
+
}
|
|
94
|
+
/** Sells `count` (one by default). @throws {KitError} `forbidden` (it does not buy them), `insufficient`, `unavailable`. */
|
|
95
|
+
sell(vendor, item, count) {
|
|
96
|
+
return this.core.change('sell', count === undefined ? { vendor, item } : { vendor, item, count });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** Trades between two players at a market: {@link at} a market by its name. */
|
|
100
|
+
export class TradesKit {
|
|
101
|
+
constructor(core) {
|
|
102
|
+
this.core = core;
|
|
103
|
+
}
|
|
104
|
+
at(key = 'town') {
|
|
105
|
+
return new TradeDesk(this.core(key));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Trades between two players: each offers a bundle, held in their own hub; when both accept
|
|
110
|
+
* the last offers, the market moves each to the other. A changed offer clears both acceptances.
|
|
111
|
+
*/
|
|
112
|
+
export class TradeDesk {
|
|
113
|
+
constructor(core) {
|
|
114
|
+
this.core = core;
|
|
115
|
+
}
|
|
116
|
+
get mine() {
|
|
117
|
+
return this.core.trades;
|
|
118
|
+
}
|
|
119
|
+
async watch() {
|
|
120
|
+
return this.core.trades.start();
|
|
121
|
+
}
|
|
122
|
+
unwatch() {
|
|
123
|
+
return this.core.trades.stop();
|
|
124
|
+
}
|
|
125
|
+
/** Opens a trade with `player`; resolves with its id. */
|
|
126
|
+
open(player) {
|
|
127
|
+
return this.core.change('trade', { with: Number(player) });
|
|
128
|
+
}
|
|
129
|
+
/** Offers `bundle` (held at once; an empty one withdraws). @throws {KitError} `insufficient`, `forbidden`, `finished`. */
|
|
130
|
+
offer(trade, bundle) {
|
|
131
|
+
return this.core.change('offer', { trade, bundle });
|
|
132
|
+
}
|
|
133
|
+
/** Accepts the offers as they stand; resolves with the trade's state. @throws {KitError} `not_ready`, `finished`. */
|
|
134
|
+
accept(trade) {
|
|
135
|
+
return this.core.change('accept', { trade });
|
|
136
|
+
}
|
|
137
|
+
/** Calls it off; what each offered comes back. */
|
|
138
|
+
decline(trade) {
|
|
139
|
+
return this.core.change('decline', { trade });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { HubState } from '../mirror.js';
|
|
2
|
+
import type { KitRuntime } from '../runtime.js';
|
|
3
|
+
export interface DuelSeat {
|
|
4
|
+
player: number;
|
|
5
|
+
wins: number;
|
|
6
|
+
/** Whether this round's throw is in (never which). */
|
|
7
|
+
thrown: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface DuelReveal {
|
|
10
|
+
round: number;
|
|
11
|
+
/** Each seat's throw, in seat order; null when it was not in on time. */
|
|
12
|
+
hands: Array<string | null>;
|
|
13
|
+
winner: number | null;
|
|
14
|
+
}
|
|
15
|
+
/** What the `duel` topic carries: who has thrown, never what, until the reveal. */
|
|
16
|
+
export interface DuelView {
|
|
17
|
+
phase: 'waiting' | 'playing' | 'finished';
|
|
18
|
+
seats: DuelSeat[];
|
|
19
|
+
best_of: number;
|
|
20
|
+
round: number;
|
|
21
|
+
/** When this round closes (Unix ms). */
|
|
22
|
+
deadline: number | null;
|
|
23
|
+
last: DuelReveal | null;
|
|
24
|
+
winner: number | null;
|
|
25
|
+
}
|
|
26
|
+
/** Two-player duels of hidden throws (the `minigame` starter): {@link duel} by table. */
|
|
27
|
+
export declare class MinigamesKit {
|
|
28
|
+
private readonly runtime;
|
|
29
|
+
private readonly nodeType;
|
|
30
|
+
private readonly duels;
|
|
31
|
+
constructor(runtime: KitRuntime, nodeType?: string);
|
|
32
|
+
duel(key: string): Duel;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* One duel: the hub keeps each round's throws until both are in (or the round's time runs out),
|
|
36
|
+
* then reveals them; the first to win a majority of `best_of` rounds wins. The starter's game is
|
|
37
|
+
* rock, paper, scissors.
|
|
38
|
+
*/
|
|
39
|
+
export declare class Duel {
|
|
40
|
+
private readonly runtime;
|
|
41
|
+
readonly nodeType: string;
|
|
42
|
+
readonly key: string;
|
|
43
|
+
readonly view: HubState<DuelView>;
|
|
44
|
+
constructor(runtime: KitRuntime, nodeType: string, key: string);
|
|
45
|
+
watch(): Promise<DuelView>;
|
|
46
|
+
unwatch(): Promise<void>;
|
|
47
|
+
/** Takes a seat; resolves with whether this seat started the first round. @throws {KitError} `full`. */
|
|
48
|
+
join(): Promise<boolean>;
|
|
49
|
+
/** Before the duel starts. @throws {KitError} `started`. */
|
|
50
|
+
leave(): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* The caller's hidden throw this round; resolves with whether it completed the round.
|
|
53
|
+
* @throws {KitError} `conflict` (already in, or no round open), `bad_request` (not a hand), `not_member`.
|
|
54
|
+
*/
|
|
55
|
+
throw(hand: string): Promise<boolean>;
|
|
56
|
+
/** Once it is over: play again. @throws {KitError} `conflict`, `not_member`. */
|
|
57
|
+
rematch(): Promise<boolean>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=minigames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minigames.d.ts","sourceRoot":"","sources":["../../../src/kit/modules/minigames.ts"],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;gBAGf,OAAO,EAAE,UAAU,EAC3B,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM;IAKtB,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC;IAI1B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,wGAAwG;IACxG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;IAIxB,4DAA4D;IAC5D,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzB;;;OAGG;IACH,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrC,gFAAgF;IAChF,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;CAG5B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { HubState } from '../mirror.js';
|
|
2
|
+
/** Two-player duels of hidden throws (the `minigame` starter): {@link duel} by table. */
|
|
3
|
+
export class MinigamesKit {
|
|
4
|
+
constructor(runtime, nodeType = 'minigame') {
|
|
5
|
+
this.runtime = runtime;
|
|
6
|
+
this.nodeType = nodeType;
|
|
7
|
+
this.duels = new Map();
|
|
8
|
+
}
|
|
9
|
+
duel(key) {
|
|
10
|
+
let d = this.duels.get(key);
|
|
11
|
+
if (!d) {
|
|
12
|
+
d = new Duel(this.runtime, this.nodeType, key);
|
|
13
|
+
this.duels.set(key, d);
|
|
14
|
+
}
|
|
15
|
+
return d;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One duel: the hub keeps each round's throws until both are in (or the round's time runs out),
|
|
20
|
+
* then reveals them; the first to win a majority of `best_of` rounds wins. The starter's game is
|
|
21
|
+
* rock, paper, scissors.
|
|
22
|
+
*/
|
|
23
|
+
export class Duel {
|
|
24
|
+
constructor(runtime, nodeType, key) {
|
|
25
|
+
this.runtime = runtime;
|
|
26
|
+
this.nodeType = nodeType;
|
|
27
|
+
this.key = key;
|
|
28
|
+
this.view = new HubState(runtime, nodeType, key, 'duel');
|
|
29
|
+
}
|
|
30
|
+
watch() {
|
|
31
|
+
return this.view.start();
|
|
32
|
+
}
|
|
33
|
+
unwatch() {
|
|
34
|
+
return this.view.stop();
|
|
35
|
+
}
|
|
36
|
+
/** Takes a seat; resolves with whether this seat started the first round. @throws {KitError} `full`. */
|
|
37
|
+
join() {
|
|
38
|
+
return this.runtime.call(this.nodeType, this.key, 'join', null, { action: true });
|
|
39
|
+
}
|
|
40
|
+
/** Before the duel starts. @throws {KitError} `started`. */
|
|
41
|
+
leave() {
|
|
42
|
+
return this.runtime.call(this.nodeType, this.key, 'leave', null, { action: true });
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The caller's hidden throw this round; resolves with whether it completed the round.
|
|
46
|
+
* @throws {KitError} `conflict` (already in, or no round open), `bad_request` (not a hand), `not_member`.
|
|
47
|
+
*/
|
|
48
|
+
throw(hand) {
|
|
49
|
+
return this.runtime.call(this.nodeType, this.key, 'throw', { hand }, { action: true });
|
|
50
|
+
}
|
|
51
|
+
/** Once it is over: play again. @throws {KitError} `conflict`, `not_member`. */
|
|
52
|
+
rematch() {
|
|
53
|
+
return this.runtime.call(this.nodeType, this.key, 'rematch', null, { action: true });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import type { KitRuntime } from '../runtime.js';
|
|
2
|
+
import { WritableKitStore, type KitStore } from '../store.js';
|
|
3
|
+
/** Items and currency moved together: a price, a reward, a hold. */
|
|
4
|
+
export interface EconBundle {
|
|
5
|
+
items: Record<string, number>;
|
|
6
|
+
currency: Record<string, number>;
|
|
7
|
+
}
|
|
8
|
+
export interface EconStack {
|
|
9
|
+
item: string;
|
|
10
|
+
count: number;
|
|
11
|
+
}
|
|
12
|
+
/** What the `inventory` read answers: only the player reads it. */
|
|
13
|
+
export interface InventoryView {
|
|
14
|
+
slots: number;
|
|
15
|
+
stacks: EconStack[];
|
|
16
|
+
/** Items given that did not fit, waiting for {@link InventoryKit.takeMail}. */
|
|
17
|
+
mail: Record<string, number>;
|
|
18
|
+
/** Items held for a trade or an order. */
|
|
19
|
+
held: Record<string, number>;
|
|
20
|
+
}
|
|
21
|
+
/** What the `wallet` read answers. */
|
|
22
|
+
export interface WalletView {
|
|
23
|
+
balances: Record<string, number>;
|
|
24
|
+
/** Currency held for a trade or an order. */
|
|
25
|
+
held: Record<string, number>;
|
|
26
|
+
}
|
|
27
|
+
export interface AchievementView {
|
|
28
|
+
id: string;
|
|
29
|
+
counter: string;
|
|
30
|
+
target: number;
|
|
31
|
+
count: number;
|
|
32
|
+
unlocked_at: number | null;
|
|
33
|
+
}
|
|
34
|
+
export interface QuestObjectiveView {
|
|
35
|
+
counter: string;
|
|
36
|
+
target: number;
|
|
37
|
+
count: number;
|
|
38
|
+
}
|
|
39
|
+
export interface QuestView {
|
|
40
|
+
id: string;
|
|
41
|
+
state: 'locked' | 'available' | 'active' | 'complete' | 'done';
|
|
42
|
+
objectives: QuestObjectiveView[];
|
|
43
|
+
reward: EconBundle;
|
|
44
|
+
xp: number;
|
|
45
|
+
tutorial: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** What the `progress` read answers. */
|
|
48
|
+
export interface ProgressView {
|
|
49
|
+
level: number;
|
|
50
|
+
xp: number;
|
|
51
|
+
/** What the level takes to finish; null at the top. */
|
|
52
|
+
next: number | null;
|
|
53
|
+
total_xp: number;
|
|
54
|
+
achievements: AchievementView[];
|
|
55
|
+
quests: QuestView[];
|
|
56
|
+
}
|
|
57
|
+
/** What the `player` topic carries and `profile` answers: anyone may read it. */
|
|
58
|
+
export interface PlayerProfile {
|
|
59
|
+
player: number;
|
|
60
|
+
level: number;
|
|
61
|
+
achievements: string[];
|
|
62
|
+
quests_done: number;
|
|
63
|
+
}
|
|
64
|
+
export interface ProductionView {
|
|
65
|
+
producers: Array<[string, number]>;
|
|
66
|
+
stock: Record<string, number>;
|
|
67
|
+
capacity: Record<string, number>;
|
|
68
|
+
}
|
|
69
|
+
/** Everything a player's hub keeps for them (`me`). */
|
|
70
|
+
export interface PlayerView {
|
|
71
|
+
profile: PlayerProfile;
|
|
72
|
+
inventory: InventoryView;
|
|
73
|
+
wallet: WalletView;
|
|
74
|
+
progress: ProgressView;
|
|
75
|
+
production: ProductionView;
|
|
76
|
+
}
|
|
77
|
+
/** What one change earned: levels, achievements, quests complete. */
|
|
78
|
+
export interface PlayerEarned {
|
|
79
|
+
levels: number;
|
|
80
|
+
achievements: string[];
|
|
81
|
+
quests: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface EconRecipe {
|
|
84
|
+
id: string;
|
|
85
|
+
inputs: EconBundle;
|
|
86
|
+
outputs: EconBundle;
|
|
87
|
+
level: number;
|
|
88
|
+
}
|
|
89
|
+
export interface LootTableView {
|
|
90
|
+
id: string;
|
|
91
|
+
cost: EconBundle;
|
|
92
|
+
entries: Array<{
|
|
93
|
+
item: string;
|
|
94
|
+
count: number;
|
|
95
|
+
weight: number;
|
|
96
|
+
pity_group: string | null;
|
|
97
|
+
}>;
|
|
98
|
+
pity_within: Record<string, number>;
|
|
99
|
+
}
|
|
100
|
+
/** What `rules` answers: the game's items, recipes, loot tables, quests and achievements. */
|
|
101
|
+
export interface PlayerRules {
|
|
102
|
+
slots: number;
|
|
103
|
+
items: Array<{
|
|
104
|
+
id: string;
|
|
105
|
+
max_stack: number;
|
|
106
|
+
tradable: boolean;
|
|
107
|
+
name: string;
|
|
108
|
+
}>;
|
|
109
|
+
currencies: string[];
|
|
110
|
+
recipes: EconRecipe[];
|
|
111
|
+
loot: LootTableView[];
|
|
112
|
+
quests: Array<Record<string, unknown>>;
|
|
113
|
+
achievements: Array<Record<string, unknown>>;
|
|
114
|
+
client_counters: string[];
|
|
115
|
+
}
|
|
116
|
+
export interface LootRoll {
|
|
117
|
+
item: string;
|
|
118
|
+
count: number;
|
|
119
|
+
/** Pity picked it. */
|
|
120
|
+
pity: boolean;
|
|
121
|
+
roll: number;
|
|
122
|
+
}
|
|
123
|
+
/** A `player` topic event: a level gained, an achievement unlocked. */
|
|
124
|
+
export type PlayerEvent = {
|
|
125
|
+
type: 'level';
|
|
126
|
+
player: number;
|
|
127
|
+
level: number;
|
|
128
|
+
} | {
|
|
129
|
+
type: 'achievement';
|
|
130
|
+
player: number;
|
|
131
|
+
achievement: string;
|
|
132
|
+
};
|
|
133
|
+
/** A store fed by another once it exists. */
|
|
134
|
+
declare class Relay<T> extends WritableKitStore<T | undefined> {
|
|
135
|
+
constructor();
|
|
136
|
+
attach(source: KitStore<T | undefined>): void;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* The caller's own `player` hub (the `player` starter), keyed by their player id: what they own
|
|
140
|
+
* and what they have done. Its stores exist from the start and fill once {@link watch} has read
|
|
141
|
+
* them; only the player reads `inventory`, `wallet` and `progress`, and each is read again when
|
|
142
|
+
* the hub says it changed. The economy is not a ledger: see the Game Kit's economy page.
|
|
143
|
+
*/
|
|
144
|
+
export declare class PlayerKit {
|
|
145
|
+
private readonly runtime;
|
|
146
|
+
readonly nodeType: string;
|
|
147
|
+
private readonly playerKey?;
|
|
148
|
+
readonly profile: Relay<PlayerProfile>;
|
|
149
|
+
readonly inventory: Relay<InventoryView>;
|
|
150
|
+
readonly wallet: Relay<WalletView>;
|
|
151
|
+
readonly progress: Relay<ProgressView>;
|
|
152
|
+
private parts;
|
|
153
|
+
private rulesRead;
|
|
154
|
+
private readonly events;
|
|
155
|
+
constructor(runtime: KitRuntime, nodeType?: string, playerKey?: string | undefined);
|
|
156
|
+
/** The hub's key: the player's id. */
|
|
157
|
+
key(): Promise<string>;
|
|
158
|
+
private ready;
|
|
159
|
+
/** Mirrors the profile and reads what only the player reads (all of it, or the parts named). */
|
|
160
|
+
watch(...which: Array<'profile' | 'inventory' | 'wallet' | 'progress'>): Promise<void>;
|
|
161
|
+
unwatch(): Promise<void>;
|
|
162
|
+
/** Levels gained and achievements unlocked, as the `player` topic announces them. */
|
|
163
|
+
onEvent(listener: (e: PlayerEvent) => void): () => void;
|
|
164
|
+
/** Calls the player's hub; a change carries an action id. */
|
|
165
|
+
call<T>(method: string, args?: unknown, change?: boolean): Promise<T>;
|
|
166
|
+
/** Everything the hub keeps for the player. */
|
|
167
|
+
me(): Promise<PlayerView>;
|
|
168
|
+
/** The game's items, recipes, loot tables, quests and achievements (read once). */
|
|
169
|
+
rules(): Promise<PlayerRules>;
|
|
170
|
+
/** Another player's public profile. */
|
|
171
|
+
profileOf(player: number | string): Promise<PlayerProfile>;
|
|
172
|
+
}
|
|
173
|
+
/** The player's items: stacks in slots, and mail for what did not fit. */
|
|
174
|
+
export declare class InventoryKit {
|
|
175
|
+
private readonly player;
|
|
176
|
+
constructor(player: PlayerKit);
|
|
177
|
+
get items(): KitStore<InventoryView | undefined>;
|
|
178
|
+
watch(): Promise<InventoryView | undefined>;
|
|
179
|
+
/** How many of `item` the player has, as last read. */
|
|
180
|
+
count(item: string): number;
|
|
181
|
+
/** @throws {KitError} `insufficient`. */
|
|
182
|
+
discard(item: string, count: number): Promise<boolean>;
|
|
183
|
+
/** Moves what fits from the mail into the inventory; resolves with what moved. */
|
|
184
|
+
takeMail(): Promise<EconBundle>;
|
|
185
|
+
}
|
|
186
|
+
/** The player's soft currencies. */
|
|
187
|
+
export declare class WalletKit {
|
|
188
|
+
private readonly player;
|
|
189
|
+
constructor(player: PlayerKit);
|
|
190
|
+
get balances(): KitStore<WalletView | undefined>;
|
|
191
|
+
watch(): Promise<WalletView | undefined>;
|
|
192
|
+
/** The balance of `currency`, as last read. */
|
|
193
|
+
balance(currency: string): number;
|
|
194
|
+
}
|
|
195
|
+
/** Experience and levels, and the public profile. */
|
|
196
|
+
export declare class ProgressionKit {
|
|
197
|
+
private readonly player;
|
|
198
|
+
constructor(player: PlayerKit);
|
|
199
|
+
get progress(): KitStore<ProgressView | undefined>;
|
|
200
|
+
get profile(): KitStore<PlayerProfile | undefined>;
|
|
201
|
+
watch(): Promise<ProgressView | undefined>;
|
|
202
|
+
/** Another player's public profile. */
|
|
203
|
+
profileOf(player: number | string): Promise<PlayerProfile>;
|
|
204
|
+
/** Called with each level the player reaches. */
|
|
205
|
+
onLevel(listener: (level: number) => void): () => void;
|
|
206
|
+
}
|
|
207
|
+
/** Achievements: counts of what the player did, unlocked once. */
|
|
208
|
+
export declare class AchievementsKit {
|
|
209
|
+
private readonly player;
|
|
210
|
+
constructor(player: PlayerKit);
|
|
211
|
+
watch(): Promise<AchievementView[]>;
|
|
212
|
+
/** The achievements with their counts, as last read (hidden ones once unlocked). */
|
|
213
|
+
list(): AchievementView[];
|
|
214
|
+
/** Called with each achievement the player unlocks. */
|
|
215
|
+
onUnlock(listener: (achievement: string) => void): () => void;
|
|
216
|
+
}
|
|
217
|
+
/** Quests, first-session tutorials among them. */
|
|
218
|
+
export declare class QuestsKit {
|
|
219
|
+
private readonly player;
|
|
220
|
+
constructor(player: PlayerKit);
|
|
221
|
+
watch(): Promise<QuestView[]>;
|
|
222
|
+
list(): QuestView[];
|
|
223
|
+
/** @throws {KitError} `conflict` (taken, done, or another first), `forbidden` (level), `not_found`. */
|
|
224
|
+
accept(quest: string): Promise<boolean>;
|
|
225
|
+
/** Claims a complete quest's reward. @throws {KitError} `not_ready`, `full`. */
|
|
226
|
+
claim(quest: string): Promise<EconBundle>;
|
|
227
|
+
/**
|
|
228
|
+
* Reports one of the counters the game lets a client report (a tutorial step).
|
|
229
|
+
* @throws {KitError} `forbidden` for a counter the game's hubs count.
|
|
230
|
+
*/
|
|
231
|
+
step(counter: string): Promise<PlayerEarned>;
|
|
232
|
+
}
|
|
233
|
+
/** Crafting from the game's recipes. */
|
|
234
|
+
export declare class CraftingKit {
|
|
235
|
+
private readonly player;
|
|
236
|
+
constructor(player: PlayerKit);
|
|
237
|
+
recipes(): Promise<EconRecipe[]>;
|
|
238
|
+
/** Crafts `times` (once by default). @throws {KitError} `insufficient`, `full`, `forbidden` (level), `not_found`. */
|
|
239
|
+
craft(recipe: string, times?: number): Promise<{
|
|
240
|
+
made: EconBundle;
|
|
241
|
+
earned: PlayerEarned;
|
|
242
|
+
}>;
|
|
243
|
+
}
|
|
244
|
+
/** Loot tables with pity. */
|
|
245
|
+
export declare class LootKit {
|
|
246
|
+
private readonly player;
|
|
247
|
+
constructor(player: PlayerKit);
|
|
248
|
+
tables(): Promise<LootTableView[]>;
|
|
249
|
+
/** Pays the table's cost and rolls once. @throws {KitError} `insufficient`, `full`, `not_found`. */
|
|
250
|
+
open(table: string): Promise<{
|
|
251
|
+
roll: LootRoll;
|
|
252
|
+
earned: PlayerEarned;
|
|
253
|
+
}>;
|
|
254
|
+
}
|
|
255
|
+
/** Idle production that catches up on the time away. */
|
|
256
|
+
export declare class ProductionKit {
|
|
257
|
+
private readonly player;
|
|
258
|
+
constructor(player: PlayerKit);
|
|
259
|
+
view(): Promise<ProductionView>;
|
|
260
|
+
/** Moves what the producers made into the inventory, as far as it fits. */
|
|
261
|
+
collect(): Promise<EconBundle>;
|
|
262
|
+
}
|
|
263
|
+
export {};
|
|
264
|
+
//# sourceMappingURL=player.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"player.d.ts","sourceRoot":"","sources":["../../../src/kit/modules/player.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE9D,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,+EAA+E;IAC/E,IAAI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