@nocville/node 0.2.2 → 0.3.0
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/dist/cjs/index.js +2 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -76,6 +76,8 @@ class NocvilleClient {
|
|
|
76
76
|
payload.name = update.name;
|
|
77
77
|
if (update.archetype !== undefined)
|
|
78
78
|
payload.archetype = update.archetype;
|
|
79
|
+
if (update.kind !== undefined)
|
|
80
|
+
payload.kind = update.kind;
|
|
79
81
|
if (update.subStatus !== undefined)
|
|
80
82
|
payload.subStatus = update.subStatus;
|
|
81
83
|
if (update.screenData !== undefined)
|
package/dist/index.d.ts
CHANGED
|
@@ -55,7 +55,9 @@ export interface AlertConfig {
|
|
|
55
55
|
heartbeatInterval?: number;
|
|
56
56
|
}
|
|
57
57
|
/** Companion pixel-screen types the server knows how to render. */
|
|
58
|
-
export type CompanionScreenType = 'log-terminal' | 'ticker-tape' | 'crt-monitor' | 'dashboard-wall' | 'status-light' | 'gauge-panel' | 'web-view' | 'desk-sign' | 'commit-board' | 'welcome-sign'
|
|
58
|
+
export type CompanionScreenType = 'log-terminal' | 'ticker-tape' | 'crt-monitor' | 'dashboard-wall' | 'status-light' | 'gauge-panel' | 'web-view' | 'desk-sign' | 'commit-board' | 'welcome-sign'
|
|
59
|
+
/** Your own pixel art (pixel-image screenData, transparency + animation frames). */
|
|
60
|
+
| 'pixel-device';
|
|
59
61
|
export type BehaviorActivity = 'busy' | 'idle' | 'waiting' | 'critical';
|
|
60
62
|
export type BehaviorIdle = 'seek-lounge' | 'seek-desk' | 'wander' | 'stay';
|
|
61
63
|
export type BehaviorPose = 'sit' | 'sleep' | 'stand';
|
|
@@ -77,13 +79,18 @@ export type BehaviorHome = {
|
|
|
77
79
|
* All fields optional; the server merges hints → archetype defaults → global defaults.
|
|
78
80
|
*/
|
|
79
81
|
export interface BehaviorHints {
|
|
82
|
+
/** Built-in office character routine, run by the game server. */
|
|
83
|
+
role?: 'receptionist' | 'security' | 'janitor' | 'barista' | 'office-cat' | 'office-dog' | 'plant-caretaker' | 'it-technician' | 'out-of-touch-executive';
|
|
80
84
|
/** Schema version */
|
|
81
85
|
v?: number;
|
|
82
86
|
/** Explicit activity override; else derived server-side */
|
|
83
87
|
activity?: BehaviorActivity;
|
|
84
88
|
/** Where to go when idle */
|
|
85
89
|
idle?: BehaviorIdle;
|
|
86
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Where to go when busy: 'seek-desk' | 'wander' | 'stay' | 'seek-companion' (work at this
|
|
92
|
+
* NPC's own companion object) | 'seek-object:<category|catalogId>'
|
|
93
|
+
*/
|
|
87
94
|
busy?: string;
|
|
88
95
|
/** Pose to strike when idle */
|
|
89
96
|
idlePose?: BehaviorPose;
|
|
@@ -149,6 +156,11 @@ export interface StatusUpdate {
|
|
|
149
156
|
metrics?: Record<string, number | string>;
|
|
150
157
|
/** NPC archetype identifier */
|
|
151
158
|
archetype?: string;
|
|
159
|
+
/**
|
|
160
|
+
* NPC type slug (lowercase letters, digits and dashes, e.g. `backup-bot`). Groups NPCs so
|
|
161
|
+
* a team can send every NPC of a type to the same room. Defaults to the archetype.
|
|
162
|
+
*/
|
|
163
|
+
kind?: string;
|
|
152
164
|
/** Sub-status for more granular state */
|
|
153
165
|
subStatus?: string;
|
|
154
166
|
/** Screen data for NPC display */
|
package/dist/index.js
CHANGED
|
@@ -73,6 +73,8 @@ export class NocvilleClient {
|
|
|
73
73
|
payload.name = update.name;
|
|
74
74
|
if (update.archetype !== undefined)
|
|
75
75
|
payload.archetype = update.archetype;
|
|
76
|
+
if (update.kind !== undefined)
|
|
77
|
+
payload.kind = update.kind;
|
|
76
78
|
if (update.subStatus !== undefined)
|
|
77
79
|
payload.subStatus = update.subStatus;
|
|
78
80
|
if (update.screenData !== undefined)
|