@gameslate/sdk 0.3.29 → 0.3.30
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/lib/game-support.js
CHANGED
|
@@ -142,8 +142,9 @@ function checkPinsAgainstRegistry(support, ctx, problems) {
|
|
|
142
142
|
for (const pin of layer.landmarks) {
|
|
143
143
|
if (effectiveLandmarkKind(pin) !== 'poi' || isTrackedPin(pin))
|
|
144
144
|
continue;
|
|
145
|
-
/* the
|
|
146
|
-
|
|
145
|
+
/* rules see the effective kind, as the app's collected check passes it (web llm.ts) */
|
|
146
|
+
const ref = { ...pin, kind: effectiveLandmarkKind(pin) };
|
|
147
|
+
if (rules.some(r => pinRuleMatchesAt(r, ref, locationId)))
|
|
147
148
|
continue;
|
|
148
149
|
plain.push(`"${pin.label}" (${pin.id}) in ${locationId}/${layer.id}`);
|
|
149
150
|
}
|
package/lib/registry.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const LandmarkKindSchema: z.ZodEnum<["calibration", "entry", "objective", "poi", "npc", "enemy", "exit", "note"]>;
|
|
3
3
|
export type LandmarkKind = z.infer<typeof LandmarkKindSchema>;
|
|
4
4
|
/**
|
|
5
|
-
* A pin's kind with the registry default applied
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* A pin's kind with the registry default applied: the one default the map, chat, replies, pin
|
|
6
|
+
* rules and the support check all use. `ref_` ids are calibration points, then a pin that waits
|
|
7
|
+
* on an objective is an objective, a spoiler-free one an entry, the rest points of interest.
|
|
8
|
+
* One reader keeps the stated kind on purpose: the web's Map Nudge fallback (nudge.ts
|
|
9
|
+
* `pickNudgeTarget`), so a pin waiting on an inactive or complete objective isn't nudged to.
|
|
10
10
|
*/
|
|
11
11
|
export declare function effectiveLandmarkKind(pin: Pick<MapLandmark, 'id' | 'kind' | 'requiresObjective' | 'spoilerFree'>): LandmarkKind;
|
|
12
12
|
export declare const LandmarkSchema: z.ZodObject<{
|
package/lib/registry.js
CHANGED
|
@@ -13,11 +13,11 @@ export const LandmarkKindSchema = z.enum([
|
|
|
13
13
|
'note',
|
|
14
14
|
]);
|
|
15
15
|
/**
|
|
16
|
-
* A pin's kind with the registry default applied
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
16
|
+
* A pin's kind with the registry default applied: the one default the map, chat, replies, pin
|
|
17
|
+
* rules and the support check all use. `ref_` ids are calibration points, then a pin that waits
|
|
18
|
+
* on an objective is an objective, a spoiler-free one an entry, the rest points of interest.
|
|
19
|
+
* One reader keeps the stated kind on purpose: the web's Map Nudge fallback (nudge.ts
|
|
20
|
+
* `pickNudgeTarget`), so a pin waiting on an inactive or complete objective isn't nudged to.
|
|
21
21
|
*/
|
|
22
22
|
export function effectiveLandmarkKind(pin) {
|
|
23
23
|
if (pin.kind)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gameslate/sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.30",
|
|
4
4
|
"description": "Build plugins for GameSlate, the second-screen companion for PC games: the plugin contract, game-state and catalogue schemas, and the plugin builder.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -583,7 +583,8 @@ collected: a `collectedBy`, a `chestFlag` or `gsFlag`, or a pack `pinRules` entr
|
|
|
583
583
|
vehicles, signposts and shops; required from sdk 0.3.29). A pin with no `kind` takes the one the
|
|
584
584
|
map draws it as (`effectiveLandmarkKind`): calibration for a `ref_` id, else objective with a
|
|
585
585
|
`requiresObjective`, else entry when `spoilerFree`, else poi. A pack rule matching on `kind`
|
|
586
|
-
sees
|
|
586
|
+
sees that effective kind too, in the app and the support check, so `match: { kind: 'poi' }`
|
|
587
|
+
covers kind-less poi pins. `npc`, `enemy`, `entry` and
|
|
587
588
|
`note` pins have no pins flag. The other three, `autoHideCollected`, `customNotes` and
|
|
588
589
|
`wayfinding`, are map features, not kinds of pin. The support check refuses
|
|
589
590
|
`pointsOfInterest: false` when the built plugin's registry has such a poi pin; otherwise the
|