@indiegems/gem-web-sdk 11.0.0 → 11.1.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/CHANGELOG.md +15 -0
- package/dist/game.d.ts +22 -0
- package/dist/gem-web-sdk.esm.js +2 -2
- package/dist/gem-web-sdk.function.js +2 -2
- package/dist/gem-web-sdk.game.js +2 -2
- package/dist/gem-web-sdk.min.js +2 -2
- package/dist/gem-web-sdk.sdk.js +2 -2
- package/dist/gem-web-sdk.server.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/sdk.d.ts +22 -0
- package/docs/api/api-reference-game.md +49 -1
- package/docs/api/api-reference-server.md +1 -1
- package/docs/api/reference.json +34 -2
- package/docs/changelog.md +15 -0
- package/docs/getting-started.md +1 -1
- package/docs/manifest.json +8 -8
- package/docs/rooms-and-matches.md +43 -0
- package/docs/server-bundles.md +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,21 @@ Its entries are grouped under up to five headings:
|
|
|
16
16
|
- **Rebuild**: a type changed. Recompile against the new version; code that compiles today keeps compiling unless the entry says otherwise.
|
|
17
17
|
- **New capability**: something a game can now do. Nothing changes unless you use it.
|
|
18
18
|
|
|
19
|
+
## 11.1.1
|
|
20
|
+
|
|
21
|
+
Upgrading from 11.1.0. Impact: none.
|
|
22
|
+
|
|
23
|
+
Nothing in this release asks anything of a game.
|
|
24
|
+
|
|
25
|
+
## 11.1.0
|
|
26
|
+
|
|
27
|
+
Upgrading from 11.0.0. Impact: none.
|
|
28
|
+
|
|
29
|
+
### New capability
|
|
30
|
+
|
|
31
|
+
- Quick join options now accept templateSlugs, a list of one to eight templates. Open rooms of every listed template are candidates together, and if a room has to be created it is made from the first template in the list. Do not pass the list together with a single template, and do not pass an empty list or more than eight, because those calls are refused locally. When a local tool hosts your game's server, only the first template is sent and the room is always created from it. Games that pass a single template keep working unchanged.
|
|
32
|
+
- A room now reports which template it was made from through Room.templateSlug. Use it to tell which mode a player landed in, especially when you offer several templates at once.
|
|
33
|
+
|
|
19
34
|
## 11.0.0
|
|
20
35
|
|
|
21
36
|
Upgrading from 10.4.0. Impact: required.
|
package/dist/game.d.ts
CHANGED
|
@@ -175,6 +175,9 @@ type CountSpec = {
|
|
|
175
175
|
"min": number;
|
|
176
176
|
};
|
|
177
177
|
};
|
|
178
|
+
type DefaultTask = {
|
|
179
|
+
"template": string;
|
|
180
|
+
};
|
|
178
181
|
type EntityType = "player" | "character";
|
|
179
182
|
type EntriesPerEntity = "all" | "best";
|
|
180
183
|
type EventSource = "client" | "server";
|
|
@@ -275,8 +278,11 @@ type PlatformPrice = {
|
|
|
275
278
|
};
|
|
276
279
|
type PrerequisiteType = "owns_item" | "progression_complete" | "min_progression_value" | "progression_level";
|
|
277
280
|
type ProgressionConfig = {
|
|
281
|
+
"assignment"?: TaskAssignment;
|
|
278
282
|
"client_writable"?: boolean;
|
|
279
283
|
"completion_threshold"?: number | null;
|
|
284
|
+
"completion_threshold_range"?: null | ThresholdRange;
|
|
285
|
+
"default_task"?: null | DefaultTask;
|
|
280
286
|
"function_may_grant"?: boolean;
|
|
281
287
|
"label"?: string | null;
|
|
282
288
|
"max_completions"?: number | null;
|
|
@@ -284,6 +290,7 @@ type ProgressionConfig = {
|
|
|
284
290
|
"platform_grants"?: PlatformGrant[];
|
|
285
291
|
"reset_schedule"?: null | ResetSchedule;
|
|
286
292
|
"rewards_on_complete"?: RecipeOperation[];
|
|
293
|
+
"templates"?: TemplateDefinition[];
|
|
287
294
|
"tracks"?: TrackDefinition[];
|
|
288
295
|
};
|
|
289
296
|
type RecipeOperation = {
|
|
@@ -532,6 +539,7 @@ type SnapshotProgression = {
|
|
|
532
539
|
"progression_type": string;
|
|
533
540
|
"slug"?: string | null;
|
|
534
541
|
"sort_order": number;
|
|
542
|
+
"template_hashes"?: Record<string, unknown>;
|
|
535
543
|
};
|
|
536
544
|
type SnapshotRecipe = {
|
|
537
545
|
"availability_end"?: string | null;
|
|
@@ -585,6 +593,18 @@ type SnapshotRunType = {
|
|
|
585
593
|
"properties_schema"?: Record<string, unknown>;
|
|
586
594
|
};
|
|
587
595
|
type SortDirection = "asc" | "desc";
|
|
596
|
+
type TaskAssignment = "none" | "per_period" | "per_player";
|
|
597
|
+
type TemplateDefinition = {
|
|
598
|
+
"description"?: string | null;
|
|
599
|
+
"display_name": string;
|
|
600
|
+
"key": string;
|
|
601
|
+
"localized"?: Record<string, unknown>;
|
|
602
|
+
"params"?: Record<string, unknown>;
|
|
603
|
+
};
|
|
604
|
+
type ThresholdRange = {
|
|
605
|
+
"max": number;
|
|
606
|
+
"min": number;
|
|
607
|
+
};
|
|
588
608
|
type TrackDefinition = {
|
|
589
609
|
"levels": LevelDefinition[];
|
|
590
610
|
"requires_item_id"?: string | null;
|
|
@@ -1724,6 +1744,7 @@ interface Room {
|
|
|
1724
1744
|
readonly matchId?: string;
|
|
1725
1745
|
readonly version: number;
|
|
1726
1746
|
readonly templateId?: string;
|
|
1747
|
+
readonly templateSlug?: string;
|
|
1727
1748
|
readonly roomType: string;
|
|
1728
1749
|
readonly transports?: readonly TransportKind[];
|
|
1729
1750
|
readonly createdAt: number;
|
|
@@ -1809,6 +1830,7 @@ interface JoinRoomOptions {
|
|
|
1809
1830
|
}
|
|
1810
1831
|
interface QuickJoinOptions extends JoinRoomOptions {
|
|
1811
1832
|
readonly templateSlug?: string;
|
|
1833
|
+
readonly templateSlugs?: readonly string[];
|
|
1812
1834
|
readonly templateId?: string;
|
|
1813
1835
|
readonly region?: string;
|
|
1814
1836
|
readonly name?: string;
|