@phantomclient/plugin 0.1.0 → 0.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/README.md +2 -2
- package/dist/lib/chunks/api-Cu4nKe7h.js +1647 -0
- package/dist/lib/chunks/sdk-permissions-DPyveeLR.js +250 -0
- package/dist/lib/guest.js +1851 -3123
- package/dist/lib/index.js +32 -31
- package/dist/lib/styles.css +1 -1
- package/dist/lib/vue.js +281 -121
- package/dist/runtime/chunks/api-ByZmAFMe.js +1 -0
- package/dist/runtime/chunks/{runtime-dom.esm-bundler-BbCcCl6A.js → runtime-dom.esm-bundler-Dcouf4CU.js} +1 -1
- package/dist/runtime/chunks/sdk-permissions-BKJgZYgg.js +1 -0
- package/dist/runtime/chunks/{state-CFbUQLzX.js → state-BjAtxWlm.js} +1 -1
- package/dist/runtime/frame.html +4 -4
- package/dist/runtime/runtime.css +1 -1
- package/dist/runtime/runtime.js +1 -1
- package/dist/runtime/sdk-vue.js +1 -1
- package/dist/runtime/sdk.js +1 -1
- package/dist/runtime/vue.js +1 -1
- package/dist/types/index.d.ts +3073 -201
- package/dist/types/vue.d.ts +2724 -237
- package/package.json +5 -2
- package/dist/lib/chunks/api-B2tHXZiJ.js +0 -9
- package/dist/lib/chunks/sdk-permissions-BnKU1K9D.js +0 -43
- package/dist/runtime/chunks/api-Bj1J6wAH.js +0 -1
- package/dist/runtime/chunks/sdk-permissions-D_NYB67a.js +0 -1
package/dist/types/vue.d.ts
CHANGED
|
@@ -42,6 +42,10 @@ declare const Achievements: PacketDefinition<{
|
|
|
42
42
|
archived: boolean;
|
|
43
43
|
achievements: AchievementEntry[];
|
|
44
44
|
}>;
|
|
45
|
+
type AdoptAPetCard = {
|
|
46
|
+
defId: number;
|
|
47
|
+
invId: number;
|
|
48
|
+
};
|
|
45
49
|
type RoomPet = {
|
|
46
50
|
lBits: number;
|
|
47
51
|
uBits: number;
|
|
@@ -119,6 +123,18 @@ type OwnListedAvatar = {
|
|
|
119
123
|
avTypeId: number;
|
|
120
124
|
customAvId: number;
|
|
121
125
|
};
|
|
126
|
+
type AvatarListFields = {
|
|
127
|
+
own: true;
|
|
128
|
+
userName: string;
|
|
129
|
+
slotFlags: number;
|
|
130
|
+
uuid: string;
|
|
131
|
+
avatars: OwnListedAvatar[];
|
|
132
|
+
} | {
|
|
133
|
+
own: false;
|
|
134
|
+
userName: string;
|
|
135
|
+
perUserAvIds: number[];
|
|
136
|
+
};
|
|
137
|
+
declare const AvatarList: PacketDefinition<AvatarListFields>;
|
|
122
138
|
type LookedUpAvatar = {
|
|
123
139
|
accountType: number;
|
|
124
140
|
isGuide: boolean;
|
|
@@ -153,6 +169,39 @@ type AvatarLookupFields = {
|
|
|
153
169
|
avatar: LookedUpAvatar | null;
|
|
154
170
|
};
|
|
155
171
|
declare const AvatarLookup: PacketDefinition<AvatarLookupFields>;
|
|
172
|
+
declare const AvatarKilled: PacketDefinition<{
|
|
173
|
+
success: boolean;
|
|
174
|
+
extra: number;
|
|
175
|
+
}>;
|
|
176
|
+
type AvatarNameIds = readonly [
|
|
177
|
+
number,
|
|
178
|
+
number,
|
|
179
|
+
number
|
|
180
|
+
];
|
|
181
|
+
declare const AvatarAdded: PacketDefinition<{
|
|
182
|
+
status: number;
|
|
183
|
+
perUserAvId: number;
|
|
184
|
+
avInvId: number;
|
|
185
|
+
}>;
|
|
186
|
+
declare const AvatarSlotBought: PacketDefinition<{
|
|
187
|
+
success: boolean;
|
|
188
|
+
}>;
|
|
189
|
+
declare const AvatarFastPassAdded: PacketDefinition<{
|
|
190
|
+
success: boolean;
|
|
191
|
+
}>;
|
|
192
|
+
declare const AvatarNameBarChanged: PacketDefinition<{
|
|
193
|
+
userId: number;
|
|
194
|
+
nameBarData: number;
|
|
195
|
+
}>;
|
|
196
|
+
declare const AvatarOrdained: PacketDefinition<{
|
|
197
|
+
success: boolean;
|
|
198
|
+
}>;
|
|
199
|
+
declare const AvatarPhotoTaken: PacketDefinition<{
|
|
200
|
+
gems: number;
|
|
201
|
+
}>;
|
|
202
|
+
declare const AvatarPhotoChecked: PacketDefinition<{
|
|
203
|
+
gems: number;
|
|
204
|
+
}>;
|
|
156
205
|
type BuddyEntry = {
|
|
157
206
|
userName: string;
|
|
158
207
|
uuid: string;
|
|
@@ -161,6 +210,16 @@ type BuddyEntry = {
|
|
|
161
210
|
accountType: number;
|
|
162
211
|
partyTimeLeft: number | null;
|
|
163
212
|
};
|
|
213
|
+
declare const BuddyList: PacketDefinition<{
|
|
214
|
+
blocked: boolean;
|
|
215
|
+
buddies: BuddyEntry[];
|
|
216
|
+
blockedUserNames: string[];
|
|
217
|
+
}>;
|
|
218
|
+
declare const BuddyAddResult: PacketDefinition<{
|
|
219
|
+
status: number;
|
|
220
|
+
userName: string;
|
|
221
|
+
userNameModerationFlag: number;
|
|
222
|
+
}>;
|
|
164
223
|
declare const BuddyLocation: PacketDefinition<{
|
|
165
224
|
roomName: string;
|
|
166
225
|
displayName: string;
|
|
@@ -213,8 +272,8 @@ declare const DenPrivacy: {
|
|
|
213
272
|
type DenPrivacy = (typeof DenPrivacy)[keyof typeof DenPrivacy];
|
|
214
273
|
declare const DenVisitorCount: PacketDefinition<{
|
|
215
274
|
count: number;
|
|
216
|
-
|
|
217
|
-
|
|
275
|
+
entering: boolean;
|
|
276
|
+
userName: string;
|
|
218
277
|
}>;
|
|
219
278
|
type DenRoom = {
|
|
220
279
|
invIdx: number;
|
|
@@ -229,6 +288,90 @@ type DenMasterpieceItem = {
|
|
|
229
288
|
uniqueImageCreatorDbId: number;
|
|
230
289
|
uniqueImageCreatorUUID: string;
|
|
231
290
|
};
|
|
291
|
+
type DenMannequinLook = {
|
|
292
|
+
baseColor: number;
|
|
293
|
+
patternColor: number;
|
|
294
|
+
patternDefId: number;
|
|
295
|
+
eyeColor: number;
|
|
296
|
+
eyeDefId: number;
|
|
297
|
+
};
|
|
298
|
+
declare const MANNEQUIN_SLOTS: readonly [
|
|
299
|
+
"tail",
|
|
300
|
+
"leg",
|
|
301
|
+
"back",
|
|
302
|
+
"neck",
|
|
303
|
+
"head"
|
|
304
|
+
];
|
|
305
|
+
type MannequinSlot = (typeof MANNEQUIN_SLOTS)[number];
|
|
306
|
+
type DenMannequinInvIds = DenMannequinLook & {
|
|
307
|
+
tailInvId: number;
|
|
308
|
+
legInvId: number;
|
|
309
|
+
backInvId: number;
|
|
310
|
+
neckInvId: number;
|
|
311
|
+
headInvId: number;
|
|
312
|
+
};
|
|
313
|
+
type DenMannequinWorn = {
|
|
314
|
+
defId: number;
|
|
315
|
+
color: number;
|
|
316
|
+
invIdx: number;
|
|
317
|
+
};
|
|
318
|
+
type DenMannequinOutfit = DenMannequinLook & Record<MannequinSlot, DenMannequinWorn>;
|
|
319
|
+
type DenOwnedItem = {
|
|
320
|
+
invIdx: number;
|
|
321
|
+
defId: number;
|
|
322
|
+
categoryId: number;
|
|
323
|
+
version: number;
|
|
324
|
+
approved: boolean;
|
|
325
|
+
uniqueImageId: string;
|
|
326
|
+
uniqueImageCreatorDbId: number;
|
|
327
|
+
uniqueImageCreatorUUID: string;
|
|
328
|
+
mannequin: DenMannequinInvIds | null;
|
|
329
|
+
denStoreInvId: number;
|
|
330
|
+
};
|
|
331
|
+
type DenStateEntry = {
|
|
332
|
+
invIdx: number;
|
|
333
|
+
defId: number;
|
|
334
|
+
placed: boolean;
|
|
335
|
+
x: number;
|
|
336
|
+
y: number;
|
|
337
|
+
version: number;
|
|
338
|
+
flipped: number;
|
|
339
|
+
userNameLink: string | null;
|
|
340
|
+
uniqueImageId: string;
|
|
341
|
+
uniqueImageCreatorDbId: number;
|
|
342
|
+
uniqueImageCreatorUUID: string;
|
|
343
|
+
mannequin: DenMannequinOutfit | null;
|
|
344
|
+
ecoConsumerStateId: number;
|
|
345
|
+
};
|
|
346
|
+
type DenStatePet = {
|
|
347
|
+
invIdx: number;
|
|
348
|
+
lBits: number;
|
|
349
|
+
uBits: number;
|
|
350
|
+
eBits: number;
|
|
351
|
+
catId: number;
|
|
352
|
+
x: number;
|
|
353
|
+
y: number;
|
|
354
|
+
flipped: number;
|
|
355
|
+
createdTs: number;
|
|
356
|
+
traitDefId: number;
|
|
357
|
+
toyDefId: number;
|
|
358
|
+
foodDefId: number;
|
|
359
|
+
name: string;
|
|
360
|
+
};
|
|
361
|
+
type DenStateChange = {
|
|
362
|
+
refId: number;
|
|
363
|
+
invIdx: number;
|
|
364
|
+
placed: boolean;
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
flipped: number;
|
|
368
|
+
userNameLink: string;
|
|
369
|
+
mannequin: DenMannequinInvIds | null;
|
|
370
|
+
};
|
|
371
|
+
type DenEcoConsumer = {
|
|
372
|
+
invIdx: number;
|
|
373
|
+
stateId: number;
|
|
374
|
+
};
|
|
232
375
|
type JamAGram = {
|
|
233
376
|
messageId: number;
|
|
234
377
|
senderUserName: string;
|
|
@@ -374,6 +517,28 @@ declare const MinigameLeaderboard: PacketDefinition<{
|
|
|
374
517
|
thisWeek: LeaderboardEntry[];
|
|
375
518
|
buddies: LeaderboardEntry[];
|
|
376
519
|
}>;
|
|
520
|
+
type MinigameAwardSums = {
|
|
521
|
+
amountSum: number;
|
|
522
|
+
gameSum: number;
|
|
523
|
+
checkSum: number;
|
|
524
|
+
};
|
|
525
|
+
type MinigameAward = {
|
|
526
|
+
amount: number;
|
|
527
|
+
gameDefId: number;
|
|
528
|
+
userId: number;
|
|
529
|
+
};
|
|
530
|
+
type MinigameScoreSums = {
|
|
531
|
+
mainSum: number;
|
|
532
|
+
valueSum: number;
|
|
533
|
+
numSum: number;
|
|
534
|
+
varRefSum: number;
|
|
535
|
+
gameSum: number;
|
|
536
|
+
};
|
|
537
|
+
type MinigameScore = {
|
|
538
|
+
score: number;
|
|
539
|
+
leaderboardUserVarRef: number;
|
|
540
|
+
gameDefId: number;
|
|
541
|
+
};
|
|
377
542
|
declare const NewspaperPageSeen: PacketDefinition<{
|
|
378
543
|
defId: number;
|
|
379
544
|
timeSeen: number;
|
|
@@ -390,6 +555,14 @@ type CustomParty = {
|
|
|
390
555
|
defId: number;
|
|
391
556
|
timeLeft: number;
|
|
392
557
|
};
|
|
558
|
+
type PoolMasterpiece = {
|
|
559
|
+
frameId: number;
|
|
560
|
+
resourceId: number;
|
|
561
|
+
userName: string;
|
|
562
|
+
creatorDbId: number;
|
|
563
|
+
creatorUuid: string;
|
|
564
|
+
raw: Record<string, unknown>;
|
|
565
|
+
};
|
|
393
566
|
declare const CustomPartyHostResult: PacketDefinition<{
|
|
394
567
|
secondsLeft: number | null;
|
|
395
568
|
hosting: boolean;
|
|
@@ -430,6 +603,12 @@ type QuestJoinOutcome = {
|
|
|
430
603
|
extra: string[];
|
|
431
604
|
};
|
|
432
605
|
declare const QuestJoinResult: PacketDefinition<QuestJoinOutcome>;
|
|
606
|
+
declare const QuestWaiting: PacketDefinition<{
|
|
607
|
+
userIds: number[];
|
|
608
|
+
}>;
|
|
609
|
+
declare const QuestJoinCancelled: PacketDefinition<{
|
|
610
|
+
extra: string[];
|
|
611
|
+
}>;
|
|
433
612
|
type QuestActorInfo = {
|
|
434
613
|
actorId: string;
|
|
435
614
|
type: number;
|
|
@@ -477,15 +656,119 @@ declare const QuestAward: PacketDefinition<{
|
|
|
477
656
|
userVarId: number;
|
|
478
657
|
value: number;
|
|
479
658
|
}>;
|
|
659
|
+
declare const QuestExitByType: PacketDefinition<{
|
|
660
|
+
exitType: string;
|
|
661
|
+
}>;
|
|
662
|
+
type QuestBundledMessage = {
|
|
663
|
+
command: string;
|
|
664
|
+
args: string[];
|
|
665
|
+
};
|
|
666
|
+
type QuestDroppedTreasure = {
|
|
667
|
+
subType: number;
|
|
668
|
+
denDefId: number | null;
|
|
669
|
+
itemDefId: number | null;
|
|
670
|
+
color: number | null;
|
|
671
|
+
amount: number | null;
|
|
672
|
+
};
|
|
673
|
+
declare const QuestActorSpawned: PacketDefinition<{
|
|
674
|
+
spawnedFrom: string;
|
|
675
|
+
actorId: string;
|
|
676
|
+
type: number;
|
|
677
|
+
defId: number;
|
|
678
|
+
dropped: QuestDroppedTreasure | null;
|
|
679
|
+
spawnOffset: {
|
|
680
|
+
x: number;
|
|
681
|
+
y: number;
|
|
682
|
+
} | null;
|
|
683
|
+
extra: string[];
|
|
684
|
+
}>;
|
|
685
|
+
declare const QuestActorMoved: PacketDefinition<{
|
|
686
|
+
actorId: string;
|
|
687
|
+
x: number;
|
|
688
|
+
y: number;
|
|
689
|
+
velocity: number;
|
|
690
|
+
seekType: number;
|
|
691
|
+
nearestX: number;
|
|
692
|
+
nearestY: number;
|
|
693
|
+
}>;
|
|
480
694
|
declare const QuestActorSeek: PacketDefinition<{
|
|
481
695
|
actorId: string;
|
|
482
696
|
seekType: number;
|
|
483
697
|
userId: number;
|
|
484
698
|
}>;
|
|
699
|
+
declare const QuestActorHealth: PacketDefinition<{
|
|
700
|
+
actorId: string;
|
|
701
|
+
healthPercent: number;
|
|
702
|
+
missed: boolean;
|
|
703
|
+
damage: number | null;
|
|
704
|
+
fierce: boolean | null;
|
|
705
|
+
extra: string[];
|
|
706
|
+
}>;
|
|
707
|
+
declare const QuestActorDied: PacketDefinition<{
|
|
708
|
+
actorId: string;
|
|
709
|
+
damage: number;
|
|
710
|
+
moved: boolean;
|
|
711
|
+
x: number;
|
|
712
|
+
y: number;
|
|
713
|
+
otherActorId: string;
|
|
714
|
+
}>;
|
|
715
|
+
declare const QuestActorRestored: PacketDefinition<{
|
|
716
|
+
actorId: string;
|
|
717
|
+
healthPercent: number;
|
|
718
|
+
}>;
|
|
719
|
+
declare const QuestCommand: PacketDefinition<{
|
|
720
|
+
command: number;
|
|
721
|
+
actorId: null;
|
|
722
|
+
state: null;
|
|
723
|
+
visible: null;
|
|
724
|
+
requireClick: null;
|
|
725
|
+
args: string[];
|
|
726
|
+
} | {
|
|
727
|
+
command: 1;
|
|
728
|
+
actorId: string;
|
|
729
|
+
state: number;
|
|
730
|
+
visible: boolean | null;
|
|
731
|
+
requireClick: boolean | null;
|
|
732
|
+
args: string[];
|
|
733
|
+
}>;
|
|
734
|
+
declare const QuestVariable: PacketDefinition<{
|
|
735
|
+
command: number;
|
|
736
|
+
actorId: null;
|
|
737
|
+
state: null;
|
|
738
|
+
visible: null;
|
|
739
|
+
requireClick: null;
|
|
740
|
+
args: string[];
|
|
741
|
+
} | {
|
|
742
|
+
command: 1;
|
|
743
|
+
actorId: string;
|
|
744
|
+
state: number;
|
|
745
|
+
visible: boolean | null;
|
|
746
|
+
requireClick: boolean | null;
|
|
747
|
+
args: string[];
|
|
748
|
+
}>;
|
|
749
|
+
declare const QuestActorSwfState: PacketDefinition<{
|
|
750
|
+
actorId: string;
|
|
751
|
+
swfState: string;
|
|
752
|
+
}>;
|
|
753
|
+
declare const QuestActorPath: PacketDefinition<{
|
|
754
|
+
actorId: string;
|
|
755
|
+
pathName: string;
|
|
756
|
+
}>;
|
|
485
757
|
declare const QuestActorIcon: PacketDefinition<{
|
|
486
758
|
actorId: string;
|
|
487
759
|
showing: boolean;
|
|
488
760
|
}>;
|
|
761
|
+
type QuestMovedItem = {
|
|
762
|
+
actorId: string;
|
|
763
|
+
innerRadius: number;
|
|
764
|
+
outerRadius: number;
|
|
765
|
+
x: number;
|
|
766
|
+
y: number;
|
|
767
|
+
};
|
|
768
|
+
declare const QuestMovedItems: PacketDefinition<{
|
|
769
|
+
items: QuestMovedItem[];
|
|
770
|
+
extra: string[];
|
|
771
|
+
}>;
|
|
489
772
|
declare const QuestPickUpResult: PacketDefinition<{
|
|
490
773
|
extra: string[];
|
|
491
774
|
result: number;
|
|
@@ -504,6 +787,9 @@ declare const QuestGiveItem: PacketDefinition<{
|
|
|
504
787
|
declare const QuestPlayerDead: PacketDefinition<{
|
|
505
788
|
userId: number;
|
|
506
789
|
}>;
|
|
790
|
+
declare const QuestCrystals: PacketDefinition<{
|
|
791
|
+
crystals: number;
|
|
792
|
+
}>;
|
|
507
793
|
declare const QuestExited: PacketDefinition<{
|
|
508
794
|
extra: string[];
|
|
509
795
|
}>;
|
|
@@ -544,6 +830,75 @@ declare const QuestAvSwitch: PacketDefinition<{
|
|
|
544
830
|
avatarRefId: number | null;
|
|
545
831
|
userId: number;
|
|
546
832
|
}>;
|
|
833
|
+
declare const QuestPlayerAttacked: PacketDefinition<{
|
|
834
|
+
actorId: string;
|
|
835
|
+
userId: number;
|
|
836
|
+
weaponDefId: number;
|
|
837
|
+
color: number;
|
|
838
|
+
}>;
|
|
839
|
+
declare const QuestBeamZapped: PacketDefinition<{
|
|
840
|
+
actorId: string;
|
|
841
|
+
userId: number;
|
|
842
|
+
}>;
|
|
843
|
+
declare const QuestPhantomZapped: PacketDefinition<{
|
|
844
|
+
actorId: string;
|
|
845
|
+
userId: number;
|
|
846
|
+
}>;
|
|
847
|
+
declare const QuestProjectileLaunched: PacketDefinition<{
|
|
848
|
+
weaponDefId: number;
|
|
849
|
+
x: number;
|
|
850
|
+
y: number;
|
|
851
|
+
actorId: string;
|
|
852
|
+
userId: number;
|
|
853
|
+
color: number;
|
|
854
|
+
}>;
|
|
855
|
+
declare const QuestSwiped: PacketDefinition<{
|
|
856
|
+
weaponDefId: number;
|
|
857
|
+
x: number;
|
|
858
|
+
y: number;
|
|
859
|
+
actorId: string;
|
|
860
|
+
userId: number;
|
|
861
|
+
color: number;
|
|
862
|
+
}>;
|
|
863
|
+
declare const QuestRespawnGranted: PacketDefinition<{
|
|
864
|
+
extra: string[];
|
|
865
|
+
}>;
|
|
866
|
+
declare const QuestSideScrollMoved: PacketDefinition<{
|
|
867
|
+
userId: number;
|
|
868
|
+
x: number;
|
|
869
|
+
y: number;
|
|
870
|
+
extra: string[];
|
|
871
|
+
}>;
|
|
872
|
+
declare const QuestPlayerRoomChange: PacketDefinition<{
|
|
873
|
+
userId: number;
|
|
874
|
+
roomName: string;
|
|
875
|
+
x: number;
|
|
876
|
+
y: number;
|
|
877
|
+
}>;
|
|
878
|
+
declare const QuestTorch: PacketDefinition<{
|
|
879
|
+
target: number;
|
|
880
|
+
lit: boolean;
|
|
881
|
+
actorId: string | null;
|
|
882
|
+
userId: number | null;
|
|
883
|
+
}>;
|
|
884
|
+
declare const QuestPlaySwf: PacketDefinition<{
|
|
885
|
+
mediaId: number;
|
|
886
|
+
}>;
|
|
887
|
+
declare const QuestPreloadSwf: PacketDefinition<{
|
|
888
|
+
mediaId: number;
|
|
889
|
+
}>;
|
|
890
|
+
declare const QuestFade: PacketDefinition<{
|
|
891
|
+
fadeIn: boolean;
|
|
892
|
+
}>;
|
|
893
|
+
declare const QuestShake: PacketDefinition<{
|
|
894
|
+
milliseconds: number;
|
|
895
|
+
}>;
|
|
896
|
+
declare const QuestMusic: PacketDefinition<{
|
|
897
|
+
name: string;
|
|
898
|
+
}>;
|
|
899
|
+
declare const QuestPostUri: PacketDefinition<{
|
|
900
|
+
uri: string;
|
|
901
|
+
}>;
|
|
547
902
|
type JoinedRoom = {
|
|
548
903
|
name: string;
|
|
549
904
|
id: number;
|
|
@@ -766,6 +1121,12 @@ type ShardNode = {
|
|
|
766
1121
|
declare const NodeHop: PacketDefinition<{
|
|
767
1122
|
host: string;
|
|
768
1123
|
}>;
|
|
1124
|
+
type Referral = {
|
|
1125
|
+
userName: string;
|
|
1126
|
+
moderatedUserName: string | null;
|
|
1127
|
+
nameBarData: number | null;
|
|
1128
|
+
accountType: string;
|
|
1129
|
+
};
|
|
769
1130
|
interface ClientClasses {
|
|
770
1131
|
[name: string]: any;
|
|
771
1132
|
}
|
|
@@ -1039,7 +1400,7 @@ type KeySpec = {
|
|
|
1039
1400
|
alt: boolean | null;
|
|
1040
1401
|
phase: "down" | "up";
|
|
1041
1402
|
consume: boolean;
|
|
1042
|
-
whileTyping:
|
|
1403
|
+
whileTyping: "never" | "empty" | "always";
|
|
1043
1404
|
repeat: boolean;
|
|
1044
1405
|
};
|
|
1045
1406
|
type NoteVerb = "write" | "read" | "has" | "forget" | "keys" | "clear";
|
|
@@ -1406,6 +1767,7 @@ type BridgeMessage = {
|
|
|
1406
1767
|
shift: boolean;
|
|
1407
1768
|
alt: boolean;
|
|
1408
1769
|
phase: "down" | "up";
|
|
1770
|
+
consumed?: boolean;
|
|
1409
1771
|
};
|
|
1410
1772
|
type BridgeErrorCode = "FLASH" | "TIMEOUT" | "CLOSED" | "NOT_READY" | "VERSION";
|
|
1411
1773
|
declare class BridgeError extends Error {
|
|
@@ -1857,6 +2219,7 @@ type OverlayNode = (() => Promise<void>) & {
|
|
|
1857
2219
|
on(event: OverlayMouseEvent, listener: (position: Position) => void): () => Promise<void>;
|
|
1858
2220
|
on(event: "link", listener: (value: string) => void): () => Promise<void>;
|
|
1859
2221
|
onFailed(listener: (message: string) => void): () => void;
|
|
2222
|
+
onRemoved(listener: () => void): () => void;
|
|
1860
2223
|
};
|
|
1861
2224
|
type InputNode = OverlayNode & {
|
|
1862
2225
|
update(changes: InputOptions): Promise<void>;
|
|
@@ -1962,7 +2325,7 @@ type FoundPlaces<Name> = Name extends keyof ClientInstances ? TypedFlash<ClientI
|
|
|
1962
2325
|
type KeyOptions = {
|
|
1963
2326
|
phase?: "down" | "up";
|
|
1964
2327
|
consume?: boolean;
|
|
1965
|
-
whileTyping?: boolean;
|
|
2328
|
+
whileTyping?: boolean | "never" | "empty" | "always";
|
|
1966
2329
|
repeat?: boolean;
|
|
1967
2330
|
};
|
|
1968
2331
|
type KeyPress = {
|
|
@@ -1972,6 +2335,7 @@ type KeyPress = {
|
|
|
1972
2335
|
shift: boolean;
|
|
1973
2336
|
alt: boolean;
|
|
1974
2337
|
phase: "down" | "up";
|
|
2338
|
+
consumed: boolean;
|
|
1975
2339
|
};
|
|
1976
2340
|
declare class FlashNotes<Value extends FlashData = FlashData> {
|
|
1977
2341
|
private readonly bridge;
|
|
@@ -2094,6 +2458,9 @@ type PacketProblem = {
|
|
|
2094
2458
|
error: Error;
|
|
2095
2459
|
text: string;
|
|
2096
2460
|
};
|
|
2461
|
+
type PacketWatchOptions = {
|
|
2462
|
+
original?: boolean;
|
|
2463
|
+
};
|
|
2097
2464
|
type MessageHook = (message: Message) => void | Promise<void>;
|
|
2098
2465
|
declare class Side {
|
|
2099
2466
|
private readonly channel;
|
|
@@ -2105,156 +2472,30 @@ declare class Side {
|
|
|
2105
2472
|
send(what: Message | string): Promise<void>;
|
|
2106
2473
|
on<Fields>(what: PacketDefinition<Fields>, hook: PacketHook<Fields>): Unsubscribe;
|
|
2107
2474
|
on(what: string, hook: MessageHook): Unsubscribe;
|
|
2108
|
-
watch<Fields>(what: PacketDefinition<Fields>, listener: (packet: Packet<Fields>) => void): Unsubscribe;
|
|
2109
|
-
watch(what: string, listener: (message: Message) => void): Unsubscribe;
|
|
2475
|
+
watch<Fields>(what: PacketDefinition<Fields>, listener: (packet: Packet<Fields>) => void, options?: PacketWatchOptions): Unsubscribe;
|
|
2476
|
+
watch(what: string, listener: (message: Message) => void, options?: PacketWatchOptions): Unsubscribe;
|
|
2110
2477
|
private read;
|
|
2111
2478
|
private checked;
|
|
2112
2479
|
}
|
|
2113
|
-
|
|
2114
|
-
{
|
|
2115
|
-
readonly id: "phantom";
|
|
2116
|
-
readonly name: "Phantom";
|
|
2117
|
-
readonly fill: 1118483;
|
|
2118
|
-
readonly border: 3816000;
|
|
2119
|
-
readonly text: 15790322;
|
|
2120
|
-
readonly alpha: 0.95;
|
|
2121
|
-
},
|
|
2122
|
-
{
|
|
2123
|
-
readonly id: "classic";
|
|
2124
|
-
readonly name: "Classic";
|
|
2125
|
-
readonly fill: 16777215;
|
|
2126
|
-
readonly border: 10265519;
|
|
2127
|
-
readonly text: 1120295;
|
|
2128
|
-
readonly alpha: 0.96;
|
|
2129
|
-
},
|
|
2130
|
-
{
|
|
2131
|
-
readonly id: "midnight";
|
|
2132
|
-
readonly name: "Midnight";
|
|
2133
|
-
readonly fill: 988970;
|
|
2134
|
-
readonly border: 3718648;
|
|
2135
|
-
readonly text: 14742270;
|
|
2136
|
-
readonly alpha: 0.94;
|
|
2137
|
-
},
|
|
2138
|
-
{
|
|
2139
|
-
readonly id: "candy";
|
|
2140
|
-
readonly name: "Candy";
|
|
2141
|
-
readonly fill: 16642808;
|
|
2142
|
-
readonly border: 15485081;
|
|
2143
|
-
readonly text: 8591427;
|
|
2144
|
-
readonly alpha: 0.96;
|
|
2145
|
-
},
|
|
2146
|
-
{
|
|
2147
|
-
readonly id: "mint";
|
|
2148
|
-
readonly name: "Mint";
|
|
2149
|
-
readonly fill: 15531509;
|
|
2150
|
-
readonly border: 1096065;
|
|
2151
|
-
readonly text: 413243;
|
|
2152
|
-
readonly alpha: 0.96;
|
|
2153
|
-
},
|
|
2154
|
-
{
|
|
2155
|
-
readonly id: "sunset";
|
|
2156
|
-
readonly name: "Sunset";
|
|
2157
|
-
readonly fill: 16775149;
|
|
2158
|
-
readonly border: 16347926;
|
|
2159
|
-
readonly text: 8138002;
|
|
2160
|
-
readonly alpha: 0.96;
|
|
2161
|
-
},
|
|
2162
|
-
{
|
|
2163
|
-
readonly id: "gold";
|
|
2164
|
-
readonly name: "Gold";
|
|
2165
|
-
readonly fill: 2694917;
|
|
2166
|
-
readonly border: 16436245;
|
|
2167
|
-
readonly text: 16710083;
|
|
2168
|
-
readonly alpha: 0.94;
|
|
2169
|
-
}
|
|
2170
|
-
];
|
|
2171
|
-
type BubbleId = (typeof BUBBLES)[number]["id"];
|
|
2172
|
-
type CommunityRoom = {
|
|
2173
|
-
key: string;
|
|
2174
|
-
name: string;
|
|
2175
|
-
};
|
|
2176
|
-
type CommunityMember = {
|
|
2480
|
+
type HiddenPlayer = {
|
|
2177
2481
|
screenName: string;
|
|
2178
|
-
bubble: BubbleId;
|
|
2179
|
-
};
|
|
2180
|
-
type CommunityMessage = {
|
|
2181
|
-
id: string;
|
|
2182
|
-
from: string;
|
|
2183
|
-
text: string;
|
|
2184
|
-
bubble: BubbleId;
|
|
2185
|
-
at: number;
|
|
2186
|
-
};
|
|
2187
|
-
type CommunityRequest = {
|
|
2188
|
-
id: string;
|
|
2189
|
-
kind: "invite" | "ask";
|
|
2190
|
-
from: string;
|
|
2191
|
-
room: CommunityRoom | null;
|
|
2192
|
-
at: number;
|
|
2193
|
-
};
|
|
2194
|
-
type CommunityAnswer = {
|
|
2195
|
-
id: string;
|
|
2196
|
-
kind: "invite" | "ask";
|
|
2197
|
-
by: string;
|
|
2198
|
-
accepted: boolean;
|
|
2199
|
-
room: CommunityRoom | null;
|
|
2200
|
-
};
|
|
2201
|
-
type CommunityStatus = {
|
|
2202
|
-
state: "off" | "connecting" | "online" | "offline" | "refused";
|
|
2203
|
-
screenName: string | null;
|
|
2204
|
-
room: string | null;
|
|
2205
|
-
error: string | null;
|
|
2206
|
-
};
|
|
2207
|
-
type CommunityOnline = {
|
|
2208
|
-
count: number;
|
|
2209
|
-
listed: readonly string[];
|
|
2210
|
-
};
|
|
2211
|
-
type CommunityJoinOptions = {
|
|
2212
|
-
bubble?: BubbleId;
|
|
2213
|
-
listed?: boolean;
|
|
2214
2482
|
};
|
|
2215
2483
|
type CommunityChannel = {
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
onMembers(listener: (members: readonly CommunityMember[]) => void): Unsubscribe;
|
|
2222
|
-
say(text: string, bubble: BubbleId | null): Promise<void>;
|
|
2223
|
-
onMessage(listener: (message: CommunityMessage) => void): Unsubscribe;
|
|
2224
|
-
online(): Promise<CommunityOnline>;
|
|
2225
|
-
report(messageId: string, reason: string): Promise<void>;
|
|
2226
|
-
invite(screenName: string): Promise<void>;
|
|
2227
|
-
ask(screenName: string): Promise<void>;
|
|
2228
|
-
answer(requestId: string, accept: boolean): Promise<void>;
|
|
2229
|
-
onRequest(listener: (request: CommunityRequest) => void): Unsubscribe;
|
|
2230
|
-
onAnswered(listener: (answer: CommunityAnswer) => void): Unsubscribe;
|
|
2484
|
+
hidden(): Promise<readonly HiddenPlayer[]>;
|
|
2485
|
+
onHidden(listener: (hidden: readonly HiddenPlayer[]) => void): Unsubscribe;
|
|
2486
|
+
hide(screenName: string): Promise<void>;
|
|
2487
|
+
unhide(screenName: string): Promise<void>;
|
|
2488
|
+
report(screenName: string, reason: string): Promise<void>;
|
|
2231
2489
|
};
|
|
2232
2490
|
declare class CommunityApi {
|
|
2233
|
-
private readonly game;
|
|
2234
|
-
private readonly flash;
|
|
2235
2491
|
private readonly channel;
|
|
2236
|
-
|
|
2237
|
-
constructor(game: GameContext, flash: PhantomFlash);
|
|
2492
|
+
constructor(game: GameContext);
|
|
2238
2493
|
get available(): boolean;
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
onMembers(listener: (members: readonly CommunityMember[]) => void): Unsubscribe;
|
|
2245
|
-
say(text: string, options?: {
|
|
2246
|
-
bubble?: BubbleId;
|
|
2247
|
-
}): Promise<void>;
|
|
2248
|
-
onMessage(listener: (message: CommunityMessage) => void): Unsubscribe;
|
|
2249
|
-
online(): Promise<CommunityOnline>;
|
|
2250
|
-
report(messageId: string, reason?: string): Promise<void>;
|
|
2251
|
-
invite(screenName: string): Promise<void>;
|
|
2252
|
-
askToJoin(screenName: string): Promise<void>;
|
|
2253
|
-
answer(requestId: string, accept: boolean): Promise<void>;
|
|
2254
|
-
onRequest(listener: (request: CommunityRequest) => void): Unsubscribe;
|
|
2255
|
-
onAnswered(listener: (answer: CommunityAnswer) => void): Unsubscribe;
|
|
2256
|
-
captureChat(prefix: string | null): Promise<void>;
|
|
2257
|
-
private patchChatBar;
|
|
2494
|
+
hidden(): Promise<readonly HiddenPlayer[]>;
|
|
2495
|
+
onHidden(listener: (hidden: readonly HiddenPlayer[]) => void): Unsubscribe;
|
|
2496
|
+
hide(screenName: string): Promise<void>;
|
|
2497
|
+
unhide(screenName: string): Promise<void>;
|
|
2498
|
+
report(screenName: string, reason?: string): Promise<void>;
|
|
2258
2499
|
private reach;
|
|
2259
2500
|
}
|
|
2260
2501
|
type ContentMatch = {
|
|
@@ -2358,30 +2599,428 @@ declare class ContentApi {
|
|
|
2358
2599
|
private whenLoaded;
|
|
2359
2600
|
private reach;
|
|
2360
2601
|
}
|
|
2361
|
-
type
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
type: number;
|
|
2375
|
-
typeName: string;
|
|
2376
|
-
userVarId: number;
|
|
2377
|
-
triggerAmount: number;
|
|
2378
|
-
iconMediaId: number;
|
|
2379
|
-
baseMediaId: number;
|
|
2380
|
-
extraText: string;
|
|
2602
|
+
type CustomRoomPicture = string | Uint8Array;
|
|
2603
|
+
type CustomRoomMotion = {
|
|
2604
|
+
pulse?: {
|
|
2605
|
+
seconds: number;
|
|
2606
|
+
min?: number;
|
|
2607
|
+
};
|
|
2608
|
+
spin?: {
|
|
2609
|
+
seconds: number;
|
|
2610
|
+
};
|
|
2611
|
+
bob?: {
|
|
2612
|
+
seconds: number;
|
|
2613
|
+
height: number;
|
|
2614
|
+
};
|
|
2381
2615
|
};
|
|
2382
|
-
type
|
|
2383
|
-
|
|
2384
|
-
|
|
2616
|
+
type CustomRoomFrames = {
|
|
2617
|
+
count: number;
|
|
2618
|
+
fps: number;
|
|
2619
|
+
};
|
|
2620
|
+
type CustomRoomArea = {
|
|
2621
|
+
rect: {
|
|
2622
|
+
x: number;
|
|
2623
|
+
y: number;
|
|
2624
|
+
width: number;
|
|
2625
|
+
height: number;
|
|
2626
|
+
};
|
|
2627
|
+
} | {
|
|
2628
|
+
circle: {
|
|
2629
|
+
x: number;
|
|
2630
|
+
y: number;
|
|
2631
|
+
radius: number;
|
|
2632
|
+
};
|
|
2633
|
+
} | {
|
|
2634
|
+
polygon: Array<[
|
|
2635
|
+
number,
|
|
2636
|
+
number
|
|
2637
|
+
]>;
|
|
2638
|
+
};
|
|
2639
|
+
type CustomRoomProp = {
|
|
2640
|
+
id: string;
|
|
2641
|
+
art: CustomRoomPicture;
|
|
2642
|
+
x: number;
|
|
2643
|
+
y: number;
|
|
2644
|
+
width?: number;
|
|
2645
|
+
height?: number;
|
|
2646
|
+
layer?: "floor" | "standing" | "front";
|
|
2647
|
+
motion?: CustomRoomMotion;
|
|
2648
|
+
frames?: CustomRoomFrames;
|
|
2649
|
+
solid?: boolean;
|
|
2650
|
+
area?: CustomRoomArea;
|
|
2651
|
+
clickable?: boolean;
|
|
2652
|
+
nearDistance?: number;
|
|
2653
|
+
bounce?: boolean;
|
|
2654
|
+
};
|
|
2655
|
+
type CustomRoomExit = {
|
|
2656
|
+
id: string;
|
|
2657
|
+
x: number;
|
|
2658
|
+
y: number;
|
|
2659
|
+
radius: number;
|
|
2660
|
+
};
|
|
2661
|
+
type CustomRoomSpec = {
|
|
2662
|
+
name: string;
|
|
2663
|
+
width: number;
|
|
2664
|
+
height: number;
|
|
2665
|
+
background: CustomRoomPicture;
|
|
2666
|
+
walkable?: CustomRoomArea[];
|
|
2667
|
+
blocked?: CustomRoomArea[];
|
|
2668
|
+
spawn: {
|
|
2669
|
+
x: number;
|
|
2670
|
+
y: number;
|
|
2671
|
+
};
|
|
2672
|
+
props?: CustomRoomProp[];
|
|
2673
|
+
exits?: CustomRoomExit[];
|
|
2674
|
+
music?: {
|
|
2675
|
+
track: string;
|
|
2676
|
+
volume?: number;
|
|
2677
|
+
};
|
|
2678
|
+
};
|
|
2679
|
+
type CustomRoomEnterOptions = {
|
|
2680
|
+
shared?: boolean;
|
|
2681
|
+
};
|
|
2682
|
+
type CustomRoomInfo = {
|
|
2683
|
+
id: string;
|
|
2684
|
+
name: string;
|
|
2685
|
+
shared?: boolean;
|
|
2686
|
+
};
|
|
2687
|
+
type CustomRoomLeaveReason = "left" | "exit" | "elsewhere" | "closed";
|
|
2688
|
+
type CustomRoomEvent = {
|
|
2689
|
+
kind: "enter";
|
|
2690
|
+
room: CustomRoomInfo;
|
|
2691
|
+
} | {
|
|
2692
|
+
kind: "leave";
|
|
2693
|
+
room: CustomRoomInfo;
|
|
2694
|
+
reason: CustomRoomLeaveReason;
|
|
2695
|
+
} | {
|
|
2696
|
+
kind: "move";
|
|
2697
|
+
room: CustomRoomInfo;
|
|
2698
|
+
x: number;
|
|
2699
|
+
y: number;
|
|
2700
|
+
} | {
|
|
2701
|
+
kind: "chat";
|
|
2702
|
+
room: CustomRoomInfo;
|
|
2703
|
+
text: string;
|
|
2704
|
+
chatKind: number;
|
|
2705
|
+
} | {
|
|
2706
|
+
kind: "propEnter" | "propLeave" | "propNear" | "propClick";
|
|
2707
|
+
room: CustomRoomInfo;
|
|
2708
|
+
prop: string;
|
|
2709
|
+
};
|
|
2710
|
+
type SharedRoomListing = {
|
|
2711
|
+
name: string;
|
|
2712
|
+
title: string;
|
|
2713
|
+
people: number;
|
|
2714
|
+
};
|
|
2715
|
+
type CustomRoomsChannel = {
|
|
2716
|
+
define(spec: CustomRoomSpec): Promise<string>;
|
|
2717
|
+
shared(): Promise<SharedRoomListing[]>;
|
|
2718
|
+
remove(roomId: string): Promise<boolean>;
|
|
2719
|
+
enter(roomId: string, options?: CustomRoomEnterOptions): Promise<void>;
|
|
2720
|
+
leave(): Promise<boolean>;
|
|
2721
|
+
current(): CustomRoomInfo | null;
|
|
2722
|
+
onEvent(listener: (event: CustomRoomEvent) => void): Unsubscribe;
|
|
2723
|
+
};
|
|
2724
|
+
declare class CustomRoomsApi {
|
|
2725
|
+
private readonly channel;
|
|
2726
|
+
constructor(game: GameContext);
|
|
2727
|
+
get available(): boolean;
|
|
2728
|
+
define(spec: CustomRoomSpec): Promise<string>;
|
|
2729
|
+
remove(roomId: string): Promise<boolean>;
|
|
2730
|
+
enter(roomId: string, options?: CustomRoomEnterOptions): Promise<void>;
|
|
2731
|
+
shared(): Promise<SharedRoomListing[]>;
|
|
2732
|
+
leave(): Promise<boolean>;
|
|
2733
|
+
get current(): CustomRoomInfo | null;
|
|
2734
|
+
onEnter(listener: (room: CustomRoomInfo) => void): Unsubscribe;
|
|
2735
|
+
onLeave(listener: (event: {
|
|
2736
|
+
room: CustomRoomInfo;
|
|
2737
|
+
reason: CustomRoomLeaveReason;
|
|
2738
|
+
}) => void): Unsubscribe;
|
|
2739
|
+
onMove(listener: (event: {
|
|
2740
|
+
room: CustomRoomInfo;
|
|
2741
|
+
x: number;
|
|
2742
|
+
y: number;
|
|
2743
|
+
}) => void): Unsubscribe;
|
|
2744
|
+
onChat(listener: (event: {
|
|
2745
|
+
room: CustomRoomInfo;
|
|
2746
|
+
text: string;
|
|
2747
|
+
kind: number;
|
|
2748
|
+
}) => void): Unsubscribe;
|
|
2749
|
+
onPropEnter(listener: (event: {
|
|
2750
|
+
room: CustomRoomInfo;
|
|
2751
|
+
prop: string;
|
|
2752
|
+
}) => void): Unsubscribe;
|
|
2753
|
+
onPropLeave(listener: (event: {
|
|
2754
|
+
room: CustomRoomInfo;
|
|
2755
|
+
prop: string;
|
|
2756
|
+
}) => void): Unsubscribe;
|
|
2757
|
+
onPropNear(listener: (event: {
|
|
2758
|
+
room: CustomRoomInfo;
|
|
2759
|
+
prop: string;
|
|
2760
|
+
}) => void): Unsubscribe;
|
|
2761
|
+
onPropClick(listener: (event: {
|
|
2762
|
+
room: CustomRoomInfo;
|
|
2763
|
+
prop: string;
|
|
2764
|
+
}) => void): Unsubscribe;
|
|
2765
|
+
private onProp;
|
|
2766
|
+
private on;
|
|
2767
|
+
private reach;
|
|
2768
|
+
}
|
|
2769
|
+
type RealtimeChannelSpec = {
|
|
2770
|
+
scope: "room";
|
|
2771
|
+
} | {
|
|
2772
|
+
scope: "plugin";
|
|
2773
|
+
} | {
|
|
2774
|
+
scope: "named";
|
|
2775
|
+
name: string;
|
|
2776
|
+
split?: boolean;
|
|
2777
|
+
};
|
|
2778
|
+
type RealtimeScope = RealtimeChannelSpec["scope"];
|
|
2779
|
+
type RealtimeObject = Record<string, unknown>;
|
|
2780
|
+
type RealtimeMember<Presence = RealtimeObject> = {
|
|
2781
|
+
id: string;
|
|
2782
|
+
screenName: string;
|
|
2783
|
+
presence?: Presence;
|
|
2784
|
+
};
|
|
2785
|
+
type RealtimeCloseReason = "left" | "banned" | "killed" | "rate-limited" | "offline";
|
|
2786
|
+
type RealtimeAskFailure = "no-handler" | "failed";
|
|
2787
|
+
type RealtimeState = "off" | "connecting" | "online" | "offline" | "refused";
|
|
2788
|
+
type RealtimeStatus = {
|
|
2789
|
+
state: RealtimeState;
|
|
2790
|
+
error: string | null;
|
|
2791
|
+
};
|
|
2792
|
+
type RealtimeJoinOptions<Presence extends RealtimeObject = RealtimeObject> = {
|
|
2793
|
+
presence?: Presence | null;
|
|
2794
|
+
};
|
|
2795
|
+
type RealtimeChannelInfo = {
|
|
2796
|
+
id: string;
|
|
2797
|
+
scope: RealtimeScope;
|
|
2798
|
+
name: string | null;
|
|
2799
|
+
part: number | null;
|
|
2800
|
+
you: RealtimeMember;
|
|
2801
|
+
members: RealtimeMember[];
|
|
2802
|
+
state: RealtimeObject | null;
|
|
2803
|
+
host: string | null;
|
|
2804
|
+
hostHidden?: boolean;
|
|
2805
|
+
};
|
|
2806
|
+
type RealtimeMessage<Data = unknown> = {
|
|
2807
|
+
channel: string;
|
|
2808
|
+
from: RealtimeMember;
|
|
2809
|
+
data: Data;
|
|
2810
|
+
at: number;
|
|
2811
|
+
direct: boolean;
|
|
2812
|
+
};
|
|
2813
|
+
type RealtimeMemberEvent = {
|
|
2814
|
+
channel: string;
|
|
2815
|
+
member: RealtimeMember;
|
|
2816
|
+
};
|
|
2817
|
+
type RealtimeStateEvent<State extends RealtimeObject = RealtimeObject> = {
|
|
2818
|
+
channel: string;
|
|
2819
|
+
state: State | null;
|
|
2820
|
+
from: string | null;
|
|
2821
|
+
at: number;
|
|
2822
|
+
};
|
|
2823
|
+
type RealtimePresenceEvent<Presence extends RealtimeObject = RealtimeObject> = {
|
|
2824
|
+
channel: string;
|
|
2825
|
+
member: RealtimeMember<Presence>;
|
|
2826
|
+
};
|
|
2827
|
+
type RealtimeHostEvent<Presence extends RealtimeObject = RealtimeObject> = {
|
|
2828
|
+
channel: string;
|
|
2829
|
+
host: RealtimeMember<Presence> | null;
|
|
2830
|
+
you: boolean;
|
|
2831
|
+
hosted: boolean;
|
|
2832
|
+
};
|
|
2833
|
+
type RealtimeAsk<Question = unknown> = {
|
|
2834
|
+
channel: string;
|
|
2835
|
+
id: string;
|
|
2836
|
+
from: RealtimeMember;
|
|
2837
|
+
data: Question;
|
|
2838
|
+
at: number;
|
|
2839
|
+
};
|
|
2840
|
+
type RealtimeAskOptions = {
|
|
2841
|
+
timeout?: number;
|
|
2842
|
+
};
|
|
2843
|
+
type RealtimeClose = {
|
|
2844
|
+
channel: string;
|
|
2845
|
+
reason: RealtimeCloseReason;
|
|
2846
|
+
message: string;
|
|
2847
|
+
};
|
|
2848
|
+
type RealtimeEvent = ({
|
|
2849
|
+
kind: "join";
|
|
2850
|
+
} & RealtimeMemberEvent) | ({
|
|
2851
|
+
kind: "leave";
|
|
2852
|
+
} & RealtimeMemberEvent) | {
|
|
2853
|
+
kind: "message";
|
|
2854
|
+
message: RealtimeMessage;
|
|
2855
|
+
} | ({
|
|
2856
|
+
kind: "state";
|
|
2857
|
+
} & RealtimeStateEvent) | ({
|
|
2858
|
+
kind: "presence";
|
|
2859
|
+
} & RealtimePresenceEvent) | ({
|
|
2860
|
+
kind: "host";
|
|
2861
|
+
} & RealtimeHostEvent) | ({
|
|
2862
|
+
kind: "close";
|
|
2863
|
+
} & RealtimeClose);
|
|
2864
|
+
type RealtimeLink = {
|
|
2865
|
+
open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
|
|
2866
|
+
leave(channel: string): Promise<boolean>;
|
|
2867
|
+
send(channel: string, data: unknown): Promise<void>;
|
|
2868
|
+
sendTo(channel: string, member: string, data: unknown): Promise<void>;
|
|
2869
|
+
setState(channel: string, state: RealtimeObject | null): Promise<void>;
|
|
2870
|
+
setPresence(channel: string, presence: RealtimeObject | null): Promise<void>;
|
|
2871
|
+
giveHost(channel: string, member: string): Promise<void>;
|
|
2872
|
+
ask(channel: string, member: string, data: unknown, options?: RealtimeAskOptions): Promise<unknown>;
|
|
2873
|
+
answer(askId: string, data: unknown): Promise<void>;
|
|
2874
|
+
decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
|
|
2875
|
+
channels(): RealtimeChannelInfo[];
|
|
2876
|
+
status(): RealtimeStatus;
|
|
2877
|
+
onEvent(listener: (event: RealtimeEvent) => void): Unsubscribe;
|
|
2878
|
+
onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
|
|
2879
|
+
onStatus(listener: (status: RealtimeStatus) => void): Unsubscribe;
|
|
2880
|
+
};
|
|
2881
|
+
type RealtimeCalls = {
|
|
2882
|
+
open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
|
|
2883
|
+
leave(channel: string): Promise<boolean>;
|
|
2884
|
+
send(channel: string, data: unknown): Promise<void>;
|
|
2885
|
+
sendTo(channel: string, member: string, data: unknown): Promise<void>;
|
|
2886
|
+
setState(channel: string, state: RealtimeObject | null): Promise<void>;
|
|
2887
|
+
setPresence(channel: string, presence: RealtimeObject | null): Promise<void>;
|
|
2888
|
+
giveHost(channel: string, member: string): Promise<void>;
|
|
2889
|
+
ask(channel: string, member: string, data: unknown, options?: RealtimeAskOptions): Promise<unknown>;
|
|
2890
|
+
answer(askId: string, data: unknown): Promise<void>;
|
|
2891
|
+
decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
|
|
2892
|
+
onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
|
|
2893
|
+
onMessage(listener: (message: RealtimeMessage) => void): Unsubscribe;
|
|
2894
|
+
onJoin(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
|
|
2895
|
+
onLeave(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
|
|
2896
|
+
onState(listener: (event: RealtimeStateEvent) => void): Unsubscribe;
|
|
2897
|
+
onPresence(listener: (event: RealtimePresenceEvent) => void): Unsubscribe;
|
|
2898
|
+
onHost(listener: (event: RealtimeHostEvent) => void): Unsubscribe;
|
|
2899
|
+
onClose(listener: (event: RealtimeClose) => void): Unsubscribe;
|
|
2900
|
+
};
|
|
2901
|
+
type Heard = {
|
|
2902
|
+
kind: "message";
|
|
2903
|
+
message: RealtimeMessage;
|
|
2904
|
+
} | ({
|
|
2905
|
+
kind: "ask";
|
|
2906
|
+
} & RealtimeAsk) | ({
|
|
2907
|
+
kind: "join" | "leave";
|
|
2908
|
+
} & RealtimeMemberEvent) | ({
|
|
2909
|
+
kind: "state";
|
|
2910
|
+
} & RealtimeStateEvent) | ({
|
|
2911
|
+
kind: "presence";
|
|
2912
|
+
} & RealtimePresenceEvent) | ({
|
|
2913
|
+
kind: "host";
|
|
2914
|
+
} & RealtimeHostEvent) | ({
|
|
2915
|
+
kind: "close";
|
|
2916
|
+
} & RealtimeClose);
|
|
2917
|
+
declare class RealtimeChannel<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject> {
|
|
2918
|
+
private readonly calls;
|
|
2919
|
+
readonly id: string;
|
|
2920
|
+
readonly scope: RealtimeScope;
|
|
2921
|
+
readonly name: string | null;
|
|
2922
|
+
readonly part: number | null;
|
|
2923
|
+
private self;
|
|
2924
|
+
private list;
|
|
2925
|
+
private shared;
|
|
2926
|
+
private hostAt;
|
|
2927
|
+
private hostIsHidden;
|
|
2928
|
+
private closedWith;
|
|
2929
|
+
private answers;
|
|
2930
|
+
private readonly heard;
|
|
2931
|
+
private stop;
|
|
2932
|
+
constructor(info: RealtimeChannelInfo, calls: RealtimeCalls);
|
|
2933
|
+
get you(): RealtimeMember<Presence>;
|
|
2934
|
+
get open(): boolean;
|
|
2935
|
+
members(): readonly RealtimeMember<Presence>[];
|
|
2936
|
+
host(): RealtimeMember<Presence> | null;
|
|
2937
|
+
get isHost(): boolean;
|
|
2938
|
+
get hosted(): boolean;
|
|
2939
|
+
giveHost(memberId: string): Promise<void>;
|
|
2940
|
+
state(): State | null;
|
|
2941
|
+
setState(state: State | null): Promise<void>;
|
|
2942
|
+
presence(): Presence | null;
|
|
2943
|
+
setPresence(presence: Presence | null): Promise<void>;
|
|
2944
|
+
send(data: Data): Promise<void>;
|
|
2945
|
+
sendTo(memberId: string, data: Data): Promise<void>;
|
|
2946
|
+
ask<Answer = unknown>(memberId: string, question: unknown, options?: RealtimeAskOptions): Promise<Answer>;
|
|
2947
|
+
onAsk<Question = unknown, Answer = unknown>(handler: (ask: RealtimeAsk<Question>) => Answer | PromiseLike<Answer>): Unsubscribe;
|
|
2948
|
+
leave(): Promise<void>;
|
|
2949
|
+
onMessage(listener: (message: RealtimeMessage<Data>) => void): Unsubscribe;
|
|
2950
|
+
onJoin(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
|
|
2951
|
+
onLeave(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
|
|
2952
|
+
onState(listener: (event: RealtimeStateEvent<State>) => void): Unsubscribe;
|
|
2953
|
+
onPresence(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
|
|
2954
|
+
onHost(listener: (event: RealtimeHostEvent<Presence>) => void): Unsubscribe;
|
|
2955
|
+
onClose(listener: (close: RealtimeClose) => void): Unsubscribe;
|
|
2956
|
+
hear(event: Heard): void;
|
|
2957
|
+
private reply;
|
|
2958
|
+
private turnDown;
|
|
2959
|
+
stopWith(stop: () => void): void;
|
|
2960
|
+
private listen;
|
|
2961
|
+
private tell;
|
|
2962
|
+
private refuse;
|
|
2963
|
+
}
|
|
2964
|
+
declare class RealtimeApi {
|
|
2965
|
+
private readonly link;
|
|
2966
|
+
constructor(game: GameContext);
|
|
2967
|
+
get available(): boolean;
|
|
2968
|
+
get status(): RealtimeStatus;
|
|
2969
|
+
onStatus(listener: (status: RealtimeStatus) => void): Unsubscribe;
|
|
2970
|
+
join<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject>(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions<Presence>): Promise<RealtimeChannel<Data, State, Presence>>;
|
|
2971
|
+
open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
|
|
2972
|
+
leave(channelId: string): Promise<boolean>;
|
|
2973
|
+
send(channelId: string, data: unknown): Promise<void>;
|
|
2974
|
+
sendTo(channelId: string, memberId: string, data: unknown): Promise<void>;
|
|
2975
|
+
ask(channelId: string, memberId: string, question: unknown, options?: RealtimeAskOptions): Promise<unknown>;
|
|
2976
|
+
answer(askId: string, answer: unknown): Promise<void>;
|
|
2977
|
+
decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
|
|
2978
|
+
state(channelId: string): RealtimeObject | null;
|
|
2979
|
+
setState(channelId: string, state: RealtimeObject | null): Promise<void>;
|
|
2980
|
+
presence(channelId: string): RealtimeObject | null;
|
|
2981
|
+
setPresence(channelId: string, presence: RealtimeObject | null): Promise<void>;
|
|
2982
|
+
host(channelId: string): RealtimeMember | null;
|
|
2983
|
+
giveHost(channelId: string, memberId: string): Promise<void>;
|
|
2984
|
+
channels(): RealtimeChannelInfo[];
|
|
2985
|
+
members(channelId: string): RealtimeMember[];
|
|
2986
|
+
private channelOf;
|
|
2987
|
+
onMessage(listener: (message: RealtimeMessage) => void): Unsubscribe;
|
|
2988
|
+
onJoin(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
|
|
2989
|
+
onLeave(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
|
|
2990
|
+
onState(listener: (event: RealtimeStateEvent) => void): Unsubscribe;
|
|
2991
|
+
onPresence(listener: (event: RealtimePresenceEvent) => void): Unsubscribe;
|
|
2992
|
+
onHost(listener: (event: RealtimeHostEvent) => void): Unsubscribe;
|
|
2993
|
+
onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
|
|
2994
|
+
onClose(listener: (event: RealtimeClose) => void): Unsubscribe;
|
|
2995
|
+
private on;
|
|
2996
|
+
private reach;
|
|
2997
|
+
}
|
|
2998
|
+
type GameContext = {
|
|
2999
|
+
flash: FlashBridge;
|
|
3000
|
+
server: Side;
|
|
3001
|
+
client: Side;
|
|
3002
|
+
content?: ContentChannel;
|
|
3003
|
+
community?: CommunityChannel;
|
|
3004
|
+
customRooms?: CustomRoomsChannel;
|
|
3005
|
+
realtime?: RealtimeLink;
|
|
3006
|
+
undo?: (key: string, requests: readonly string[] | null) => void;
|
|
3007
|
+
};
|
|
3008
|
+
type PlayerAchievements = PacketOf<typeof Achievements>;
|
|
3009
|
+
type AchievementDescription = {
|
|
3010
|
+
defId: number;
|
|
3011
|
+
name: string;
|
|
3012
|
+
description: string;
|
|
3013
|
+
type: number;
|
|
3014
|
+
typeName: string;
|
|
3015
|
+
userVarId: number;
|
|
3016
|
+
triggerAmount: number;
|
|
3017
|
+
iconMediaId: number;
|
|
3018
|
+
baseMediaId: number;
|
|
3019
|
+
extraText: string;
|
|
3020
|
+
};
|
|
3021
|
+
type AchievementType = {
|
|
3022
|
+
type: number;
|
|
3023
|
+
name: string;
|
|
2385
3024
|
};
|
|
2386
3025
|
type HeldAchievement = {
|
|
2387
3026
|
defId: number;
|
|
@@ -2399,6 +3038,14 @@ type CachedStat = {
|
|
|
2399
3038
|
value: number;
|
|
2400
3039
|
type: number;
|
|
2401
3040
|
};
|
|
3041
|
+
type EarnAnswer = {
|
|
3042
|
+
defId: number;
|
|
3043
|
+
userVarId: number;
|
|
3044
|
+
asked: number;
|
|
3045
|
+
kept: number;
|
|
3046
|
+
earned: boolean;
|
|
3047
|
+
achievements: AchievementEntry[];
|
|
3048
|
+
};
|
|
2402
3049
|
type StatChange = {
|
|
2403
3050
|
userVarId: number;
|
|
2404
3051
|
value: number;
|
|
@@ -2413,17 +3060,21 @@ declare class AchievementsApi {
|
|
|
2413
3060
|
private readonly server;
|
|
2414
3061
|
private readonly values;
|
|
2415
3062
|
private readonly changeListeners;
|
|
3063
|
+
private readonly statsListeners;
|
|
2416
3064
|
constructor(game: GameContext);
|
|
2417
3065
|
stat(userVarId: number): number | null;
|
|
2418
3066
|
get stats(): ReadonlyMap<number, number>;
|
|
2419
3067
|
readStat(userVarId: number): Promise<number>;
|
|
2420
3068
|
refreshStats(timeoutMs?: number): Promise<ReadonlyMap<number, number>>;
|
|
2421
3069
|
setStat(userVarId: number, value: number, timeoutMs?: number): Promise<StatChange>;
|
|
3070
|
+
earn(defId: number, timeoutMs?: number): Promise<EarnAnswer>;
|
|
2422
3071
|
of(userName: string, timeoutMs?: number): Promise<PlayerAchievements>;
|
|
2423
3072
|
onStatChange(listener: (change: StatChange) => void): () => void;
|
|
2424
3073
|
onAchievement(listener: (achievement: AchievementEntry, change: StatChange) => void): () => void;
|
|
2425
3074
|
definition(defId: number): Promise<Record<string, FlashValue> | null>;
|
|
2426
3075
|
definitions(type?: number): Promise<Record<string, FlashValue>>;
|
|
3076
|
+
definitionsByType(): Promise<Record<string, Record<string, FlashValue>[]>>;
|
|
3077
|
+
onStats(listener: (stats: ReadonlyMap<number, number>) => void): () => void;
|
|
2427
3078
|
hasUnseen(): Promise<boolean>;
|
|
2428
3079
|
showNew(): Promise<void>;
|
|
2429
3080
|
onAchievements(listener: (answer: PlayerAchievements) => void): () => void;
|
|
@@ -2494,6 +3145,47 @@ type AvatarKindDefinition = {
|
|
|
2494
3145
|
availabilityStartTime: number;
|
|
2495
3146
|
availabilityEndTime: number;
|
|
2496
3147
|
};
|
|
3148
|
+
type AvatarSummary = {
|
|
3149
|
+
userName: string;
|
|
3150
|
+
uuid: string;
|
|
3151
|
+
perUserAvId: number;
|
|
3152
|
+
avInvId: number;
|
|
3153
|
+
avName: string;
|
|
3154
|
+
avTypeId: number;
|
|
3155
|
+
customAvId: number;
|
|
3156
|
+
colors: AvatarColors;
|
|
3157
|
+
userId: number;
|
|
3158
|
+
enviroTypeFlag: number;
|
|
3159
|
+
};
|
|
3160
|
+
type NewAvatar = {
|
|
3161
|
+
avTypeId: number;
|
|
3162
|
+
nameIds: AvatarNameIds;
|
|
3163
|
+
customAvId?: number;
|
|
3164
|
+
diamondDefId?: number;
|
|
3165
|
+
shopId?: number;
|
|
3166
|
+
};
|
|
3167
|
+
type AdventurePlayer = {
|
|
3168
|
+
userId: number;
|
|
3169
|
+
userName: string;
|
|
3170
|
+
avName: string;
|
|
3171
|
+
isMember: boolean;
|
|
3172
|
+
nameBarData: number;
|
|
3173
|
+
};
|
|
3174
|
+
type HostedGame = {
|
|
3175
|
+
infoText: string;
|
|
3176
|
+
userMessage: string;
|
|
3177
|
+
difficulty: number;
|
|
3178
|
+
severity: number;
|
|
3179
|
+
};
|
|
3180
|
+
type AvatarHosting = {
|
|
3181
|
+
adventure: HostedGame | null;
|
|
3182
|
+
pvp: HostedGame | null;
|
|
3183
|
+
};
|
|
3184
|
+
type AvatarRoomState = {
|
|
3185
|
+
joiningRoom: boolean;
|
|
3186
|
+
inPreviewRoom: boolean;
|
|
3187
|
+
waitingForLanguage: boolean;
|
|
3188
|
+
};
|
|
2497
3189
|
declare class AvatarApi {
|
|
2498
3190
|
private readonly flash;
|
|
2499
3191
|
private readonly client;
|
|
@@ -2502,9 +3194,11 @@ declare class AvatarApi {
|
|
|
2502
3194
|
private readonly lookupListeners;
|
|
2503
3195
|
private readonly paintListeners;
|
|
2504
3196
|
private readonly offered;
|
|
2505
|
-
private
|
|
3197
|
+
private noClipHook;
|
|
3198
|
+
private readonly noClipListeners;
|
|
2506
3199
|
private grounded;
|
|
2507
3200
|
private navigator;
|
|
3201
|
+
private readonly nameBars;
|
|
2508
3202
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
2509
3203
|
private gridOf;
|
|
2510
3204
|
private readGrid;
|
|
@@ -2515,6 +3209,7 @@ declare class AvatarApi {
|
|
|
2515
3209
|
userId(): Promise<number>;
|
|
2516
3210
|
view(): Promise<FlashHandle>;
|
|
2517
3211
|
standing(): Promise<AvatarStanding | null>;
|
|
3212
|
+
private standingOfView;
|
|
2518
3213
|
placeAt(position: Point, options?: {
|
|
2519
3214
|
instant?: boolean;
|
|
2520
3215
|
}): Promise<void>;
|
|
@@ -2542,6 +3237,7 @@ declare class AvatarApi {
|
|
|
2542
3237
|
restoreColors(part: AvatarColorPart): Promise<boolean>;
|
|
2543
3238
|
pickColor(part: AvatarColorPart, index: number): Promise<boolean>;
|
|
2544
3239
|
paint(colors: AvatarColors): Promise<boolean>;
|
|
3240
|
+
paintColor(part: AvatarColorPart, index: number): Promise<boolean>;
|
|
2545
3241
|
act(action: AvatarAction): Promise<void>;
|
|
2546
3242
|
list(): Promise<OwnListedAvatar[]>;
|
|
2547
3243
|
switchTo(perUserAvId: number): Promise<boolean>;
|
|
@@ -2558,9 +3254,53 @@ declare class AvatarApi {
|
|
|
2558
3254
|
setWalkSpeed(times: number): Promise<void>;
|
|
2559
3255
|
glide(direction: Point | null): Promise<void>;
|
|
2560
3256
|
setNoClip(on: boolean): Promise<boolean>;
|
|
3257
|
+
private rebuildGrid;
|
|
3258
|
+
get noClip(): boolean;
|
|
3259
|
+
onNoClip(listener: (on: boolean) => void): () => void;
|
|
2561
3260
|
setAirborne(on: boolean): Promise<boolean>;
|
|
2562
3261
|
walkPath(points: readonly Point[]): Promise<void>;
|
|
2563
3262
|
walkThrough(x: number, y: number, options?: WalkThroughOptions): Promise<boolean>;
|
|
3263
|
+
create(animal: NewAvatar): Promise<PacketOf<typeof AvatarAdded>>;
|
|
3264
|
+
buySlot(): Promise<boolean>;
|
|
3265
|
+
createFirst(avTypeId: number, nameIds: AvatarNameIds): Promise<boolean>;
|
|
3266
|
+
chooseUsable(avInvIds: readonly number[]): Promise<boolean>;
|
|
3267
|
+
setPendingFlag(flag: number): Promise<void>;
|
|
3268
|
+
canPayForPhoto(): Promise<boolean>;
|
|
3269
|
+
payForPhoto(): Promise<number>;
|
|
3270
|
+
definitionsLoaded(): Promise<boolean>;
|
|
3271
|
+
loadDefinitions(): Promise<boolean>;
|
|
3272
|
+
data(userName: string, perUserAvId: number, timeoutMs?: number): Promise<AvatarSummary>;
|
|
3273
|
+
private loadAvatar;
|
|
3274
|
+
private calledBack;
|
|
3275
|
+
private summarise;
|
|
3276
|
+
private summaryOf;
|
|
3277
|
+
inRoom(userId: number): Promise<AvatarSummary | null>;
|
|
3278
|
+
findInRoom(query: {
|
|
3279
|
+
userName: string;
|
|
3280
|
+
perUserAvId?: number;
|
|
3281
|
+
} | {
|
|
3282
|
+
avName: string;
|
|
3283
|
+
}): Promise<AvatarSummary | null>;
|
|
3284
|
+
standingOf(userId: number): Promise<AvatarStanding | null>;
|
|
3285
|
+
defaultLook(avTypeId: number, custom?: boolean): Promise<AvatarSummary | null>;
|
|
3286
|
+
buddyCardAvatar(): Promise<AvatarSummary | null>;
|
|
3287
|
+
adventurePlayers(): Promise<AdventurePlayer[]>;
|
|
3288
|
+
offScreenPlayers(): Promise<number[]>;
|
|
3289
|
+
lastSeenAt(userId: number, roomName?: string): Promise<Point | null>;
|
|
3290
|
+
hosting(): Promise<AvatarHosting>;
|
|
3291
|
+
isHostingAdventure(): Promise<boolean>;
|
|
3292
|
+
suitsEnvironment(enviroType: number): Promise<boolean>;
|
|
3293
|
+
roomState(): Promise<AvatarRoomState>;
|
|
3294
|
+
lastNameBar(userId: number): number | null;
|
|
3295
|
+
onList(listener: (list: PacketOf<typeof AvatarList>) => void): () => void;
|
|
3296
|
+
onRemoved(listener: (result: PacketOf<typeof AvatarKilled>) => void): () => void;
|
|
3297
|
+
onAdded(listener: (added: PacketOf<typeof AvatarAdded>) => void): () => void;
|
|
3298
|
+
onSlotBought(listener: (result: PacketOf<typeof AvatarSlotBought>) => void): () => void;
|
|
3299
|
+
onFirstCreated(listener: (result: PacketOf<typeof AvatarFastPassAdded>) => void): () => void;
|
|
3300
|
+
onNameBarChange(listener: (change: PacketOf<typeof AvatarNameBarChanged>) => void): () => void;
|
|
3301
|
+
onUsableChosen(listener: (result: PacketOf<typeof AvatarOrdained>) => void): () => void;
|
|
3302
|
+
onPhotoChecked(listener: (result: PacketOf<typeof AvatarPhotoChecked>) => void): () => void;
|
|
3303
|
+
onPhotoTaken(listener: (result: PacketOf<typeof AvatarPhotoTaken>) => void): () => void;
|
|
2564
3304
|
}
|
|
2565
3305
|
type AdventurePrizeKind = "denItem" | "clothing" | "gems" | "crystals";
|
|
2566
3306
|
type AdventureActorPrize = {
|
|
@@ -2816,6 +3556,83 @@ type SpawnActorOptions = {
|
|
|
2816
3556
|
skipIfTaken?: boolean;
|
|
2817
3557
|
parameters?: string;
|
|
2818
3558
|
};
|
|
3559
|
+
type AdventureExperience = PacketOf<typeof QuestXp>;
|
|
3560
|
+
type AdventureDeparture = {
|
|
3561
|
+
userId: number;
|
|
3562
|
+
avatarName: string;
|
|
3563
|
+
};
|
|
3564
|
+
type AdventureAward = {
|
|
3565
|
+
userVarId: number;
|
|
3566
|
+
value: number;
|
|
3567
|
+
};
|
|
3568
|
+
type AdventureSeek = {
|
|
3569
|
+
seekType: number;
|
|
3570
|
+
userId: number;
|
|
3571
|
+
};
|
|
3572
|
+
type AdventureSeed = {
|
|
3573
|
+
defId: number;
|
|
3574
|
+
count: number;
|
|
3575
|
+
max: number;
|
|
3576
|
+
};
|
|
3577
|
+
type AdventurePlant = {
|
|
3578
|
+
actorId: string;
|
|
3579
|
+
defId: number | null;
|
|
3580
|
+
position: Point | null;
|
|
3581
|
+
userName: string | null;
|
|
3582
|
+
launcherUserId: number | null;
|
|
3583
|
+
eaten: string[];
|
|
3584
|
+
recoils: number;
|
|
3585
|
+
};
|
|
3586
|
+
type AdventureCombatStats = PacketOf<typeof QuestStatsUpdate>;
|
|
3587
|
+
type AdventureAttack = {
|
|
3588
|
+
userId: number;
|
|
3589
|
+
weaponDefId: number;
|
|
3590
|
+
color: number;
|
|
3591
|
+
};
|
|
3592
|
+
type AdventurePlayerRoom = {
|
|
3593
|
+
roomName: string;
|
|
3594
|
+
position: Point;
|
|
3595
|
+
};
|
|
3596
|
+
type AdventureSoundCue = {
|
|
3597
|
+
name: string;
|
|
3598
|
+
voiceOver: boolean;
|
|
3599
|
+
subtitle: string | null;
|
|
3600
|
+
};
|
|
3601
|
+
type AdventureZap = {
|
|
3602
|
+
kind: "beam" | "phantom";
|
|
3603
|
+
actorId: string;
|
|
3604
|
+
userId: number;
|
|
3605
|
+
};
|
|
3606
|
+
type AdventureLaunch = {
|
|
3607
|
+
ranged: boolean;
|
|
3608
|
+
weaponDefId: number;
|
|
3609
|
+
target: Point;
|
|
3610
|
+
color: number;
|
|
3611
|
+
};
|
|
3612
|
+
type AdventureSoundPack = {
|
|
3613
|
+
mediaId: number;
|
|
3614
|
+
};
|
|
3615
|
+
type AdventureActorMove = {
|
|
3616
|
+
position: Point;
|
|
3617
|
+
velocity: number;
|
|
3618
|
+
seekType: number;
|
|
3619
|
+
nearest: Point;
|
|
3620
|
+
};
|
|
3621
|
+
type AdventureWeaponLaunch = {
|
|
3622
|
+
weaponDefId: number;
|
|
3623
|
+
target: Point;
|
|
3624
|
+
color: number;
|
|
3625
|
+
};
|
|
3626
|
+
type AdventureClientStatus = {
|
|
3627
|
+
justJoined: boolean;
|
|
3628
|
+
exitPending: boolean;
|
|
3629
|
+
likeNormalRoom: boolean;
|
|
3630
|
+
playAsPet: boolean;
|
|
3631
|
+
joinableAfterStart: boolean;
|
|
3632
|
+
throwKeyDown: boolean;
|
|
3633
|
+
crystalCount: number;
|
|
3634
|
+
maxGoals: number;
|
|
3635
|
+
};
|
|
2819
3636
|
declare class AdventuresApi {
|
|
2820
3637
|
readonly [STATE_FIELDS]: readonly [
|
|
2821
3638
|
"lobbyState",
|
|
@@ -2825,7 +3642,38 @@ declare class AdventuresApi {
|
|
|
2825
3642
|
"roomName",
|
|
2826
3643
|
"rewardsOffered",
|
|
2827
3644
|
"endReason",
|
|
2828
|
-
"crystalCount"
|
|
3645
|
+
"crystalCount",
|
|
3646
|
+
"experienceState",
|
|
3647
|
+
"levelByUser",
|
|
3648
|
+
"departed",
|
|
3649
|
+
"defeatedUserIds",
|
|
3650
|
+
"awardList",
|
|
3651
|
+
"givenItemIds",
|
|
3652
|
+
"exitAnswered",
|
|
3653
|
+
"lastBundleMessages",
|
|
3654
|
+
"iconByActor",
|
|
3655
|
+
"seekByActor",
|
|
3656
|
+
"disguiseByUser",
|
|
3657
|
+
"seedsByDef",
|
|
3658
|
+
"plantByActor",
|
|
3659
|
+
"combatState",
|
|
3660
|
+
"volumeByActor",
|
|
3661
|
+
"attackByActor",
|
|
3662
|
+
"roomByUser",
|
|
3663
|
+
"sideScrollByUser",
|
|
3664
|
+
"actorTorches",
|
|
3665
|
+
"playerTorches",
|
|
3666
|
+
"musicName",
|
|
3667
|
+
"cutsceneMedia",
|
|
3668
|
+
"preloadedMedia",
|
|
3669
|
+
"soundPackIds",
|
|
3670
|
+
"screenFadedOut",
|
|
3671
|
+
"lastZapState",
|
|
3672
|
+
"launchBy",
|
|
3673
|
+
"respawnsGrantedCount",
|
|
3674
|
+
"shakeUntil",
|
|
3675
|
+
"lastSoundCue",
|
|
3676
|
+
"pageViewList"
|
|
2829
3677
|
];
|
|
2830
3678
|
private readonly flash;
|
|
2831
3679
|
private readonly navigator;
|
|
@@ -2851,6 +3699,37 @@ declare class AdventuresApi {
|
|
|
2851
3699
|
private readonly loops;
|
|
2852
3700
|
private nextLoop;
|
|
2853
3701
|
private nextSwing;
|
|
3702
|
+
private experienceState;
|
|
3703
|
+
private readonly levelByUser;
|
|
3704
|
+
private readonly departed;
|
|
3705
|
+
private readonly defeatedUserIds;
|
|
3706
|
+
private readonly awardList;
|
|
3707
|
+
private readonly givenItemIds;
|
|
3708
|
+
private exitAnswered;
|
|
3709
|
+
private lastBundleMessages;
|
|
3710
|
+
private readonly iconByActor;
|
|
3711
|
+
private readonly seekByActor;
|
|
3712
|
+
private readonly disguiseByUser;
|
|
3713
|
+
private readonly seedsByDef;
|
|
3714
|
+
private readonly plantByActor;
|
|
3715
|
+
private combatState;
|
|
3716
|
+
private readonly volumeByActor;
|
|
3717
|
+
private readonly attackByActor;
|
|
3718
|
+
private readonly roomByUser;
|
|
3719
|
+
private readonly sideScrollByUser;
|
|
3720
|
+
private readonly actorTorches;
|
|
3721
|
+
private readonly playerTorches;
|
|
3722
|
+
private musicName;
|
|
3723
|
+
private cutsceneMedia;
|
|
3724
|
+
private readonly preloadedMedia;
|
|
3725
|
+
private readonly soundPackIds;
|
|
3726
|
+
private screenFadedOut;
|
|
3727
|
+
private lastZapState;
|
|
3728
|
+
private readonly launchBy;
|
|
3729
|
+
private respawnsGrantedCount;
|
|
3730
|
+
private shakeUntil;
|
|
3731
|
+
private lastSoundCue;
|
|
3732
|
+
private readonly pageViewList;
|
|
2854
3733
|
constructor(game: GameContext);
|
|
2855
3734
|
get lobby(): AdventureLobby | null;
|
|
2856
3735
|
get current(): Adventure | null;
|
|
@@ -3007,6 +3886,95 @@ declare class AdventuresApi {
|
|
|
3007
3886
|
onSeedPlanted(listener: (planted: PacketOf<typeof QuestSeedPlanted>) => void): () => void;
|
|
3008
3887
|
onPlantAte(listener: (ate: PacketOf<typeof QuestPlantAte>) => void): () => void;
|
|
3009
3888
|
onPlantEatRecoil(listener: (recoil: PacketOf<typeof QuestPlantEatRecoil>) => void): () => void;
|
|
3889
|
+
experience(): AdventureExperience | null;
|
|
3890
|
+
playerLevel(userId: number): number | null;
|
|
3891
|
+
departedPlayers(): AdventureDeparture[];
|
|
3892
|
+
defeatedPlayers(): number[];
|
|
3893
|
+
awards(): AdventureAward[];
|
|
3894
|
+
givenItems(): string[];
|
|
3895
|
+
get exitConfirmed(): boolean;
|
|
3896
|
+
lastBundle(): QuestBundledMessage[];
|
|
3897
|
+
actorIconShowing(actorId: string): boolean | null;
|
|
3898
|
+
actorSeeking(actorId: string): AdventureSeek | null;
|
|
3899
|
+
disguise(userId: number): number | null;
|
|
3900
|
+
seeds(): AdventureSeed[];
|
|
3901
|
+
plants(): AdventurePlant[];
|
|
3902
|
+
combatStats(): AdventureCombatStats | null;
|
|
3903
|
+
volumeProgress(actorId: string): number | null;
|
|
3904
|
+
attackTarget(actorId: string): AdventureAttack | null;
|
|
3905
|
+
playerRoom(userId: number): AdventurePlayerRoom | null;
|
|
3906
|
+
sideScrollPosition(userId: number): Point | null;
|
|
3907
|
+
actorTorch(actorId: string): boolean | null;
|
|
3908
|
+
playerTorch(userId: number): boolean | null;
|
|
3909
|
+
get music(): string | null;
|
|
3910
|
+
get cutscene(): number | null;
|
|
3911
|
+
preloadedCutscenes(): number[];
|
|
3912
|
+
soundPacks(): number[];
|
|
3913
|
+
get screenFaded(): boolean;
|
|
3914
|
+
lastZap(): AdventureZap | null;
|
|
3915
|
+
lastLaunch(by: number | string): AdventureLaunch | null;
|
|
3916
|
+
get respawnsGranted(): number;
|
|
3917
|
+
get shaking(): boolean;
|
|
3918
|
+
lastSound(): AdventureSoundCue | null;
|
|
3919
|
+
pageViews(): string[];
|
|
3920
|
+
clientStatus(): Promise<AdventureClientStatus>;
|
|
3921
|
+
actorPathToPlayer(actorId: string): Promise<boolean>;
|
|
3922
|
+
onActorSpawned(listener: (spawned: PacketOf<typeof QuestActorSpawned>) => void): () => void;
|
|
3923
|
+
onActorMoved(listener: (moved: PacketOf<typeof QuestActorMoved>) => void): () => void;
|
|
3924
|
+
onActorHealth(listener: (health: PacketOf<typeof QuestActorHealth>) => void): () => void;
|
|
3925
|
+
onActorDied(listener: (died: PacketOf<typeof QuestActorDied>) => void): () => void;
|
|
3926
|
+
onActorRestored(listener: (restored: PacketOf<typeof QuestActorRestored>) => void): () => void;
|
|
3927
|
+
onActorSwfState(listener: (state: PacketOf<typeof QuestActorSwfState>) => void): () => void;
|
|
3928
|
+
onActorPath(listener: (path: PacketOf<typeof QuestActorPath>) => void): () => void;
|
|
3929
|
+
onCommand(listener: (command: PacketOf<typeof QuestCommand>) => void): () => void;
|
|
3930
|
+
onVariable(listener: (variable: PacketOf<typeof QuestVariable>) => void): () => void;
|
|
3931
|
+
onPickUpResult(listener: (result: AdventurePickUpAnswer) => void): () => void;
|
|
3932
|
+
onMovedItems(listener: (moved: PacketOf<typeof QuestMovedItems>) => void): () => void;
|
|
3933
|
+
onCrystalCount(listener: (count: PacketOf<typeof QuestCrystals>) => void): () => void;
|
|
3934
|
+
onSentOut(listener: (sent: PacketOf<typeof QuestExitByType>) => void): () => void;
|
|
3935
|
+
onLobbyWaiting(listener: (waiting: PacketOf<typeof QuestWaiting>) => void): () => void;
|
|
3936
|
+
onLobbyLeft(listener: (left: PacketOf<typeof QuestJoinCancelled>) => void): () => void;
|
|
3937
|
+
onPlayerAttacked(listener: (attack: PacketOf<typeof QuestPlayerAttacked>) => void): () => void;
|
|
3938
|
+
onBeamZap(listener: (zap: PacketOf<typeof QuestBeamZapped>) => void): () => void;
|
|
3939
|
+
onPhantomZap(listener: (zap: PacketOf<typeof QuestPhantomZapped>) => void): () => void;
|
|
3940
|
+
onThrow(listener: (thrown: PacketOf<typeof QuestProjectileLaunched>) => void): () => void;
|
|
3941
|
+
onSwing(listener: (swung: PacketOf<typeof QuestSwiped>) => void): () => void;
|
|
3942
|
+
onRespawnGranted(listener: (granted: PacketOf<typeof QuestRespawnGranted>) => void): () => void;
|
|
3943
|
+
onPlayerRoomChange(listener: (change: PacketOf<typeof QuestPlayerRoomChange>) => void): () => void;
|
|
3944
|
+
onSideScroll(listener: (moved: PacketOf<typeof QuestSideScrollMoved>) => void): () => void;
|
|
3945
|
+
onTorch(listener: (torch: PacketOf<typeof QuestTorch>) => void): () => void;
|
|
3946
|
+
onCutscene(listener: (film: PacketOf<typeof QuestPlaySwf>) => void): () => void;
|
|
3947
|
+
onCutscenePreload(listener: (film: PacketOf<typeof QuestPreloadSwf>) => void): () => void;
|
|
3948
|
+
onFade(listener: (fade: PacketOf<typeof QuestFade>) => void): () => void;
|
|
3949
|
+
onShake(listener: (shake: PacketOf<typeof QuestShake>) => void): () => void;
|
|
3950
|
+
onSound(listener: (sound: AdventureSoundCue) => void): () => void;
|
|
3951
|
+
onMusic(listener: (music: PacketOf<typeof QuestMusic>) => void): () => void;
|
|
3952
|
+
onSoundPack(listener: (pack: AdventureSoundPack) => void): () => void;
|
|
3953
|
+
onPageView(listener: (view: PacketOf<typeof QuestPostUri>) => void): () => void;
|
|
3954
|
+
reportHit(actorId: string, weaponDefId: number, at: Point): Promise<void>;
|
|
3955
|
+
reportPlayerHit(weaponDefId: number): Promise<void>;
|
|
3956
|
+
reportAttackOnPlayer(actorId: string, userId: number, weaponDefId: number, color: number): Promise<void>;
|
|
3957
|
+
reportActorPosition(actorId: string, move: AdventureActorMove): Promise<void>;
|
|
3958
|
+
requestActorSeek(actorId: string, seekType: number): Promise<void>;
|
|
3959
|
+
untrigger(actorId: string): Promise<void>;
|
|
3960
|
+
reportBeamZap(actorId: string): Promise<void>;
|
|
3961
|
+
reportPhantomZap(actorId: string, at?: Point): Promise<void>;
|
|
3962
|
+
reportDestructibleHit(phantomActorId: string, destructibleActorId: string): Promise<void>;
|
|
3963
|
+
reportPlantAte(plantActorId: string, phantomActorId?: string): Promise<void>;
|
|
3964
|
+
reportThrow({ weaponDefId, target, color }: AdventureWeaponLaunch): Promise<void>;
|
|
3965
|
+
reportSwing({ weaponDefId, target, color }: AdventureWeaponLaunch): Promise<void>;
|
|
3966
|
+
finishCutscene(): Promise<void>;
|
|
3967
|
+
movedItems(timeoutMs?: number): Promise<PacketOf<typeof QuestMovedItems>>;
|
|
3968
|
+
requestRespawn(at?: Point): Promise<void>;
|
|
3969
|
+
finishMinigame(result: number, from?: {
|
|
3970
|
+
actorName: string;
|
|
3971
|
+
actorState: number;
|
|
3972
|
+
}): Promise<void>;
|
|
3973
|
+
finishRoomMinigame(roomName: string, result: number): Promise<void>;
|
|
3974
|
+
reportSideScroll(at: Point, flags?: number): Promise<void>;
|
|
3975
|
+
private forgetRun;
|
|
3976
|
+
private plantOf;
|
|
3977
|
+
private respawnPoint;
|
|
3010
3978
|
private targetOf;
|
|
3011
3979
|
private manager;
|
|
3012
3980
|
}
|
|
@@ -3049,6 +4017,17 @@ declare class AssetsApi {
|
|
|
3049
4017
|
loadMedia(mediaId: number, timeoutMs?: number): Promise<LoadedMediaInfo>;
|
|
3050
4018
|
onLoaded(listener: (asset: LoadedAsset) => void): Unsubscribe;
|
|
3051
4019
|
}
|
|
4020
|
+
type BuddySighting = {
|
|
4021
|
+
userName: string;
|
|
4022
|
+
online: boolean;
|
|
4023
|
+
roomName: string;
|
|
4024
|
+
displayName: string;
|
|
4025
|
+
displayNameId: number;
|
|
4026
|
+
otherServer: boolean;
|
|
4027
|
+
node: string | null;
|
|
4028
|
+
locked: boolean;
|
|
4029
|
+
seenAt: number;
|
|
4030
|
+
};
|
|
3052
4031
|
type Buddy = BuddyEntry;
|
|
3053
4032
|
type BuddyUpdate = {
|
|
3054
4033
|
type: "added" | "removed" | "online" | "offline" | "renamed" | "updated";
|
|
@@ -3078,6 +4057,23 @@ type SentBuddyRequest = {
|
|
|
3078
4057
|
expiresAt: number;
|
|
3079
4058
|
accepting: boolean;
|
|
3080
4059
|
};
|
|
4060
|
+
type IncomingBuddyRequest = {
|
|
4061
|
+
userName: string;
|
|
4062
|
+
userNameModerationFlag: number;
|
|
4063
|
+
receivedAt: number;
|
|
4064
|
+
expiresAt: number;
|
|
4065
|
+
};
|
|
4066
|
+
type BuddyBlockChange = {
|
|
4067
|
+
userName: string;
|
|
4068
|
+
blocked: boolean;
|
|
4069
|
+
success: boolean;
|
|
4070
|
+
};
|
|
4071
|
+
type BuddyCardTradeItem = {
|
|
4072
|
+
defId: number;
|
|
4073
|
+
invIdx: number;
|
|
4074
|
+
itemType: number;
|
|
4075
|
+
name: string;
|
|
4076
|
+
};
|
|
3081
4077
|
type BuddyWhereabouts = {
|
|
3082
4078
|
roomName: string;
|
|
3083
4079
|
displayName: string;
|
|
@@ -3088,21 +4084,30 @@ type BuddyWhereabouts = {
|
|
|
3088
4084
|
declare class BuddiesApi {
|
|
3089
4085
|
readonly [STATE_FIELDS]: readonly [
|
|
3090
4086
|
"buddies",
|
|
3091
|
-
"blockedNames"
|
|
4087
|
+
"blockedNames",
|
|
4088
|
+
"incoming"
|
|
3092
4089
|
];
|
|
3093
4090
|
private readonly flash;
|
|
3094
4091
|
private readonly server;
|
|
3095
4092
|
private readonly buddies;
|
|
3096
4093
|
private readonly blockedNames;
|
|
4094
|
+
private readonly incoming;
|
|
3097
4095
|
private readonly listeners;
|
|
3098
4096
|
private readonly locationListeners;
|
|
3099
4097
|
private readonly blockInfoListeners;
|
|
4098
|
+
private readonly sightings;
|
|
4099
|
+
private readonly sightingListeners;
|
|
4100
|
+
private readonly asked;
|
|
3100
4101
|
constructor(game: GameContext);
|
|
4102
|
+
get whereabouts(): BuddySighting[];
|
|
4103
|
+
whereaboutsOf(userName: string): BuddySighting | null;
|
|
4104
|
+
onWhereabouts(listener: (sighting: BuddySighting) => void): Unsubscribe;
|
|
3101
4105
|
get list(): Buddy[];
|
|
3102
4106
|
get online(): Buddy[];
|
|
3103
4107
|
get blocked(): string[];
|
|
3104
4108
|
get(userName: string): Buddy | null;
|
|
3105
4109
|
isBlocked(userName: string): boolean;
|
|
4110
|
+
get requests(): IncomingBuddyRequest[];
|
|
3106
4111
|
refresh(timeoutMs?: number): Promise<Buddy[]>;
|
|
3107
4112
|
add(userName: string): Promise<void>;
|
|
3108
4113
|
remove(userName: string): Promise<void>;
|
|
@@ -3115,11 +4120,18 @@ declare class BuddiesApi {
|
|
|
3115
4120
|
onUpdate(listener: (update: BuddyUpdate) => void): Unsubscribe;
|
|
3116
4121
|
onLocation(listener: (location: PacketOf<typeof BuddyLocation>) => void): Unsubscribe;
|
|
3117
4122
|
onBlockInfo(listener: (info: PacketOf<typeof BuddyBlockInfo>) => void): Unsubscribe;
|
|
4123
|
+
onAddResult(listener: (result: PacketOf<typeof BuddyAddResult>) => void): Unsubscribe;
|
|
4124
|
+
onBlockChange(listener: (change: BuddyBlockChange) => void): Unsubscribe;
|
|
4125
|
+
onList(listener: (list: PacketOf<typeof BuddyList>) => void): Unsubscribe;
|
|
3118
4126
|
private fromStatus;
|
|
3119
4127
|
isBlockingMe(userName: string, timeoutMs?: number): Promise<boolean>;
|
|
3120
4128
|
capacity(): Promise<BuddyCapacity>;
|
|
3121
4129
|
knows(userName: string): Promise<boolean>;
|
|
3122
4130
|
details(userName: string): Promise<BuddyDetails | null>;
|
|
4131
|
+
clientList(): Promise<BuddyDetails[]>;
|
|
4132
|
+
clientBlocked(): Promise<string[]>;
|
|
4133
|
+
hasBlocked(userName: string): Promise<boolean>;
|
|
4134
|
+
cardTradeList(): Promise<BuddyCardTradeItem[] | null>;
|
|
3123
4135
|
showCard(userName: string, online?: boolean): Promise<void>;
|
|
3124
4136
|
closeCard(): Promise<void>;
|
|
3125
4137
|
joinBuddyQuest(): Promise<boolean>;
|
|
@@ -3156,12 +4168,16 @@ type ModerationEvent = {
|
|
|
3156
4168
|
};
|
|
3157
4169
|
declare class ChatApi {
|
|
3158
4170
|
readonly [STATE_FIELDS]: readonly [
|
|
3159
|
-
"history"
|
|
4171
|
+
"history",
|
|
4172
|
+
"adminNotice",
|
|
4173
|
+
"moderationNotice"
|
|
3160
4174
|
];
|
|
3161
4175
|
private readonly flash;
|
|
3162
4176
|
private readonly server;
|
|
3163
4177
|
private readonly history;
|
|
3164
4178
|
private readonly listeners;
|
|
4179
|
+
private adminNotice;
|
|
4180
|
+
private moderationNotice;
|
|
3165
4181
|
constructor(game: GameContext);
|
|
3166
4182
|
get recent(): readonly ChatMessage[];
|
|
3167
4183
|
say(text: string): Promise<void>;
|
|
@@ -3187,7 +4203,18 @@ declare class ChatApi {
|
|
|
3187
4203
|
log(text: string, from?: string): Promise<void>;
|
|
3188
4204
|
clearLog(): Promise<void>;
|
|
3189
4205
|
onJamAGram(listener: (card: JamAGram) => void): Unsubscribe;
|
|
4206
|
+
get lastAdminMessage(): AdminNotice | null;
|
|
4207
|
+
get lastModeration(): ModerationEvent | null;
|
|
4208
|
+
private phraseNodes;
|
|
3190
4209
|
}
|
|
4210
|
+
declare const DIAMOND_TYPE: {
|
|
4211
|
+
readonly item: 0;
|
|
4212
|
+
readonly denItem: 1;
|
|
4213
|
+
readonly pet: 2;
|
|
4214
|
+
readonly avatar: 3;
|
|
4215
|
+
readonly den: 4;
|
|
4216
|
+
};
|
|
4217
|
+
type DiamondType = keyof typeof DIAMOND_TYPE;
|
|
3191
4218
|
type CurrencyKey = CurrencyKind | number;
|
|
3192
4219
|
type CurrencyChange = {
|
|
3193
4220
|
currency: number;
|
|
@@ -3243,6 +4270,8 @@ declare class CurrencyApi {
|
|
|
3243
4270
|
exchangeDefinition(defId: number): Promise<CurrencyExchangeDefinition | null>;
|
|
3244
4271
|
exchange(shopId: number, exchangeDefId: number, timeoutMs?: number): Promise<ExchangeResult>;
|
|
3245
4272
|
canAfford(price: number | string, currency?: CurrencyKey): Promise<boolean>;
|
|
4273
|
+
diamondsLoaded(): Promise<boolean>;
|
|
4274
|
+
diamondDefinitionId(refDefId: number, type: DiamondType | number): Promise<number | null>;
|
|
3246
4275
|
onChange(listener: (change: CurrencyChange) => void): () => void;
|
|
3247
4276
|
onExchange(listener: (result: ExchangeResult) => void): () => void;
|
|
3248
4277
|
onDonate(listener: (success: boolean) => void): () => void;
|
|
@@ -3259,9 +4288,10 @@ type OpenDailyGift = {
|
|
|
3259
4288
|
};
|
|
3260
4289
|
declare class DailyGiftApi {
|
|
3261
4290
|
private readonly flash;
|
|
4291
|
+
private readonly client;
|
|
3262
4292
|
private readonly giftListeners;
|
|
3263
4293
|
private statUserVarId;
|
|
3264
|
-
constructor(game: GameContext);
|
|
4294
|
+
constructor(game: GameContext, flash: PhantomFlash);
|
|
3265
4295
|
daysInCycle(): Promise<number>;
|
|
3266
4296
|
statId(): Promise<number>;
|
|
3267
4297
|
received(): Promise<number>;
|
|
@@ -3273,6 +4303,12 @@ declare class DailyGiftApi {
|
|
|
3273
4303
|
reject(): Promise<void>;
|
|
3274
4304
|
close(): Promise<void>;
|
|
3275
4305
|
onGift(listener: (received: number) => void): Unsubscribe;
|
|
4306
|
+
unwrap(): Promise<void>;
|
|
4307
|
+
onOpen(listener: () => void): Unsubscribe;
|
|
4308
|
+
wheelOpen(): Promise<boolean>;
|
|
4309
|
+
spinWheel(): Promise<boolean>;
|
|
4310
|
+
onWheelOpen(listener: () => void): Unsubscribe;
|
|
4311
|
+
private hookExit;
|
|
3276
4312
|
private press;
|
|
3277
4313
|
private popup;
|
|
3278
4314
|
}
|
|
@@ -3340,9 +4376,12 @@ declare const OWN_POPUPS: {
|
|
|
3340
4376
|
readonly emailConfirmation: "_emailConfirmation";
|
|
3341
4377
|
};
|
|
3342
4378
|
type OwnPopupName = keyof typeof OWN_POPUPS;
|
|
4379
|
+
type LoginPopup = "newspaper" | "holidayBanner" | "adoptAPetIntro";
|
|
3343
4380
|
declare class PopupsApi {
|
|
3344
4381
|
private readonly flash;
|
|
3345
4382
|
private readonly client;
|
|
4383
|
+
private readonly loginSkips;
|
|
4384
|
+
private readonly skippedListeners;
|
|
3346
4385
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
3347
4386
|
list(): Promise<Popup[]>;
|
|
3348
4387
|
read(match?: string): Promise<Popup | null>;
|
|
@@ -3351,6 +4390,11 @@ declare class PopupsApi {
|
|
|
3351
4390
|
onClose(listener: (popup: PopupClosed) => void): () => void;
|
|
3352
4391
|
isOpen(popup: OwnPopupName): Promise<boolean>;
|
|
3353
4392
|
close(popup: OwnPopupName): Promise<boolean>;
|
|
4393
|
+
skipAtLogin(popups?: readonly LoginPopup[]): Promise<LoginPopup[]>;
|
|
4394
|
+
stopSkippingAtLogin(): Promise<void>;
|
|
4395
|
+
get skippingAtLogin(): LoginPopup[];
|
|
4396
|
+
onSkipped(listener: (popup: LoginPopup) => void): () => void;
|
|
4397
|
+
private skipLoginPopup;
|
|
3354
4398
|
private ownPopup;
|
|
3355
4399
|
private describe;
|
|
3356
4400
|
private textOf;
|
|
@@ -3419,6 +4463,10 @@ type DenShopPurchase = {
|
|
|
3419
4463
|
currency: DenShopCurrency;
|
|
3420
4464
|
balance: number;
|
|
3421
4465
|
};
|
|
4466
|
+
type DenShopOfferingEvent = DenShopContents & {
|
|
4467
|
+
ownerUserName: string | null;
|
|
4468
|
+
ok: boolean;
|
|
4469
|
+
};
|
|
3422
4470
|
type DenShopPurchaseEvent = {
|
|
3423
4471
|
status: number;
|
|
3424
4472
|
ownerUserName: string;
|
|
@@ -3428,21 +4476,75 @@ type DenShopPurchaseEvent = {
|
|
|
3428
4476
|
currency: DenShopCurrency | null;
|
|
3429
4477
|
balance: number | null;
|
|
3430
4478
|
};
|
|
4479
|
+
type DenShopSale = {
|
|
4480
|
+
storeInvId: number;
|
|
4481
|
+
item: DenShopItem;
|
|
4482
|
+
defId: number;
|
|
4483
|
+
cost: number;
|
|
4484
|
+
currency: DenShopCurrency;
|
|
4485
|
+
balance: number;
|
|
4486
|
+
};
|
|
4487
|
+
type DenShopStand = {
|
|
4488
|
+
ownerUserName: string;
|
|
4489
|
+
storeInvId: number;
|
|
4490
|
+
defId: number;
|
|
4491
|
+
};
|
|
4492
|
+
type DenShopUpdate = {
|
|
4493
|
+
list?: Array<{
|
|
4494
|
+
item: DenShopItem;
|
|
4495
|
+
cost: number;
|
|
4496
|
+
currency?: DenShopCurrency;
|
|
4497
|
+
}>;
|
|
4498
|
+
unlist?: DenShopItem[];
|
|
4499
|
+
};
|
|
3431
4500
|
declare class DenShopApi {
|
|
3432
4501
|
private readonly flash;
|
|
3433
4502
|
private readonly server;
|
|
4503
|
+
private readonly asked;
|
|
4504
|
+
private readonly offeringListeners;
|
|
4505
|
+
private telling;
|
|
3434
4506
|
constructor(game: GameContext);
|
|
3435
4507
|
offering(userName: string, storeInvId: number, timeoutMs?: number): Promise<DenShopContents>;
|
|
3436
4508
|
list(storeInvId: number, state: string, item: DenShopItem, cost: number, currency?: DenShopCurrency, timeoutMs?: number): Promise<DenShopChange>;
|
|
3437
4509
|
reprice(storeInvId: number, state: string, item: DenShopItem, cost: number, currency?: DenShopCurrency, timeoutMs?: number): Promise<DenShopChange>;
|
|
3438
4510
|
unlist(storeInvId: number, state: string, item: DenShopItem, timeoutMs?: number): Promise<DenShopChange>;
|
|
3439
4511
|
buy(ownerUserName: string, storeInvId: number, state: string, listing: DenShopListing, timeoutMs?: number): Promise<DenShopPurchase>;
|
|
4512
|
+
onOffering(listener: (offering: DenShopOfferingEvent) => void): Unsubscribe;
|
|
4513
|
+
private offeringOf;
|
|
3440
4514
|
onChange(listener: (change: DenShopChange) => void): Unsubscribe;
|
|
3441
4515
|
onBuy(listener: (purchase: DenShopPurchaseEvent) => void): Unsubscribe;
|
|
3442
|
-
|
|
4516
|
+
onSale(listener: (sale: DenShopSale) => void): Unsubscribe;
|
|
4517
|
+
inDen(): Promise<DenShopStand[]>;
|
|
4518
|
+
update(storeInvId: number, state: string, { list, unlist }: DenShopUpdate, timeoutMs?: number): Promise<DenShopChange>;
|
|
4519
|
+
private isMe;
|
|
4520
|
+
private send;
|
|
3443
4521
|
private myShopItem;
|
|
3444
4522
|
}
|
|
3445
4523
|
type DenVisitors = Omit<PacketOf<typeof DenVisitorCount>, "room">;
|
|
4524
|
+
type DenVisit = {
|
|
4525
|
+
userName: string;
|
|
4526
|
+
entering: boolean;
|
|
4527
|
+
count: number;
|
|
4528
|
+
home: boolean;
|
|
4529
|
+
at: number;
|
|
4530
|
+
};
|
|
4531
|
+
type DenGuest = {
|
|
4532
|
+
userId: number;
|
|
4533
|
+
userName: string;
|
|
4534
|
+
avatarName: string;
|
|
4535
|
+
uuid: string;
|
|
4536
|
+
arrivedAt: number;
|
|
4537
|
+
alreadyHere: boolean;
|
|
4538
|
+
};
|
|
4539
|
+
type DenGuestLeft = DenGuest & {
|
|
4540
|
+
leftAt: number;
|
|
4541
|
+
};
|
|
4542
|
+
type DenPlacement = {
|
|
4543
|
+
placed: number;
|
|
4544
|
+
limit: number;
|
|
4545
|
+
warningAt: number;
|
|
4546
|
+
ownDen: boolean;
|
|
4547
|
+
};
|
|
3446
4548
|
type DenPlacedItem = {
|
|
3447
4549
|
defId: number;
|
|
3448
4550
|
invIdx: number;
|
|
@@ -3513,17 +4615,114 @@ type EcoState = {
|
|
|
3513
4615
|
unredeemedEcoCredits: number;
|
|
3514
4616
|
secondsUntilNextEcoCredit: number;
|
|
3515
4617
|
};
|
|
4618
|
+
type DenPurchaseAnswer = DenPurchase & {
|
|
4619
|
+
currencyType: number;
|
|
4620
|
+
};
|
|
4621
|
+
type DenSale = {
|
|
4622
|
+
invIdxs: number[];
|
|
4623
|
+
gems: number | null;
|
|
4624
|
+
};
|
|
4625
|
+
type DenEcoConsumers = {
|
|
4626
|
+
ecoPointsConsumed: number;
|
|
4627
|
+
ecoScore: number;
|
|
4628
|
+
consumers: DenEcoConsumer[];
|
|
4629
|
+
};
|
|
4630
|
+
type DenEcoRedemption = {
|
|
4631
|
+
redeemed: boolean;
|
|
4632
|
+
secondsUntilNextEcoCredit: number | null;
|
|
4633
|
+
};
|
|
4634
|
+
type DenPhantomChange = {
|
|
4635
|
+
userId: number;
|
|
4636
|
+
phantom: boolean;
|
|
4637
|
+
};
|
|
4638
|
+
type DenOwnedItems = {
|
|
4639
|
+
activeDenIdx: number;
|
|
4640
|
+
items: DenOwnedItem[];
|
|
4641
|
+
petsInDen: number[];
|
|
4642
|
+
};
|
|
4643
|
+
type DenServerState = {
|
|
4644
|
+
forceReload: boolean;
|
|
4645
|
+
items: DenStateEntry[];
|
|
4646
|
+
pets: DenStatePet[];
|
|
4647
|
+
};
|
|
4648
|
+
type DenItemSave = {
|
|
4649
|
+
invIdx: number;
|
|
4650
|
+
refId?: number;
|
|
4651
|
+
placed?: boolean;
|
|
4652
|
+
x?: number;
|
|
4653
|
+
y?: number;
|
|
4654
|
+
flipped?: number;
|
|
4655
|
+
userNameLink?: string;
|
|
4656
|
+
};
|
|
4657
|
+
type HeldDenShop = {
|
|
4658
|
+
storeInvId: number;
|
|
4659
|
+
state: string;
|
|
4660
|
+
listings: HeldDenShopListing[];
|
|
4661
|
+
};
|
|
4662
|
+
type HeldDenShopListing = {
|
|
4663
|
+
itemType: number;
|
|
4664
|
+
invIdx: number;
|
|
4665
|
+
defId: number;
|
|
4666
|
+
cost: number;
|
|
4667
|
+
currencyType: number;
|
|
4668
|
+
shopInvIdx: number;
|
|
4669
|
+
};
|
|
4670
|
+
type DenRoomChange = {
|
|
4671
|
+
denRoomDefId: number;
|
|
4672
|
+
perUserAvId: number | null;
|
|
4673
|
+
activePetInvId: number | null;
|
|
4674
|
+
};
|
|
3516
4675
|
declare class DensApi {
|
|
3517
4676
|
readonly [STATE_FIELDS]: readonly [
|
|
3518
|
-
"visitorCount"
|
|
4677
|
+
"visitorCount",
|
|
4678
|
+
"ownName",
|
|
4679
|
+
"home",
|
|
4680
|
+
"guestsById",
|
|
4681
|
+
"roomChangeHeard",
|
|
4682
|
+
"kickedAtHeard",
|
|
4683
|
+
"purchaseHeard",
|
|
4684
|
+
"saleHeard",
|
|
4685
|
+
"emptiedAtHeard",
|
|
4686
|
+
"ecoStateHeard",
|
|
4687
|
+
"ecoRedemptionHeard",
|
|
4688
|
+
"ecoConsumerStates",
|
|
4689
|
+
"activeDenIdxHeard",
|
|
4690
|
+
"stateHeard"
|
|
3519
4691
|
];
|
|
3520
4692
|
private visitorCount;
|
|
3521
4693
|
private readonly visitorListeners;
|
|
4694
|
+
private readonly visitListeners;
|
|
3522
4695
|
private readonly kickListeners;
|
|
4696
|
+
private ownName;
|
|
4697
|
+
private home;
|
|
4698
|
+
private readonly guestsById;
|
|
4699
|
+
private guestWork;
|
|
4700
|
+
private settlingSince;
|
|
4701
|
+
private readonly arriveListeners;
|
|
4702
|
+
private readonly leaveListeners;
|
|
4703
|
+
private readonly homeListeners;
|
|
3523
4704
|
private readonly flash;
|
|
3524
4705
|
private readonly client;
|
|
3525
4706
|
private readonly server;
|
|
4707
|
+
private readonly clientSide;
|
|
4708
|
+
private roomChangeHeard;
|
|
4709
|
+
private kickedAtHeard;
|
|
4710
|
+
private purchaseHeard;
|
|
4711
|
+
private saleHeard;
|
|
4712
|
+
private emptiedAtHeard;
|
|
4713
|
+
private ecoStateHeard;
|
|
4714
|
+
private ecoRedemptionHeard;
|
|
4715
|
+
private readonly ecoConsumerStates;
|
|
4716
|
+
private activeDenIdxHeard;
|
|
4717
|
+
private stateHeard;
|
|
4718
|
+
private readonly specialTypes;
|
|
4719
|
+
private defWork;
|
|
3526
4720
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
4721
|
+
get inOwnDen(): boolean;
|
|
4722
|
+
get guests(): readonly DenGuest[];
|
|
4723
|
+
onGuestArrive(listener: (guest: DenGuest) => void): Unsubscribe;
|
|
4724
|
+
onGuestLeave(listener: (guest: DenGuestLeft) => void): Unsubscribe;
|
|
4725
|
+
onOwnDen(listener: (inside: boolean) => void): Unsubscribe;
|
|
3527
4726
|
join(owner: string): Promise<void>;
|
|
3528
4727
|
joinOwn(): Promise<void>;
|
|
3529
4728
|
isOwnDen(): Promise<boolean>;
|
|
@@ -3534,6 +4733,7 @@ declare class DensApi {
|
|
|
3534
4733
|
switchRoom(invIdx: number): Promise<void>;
|
|
3535
4734
|
get visitors(): DenVisitors | null;
|
|
3536
4735
|
onVisitors(listener: (visitors: DenVisitors) => void): () => void;
|
|
4736
|
+
onVisit(listener: (visit: DenVisit) => void): Unsubscribe;
|
|
3537
4737
|
onKicked(listener: () => void): () => void;
|
|
3538
4738
|
onEntered(listener: (den: {
|
|
3539
4739
|
ownerName: string;
|
|
@@ -3572,6 +4772,7 @@ declare class DensApi {
|
|
|
3572
4772
|
ecoScore: number;
|
|
3573
4773
|
}>;
|
|
3574
4774
|
items(): Promise<DenPlacedItem[]>;
|
|
4775
|
+
placement(): Promise<DenPlacement | null>;
|
|
3575
4776
|
moveItem(item: Pick<DenPlacedItem, "refId" | "invIdx">, placement: DenItemPlacement): Promise<boolean>;
|
|
3576
4777
|
inventory(timeoutMs?: number): Promise<DenInventoryItem[]>;
|
|
3577
4778
|
itemDefinition(defId: number): Promise<DenItemDefinition | null>;
|
|
@@ -3586,13 +4787,54 @@ declare class DensApi {
|
|
|
3586
4787
|
recycleItems(...invIdxs: number[]): Promise<number[]>;
|
|
3587
4788
|
empty(): Promise<void>;
|
|
3588
4789
|
saveLayout(): Promise<void>;
|
|
4790
|
+
get roomChange(): DenRoomChange | null;
|
|
4791
|
+
get kickedAt(): number | null;
|
|
4792
|
+
get lastPurchase(): DenPurchaseAnswer | null;
|
|
4793
|
+
onPurchase(listener: (purchase: DenPurchaseAnswer) => void): Unsubscribe;
|
|
4794
|
+
get lastSale(): DenSale | null;
|
|
4795
|
+
onSale(listener: (sale: DenSale) => void): Unsubscribe;
|
|
4796
|
+
get emptiedAt(): number | null;
|
|
4797
|
+
onEmptied(listener: () => void): Unsubscribe;
|
|
4798
|
+
epicDens(timeoutMs?: number): Promise<string[]>;
|
|
4799
|
+
onEpicDens(listener: (userNames: string[]) => void): Unsubscribe;
|
|
4800
|
+
setPhantom(phantom: boolean, timeoutMs?: number): Promise<DenPhantomChange | null>;
|
|
4801
|
+
onPhantom(listener: (change: DenPhantomChange) => void): Unsubscribe;
|
|
4802
|
+
get lastEcoState(): EcoState | null;
|
|
4803
|
+
onEcoState(listener: (state: EcoState) => void): Unsubscribe;
|
|
4804
|
+
get lastEcoRedemption(): DenEcoRedemption | null;
|
|
4805
|
+
onEcoCreditsRedeemed(listener: (redemption: DenEcoRedemption) => void): Unsubscribe;
|
|
4806
|
+
get ecoConsumers(): ReadonlyMap<number, number>;
|
|
4807
|
+
onEcoConsumers(listener: (consumers: DenEcoConsumers) => void): Unsubscribe;
|
|
4808
|
+
get activeDenIdx(): number | null;
|
|
4809
|
+
onItemList(listener: (items: DenOwnedItems) => void): Unsubscribe;
|
|
4810
|
+
serverState(): Promise<DenServerState | null>;
|
|
4811
|
+
onState(listener: (state: DenServerState) => void): Unsubscribe;
|
|
4812
|
+
saveItems(changes: DenItemSave[], timeoutMs?: number): Promise<number[]>;
|
|
4813
|
+
onSaved(listener: (invIdxs: number[]) => void): Unsubscribe;
|
|
4814
|
+
onSaving(listener: (changes: DenStateChange[]) => void): Unsubscribe;
|
|
4815
|
+
isChangePending(): Promise<boolean>;
|
|
4816
|
+
openDenShopId(): Promise<number | null>;
|
|
4817
|
+
heldDenShop(storeInvId: number): Promise<HeldDenShop | null>;
|
|
3589
4818
|
private placedItems;
|
|
3590
4819
|
private placedItem;
|
|
3591
4820
|
private ownedItems;
|
|
3592
4821
|
private findOwnedItem;
|
|
3593
4822
|
private readOwnedItem;
|
|
3594
4823
|
private readPlacementFields;
|
|
4824
|
+
private saveRow;
|
|
4825
|
+
private findPlaced;
|
|
4826
|
+
private readWithDefs;
|
|
4827
|
+
private lookUpSpecialType;
|
|
4828
|
+
private queueDefs;
|
|
4829
|
+
private holder;
|
|
4830
|
+
private editorOpen;
|
|
4831
|
+
private saveWithoutEditor;
|
|
4832
|
+
private heldStateItems;
|
|
4833
|
+
private markSaved;
|
|
3595
4834
|
private playerName;
|
|
4835
|
+
private queueGuests;
|
|
4836
|
+
private isOwnDenName;
|
|
4837
|
+
private isOwnName;
|
|
3596
4838
|
}
|
|
3597
4839
|
type JamAGramDraft = {
|
|
3598
4840
|
message: string;
|
|
@@ -3603,13 +4845,38 @@ type JamAGramDraft = {
|
|
|
3603
4845
|
giftInvId?: number;
|
|
3604
4846
|
specialType?: number;
|
|
3605
4847
|
};
|
|
4848
|
+
type JamAGramBuddyAnswerOutcome = {
|
|
4849
|
+
messageId: number | null;
|
|
4850
|
+
accept: boolean | null;
|
|
4851
|
+
result: number;
|
|
4852
|
+
refused: boolean;
|
|
4853
|
+
heardAt: number;
|
|
4854
|
+
};
|
|
4855
|
+
type ClientJamAGram = {
|
|
4856
|
+
messageId: number;
|
|
4857
|
+
senderUserName: string;
|
|
4858
|
+
senderModeratedUserName: string;
|
|
4859
|
+
read: boolean;
|
|
4860
|
+
message: string;
|
|
4861
|
+
type: number;
|
|
4862
|
+
giftId: number;
|
|
4863
|
+
giftName: string;
|
|
4864
|
+
isGift: boolean;
|
|
4865
|
+
cardMediaId: number;
|
|
4866
|
+
stampMediaId: number;
|
|
4867
|
+
specialType: number;
|
|
4868
|
+
};
|
|
3606
4869
|
declare class ECardsApi {
|
|
3607
4870
|
readonly [STATE_FIELDS]: readonly [
|
|
3608
|
-
"cards"
|
|
4871
|
+
"cards",
|
|
4872
|
+
"buddyAnswer"
|
|
3609
4873
|
];
|
|
3610
4874
|
private readonly flash;
|
|
3611
4875
|
private readonly server;
|
|
3612
4876
|
private readonly cards;
|
|
4877
|
+
private buddyAnswer;
|
|
4878
|
+
private readonly answering;
|
|
4879
|
+
private readonly buddyAnswerListeners;
|
|
3613
4880
|
private readonly receivedListeners;
|
|
3614
4881
|
private readonly updatedListeners;
|
|
3615
4882
|
private readonly removedListeners;
|
|
@@ -3638,6 +4905,11 @@ declare class ECardsApi {
|
|
|
3638
4905
|
acceptGift(messageId: number, colorIndex?: number, timeoutMs?: number): Promise<void>;
|
|
3639
4906
|
discardGift(messageId: number, timeoutMs?: number): Promise<void>;
|
|
3640
4907
|
respondToBuddyRequest(messageId: number, accept: boolean): Promise<void>;
|
|
4908
|
+
get lastBuddyAnswer(): JamAGramBuddyAnswerOutcome | null;
|
|
4909
|
+
onBuddyAnswer(listener: (answer: JamAGramBuddyAnswerOutcome) => void): Unsubscribe;
|
|
4910
|
+
onInbox(listener: (cards: JamAGram[]) => void): Unsubscribe;
|
|
4911
|
+
clientInbox(): Promise<ClientJamAGram[]>;
|
|
4912
|
+
clientInboxLoaded(): Promise<boolean>;
|
|
3641
4913
|
openComposer(userName: string, moderatedUserName?: string): Promise<void>;
|
|
3642
4914
|
closeInbox(): Promise<void>;
|
|
3643
4915
|
isComposerOpen(): Promise<boolean>;
|
|
@@ -3864,6 +5136,7 @@ type GameScreenToClose = keyof typeof CLOSERS;
|
|
|
3864
5136
|
declare class GuiApi {
|
|
3865
5137
|
private readonly bridge;
|
|
3866
5138
|
private readonly flash;
|
|
5139
|
+
private currencyPin;
|
|
3867
5140
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
3868
5141
|
tree(options?: {
|
|
3869
5142
|
from?: GuiRoot | GuiTarget;
|
|
@@ -3911,6 +5184,10 @@ declare class GuiApi {
|
|
|
3911
5184
|
grayHudAvatar(gray?: boolean): Promise<void>;
|
|
3912
5185
|
toggleHud(): Promise<void>;
|
|
3913
5186
|
isDarkened(): Promise<boolean>;
|
|
5187
|
+
pinCurrency(): Promise<void>;
|
|
5188
|
+
unpinCurrency(): Promise<void>;
|
|
5189
|
+
get currencyPinned(): boolean;
|
|
5190
|
+
private rollCurrency;
|
|
3914
5191
|
private chatField;
|
|
3915
5192
|
private setFieldText;
|
|
3916
5193
|
private counter;
|
|
@@ -3949,6 +5226,18 @@ type PurchaseResult = {
|
|
|
3949
5226
|
balance: number | null;
|
|
3950
5227
|
currencyType: number;
|
|
3951
5228
|
};
|
|
5229
|
+
type AvatarSlot = {
|
|
5230
|
+
perUserAvId: number;
|
|
5231
|
+
avInvId: number;
|
|
5232
|
+
};
|
|
5233
|
+
type ItemPrizeOffer = {
|
|
5234
|
+
defId: number;
|
|
5235
|
+
isClothing: boolean;
|
|
5236
|
+
color: number;
|
|
5237
|
+
userVarId: number;
|
|
5238
|
+
nameStrId: number;
|
|
5239
|
+
descStrId: number;
|
|
5240
|
+
};
|
|
3952
5241
|
type RecycleResult = {
|
|
3953
5242
|
recycled: number[];
|
|
3954
5243
|
gems: number | null;
|
|
@@ -3956,13 +5245,17 @@ type RecycleResult = {
|
|
|
3956
5245
|
declare class InventoryApi {
|
|
3957
5246
|
readonly [STATE_FIELDS]: readonly [
|
|
3958
5247
|
"inventory",
|
|
3959
|
-
"slots"
|
|
5248
|
+
"slots",
|
|
5249
|
+
"prize"
|
|
3960
5250
|
];
|
|
3961
5251
|
private readonly flash;
|
|
3962
5252
|
private readonly server;
|
|
3963
5253
|
private inventory;
|
|
3964
5254
|
private readonly slots;
|
|
3965
5255
|
private readonly changeListeners;
|
|
5256
|
+
private readonly slotListeners;
|
|
5257
|
+
private readonly prizeListeners;
|
|
5258
|
+
private prize;
|
|
3966
5259
|
constructor(game: GameContext);
|
|
3967
5260
|
items({ refresh }?: {
|
|
3968
5261
|
refresh?: boolean;
|
|
@@ -3981,6 +5274,10 @@ declare class InventoryApi {
|
|
|
3981
5274
|
}>;
|
|
3982
5275
|
onChange(listener: (change: InventoryChange) => void): () => void;
|
|
3983
5276
|
onUse(listener: (success: boolean) => void): () => void;
|
|
5277
|
+
avatarSlots(): AvatarSlot[];
|
|
5278
|
+
onAvatarSlot(listener: (slot: AvatarSlot) => void): Unsubscribe;
|
|
5279
|
+
get latestPrize(): ItemPrizeOffer | null;
|
|
5280
|
+
onPrize(listener: (prize: ItemPrizeOffer) => void): Unsubscribe;
|
|
3984
5281
|
wear(...invIds: number[]): Promise<boolean>;
|
|
3985
5282
|
takeOff(...invIds: number[]): Promise<boolean>;
|
|
3986
5283
|
change({ wear, remove, }: {
|
|
@@ -3993,6 +5290,7 @@ declare class InventoryApi {
|
|
|
3993
5290
|
diamond?: boolean;
|
|
3994
5291
|
}): Promise<PurchaseResult>;
|
|
3995
5292
|
recycle(...invIds: number[]): Promise<RecycleResult>;
|
|
5293
|
+
private keepSlot;
|
|
3996
5294
|
private keep;
|
|
3997
5295
|
private apply;
|
|
3998
5296
|
}
|
|
@@ -4009,6 +5307,11 @@ declare class LocalizationApi {
|
|
|
4009
5307
|
private codes;
|
|
4010
5308
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
4011
5309
|
currentLanguage(): Promise<Language>;
|
|
5310
|
+
accountLanguage(): Promise<Language>;
|
|
5311
|
+
languageForLocale(locale: string): Promise<Language | null>;
|
|
5312
|
+
sortingLocale(): Promise<string>;
|
|
5313
|
+
numberLocale(): Promise<string>;
|
|
5314
|
+
countryCode(): Promise<string>;
|
|
4012
5315
|
hasLocalizations(): Promise<boolean>;
|
|
4013
5316
|
translate(id: number): Promise<string>;
|
|
4014
5317
|
translatePreferred(id: number): Promise<string>;
|
|
@@ -4024,12 +5327,48 @@ declare class LocalizationApi {
|
|
|
4024
5327
|
private languageCodes;
|
|
4025
5328
|
}
|
|
4026
5329
|
type Masterpiece = DenMasterpieceItem;
|
|
5330
|
+
type MasterpieceList = {
|
|
5331
|
+
userName: string | null;
|
|
5332
|
+
items: Masterpiece[];
|
|
5333
|
+
};
|
|
5334
|
+
type MasterpieceCreator = {
|
|
5335
|
+
denUserName: string | null;
|
|
5336
|
+
uniqueImageId: string | null;
|
|
5337
|
+
creatorName: string;
|
|
5338
|
+
};
|
|
5339
|
+
type MasterpieceLikes = {
|
|
5340
|
+
count: number;
|
|
5341
|
+
liked: boolean;
|
|
5342
|
+
};
|
|
5343
|
+
type MasterpieceLikesEvent = MasterpieceLikes & {
|
|
5344
|
+
uniqueImageId: string;
|
|
5345
|
+
ok: boolean;
|
|
5346
|
+
};
|
|
5347
|
+
type MasterpieceLiked = {
|
|
5348
|
+
uniqueImageId: string;
|
|
5349
|
+
ok: boolean;
|
|
5350
|
+
};
|
|
5351
|
+
type LikeableMasterpiece = Pick<Masterpiece, "uniqueImageId" | "uniqueImageCreatorUUID" | "uniqueImageCreatorDbId" | "version">;
|
|
4027
5352
|
declare class MasterpiecesApi {
|
|
4028
5353
|
private readonly flash;
|
|
4029
5354
|
private readonly server;
|
|
5355
|
+
private readonly itemsAsked;
|
|
5356
|
+
private readonly creatorsAsked;
|
|
5357
|
+
private readonly likesAsked;
|
|
5358
|
+
private readonly likesGiven;
|
|
5359
|
+
private readonly itemsListeners;
|
|
5360
|
+
private readonly creatorListeners;
|
|
5361
|
+
private readonly likesListeners;
|
|
5362
|
+
private readonly likedListeners;
|
|
4030
5363
|
constructor(game: GameContext);
|
|
4031
5364
|
itemsOf(userName: string, timeoutMs?: number): Promise<Masterpiece[]>;
|
|
4032
5365
|
creatorOf(denUserName: string, uniqueImageId: string, timeoutMs?: number): Promise<string>;
|
|
5366
|
+
likes(uniqueImageId: string, timeoutMs?: number): Promise<MasterpieceLikes>;
|
|
5367
|
+
like(masterpiece: LikeableMasterpiece, timeoutMs?: number): Promise<boolean>;
|
|
5368
|
+
onItems(listener: (list: MasterpieceList) => void): Unsubscribe;
|
|
5369
|
+
onCreator(listener: (creator: MasterpieceCreator) => void): Unsubscribe;
|
|
5370
|
+
onLikes(listener: (likes: MasterpieceLikesEvent) => void): Unsubscribe;
|
|
5371
|
+
onLiked(listener: (liked: MasterpieceLiked) => void): Unsubscribe;
|
|
4033
5372
|
}
|
|
4034
5373
|
type ConnectFourMark = "me" | "opponent" | null;
|
|
4035
5374
|
type ConnectFourBoard = ReadonlyArray<ReadonlyArray<ConnectFourMark>>;
|
|
@@ -4223,6 +5562,7 @@ type MinigameStatus = {
|
|
|
4223
5562
|
fullRoomGame: boolean;
|
|
4224
5563
|
roomName: string;
|
|
4225
5564
|
pending: PendingMinigame | null;
|
|
5565
|
+
roomEnvironment: number | null;
|
|
4226
5566
|
};
|
|
4227
5567
|
type PendingMinigame = {
|
|
4228
5568
|
gameDefId: number;
|
|
@@ -4245,6 +5585,50 @@ type CachedLeaderboard = {
|
|
|
4245
5585
|
thisWeek: LeaderboardEntry[];
|
|
4246
5586
|
buddies: LeaderboardEntry[];
|
|
4247
5587
|
};
|
|
5588
|
+
type ClientLeaderboard = {
|
|
5589
|
+
gameDefId: number;
|
|
5590
|
+
cachedAt: number;
|
|
5591
|
+
allTime: LeaderboardEntry[];
|
|
5592
|
+
thisWeek: LeaderboardEntry[];
|
|
5593
|
+
buddies: LeaderboardEntry[];
|
|
5594
|
+
};
|
|
5595
|
+
type MinigameJoinRecord = MinigameJoinAnswer & {
|
|
5596
|
+
gameDefId: number | null;
|
|
5597
|
+
heardAt: number;
|
|
5598
|
+
};
|
|
5599
|
+
type PendingPvpInvite = {
|
|
5600
|
+
gameDefId: number;
|
|
5601
|
+
userName: string;
|
|
5602
|
+
nameVisible: boolean;
|
|
5603
|
+
heardAt: number;
|
|
5604
|
+
};
|
|
5605
|
+
type MinigameSerials = {
|
|
5606
|
+
gems: number | null;
|
|
5607
|
+
score: number | null;
|
|
5608
|
+
mastery: number | null;
|
|
5609
|
+
};
|
|
5610
|
+
type MinigameGemSerial = {
|
|
5611
|
+
serial: number;
|
|
5612
|
+
forScore: boolean;
|
|
5613
|
+
};
|
|
5614
|
+
type MinigameMasterySerial = {
|
|
5615
|
+
serial: number;
|
|
5616
|
+
showPopup: boolean;
|
|
5617
|
+
};
|
|
5618
|
+
type MinigameAwardSent = {
|
|
5619
|
+
serial: number | null;
|
|
5620
|
+
award: MinigameAward | null;
|
|
5621
|
+
sums: MinigameAwardSums;
|
|
5622
|
+
};
|
|
5623
|
+
type MinigameScoreSent = {
|
|
5624
|
+
serial: number | null;
|
|
5625
|
+
score: MinigameScore | null;
|
|
5626
|
+
sums: MinigameScoreSums;
|
|
5627
|
+
};
|
|
5628
|
+
type MinigamePlayerInfo = {
|
|
5629
|
+
activePetName: string;
|
|
5630
|
+
member: boolean;
|
|
5631
|
+
};
|
|
4248
5632
|
type MinigameJoinOptions = {
|
|
4249
5633
|
multiplayer?: boolean;
|
|
4250
5634
|
proModeId?: number;
|
|
@@ -4256,6 +5640,9 @@ declare class MinigamesApi {
|
|
|
4256
5640
|
"requested",
|
|
4257
5641
|
"session",
|
|
4258
5642
|
"boards",
|
|
5643
|
+
"joinAnswer",
|
|
5644
|
+
"invite",
|
|
5645
|
+
"serialsHeard",
|
|
4259
5646
|
"ticTacToe",
|
|
4260
5647
|
"connectFour",
|
|
4261
5648
|
"rockPaperScissors",
|
|
@@ -4269,6 +5656,14 @@ declare class MinigamesApi {
|
|
|
4269
5656
|
private requested;
|
|
4270
5657
|
private session;
|
|
4271
5658
|
private readonly boards;
|
|
5659
|
+
private joinAnswer;
|
|
5660
|
+
private invite;
|
|
5661
|
+
private serialsHeard;
|
|
5662
|
+
private readonly gemSerialListeners;
|
|
5663
|
+
private readonly masterySerialListeners;
|
|
5664
|
+
private readonly gemAwardListeners;
|
|
5665
|
+
private readonly masteryAwardListeners;
|
|
5666
|
+
private readonly scoreListeners;
|
|
4272
5667
|
readonly ticTacToe: MinigameTicTacToeApi;
|
|
4273
5668
|
readonly connectFour: MinigameConnectFourApi;
|
|
4274
5669
|
readonly rockPaperScissors: MinigameRockPaperScissorsApi;
|
|
@@ -4315,6 +5710,20 @@ declare class MinigamesApi {
|
|
|
4315
5710
|
chat(text: string): Promise<void>;
|
|
4316
5711
|
onPlayerLeft(listener: (left: PacketOf<typeof MinigameLeft>) => void): () => void;
|
|
4317
5712
|
onRoomRemoved(listener: (removed: PacketOf<typeof MinigameRoomRemoved>) => void): () => void;
|
|
5713
|
+
onLeaderboard(listener: (board: MinigameLeaderboardAnswer) => void): Unsubscribe;
|
|
5714
|
+
clientLeaderboard(gameDefId: number): Promise<ClientLeaderboard | null>;
|
|
5715
|
+
get lastJoin(): MinigameJoinRecord | null;
|
|
5716
|
+
get pvpInvite(): PendingPvpInvite | null;
|
|
5717
|
+
get serials(): MinigameSerials;
|
|
5718
|
+
onGemSerial(listener: (serial: MinigameGemSerial) => void): Unsubscribe;
|
|
5719
|
+
onMasterySerial(listener: (serial: MinigameMasterySerial) => void): Unsubscribe;
|
|
5720
|
+
onGemAward(listener: (sent: MinigameAwardSent) => void): Unsubscribe;
|
|
5721
|
+
onPetMasteryAward(listener: (sent: MinigameAwardSent) => void): Unsubscribe;
|
|
5722
|
+
onScore(listener: (sent: MinigameScoreSent) => void): Unsubscribe;
|
|
5723
|
+
quit(): Promise<void>;
|
|
5724
|
+
playerInfo(): Promise<MinigamePlayerInfo>;
|
|
5725
|
+
gameNameId(gameDefId: number): Promise<number | null>;
|
|
5726
|
+
isMemberAccountType(accountType: number): Promise<boolean>;
|
|
4318
5727
|
private pendingGame;
|
|
4319
5728
|
private infoCache;
|
|
4320
5729
|
private lookUp;
|
|
@@ -4322,6 +5731,56 @@ declare class MinigamesApi {
|
|
|
4322
5731
|
private manager;
|
|
4323
5732
|
private comm;
|
|
4324
5733
|
}
|
|
5734
|
+
type Membership = {
|
|
5735
|
+
userName: string;
|
|
5736
|
+
accountType: number;
|
|
5737
|
+
member: boolean;
|
|
5738
|
+
daysLeft: number;
|
|
5739
|
+
endsAt: number | null;
|
|
5740
|
+
sourceType: string | null;
|
|
5741
|
+
heardAt: number;
|
|
5742
|
+
cause: "login" | "redeemed";
|
|
5743
|
+
};
|
|
5744
|
+
type MembershipLook = {
|
|
5745
|
+
accountType: number;
|
|
5746
|
+
daysLeft: number;
|
|
5747
|
+
};
|
|
5748
|
+
type MembershipLookOptions = {
|
|
5749
|
+
accountType?: number;
|
|
5750
|
+
daysLeft?: number;
|
|
5751
|
+
};
|
|
5752
|
+
type ShownMembership = {
|
|
5753
|
+
accountType: number;
|
|
5754
|
+
member: boolean;
|
|
5755
|
+
daysLeft: number;
|
|
5756
|
+
};
|
|
5757
|
+
declare class MembershipApi {
|
|
5758
|
+
readonly [STATE_FIELDS]: readonly [
|
|
5759
|
+
"heard"
|
|
5760
|
+
];
|
|
5761
|
+
private heard;
|
|
5762
|
+
private current;
|
|
5763
|
+
private hooks;
|
|
5764
|
+
private questRoom;
|
|
5765
|
+
private readonly changeListeners;
|
|
5766
|
+
private readonly lookListeners;
|
|
5767
|
+
private readonly flash;
|
|
5768
|
+
private readonly server;
|
|
5769
|
+
private readonly client;
|
|
5770
|
+
constructor(game: GameContext);
|
|
5771
|
+
get real(): Membership | null;
|
|
5772
|
+
onChange(listener: (membership: Membership) => void): Unsubscribe;
|
|
5773
|
+
shown(): Promise<ShownMembership>;
|
|
5774
|
+
get showing(): MembershipLook | null;
|
|
5775
|
+
onShowing(listener: (look: MembershipLook | null) => void): Unsubscribe;
|
|
5776
|
+
show(options?: MembershipLookOptions): Promise<MembershipLook>;
|
|
5777
|
+
stopShowing(): Promise<void>;
|
|
5778
|
+
private hear;
|
|
5779
|
+
private hook;
|
|
5780
|
+
private rewriteLogin;
|
|
5781
|
+
private tellGame;
|
|
5782
|
+
private isOwn;
|
|
5783
|
+
}
|
|
4325
5784
|
type NewspaperIssue = {
|
|
4326
5785
|
defId: number;
|
|
4327
5786
|
title: string;
|
|
@@ -4345,6 +5804,7 @@ declare class NewspaperApi {
|
|
|
4345
5804
|
private readonly seenListeners;
|
|
4346
5805
|
constructor(game: GameContext);
|
|
4347
5806
|
definitions(): Promise<NewspaperIssue[]>;
|
|
5807
|
+
definition(defId: number): Promise<NewspaperIssue | null>;
|
|
4348
5808
|
dataOf(defId: number): Promise<NewspaperReadState | null>;
|
|
4349
5809
|
hasUnseenPages(): Promise<boolean>;
|
|
4350
5810
|
hasSeenFirstPage(): Promise<boolean>;
|
|
@@ -4463,14 +5923,64 @@ type AdoptionTier = {
|
|
|
4463
5923
|
complete: boolean;
|
|
4464
5924
|
thresholds: number[];
|
|
4465
5925
|
};
|
|
5926
|
+
type AdoptionChecklist = {
|
|
5927
|
+
success: boolean;
|
|
5928
|
+
cards: AdoptAPetCard[];
|
|
5929
|
+
};
|
|
5930
|
+
type PetRestyle = {
|
|
5931
|
+
success: boolean;
|
|
5932
|
+
gems: number;
|
|
5933
|
+
invId: number;
|
|
5934
|
+
lBits: number;
|
|
5935
|
+
uBits: number;
|
|
5936
|
+
eBits: number;
|
|
5937
|
+
};
|
|
5938
|
+
type PetWornSlots = {
|
|
5939
|
+
cat9: number;
|
|
5940
|
+
cat10: number;
|
|
5941
|
+
cat11: number;
|
|
5942
|
+
};
|
|
5943
|
+
type PetEnviroType = number;
|
|
5944
|
+
type PetAsItem = {
|
|
5945
|
+
invId: number;
|
|
5946
|
+
defId: number;
|
|
5947
|
+
name: string;
|
|
5948
|
+
type: number;
|
|
5949
|
+
enviroType: PetEnviroType;
|
|
5950
|
+
recycleValue: number;
|
|
5951
|
+
currencyType: number;
|
|
5952
|
+
membersOnly: boolean;
|
|
5953
|
+
isEgg: boolean;
|
|
5954
|
+
isHatched: boolean;
|
|
5955
|
+
isAvailable: boolean;
|
|
5956
|
+
isInDenShop: boolean;
|
|
5957
|
+
isDiamond: boolean;
|
|
5958
|
+
isRare: boolean;
|
|
5959
|
+
};
|
|
5960
|
+
type PetPictureOptions = {
|
|
5961
|
+
scale?: number;
|
|
5962
|
+
background?: number | null;
|
|
5963
|
+
maxSize?: number;
|
|
5964
|
+
timeoutMs?: number;
|
|
5965
|
+
};
|
|
4466
5966
|
declare class PetsApi {
|
|
4467
5967
|
private readonly flash;
|
|
4468
5968
|
private readonly server;
|
|
4469
5969
|
private readonly switchListeners;
|
|
4470
5970
|
private readonly listListeners;
|
|
4471
5971
|
private readonly dismissListeners;
|
|
4472
|
-
|
|
5972
|
+
private readonly createdListeners;
|
|
5973
|
+
private readonly eggNamedListeners;
|
|
5974
|
+
private readonly masteryListeners;
|
|
5975
|
+
private readonly restyleListeners;
|
|
5976
|
+
private readonly unlockListeners;
|
|
5977
|
+
private readonly checklistListeners;
|
|
5978
|
+
private readonly adoptionCountListeners;
|
|
5979
|
+
private unlockedField;
|
|
5980
|
+
private readonly hooks;
|
|
5981
|
+
constructor(game: GameContext, flash?: PhantomFlash);
|
|
4473
5982
|
list(): Promise<PlayerPet[]>;
|
|
5983
|
+
private petRecord;
|
|
4474
5984
|
activeInvId(): Promise<number>;
|
|
4475
5985
|
active(): Promise<PlayerPet | null>;
|
|
4476
5986
|
activeName(): Promise<string>;
|
|
@@ -4524,9 +6034,67 @@ declare class PetsApi {
|
|
|
4524
6034
|
uBits: number;
|
|
4525
6035
|
eBits: number;
|
|
4526
6036
|
}>;
|
|
6037
|
+
buy(shopId: number, itemDefId: number, bits: {
|
|
6038
|
+
lBits: number;
|
|
6039
|
+
uBits: number;
|
|
6040
|
+
eBits: number;
|
|
6041
|
+
}, name: {
|
|
6042
|
+
firstNameLocId: number;
|
|
6043
|
+
secondNameLocId: number;
|
|
6044
|
+
}, options?: {
|
|
6045
|
+
fromRedemption?: boolean;
|
|
6046
|
+
timeoutMs?: number;
|
|
6047
|
+
}): Promise<CreatedPet>;
|
|
6048
|
+
restyle(worn: PetWornSlots, options?: {
|
|
6049
|
+
enviroType?: PetEnviroType;
|
|
6050
|
+
timeoutMs?: number;
|
|
6051
|
+
}): Promise<PetRestyle>;
|
|
6052
|
+
adoptionChecklistOf(userName: string, timeoutMs?: number): Promise<AdoptionChecklist>;
|
|
6053
|
+
adoptionCountOf(userName: string, timeoutMs?: number): Promise<number>;
|
|
6054
|
+
adoptionCardDefs(): Promise<AdoptionCardDef[]>;
|
|
6055
|
+
adoptionCardTotal(): Promise<number>;
|
|
6056
|
+
hasAdoptionCards(): Promise<boolean>;
|
|
6057
|
+
definitions(): Promise<PetDefinition[]>;
|
|
6058
|
+
unlockedKinds(): Promise<number[]>;
|
|
6059
|
+
goesOnLandAndInOcean(pet: {
|
|
6060
|
+
defId: number;
|
|
6061
|
+
createdTs: number;
|
|
6062
|
+
}): Promise<boolean>;
|
|
6063
|
+
goesWith(pet: {
|
|
6064
|
+
defId: number;
|
|
6065
|
+
createdTs: number;
|
|
6066
|
+
}, enviroTypeFlag?: number): Promise<boolean>;
|
|
6067
|
+
enviroTypeOf(pet: {
|
|
6068
|
+
defId: number;
|
|
6069
|
+
createdTs: number;
|
|
6070
|
+
}, enviroTypeFlag?: number): Promise<PetEnviroType>;
|
|
6071
|
+
isGroundType(type: number): Promise<boolean>;
|
|
6072
|
+
kindOfBits(lBits: number): Promise<number>;
|
|
6073
|
+
listAsItems(): Promise<PetAsItem[]>;
|
|
6074
|
+
picture(pet: {
|
|
6075
|
+
lBits: number;
|
|
6076
|
+
uBits: number;
|
|
6077
|
+
eBits: number;
|
|
6078
|
+
createdTs?: number;
|
|
6079
|
+
invId?: number;
|
|
6080
|
+
name?: string;
|
|
6081
|
+
personalityDefId?: number;
|
|
6082
|
+
favoriteFoodDefId?: number;
|
|
6083
|
+
favoriteToyDefId?: number;
|
|
6084
|
+
}, options?: PetPictureOptions): Promise<string>;
|
|
6085
|
+
private playerEnviroTypeFlag;
|
|
6086
|
+
private withDefinition;
|
|
4527
6087
|
onSwitch(listener: (change: PetSwitch) => void): () => void;
|
|
4528
6088
|
onList(listener: (list: PacketOf<typeof PetList>) => void): () => void;
|
|
4529
6089
|
onDismissed(listener: (dismissed: PacketOf<typeof PetDismissed>) => void): () => void;
|
|
6090
|
+
onCreated(listener: (created: CreatedPet) => void): () => void;
|
|
6091
|
+
onEggNamed(listener: (named: NamedEggPet) => void): () => void;
|
|
6092
|
+
onMasteryBadge(listener: (result: PetMasteryResult) => void): () => void;
|
|
6093
|
+
onRestyled(listener: (restyle: PetRestyle) => void): () => void;
|
|
6094
|
+
onUnlocked(listener: (defIds: number[]) => void): () => void;
|
|
6095
|
+
onAdoptionChecklist(listener: (checklist: AdoptionChecklist) => void): () => void;
|
|
6096
|
+
onAdoptionCount(listener: (count: number) => void): () => void;
|
|
6097
|
+
onDefinitionsLoaded(listener: () => void): () => void;
|
|
4530
6098
|
}
|
|
4531
6099
|
type CachedWall = {
|
|
4532
6100
|
posts: WallPost[];
|
|
@@ -4568,10 +6136,67 @@ type WallContents = {
|
|
|
4568
6136
|
notifications: WallPost[];
|
|
4569
6137
|
parameters: WallValue;
|
|
4570
6138
|
};
|
|
6139
|
+
type WallAccess = {
|
|
6140
|
+
userName: string | null;
|
|
6141
|
+
granted: boolean;
|
|
6142
|
+
result: string;
|
|
6143
|
+
read: boolean;
|
|
6144
|
+
write: boolean;
|
|
6145
|
+
};
|
|
6146
|
+
type WallPrivacyAnswer = {
|
|
6147
|
+
userName: string | null;
|
|
6148
|
+
setting: number;
|
|
6149
|
+
};
|
|
6150
|
+
type WallPrivacyChange = {
|
|
6151
|
+
setting: number | null;
|
|
6152
|
+
ok: boolean;
|
|
6153
|
+
};
|
|
6154
|
+
type WallParametersChange = {
|
|
6155
|
+
changes: WallValue;
|
|
6156
|
+
ok: boolean;
|
|
6157
|
+
};
|
|
6158
|
+
type WallVisit = {
|
|
6159
|
+
userName: string | null;
|
|
6160
|
+
ok: boolean;
|
|
6161
|
+
};
|
|
6162
|
+
type WallLikes = {
|
|
6163
|
+
count: number;
|
|
6164
|
+
liked: boolean;
|
|
6165
|
+
};
|
|
6166
|
+
type WallLikesEvent = WallLikes & {
|
|
6167
|
+
ownerUuid: string;
|
|
6168
|
+
ok: boolean;
|
|
6169
|
+
};
|
|
6170
|
+
type WallLiked = {
|
|
6171
|
+
ownerUuid: string;
|
|
6172
|
+
ok: boolean;
|
|
6173
|
+
};
|
|
6174
|
+
type WallServiceRequest = {
|
|
6175
|
+
command: string;
|
|
6176
|
+
fields: {
|
|
6177
|
+
[key: string]: WallValue;
|
|
6178
|
+
};
|
|
6179
|
+
};
|
|
4571
6180
|
declare class PlayerWallApi {
|
|
4572
6181
|
private readonly flash;
|
|
6182
|
+
private readonly hooks;
|
|
6183
|
+
private readonly server;
|
|
4573
6184
|
private readonly postsListeners;
|
|
4574
|
-
|
|
6185
|
+
private readonly tokensAsked;
|
|
6186
|
+
private readonly privacyAsked;
|
|
6187
|
+
private readonly privacySet;
|
|
6188
|
+
private readonly parametersSent;
|
|
6189
|
+
private readonly visitsCounted;
|
|
6190
|
+
private readonly likesAsked;
|
|
6191
|
+
private readonly likesGiven;
|
|
6192
|
+
private readonly accessListeners;
|
|
6193
|
+
private readonly privacyListeners;
|
|
6194
|
+
private readonly privacyChangeListeners;
|
|
6195
|
+
private readonly parametersListeners;
|
|
6196
|
+
private readonly visitListeners;
|
|
6197
|
+
private readonly likesListeners;
|
|
6198
|
+
private readonly likedListeners;
|
|
6199
|
+
constructor(game: GameContext, hooks: PhantomFlash);
|
|
4575
6200
|
posts(userName?: string, timeoutMs?: number): Promise<WallContents>;
|
|
4576
6201
|
check(userName?: string, timeoutMs?: number): Promise<WallValue>;
|
|
4577
6202
|
post(userName: string, message: string, options?: WallPostOptions, timeoutMs?: number): Promise<void>;
|
|
@@ -4594,6 +6219,19 @@ declare class PlayerWallApi {
|
|
|
4594
6219
|
isOwnWallOpen(): Promise<boolean>;
|
|
4595
6220
|
openWallOwner(): Promise<string | null>;
|
|
4596
6221
|
onPosts(listener: (wall: WallContents) => void): Unsubscribe;
|
|
6222
|
+
requestPermissions(userName: string, timeoutMs?: number): Promise<WallPermissions>;
|
|
6223
|
+
likes(ownerUuid: string, timeoutMs?: number): Promise<WallLikes>;
|
|
6224
|
+
like(ownerUuid: string, timeoutMs?: number): Promise<boolean>;
|
|
6225
|
+
hasOpenedOwnWall(): Promise<boolean>;
|
|
6226
|
+
hasCountedVisit(userName: string): Promise<boolean>;
|
|
6227
|
+
onAccess(listener: (access: WallAccess) => void): Unsubscribe;
|
|
6228
|
+
onPrivacy(listener: (answer: WallPrivacyAnswer) => void): Unsubscribe;
|
|
6229
|
+
onPrivacyChange(listener: (change: WallPrivacyChange) => void): Unsubscribe;
|
|
6230
|
+
onParametersChange(listener: (change: WallParametersChange) => void): Unsubscribe;
|
|
6231
|
+
onVisitCounted(listener: (visit: WallVisit) => void): Unsubscribe;
|
|
6232
|
+
onLikes(listener: (likes: WallLikesEvent) => void): Unsubscribe;
|
|
6233
|
+
onLiked(listener: (liked: WallLiked) => void): Unsubscribe;
|
|
6234
|
+
onServiceRequest(listener: (request: WallServiceRequest) => void): () => void;
|
|
4597
6235
|
private request;
|
|
4598
6236
|
myPrivacy(): Promise<number | null>;
|
|
4599
6237
|
cached(): Promise<CachedWall>;
|
|
@@ -4655,15 +6293,131 @@ type DisciplineEvent = {
|
|
|
4655
6293
|
disconnects: boolean;
|
|
4656
6294
|
extra: readonly string[];
|
|
4657
6295
|
};
|
|
6296
|
+
type PlayerPrivacy = {
|
|
6297
|
+
den: number;
|
|
6298
|
+
eCards: number;
|
|
6299
|
+
playerWall: number;
|
|
6300
|
+
webPlayerWall: number;
|
|
6301
|
+
};
|
|
6302
|
+
type PlayerState = {
|
|
6303
|
+
userName: string;
|
|
6304
|
+
uuid: string;
|
|
6305
|
+
avatarId: number;
|
|
6306
|
+
accountType: number;
|
|
6307
|
+
member: boolean;
|
|
6308
|
+
moderator: boolean;
|
|
6309
|
+
guide: boolean;
|
|
6310
|
+
silenced: boolean;
|
|
6311
|
+
chat: PlayerChatType;
|
|
6312
|
+
loginCount: number;
|
|
6313
|
+
createdAt: number;
|
|
6314
|
+
worldMapRoom: string;
|
|
6315
|
+
pendingFlags: number;
|
|
6316
|
+
tourDone: boolean;
|
|
6317
|
+
needsFirstAnimal: boolean;
|
|
6318
|
+
privacy: PlayerPrivacy;
|
|
6319
|
+
animalDefsLoaded: boolean;
|
|
6320
|
+
hostingParty: boolean;
|
|
6321
|
+
};
|
|
6322
|
+
type PlayerStateChange = {
|
|
6323
|
+
state: PlayerState;
|
|
6324
|
+
changed: Array<keyof PlayerState>;
|
|
6325
|
+
};
|
|
6326
|
+
type PlayerRecord = {
|
|
6327
|
+
userName: string;
|
|
6328
|
+
uuid: string;
|
|
6329
|
+
accountType: number;
|
|
6330
|
+
member: boolean;
|
|
6331
|
+
guide: boolean;
|
|
6332
|
+
nameApproved: boolean;
|
|
6333
|
+
shownName: string;
|
|
6334
|
+
currentAvatarId: number;
|
|
6335
|
+
avatarIds: number[];
|
|
6336
|
+
daysSinceLastLogin: number;
|
|
6337
|
+
hostingParty: boolean;
|
|
6338
|
+
lastAchievementRequest: number;
|
|
6339
|
+
achievementsByType: Record<number, number>;
|
|
6340
|
+
};
|
|
6341
|
+
type KnownAvatar = {
|
|
6342
|
+
userName: string;
|
|
6343
|
+
perUserAvId: number;
|
|
6344
|
+
avInvId: number;
|
|
6345
|
+
avName: string;
|
|
6346
|
+
avTypeId: number;
|
|
6347
|
+
customAvId: number;
|
|
6348
|
+
colors: number[];
|
|
6349
|
+
enviroType: number;
|
|
6350
|
+
questLevel: number;
|
|
6351
|
+
questXp: number;
|
|
6352
|
+
questHealthPercentage: number;
|
|
6353
|
+
dead: boolean;
|
|
6354
|
+
};
|
|
6355
|
+
type ClothingItem = {
|
|
6356
|
+
invIdx: number;
|
|
6357
|
+
defId: number;
|
|
6358
|
+
name: string;
|
|
6359
|
+
color: number;
|
|
6360
|
+
layerId: number;
|
|
6361
|
+
enviroType: number;
|
|
6362
|
+
membersOnly: boolean;
|
|
6363
|
+
inDenShop: boolean;
|
|
6364
|
+
};
|
|
6365
|
+
type AnimalDefaults = {
|
|
6366
|
+
colors: [
|
|
6367
|
+
number,
|
|
6368
|
+
number,
|
|
6369
|
+
number
|
|
6370
|
+
];
|
|
6371
|
+
eyes: number;
|
|
6372
|
+
enviroTypeFlag: number;
|
|
6373
|
+
};
|
|
6374
|
+
type AnimalKind = {
|
|
6375
|
+
defId: number;
|
|
6376
|
+
titleStrId: number;
|
|
6377
|
+
membersOnly: boolean;
|
|
6378
|
+
enviroTypeFlag: number;
|
|
6379
|
+
defEyes: number;
|
|
6380
|
+
defPattern: number;
|
|
6381
|
+
colors: [
|
|
6382
|
+
number,
|
|
6383
|
+
number,
|
|
6384
|
+
number
|
|
6385
|
+
];
|
|
6386
|
+
custom: {
|
|
6387
|
+
avatarRefId: number;
|
|
6388
|
+
iconRefId: number;
|
|
6389
|
+
particleRefId: number;
|
|
6390
|
+
patternRefIds: number[];
|
|
6391
|
+
} | null;
|
|
6392
|
+
};
|
|
6393
|
+
type DenRoomDefinition = {
|
|
6394
|
+
defId: number;
|
|
6395
|
+
name: string;
|
|
6396
|
+
titleStrId: number;
|
|
6397
|
+
cost: number;
|
|
6398
|
+
enviroType: number;
|
|
6399
|
+
roomDefId: number;
|
|
6400
|
+
status: number;
|
|
6401
|
+
membersOnly: boolean;
|
|
6402
|
+
mediaId: number;
|
|
6403
|
+
mediaIdLarge: number;
|
|
6404
|
+
availabilityStartTime: number;
|
|
6405
|
+
availabilityEndTime: number;
|
|
6406
|
+
};
|
|
6407
|
+
type PartyHosting = {
|
|
6408
|
+
userName: string;
|
|
6409
|
+
secondsLeft: number;
|
|
6410
|
+
};
|
|
4658
6411
|
declare class PlayerApi {
|
|
4659
6412
|
readonly [STATE_FIELDS]: readonly [
|
|
4660
6413
|
"player"
|
|
4661
6414
|
];
|
|
4662
6415
|
private readonly flash;
|
|
6416
|
+
private readonly client;
|
|
4663
6417
|
private readonly server;
|
|
4664
6418
|
private player;
|
|
4665
6419
|
private readonly listeners;
|
|
4666
|
-
constructor(game: GameContext);
|
|
6420
|
+
constructor(game: GameContext, flash: PhantomFlash);
|
|
4667
6421
|
get login(): LoginPlayer | null;
|
|
4668
6422
|
onLogin(listener: (player: LoginPlayer) => void): Unsubscribe;
|
|
4669
6423
|
userName(): Promise<string>;
|
|
@@ -4690,7 +6444,37 @@ declare class PlayerApi {
|
|
|
4690
6444
|
setInvisible(on: boolean, timeoutMs?: number): Promise<boolean>;
|
|
4691
6445
|
discipline(): Promise<PlayerDiscipline>;
|
|
4692
6446
|
onDiscipline(listener: (event: DisciplineEvent) => void): Unsubscribe;
|
|
6447
|
+
onInvisibleChange(listener: (invisible: boolean) => void): Unsubscribe;
|
|
6448
|
+
state(): Promise<PlayerState>;
|
|
6449
|
+
onChange(listener: (change: PlayerStateChange) => void, options?: {
|
|
6450
|
+
everyFrames?: number;
|
|
6451
|
+
}): Unsubscribe;
|
|
6452
|
+
record(userName?: string): Promise<PlayerRecord | null>;
|
|
6453
|
+
avatars(userName?: string): Promise<KnownAvatar[]>;
|
|
6454
|
+
avatarOf(userName: string, perUserAvId?: number): Promise<KnownAvatar | null>;
|
|
6455
|
+
partyTimeLeft(userName?: string): Promise<number>;
|
|
6456
|
+
onPartyHosting(listener: (hosting: PartyHosting) => void): Unsubscribe;
|
|
6457
|
+
onTradeListChange(listener: () => void): Unsubscribe;
|
|
6458
|
+
clothing(options?: {
|
|
6459
|
+
avTypeId?: number;
|
|
6460
|
+
bodyMods?: boolean;
|
|
6461
|
+
}): Promise<ClothingItem[]>;
|
|
6462
|
+
denItemsForRoom(): Promise<DenInventoryItem[]>;
|
|
6463
|
+
petsInDen(world: "land" | "ocean"): Promise<DenInventoryItem[]>;
|
|
6464
|
+
animalKindCount(): Promise<number>;
|
|
6465
|
+
animalDefaults(avTypeId: number): Promise<AnimalDefaults>;
|
|
6466
|
+
customAnimal(customAvId: number): Promise<AnimalKind | null>;
|
|
6467
|
+
customAnimalsOf(avTypeId: number): Promise<AnimalKind[]>;
|
|
6468
|
+
animalOf(userName?: string): Promise<AnimalKind | null>;
|
|
6469
|
+
denRoomDefinitions(): Promise<DenRoomDefinition[]>;
|
|
6470
|
+
denRoomDefinition(defId: number): Promise<DenRoomDefinition | null>;
|
|
6471
|
+
private hear;
|
|
6472
|
+
private stateSources;
|
|
6473
|
+
private recordOf;
|
|
6474
|
+
private avatarHandles;
|
|
6475
|
+
private readCollection;
|
|
4693
6476
|
private userInfo;
|
|
6477
|
+
private playerUserInfo;
|
|
4694
6478
|
}
|
|
4695
6479
|
declare const REPORT_REASONS: {
|
|
4696
6480
|
readonly mean: 1;
|
|
@@ -4712,12 +6496,23 @@ declare const CONTENT_DATA_TYPE: {
|
|
|
4712
6496
|
readonly masterpiece: 8;
|
|
4713
6497
|
};
|
|
4714
6498
|
type ReportedContent = keyof typeof CONTENT_DATA_TYPE;
|
|
6499
|
+
type SentReport = {
|
|
6500
|
+
userName: string;
|
|
6501
|
+
reason: ReportReason | null;
|
|
6502
|
+
reasonId: number;
|
|
6503
|
+
dataType: number | null;
|
|
6504
|
+
data: string | null;
|
|
6505
|
+
};
|
|
4715
6506
|
declare class ReportsApi {
|
|
4716
6507
|
private readonly flash;
|
|
4717
6508
|
private readonly server;
|
|
6509
|
+
private readonly client;
|
|
4718
6510
|
constructor(game: GameContext);
|
|
4719
6511
|
report(userName: string, reason: ReportReason, timeoutMs?: number): Promise<boolean>;
|
|
4720
6512
|
reportContent(userName: string, kind: ReportedContent, reason: ReportReason, data: string, timeoutMs?: number): Promise<boolean>;
|
|
6513
|
+
onReportResult(listener: (taken: boolean) => void): Unsubscribe;
|
|
6514
|
+
onContentReportResult(listener: (taken: boolean) => void): Unsubscribe;
|
|
6515
|
+
onReportSent(listener: (report: SentReport) => void): Unsubscribe;
|
|
4721
6516
|
}
|
|
4722
6517
|
declare const WORLD_ITEM_GIFTS: readonly [
|
|
4723
6518
|
"denItem",
|
|
@@ -4756,6 +6551,25 @@ type WorldItemTaken = {
|
|
|
4756
6551
|
taken: boolean;
|
|
4757
6552
|
balance: number | null;
|
|
4758
6553
|
};
|
|
6554
|
+
type WorldItemTakenEvent = WorldItemTaken & {
|
|
6555
|
+
defId: number | null;
|
|
6556
|
+
};
|
|
6557
|
+
type RoomDarkArea = {
|
|
6558
|
+
x: number;
|
|
6559
|
+
y: number;
|
|
6560
|
+
rotation: number;
|
|
6561
|
+
bounds: {
|
|
6562
|
+
x: number;
|
|
6563
|
+
y: number;
|
|
6564
|
+
width: number;
|
|
6565
|
+
height: number;
|
|
6566
|
+
};
|
|
6567
|
+
};
|
|
6568
|
+
type RoomObjectAt = {
|
|
6569
|
+
name: string;
|
|
6570
|
+
className: string;
|
|
6571
|
+
isJourneyBookItem: boolean;
|
|
6572
|
+
};
|
|
4759
6573
|
type RoomSpawn = {
|
|
4760
6574
|
name: string;
|
|
4761
6575
|
x: number;
|
|
@@ -4874,12 +6688,15 @@ declare class RoomApi {
|
|
|
4874
6688
|
private roomLayout;
|
|
4875
6689
|
private readonly listeners;
|
|
4876
6690
|
private readonly failureListeners;
|
|
6691
|
+
private readonly giftsAsked;
|
|
6692
|
+
private readonly giftListeners;
|
|
4877
6693
|
private readonly server;
|
|
4878
6694
|
private readonly flash;
|
|
4879
6695
|
constructor(game: GameContext);
|
|
4880
6696
|
get current(): RoomInfo | null;
|
|
4881
6697
|
get details(): RoomDetails | null;
|
|
4882
6698
|
get layout(): RoomLayout | null;
|
|
6699
|
+
onLayout(listener: (layout: RoomLayout) => void): () => void;
|
|
4883
6700
|
toScreen(point: {
|
|
4884
6701
|
x: number;
|
|
4885
6702
|
y: number;
|
|
@@ -4896,6 +6713,7 @@ declare class RoomApi {
|
|
|
4896
6713
|
}>;
|
|
4897
6714
|
worldItem(defId: number): Promise<WorldItem | null>;
|
|
4898
6715
|
takeWorldItem(defId: number, options?: WorldItemTakeOptions, timeoutMs?: number): Promise<WorldItemTaken>;
|
|
6716
|
+
onWorldItemTaken(listener: (gift: WorldItemTakenEvent) => void): () => void;
|
|
4899
6717
|
private hasTakenGift;
|
|
4900
6718
|
onJoin(listener: (room: RoomInfo) => void): () => void;
|
|
4901
6719
|
focusCamera(at: {
|
|
@@ -4959,6 +6777,25 @@ declare class RoomApi {
|
|
|
4959
6777
|
setPathDepth(cells: number): Promise<void>;
|
|
4960
6778
|
reload(): Promise<boolean>;
|
|
4961
6779
|
showAvatars(show: boolean): Promise<void>;
|
|
6780
|
+
joiningInvisibly(): Promise<boolean>;
|
|
6781
|
+
darkAreas(): Promise<RoomDarkArea[]>;
|
|
6782
|
+
nearestEmptyCell(point: {
|
|
6783
|
+
x: number;
|
|
6784
|
+
y: number;
|
|
6785
|
+
}): Promise<{
|
|
6786
|
+
x: number;
|
|
6787
|
+
y: number;
|
|
6788
|
+
} | null>;
|
|
6789
|
+
journeyBookItemsLeft(): Promise<number>;
|
|
6790
|
+
objectAt(point: {
|
|
6791
|
+
x: number;
|
|
6792
|
+
y: number;
|
|
6793
|
+
}, options?: {
|
|
6794
|
+
journeyBookOnly?: boolean;
|
|
6795
|
+
}): Promise<RoomObjectAt | null>;
|
|
6796
|
+
setJamaaTime(milliseconds: number): Promise<void>;
|
|
6797
|
+
setDenKickNotice(show: boolean): Promise<void>;
|
|
6798
|
+
private darkArea;
|
|
4962
6799
|
private actors;
|
|
4963
6800
|
private number;
|
|
4964
6801
|
private convert;
|
|
@@ -4991,9 +6828,11 @@ type RoomPlayerView = {
|
|
|
4991
6828
|
declare class RoomPlayers {
|
|
4992
6829
|
readonly [STATE_FIELDS]: readonly [
|
|
4993
6830
|
"byId",
|
|
4994
|
-
"selfId"
|
|
6831
|
+
"selfId",
|
|
6832
|
+
"paths"
|
|
4995
6833
|
];
|
|
4996
6834
|
private readonly byId;
|
|
6835
|
+
private readonly paths;
|
|
4997
6836
|
private readonly enterListeners;
|
|
4998
6837
|
private readonly leaveListeners;
|
|
4999
6838
|
private readonly moveListeners;
|
|
@@ -5008,6 +6847,10 @@ declare class RoomPlayers {
|
|
|
5008
6847
|
onEnter(listener: (player: RoomPlayer) => void): () => void;
|
|
5009
6848
|
onLeave(listener: (player: RoomPlayer) => void): () => void;
|
|
5010
6849
|
onMove(listener: (player: RoomPlayer) => void): () => void;
|
|
6850
|
+
pathOf(userId: number): Array<{
|
|
6851
|
+
x: number;
|
|
6852
|
+
y: number;
|
|
6853
|
+
}> | null;
|
|
5011
6854
|
refresh(): Promise<readonly RoomPlayer[]>;
|
|
5012
6855
|
viewOf(userId: number): Promise<RoomPlayerView | null>;
|
|
5013
6856
|
views(): Promise<RoomPlayerView[]>;
|
|
@@ -5023,9 +6866,15 @@ type ConnectionOutcome = {
|
|
|
5023
6866
|
connected: boolean;
|
|
5024
6867
|
};
|
|
5025
6868
|
declare class SessionApi {
|
|
6869
|
+
readonly [STATE_FIELDS]: readonly [
|
|
6870
|
+
"validated"
|
|
6871
|
+
];
|
|
5026
6872
|
private readonly bridge;
|
|
5027
6873
|
private readonly flash;
|
|
5028
6874
|
private readonly serverSide;
|
|
6875
|
+
private readonly clientSide;
|
|
6876
|
+
private validated;
|
|
6877
|
+
private keepActiveTimer;
|
|
5029
6878
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
5030
6879
|
connected(): Promise<boolean>;
|
|
5031
6880
|
mode(): Promise<ConnectionMode>;
|
|
@@ -5038,6 +6887,18 @@ declare class SessionApi {
|
|
|
5038
6887
|
}): Promise<void>;
|
|
5039
6888
|
requestList(listId: number, timeoutMs?: number): Promise<ShopListFields>;
|
|
5040
6889
|
onList(listener: (list: ShopListFields) => void): Unsubscribe;
|
|
6890
|
+
inMinigame(): Promise<boolean>;
|
|
6891
|
+
settingsUserName(): Promise<string>;
|
|
6892
|
+
sendEmailActivation(email: string, timeoutMs?: number): Promise<boolean>;
|
|
6893
|
+
onEmailActivation(listener: (sent: boolean) => void): Unsubscribe;
|
|
6894
|
+
onEmailActivationRequest(listener: (email: string) => void): Unsubscribe;
|
|
6895
|
+
get emailValidated(): boolean;
|
|
6896
|
+
onEmailValidated(listener: () => void): Unsubscribe;
|
|
6897
|
+
markActive(): Promise<void>;
|
|
6898
|
+
keepActive(): Promise<void>;
|
|
6899
|
+
stopKeepingActive(): Promise<void>;
|
|
6900
|
+
get keepingActive(): boolean;
|
|
6901
|
+
onIdleWarning(listener: () => void): Unsubscribe;
|
|
5041
6902
|
private hookVoid;
|
|
5042
6903
|
}
|
|
5043
6904
|
type ItemDefinition = {
|
|
@@ -5086,6 +6947,21 @@ type ShopListing = {
|
|
|
5086
6947
|
listType: number;
|
|
5087
6948
|
defIds: number[];
|
|
5088
6949
|
};
|
|
6950
|
+
type ItemPictureKind = "clothing" | "den-item";
|
|
6951
|
+
type ItemPictureItem = number | {
|
|
6952
|
+
defId: number;
|
|
6953
|
+
kind?: ItemPictureKind;
|
|
6954
|
+
color?: number;
|
|
6955
|
+
};
|
|
6956
|
+
type ItemPictureOptions = {
|
|
6957
|
+
scale?: number;
|
|
6958
|
+
background?: number | null;
|
|
6959
|
+
maxSize?: number;
|
|
6960
|
+
large?: boolean;
|
|
6961
|
+
version?: number;
|
|
6962
|
+
timeoutMs?: number;
|
|
6963
|
+
cache?: boolean;
|
|
6964
|
+
};
|
|
5089
6965
|
type DenShopOffering = {
|
|
5090
6966
|
shopId: number;
|
|
5091
6967
|
listType: number;
|
|
@@ -5143,6 +7019,7 @@ declare class ShopsApi {
|
|
|
5143
7019
|
private readonly client;
|
|
5144
7020
|
private readonly server;
|
|
5145
7021
|
private readonly lists;
|
|
7022
|
+
private readonly pictures;
|
|
5146
7023
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
5147
7024
|
offering(shopId: number, { refresh, timeoutMs, }?: {
|
|
5148
7025
|
refresh?: boolean;
|
|
@@ -5154,6 +7031,7 @@ declare class ShopsApi {
|
|
|
5154
7031
|
}): Promise<DenShopOffering>;
|
|
5155
7032
|
definition(defId: number): Promise<ItemDefinition | null>;
|
|
5156
7033
|
definitionsReady(): Promise<boolean>;
|
|
7034
|
+
picture(item: ItemPictureItem, options?: ItemPictureOptions): Promise<string>;
|
|
5157
7035
|
isAvailable(window: {
|
|
5158
7036
|
availabilityStartTime: number;
|
|
5159
7037
|
availabilityEndTime: number;
|
|
@@ -5165,6 +7043,10 @@ declare class ShopsApi {
|
|
|
5165
7043
|
}): Promise<DiamondDefinition | null>;
|
|
5166
7044
|
diamondList(defIds: number[]): Promise<DiamondShopList>;
|
|
5167
7045
|
listType(shopId: number): Promise<number | null>;
|
|
7046
|
+
knownShops(): Promise<Array<{
|
|
7047
|
+
shopId: number;
|
|
7048
|
+
listType: number;
|
|
7049
|
+
}>>;
|
|
5168
7050
|
open(shopId: number): Promise<void>;
|
|
5169
7051
|
close(): Promise<void>;
|
|
5170
7052
|
isOpen(): Promise<boolean>;
|
|
@@ -5190,7 +7072,13 @@ declare class ShopsApi {
|
|
|
5190
7072
|
onBuy(listener: (purchase: Purchase) => void): Unsubscribe;
|
|
5191
7073
|
onSell(listener: (sale: Sale) => void): Unsubscribe;
|
|
5192
7074
|
onList(listener: (listing: ShopListing) => void): Unsubscribe;
|
|
7075
|
+
onDiamondBundleBuy(listener: (result: {
|
|
7076
|
+
bought: boolean;
|
|
7077
|
+
balance: number | null;
|
|
7078
|
+
}) => void): Unsubscribe;
|
|
5193
7079
|
private definitionsLoaded;
|
|
7080
|
+
private drawClothing;
|
|
7081
|
+
private drawDenItem;
|
|
5194
7082
|
private listFor;
|
|
5195
7083
|
}
|
|
5196
7084
|
declare const BANKS: {
|
|
@@ -5319,6 +7207,24 @@ type TradeEnd = {
|
|
|
5319
7207
|
userName: string | null;
|
|
5320
7208
|
roomName: string | null;
|
|
5321
7209
|
};
|
|
7210
|
+
type TradeDraftItem = TradeItemRef & {
|
|
7211
|
+
defId: number;
|
|
7212
|
+
};
|
|
7213
|
+
type TradeCounts = {
|
|
7214
|
+
myList: {
|
|
7215
|
+
clothing: number;
|
|
7216
|
+
den: number;
|
|
7217
|
+
pets: number;
|
|
7218
|
+
};
|
|
7219
|
+
draft: {
|
|
7220
|
+
clothing: number;
|
|
7221
|
+
den: number;
|
|
7222
|
+
};
|
|
7223
|
+
};
|
|
7224
|
+
type TradeListEdit = {
|
|
7225
|
+
added: InventoryRef[];
|
|
7226
|
+
removed: InventoryRef[];
|
|
7227
|
+
};
|
|
5322
7228
|
type TradeListing = Omit<PacketOf<typeof TradeList>, "room">;
|
|
5323
7229
|
declare class TradesApi {
|
|
5324
7230
|
readonly [STATE_FIELDS]: readonly [
|
|
@@ -5326,6 +7232,7 @@ declare class TradesApi {
|
|
|
5326
7232
|
];
|
|
5327
7233
|
private readonly flash;
|
|
5328
7234
|
private readonly server;
|
|
7235
|
+
private readonly clientSide;
|
|
5329
7236
|
private pending;
|
|
5330
7237
|
constructor(game: GameContext);
|
|
5331
7238
|
get offer(): TradeOffer | null;
|
|
@@ -5347,6 +7254,11 @@ declare class TradesApi {
|
|
|
5347
7254
|
heldList(): Promise<TradeItemRef[]>;
|
|
5348
7255
|
list(userName: string, timeoutMs?: number): Promise<TradeListing>;
|
|
5349
7256
|
onList(listener: (listing: TradeListing) => void): Unsubscribe;
|
|
7257
|
+
onListChanged(listener: (edit: TradeListEdit) => void): Unsubscribe;
|
|
7258
|
+
offerDraft(): Promise<TradeDraftItem[]>;
|
|
7259
|
+
counts(): Promise<TradeCounts>;
|
|
7260
|
+
listEntry(item: TradeItemRef): Promise<TradeItemRef | null>;
|
|
7261
|
+
private ownCollection;
|
|
5350
7262
|
private comm;
|
|
5351
7263
|
private changeList;
|
|
5352
7264
|
private endInClient;
|
|
@@ -5472,10 +7384,17 @@ type UiOptions = {
|
|
|
5472
7384
|
height?: number;
|
|
5473
7385
|
visible?: boolean;
|
|
5474
7386
|
};
|
|
7387
|
+
type UiReadiness = {
|
|
7388
|
+
art: boolean;
|
|
7389
|
+
palettes: boolean;
|
|
7390
|
+
};
|
|
5475
7391
|
type UiWindow = UiWidget & {
|
|
5476
7392
|
readonly body: OverlayNode;
|
|
5477
7393
|
readonly width: number;
|
|
5478
7394
|
readonly height: number;
|
|
7395
|
+
readonly bodyWidth: number;
|
|
7396
|
+
readonly bodyHeight: number;
|
|
7397
|
+
readonly framed: boolean;
|
|
5479
7398
|
setTitle(title: string): Promise<void>;
|
|
5480
7399
|
onClose(listener: () => void): UiRemove;
|
|
5481
7400
|
onMove(listener: (position: {
|
|
@@ -5599,6 +7518,7 @@ type UiTooltip = UiWidget & {
|
|
|
5599
7518
|
type UiTooltipOptions = UiOptions & {
|
|
5600
7519
|
text?: string;
|
|
5601
7520
|
visible?: boolean;
|
|
7521
|
+
target?: UiWidget | OverlayNode;
|
|
5602
7522
|
};
|
|
5603
7523
|
type UiProgress = UiWidget & {
|
|
5604
7524
|
value(): number;
|
|
@@ -5667,10 +7587,14 @@ declare class UiApi {
|
|
|
5667
7587
|
private symbolMaker;
|
|
5668
7588
|
private gameFont;
|
|
5669
7589
|
private defaultSkin;
|
|
7590
|
+
private readonly known;
|
|
7591
|
+
readyTimeoutMs: number;
|
|
5670
7592
|
readonly popup: UiPopups;
|
|
5671
7593
|
constructor(game: GameContext, flash: PhantomFlash);
|
|
5672
7594
|
get skin(): UiSkin;
|
|
5673
7595
|
set skin(skin: UiSkin);
|
|
7596
|
+
status(): Promise<UiReadiness>;
|
|
7597
|
+
ready(timeoutMs?: number): Promise<UiReadiness>;
|
|
5674
7598
|
theme(skin?: UiSkin): Promise<UiTheme>;
|
|
5675
7599
|
symbols(): Array<[
|
|
5676
7600
|
UiSymbolName,
|
|
@@ -5689,6 +7613,8 @@ declare class UiApi {
|
|
|
5689
7613
|
grid(options: UiGridOptions): Promise<UiGrid>;
|
|
5690
7614
|
scroll(options?: UiScrollOptions): Promise<UiScroll>;
|
|
5691
7615
|
tooltip(options?: UiTooltipOptions): Promise<UiTooltip>;
|
|
7616
|
+
private bubble;
|
|
7617
|
+
private explain;
|
|
5692
7618
|
progress(options?: UiProgressOptions): Promise<UiProgress>;
|
|
5693
7619
|
colors(options?: UiColorsOptions): Promise<UiColors>;
|
|
5694
7620
|
paletteValues(which?: 1 | 2 | "game"): Promise<number[]>;
|
|
@@ -5711,9 +7637,16 @@ declare class UiApi {
|
|
|
5711
7637
|
private placeOf;
|
|
5712
7638
|
private maker;
|
|
5713
7639
|
private nodeObject;
|
|
7640
|
+
private adopt;
|
|
7641
|
+
private waitFor;
|
|
7642
|
+
private artLoaded;
|
|
7643
|
+
private palettesLoaded;
|
|
5714
7644
|
private clientFont;
|
|
5715
7645
|
private frameOnly;
|
|
5716
7646
|
private dressWindow;
|
|
7647
|
+
private frameClose;
|
|
7648
|
+
private boundsOf;
|
|
7649
|
+
private parchmentOf;
|
|
5717
7650
|
private clientTooltip;
|
|
5718
7651
|
private palette;
|
|
5719
7652
|
private clientColorTable;
|
|
@@ -5766,6 +7699,23 @@ type PartyRules = {
|
|
|
5766
7699
|
canSwitchPet: boolean;
|
|
5767
7700
|
};
|
|
5768
7701
|
type PartyHostOutcome = PacketOf<typeof CustomPartyHostResult>;
|
|
7702
|
+
type PartyJoinAnswer = {
|
|
7703
|
+
kind: "party" | "custom";
|
|
7704
|
+
joined: boolean;
|
|
7705
|
+
reason: string | null;
|
|
7706
|
+
extra: readonly string[];
|
|
7707
|
+
};
|
|
7708
|
+
type HostingStatus = {
|
|
7709
|
+
state: "hosting";
|
|
7710
|
+
secondsLeft: number | null;
|
|
7711
|
+
} | {
|
|
7712
|
+
state: "refused";
|
|
7713
|
+
reason: string | null;
|
|
7714
|
+
} | {
|
|
7715
|
+
state: "ended";
|
|
7716
|
+
diamondsRefunded: number;
|
|
7717
|
+
};
|
|
7718
|
+
type PartyMasterpiece = PoolMasterpiece;
|
|
5769
7719
|
type CustomPartyWhereabouts = {
|
|
5770
7720
|
creatorUuid: string;
|
|
5771
7721
|
node: string;
|
|
@@ -5778,11 +7728,23 @@ type GoToPlayerResult = {
|
|
|
5778
7728
|
switchingNode: boolean;
|
|
5779
7729
|
};
|
|
5780
7730
|
declare class WorldApi {
|
|
7731
|
+
readonly [STATE_FIELDS]: readonly [
|
|
7732
|
+
"listedRooms",
|
|
7733
|
+
"loginKey",
|
|
7734
|
+
"hopHost",
|
|
7735
|
+
"partyJoin",
|
|
7736
|
+
"hostingStatus"
|
|
7737
|
+
];
|
|
5781
7738
|
private readonly partyFailureListeners;
|
|
5782
7739
|
private readonly partyListListeners;
|
|
5783
7740
|
private readonly partyNodeListeners;
|
|
5784
7741
|
private readonly flash;
|
|
5785
7742
|
private readonly server;
|
|
7743
|
+
private readonly listedRooms;
|
|
7744
|
+
private loginKey;
|
|
7745
|
+
private hopHost;
|
|
7746
|
+
private partyJoin;
|
|
7747
|
+
private hostingStatus;
|
|
5786
7748
|
constructor(game: GameContext);
|
|
5787
7749
|
serverNode(): Promise<ServerNode>;
|
|
5788
7750
|
shardId(): Promise<number>;
|
|
@@ -5803,7 +7765,9 @@ declare class WorldApi {
|
|
|
5803
7765
|
onParties(listener: (parties: ScheduledParty[]) => void): () => void;
|
|
5804
7766
|
onPartyNode(listener: (node: PacketOf<typeof CustomPartyNode>) => void): () => void;
|
|
5805
7767
|
partyDefinition(defId: number): Promise<PartyDefinition | null>;
|
|
7768
|
+
partyDefinitions(): Promise<PartyDefinition[]>;
|
|
5806
7769
|
partyRules(): Promise<PartyRules>;
|
|
7770
|
+
canUseAvatarHere(perUserAvId: number): Promise<boolean>;
|
|
5807
7771
|
shardName(shardId: number): Promise<string>;
|
|
5808
7772
|
hostParty(partyDefId: number, nameStrIds: readonly [
|
|
5809
7773
|
number,
|
|
@@ -5813,11 +7777,441 @@ declare class WorldApi {
|
|
|
5813
7777
|
onHostingEnded(listener: (ended: PacketOf<typeof CustomPartyKilled>) => void): () => void;
|
|
5814
7778
|
partyNode(creatorUuid: string, timeoutMs?: number): Promise<CustomPartyWhereabouts | null>;
|
|
5815
7779
|
hostingTimeLeft(creatorUuid: string, userName?: string, timeoutMs?: number): Promise<number>;
|
|
7780
|
+
onHostingTimeLeft(listener: (secondsLeft: number) => void): () => void;
|
|
5816
7781
|
showParties(open?: boolean): Promise<void>;
|
|
5817
7782
|
onRoomList(listener: (rooms: readonly ListedRoom[]) => void): () => void;
|
|
5818
7783
|
onRandomKey(listener: (key: string) => void): () => void;
|
|
7784
|
+
get rooms(): readonly ListedRoom[];
|
|
7785
|
+
get randomKey(): string | null;
|
|
7786
|
+
get lastNodeHop(): string | null;
|
|
7787
|
+
get lastPartyJoin(): PartyJoinAnswer | null;
|
|
7788
|
+
get hosting(): HostingStatus | null;
|
|
7789
|
+
onHostResult(listener: (outcome: PartyHostOutcome) => void): () => void;
|
|
7790
|
+
onCustomParties(listener: (parties: CustomParty[]) => void): () => void;
|
|
7791
|
+
onShards(listener: (nodes: ShardNode[]) => void): () => void;
|
|
7792
|
+
partyMasterpieces(timeoutMs?: number): Promise<PartyMasterpiece[]>;
|
|
7793
|
+
onPartyMasterpieces(listener: (pool: PartyMasterpiece[]) => void): () => void;
|
|
7794
|
+
requestFirstFiveMinutesRoom(timeoutMs?: number): Promise<boolean>;
|
|
7795
|
+
onFirstFiveMinutesRoom(listener: (ready: boolean) => void): () => void;
|
|
7796
|
+
joinNamedRoom(roomName: string): Promise<void>;
|
|
7797
|
+
roomDefinitions(): Promise<RoomDefinition[]>;
|
|
5819
7798
|
private partyFailed;
|
|
5820
7799
|
}
|
|
7800
|
+
type JourneyBookCounts = {
|
|
7801
|
+
unseenPages: number;
|
|
7802
|
+
unclaimedGifts: number;
|
|
7803
|
+
};
|
|
7804
|
+
declare class JourneyBookApi {
|
|
7805
|
+
private readonly flash;
|
|
7806
|
+
private readonly client;
|
|
7807
|
+
constructor(game: GameContext, flash: PhantomFlash);
|
|
7808
|
+
counts(): Promise<JourneyBookCounts>;
|
|
7809
|
+
unseenPages(): Promise<number>;
|
|
7810
|
+
unclaimedGifts(): Promise<number>;
|
|
7811
|
+
open(factDefId?: number): Promise<void>;
|
|
7812
|
+
onChange(listener: (counts: JourneyBookCounts) => void): Unsubscribe;
|
|
7813
|
+
}
|
|
7814
|
+
type ReferralCodeInfo = {
|
|
7815
|
+
code: string;
|
|
7816
|
+
link: string;
|
|
7817
|
+
};
|
|
7818
|
+
type ReferredPlayer = Referral & {
|
|
7819
|
+
member: boolean;
|
|
7820
|
+
};
|
|
7821
|
+
type ReferralPage = {
|
|
7822
|
+
referrals: ReferredPlayer[];
|
|
7823
|
+
more: boolean;
|
|
7824
|
+
status: number;
|
|
7825
|
+
};
|
|
7826
|
+
type ReferrerOutcome = "recorded" | "refused" | "failed";
|
|
7827
|
+
declare class ReferralsApi {
|
|
7828
|
+
readonly [STATE_FIELDS]: readonly [
|
|
7829
|
+
"heardCode"
|
|
7830
|
+
];
|
|
7831
|
+
private readonly flash;
|
|
7832
|
+
private readonly server;
|
|
7833
|
+
private heardCode;
|
|
7834
|
+
constructor(game: GameContext);
|
|
7835
|
+
get code(): string | null;
|
|
7836
|
+
fetchCode(timeoutMs?: number): Promise<ReferralCodeInfo>;
|
|
7837
|
+
clientCode(): Promise<string | null>;
|
|
7838
|
+
hasReferrer(timeoutMs?: number): Promise<boolean>;
|
|
7839
|
+
nameReferrer(userName: string, timeoutMs?: number): Promise<ReferrerOutcome>;
|
|
7840
|
+
list(options?: {
|
|
7841
|
+
page?: number;
|
|
7842
|
+
pageSize?: number;
|
|
7843
|
+
timeoutMs?: number;
|
|
7844
|
+
}): Promise<ReferralPage>;
|
|
7845
|
+
onCode(listener: (code: ReferralCodeInfo | null) => void): Unsubscribe;
|
|
7846
|
+
onHasReferrer(listener: (hasReferrer: boolean) => void): Unsubscribe;
|
|
7847
|
+
onReferrerNamed(listener: (outcome: ReferrerOutcome) => void): Unsubscribe;
|
|
7848
|
+
onList(listener: (page: ReferralPage) => void): Unsubscribe;
|
|
7849
|
+
}
|
|
7850
|
+
type ShortcutOptions = {
|
|
7851
|
+
release?: boolean;
|
|
7852
|
+
repeat?: boolean;
|
|
7853
|
+
consume?: boolean;
|
|
7854
|
+
anyModifiers?: boolean;
|
|
7855
|
+
};
|
|
7856
|
+
type Shortcut = Required<ShortcutOptions> & {
|
|
7857
|
+
shortcut: string;
|
|
7858
|
+
};
|
|
7859
|
+
type ShortcutPress = {
|
|
7860
|
+
shortcut: string;
|
|
7861
|
+
phase: "down" | "up";
|
|
7862
|
+
code: number;
|
|
7863
|
+
ctrl: boolean;
|
|
7864
|
+
shift: boolean;
|
|
7865
|
+
alt: boolean;
|
|
7866
|
+
consumed: boolean;
|
|
7867
|
+
};
|
|
7868
|
+
declare class InputApi {
|
|
7869
|
+
private readonly flash;
|
|
7870
|
+
private readonly bindings;
|
|
7871
|
+
private readonly listeners;
|
|
7872
|
+
private readonly held;
|
|
7873
|
+
constructor(game: GameContext);
|
|
7874
|
+
bind(shortcut: string, options?: ShortcutOptions): Promise<Shortcut>;
|
|
7875
|
+
unbind(shortcut: string): Promise<boolean>;
|
|
7876
|
+
get bound(): Shortcut[];
|
|
7877
|
+
onShortcut(listener: (press: ShortcutPress) => void): Unsubscribe;
|
|
7878
|
+
private listen;
|
|
7879
|
+
private tell;
|
|
7880
|
+
}
|
|
7881
|
+
type ViewState = {
|
|
7882
|
+
zoom: number | null;
|
|
7883
|
+
zoomChanged: boolean;
|
|
7884
|
+
interfaceShown: boolean;
|
|
7885
|
+
ownAvatarShown: boolean;
|
|
7886
|
+
ownNameTagShown: boolean;
|
|
7887
|
+
};
|
|
7888
|
+
declare class ViewApi {
|
|
7889
|
+
private readonly bridge;
|
|
7890
|
+
private readonly flash;
|
|
7891
|
+
private readonly hidden;
|
|
7892
|
+
private readonly listeners;
|
|
7893
|
+
private natural;
|
|
7894
|
+
private following;
|
|
7895
|
+
private zoomHooks;
|
|
7896
|
+
private last;
|
|
7897
|
+
constructor(game: GameContext, flash: PhantomFlash);
|
|
7898
|
+
state(): Promise<ViewState>;
|
|
7899
|
+
zoom(): Promise<number | null>;
|
|
7900
|
+
get zoomLimits(): {
|
|
7901
|
+
min: number;
|
|
7902
|
+
max: number;
|
|
7903
|
+
};
|
|
7904
|
+
setZoom(percent: number): Promise<number | null>;
|
|
7905
|
+
resetZoom(): Promise<number | null>;
|
|
7906
|
+
showInterface(show: boolean): Promise<boolean>;
|
|
7907
|
+
showOwnAvatar(show: boolean): Promise<boolean>;
|
|
7908
|
+
showOwnNameTag(show: boolean): Promise<boolean>;
|
|
7909
|
+
onChange(listener: (state: ViewState) => void): Unsubscribe;
|
|
7910
|
+
private set;
|
|
7911
|
+
private hide;
|
|
7912
|
+
private follow;
|
|
7913
|
+
private hideAgain;
|
|
7914
|
+
private stopFollowing;
|
|
7915
|
+
private hookZoom;
|
|
7916
|
+
private changed;
|
|
7917
|
+
}
|
|
7918
|
+
type LookItem = {
|
|
7919
|
+
defId: number;
|
|
7920
|
+
color: number;
|
|
7921
|
+
};
|
|
7922
|
+
type Look = {
|
|
7923
|
+
avTypeId: number;
|
|
7924
|
+
colors: Record<AvatarColorPart, number>;
|
|
7925
|
+
eyes: number;
|
|
7926
|
+
pattern: number;
|
|
7927
|
+
items: LookItem[];
|
|
7928
|
+
};
|
|
7929
|
+
type LookItemPlan = {
|
|
7930
|
+
item: LookItem;
|
|
7931
|
+
invId: number | null;
|
|
7932
|
+
status: "worn" | "put-on" | "other-colour" | "not-owned" | "not-wearable";
|
|
7933
|
+
};
|
|
7934
|
+
type LookPlan = {
|
|
7935
|
+
items: LookItemPlan[];
|
|
7936
|
+
eyes: "same" | "change" | "not-wearable";
|
|
7937
|
+
pattern: "same" | "change" | "not-wearable";
|
|
7938
|
+
wear: number[];
|
|
7939
|
+
remove: number[];
|
|
7940
|
+
colors: AvatarColors | null;
|
|
7941
|
+
};
|
|
7942
|
+
type LookOptions = {
|
|
7943
|
+
replace?: boolean;
|
|
7944
|
+
otherColours?: boolean;
|
|
7945
|
+
keepColors?: boolean;
|
|
7946
|
+
};
|
|
7947
|
+
type LookResult = {
|
|
7948
|
+
plan: LookPlan;
|
|
7949
|
+
items: boolean | null;
|
|
7950
|
+
colors: boolean | null;
|
|
7951
|
+
};
|
|
7952
|
+
type LookChange = {
|
|
7953
|
+
kind: "clothing";
|
|
7954
|
+
userName: string;
|
|
7955
|
+
perUserAvId: number;
|
|
7956
|
+
added: number[];
|
|
7957
|
+
removed: number[];
|
|
7958
|
+
} | {
|
|
7959
|
+
kind: "colors";
|
|
7960
|
+
success: boolean;
|
|
7961
|
+
};
|
|
7962
|
+
declare class LooksApi {
|
|
7963
|
+
private readonly areas;
|
|
7964
|
+
private readonly flash;
|
|
7965
|
+
private readonly server;
|
|
7966
|
+
constructor(game: GameContext, areas: () => {
|
|
7967
|
+
avatar: AvatarApi;
|
|
7968
|
+
inventory: InventoryApi;
|
|
7969
|
+
});
|
|
7970
|
+
private get avatar();
|
|
7971
|
+
private get inventory();
|
|
7972
|
+
current(): Promise<Look>;
|
|
7973
|
+
of(userName: string): Promise<Look | null>;
|
|
7974
|
+
plan(look: Look, options?: LookOptions): Promise<LookPlan>;
|
|
7975
|
+
putOn(look: Look, options?: LookOptions): Promise<LookResult>;
|
|
7976
|
+
onChange(listener: (change: LookChange) => void): () => void;
|
|
7977
|
+
private player;
|
|
7978
|
+
private holding;
|
|
7979
|
+
}
|
|
7980
|
+
type ArtImage = {
|
|
7981
|
+
width: number;
|
|
7982
|
+
height: number;
|
|
7983
|
+
data: ArrayLike<number>;
|
|
7984
|
+
};
|
|
7985
|
+
type ArtPictureInput = ArtImage | Uint8Array | ArrayBuffer | string;
|
|
7986
|
+
type ArtFit = "contain" | "cover" | "stretch";
|
|
7987
|
+
type ArtPlanOptions = {
|
|
7988
|
+
colors?: number;
|
|
7989
|
+
palette?: readonly number[];
|
|
7990
|
+
dither?: boolean;
|
|
7991
|
+
fit?: ArtFit;
|
|
7992
|
+
background?: number;
|
|
7993
|
+
};
|
|
7994
|
+
type ArtPaintingPlan = {
|
|
7995
|
+
columns: number;
|
|
7996
|
+
rows: number;
|
|
7997
|
+
cellSize: number;
|
|
7998
|
+
palette: number[];
|
|
7999
|
+
cells: Uint16Array;
|
|
8000
|
+
preview: {
|
|
8001
|
+
width: number;
|
|
8002
|
+
height: number;
|
|
8003
|
+
data: Uint8ClampedArray;
|
|
8004
|
+
};
|
|
8005
|
+
runs: ArtRun[][];
|
|
8006
|
+
};
|
|
8007
|
+
type ArtRun = {
|
|
8008
|
+
row: number;
|
|
8009
|
+
from: number;
|
|
8010
|
+
to: number;
|
|
8011
|
+
};
|
|
8012
|
+
type CanvasPoint = {
|
|
8013
|
+
x: number;
|
|
8014
|
+
y: number;
|
|
8015
|
+
};
|
|
8016
|
+
type CanvasShape = "line" | "rectangle" | "ellipse" | "triangle";
|
|
8017
|
+
declare const SWF_NAMES: {
|
|
8018
|
+
readonly painting: "ArtStudioPainting";
|
|
8019
|
+
readonly grid: "ArtStudioGridDrawing";
|
|
8020
|
+
readonly pottery: "ArtStudioPottery";
|
|
8021
|
+
readonly print: "ArtStudioPrint";
|
|
8022
|
+
};
|
|
8023
|
+
type ArtStudioKind = keyof typeof SWF_NAMES;
|
|
8024
|
+
type ArtCanvasKind = "painting" | "grid";
|
|
8025
|
+
type ArtStudioTool = "brush" | "line" | "airbrush" | "rectangle" | "fill" | "ellipse" | "smudge" | "triangle" | "pencil";
|
|
8026
|
+
type ArtPaintSpeed = "instant" | "fast" | "steady" | "slow";
|
|
8027
|
+
type ArtCanvasState = {
|
|
8028
|
+
kind: ArtCanvasKind;
|
|
8029
|
+
ready: boolean;
|
|
8030
|
+
width: number;
|
|
8031
|
+
height: number;
|
|
8032
|
+
tool: ArtStudioTool | null;
|
|
8033
|
+
brushSize: number;
|
|
8034
|
+
brushWidth: number;
|
|
8035
|
+
cellSize: number | null;
|
|
8036
|
+
color: number;
|
|
8037
|
+
hasDrawn: boolean;
|
|
8038
|
+
needsSave: boolean;
|
|
8039
|
+
undoable: boolean;
|
|
8040
|
+
};
|
|
8041
|
+
type ArtPotteryState = {
|
|
8042
|
+
kind: "pottery";
|
|
8043
|
+
ready: boolean;
|
|
8044
|
+
design: number;
|
|
8045
|
+
designs: number;
|
|
8046
|
+
colouring: boolean;
|
|
8047
|
+
};
|
|
8048
|
+
type ArtPrintState = {
|
|
8049
|
+
kind: "print";
|
|
8050
|
+
ready: boolean;
|
|
8051
|
+
picture: number;
|
|
8052
|
+
pictures: number;
|
|
8053
|
+
loading: boolean;
|
|
8054
|
+
};
|
|
8055
|
+
type ArtStudioState = ArtCanvasState | ArtPotteryState | ArtPrintState;
|
|
8056
|
+
type ArtStudioPalette = {
|
|
8057
|
+
kind: ArtCanvasKind;
|
|
8058
|
+
brushWidths: number[];
|
|
8059
|
+
swatches: number[];
|
|
8060
|
+
anyColor: boolean;
|
|
8061
|
+
};
|
|
8062
|
+
type ArtStroke = {
|
|
8063
|
+
kind: ArtCanvasKind;
|
|
8064
|
+
tool: ArtStudioTool | null;
|
|
8065
|
+
color: number;
|
|
8066
|
+
brushSize: number;
|
|
8067
|
+
by: "player" | "plugin";
|
|
8068
|
+
};
|
|
8069
|
+
type ArtToolChange = {
|
|
8070
|
+
kind: ArtCanvasKind | null;
|
|
8071
|
+
tool: ArtStudioTool | null;
|
|
8072
|
+
brushSize: number;
|
|
8073
|
+
};
|
|
8074
|
+
type ArtColorChange = {
|
|
8075
|
+
kind: ArtCanvasKind | null;
|
|
8076
|
+
color: number;
|
|
8077
|
+
};
|
|
8078
|
+
type ArtSubmitTarget = "animal-jam" | "masterpiece";
|
|
8079
|
+
type ArtSubmitStart = {
|
|
8080
|
+
kind: ArtCanvasKind;
|
|
8081
|
+
target: ArtSubmitTarget;
|
|
8082
|
+
};
|
|
8083
|
+
type ArtSubmitResult = {
|
|
8084
|
+
kind: ArtCanvasKind;
|
|
8085
|
+
target: ArtSubmitTarget;
|
|
8086
|
+
ok: boolean;
|
|
8087
|
+
masterpieceId: string | null;
|
|
8088
|
+
refused: boolean;
|
|
8089
|
+
};
|
|
8090
|
+
type ArtMasterpieceBought = {
|
|
8091
|
+
kind: ArtCanvasKind;
|
|
8092
|
+
ok: boolean;
|
|
8093
|
+
diamonds: number;
|
|
8094
|
+
denItemInvId: number;
|
|
8095
|
+
};
|
|
8096
|
+
type ArtBrowsed = {
|
|
8097
|
+
kind: "pottery" | "print";
|
|
8098
|
+
index: number;
|
|
8099
|
+
count: number;
|
|
8100
|
+
};
|
|
8101
|
+
type ArtPaintOptions = ArtPlanOptions & {
|
|
8102
|
+
brushSize?: number;
|
|
8103
|
+
speed?: ArtPaintSpeed;
|
|
8104
|
+
clearFirst?: boolean;
|
|
8105
|
+
};
|
|
8106
|
+
type ArtPaintProgress = {
|
|
8107
|
+
color: number;
|
|
8108
|
+
colors: number;
|
|
8109
|
+
strokes: number;
|
|
8110
|
+
totalStrokes: number;
|
|
8111
|
+
};
|
|
8112
|
+
type ArtPaintResult = ArtPaintProgress & {
|
|
8113
|
+
completed: boolean;
|
|
8114
|
+
error: string | null;
|
|
8115
|
+
};
|
|
8116
|
+
type ArtPaintStart = {
|
|
8117
|
+
columns: number;
|
|
8118
|
+
rows: number;
|
|
8119
|
+
cellSize: number;
|
|
8120
|
+
colors: number;
|
|
8121
|
+
totalStrokes: number;
|
|
8122
|
+
};
|
|
8123
|
+
declare class ArtStudioApi {
|
|
8124
|
+
private readonly flash;
|
|
8125
|
+
private readonly client;
|
|
8126
|
+
private job;
|
|
8127
|
+
private finished;
|
|
8128
|
+
private readonly strokeListeners;
|
|
8129
|
+
private readonly progressListeners;
|
|
8130
|
+
private readonly doneListeners;
|
|
8131
|
+
constructor(game: GameContext, flash: PhantomFlash);
|
|
8132
|
+
isOpen(): Promise<boolean>;
|
|
8133
|
+
current(): Promise<ArtStudioKind | null>;
|
|
8134
|
+
state(): Promise<ArtStudioState | null>;
|
|
8135
|
+
palette(): Promise<ArtStudioPalette | null>;
|
|
8136
|
+
picture(options?: {
|
|
8137
|
+
scale?: number;
|
|
8138
|
+
maxSize?: number;
|
|
8139
|
+
}): Promise<string | null>;
|
|
8140
|
+
open(kind: ArtStudioKind, options?: {
|
|
8141
|
+
gameDefId?: number;
|
|
8142
|
+
}): Promise<void>;
|
|
8143
|
+
close(options?: {
|
|
8144
|
+
confirm?: boolean;
|
|
8145
|
+
}): Promise<boolean>;
|
|
8146
|
+
setTool(tool: ArtStudioTool): Promise<void>;
|
|
8147
|
+
setBrushSize(size: number): Promise<void>;
|
|
8148
|
+
setColor(color: number): Promise<void>;
|
|
8149
|
+
stroke(points: readonly CanvasPoint[], options?: {
|
|
8150
|
+
tool?: "brush" | "airbrush";
|
|
8151
|
+
color?: number;
|
|
8152
|
+
size?: number;
|
|
8153
|
+
}): Promise<number>;
|
|
8154
|
+
shape(shape: CanvasShape, from: CanvasPoint, to: CanvasPoint, options?: {
|
|
8155
|
+
color?: number;
|
|
8156
|
+
size?: number;
|
|
8157
|
+
}): Promise<void>;
|
|
8158
|
+
fill(point: CanvasPoint, options?: {
|
|
8159
|
+
color?: number;
|
|
8160
|
+
}): Promise<void>;
|
|
8161
|
+
setCells(cells: ReadonlyArray<{
|
|
8162
|
+
column: number;
|
|
8163
|
+
row: number;
|
|
8164
|
+
color: number;
|
|
8165
|
+
}>): Promise<number>;
|
|
8166
|
+
clear(options?: {
|
|
8167
|
+
confirm?: boolean;
|
|
8168
|
+
}): Promise<void>;
|
|
8169
|
+
undo(): Promise<void>;
|
|
8170
|
+
planPainting(image: ArtPictureInput, options?: ArtPaintOptions & {
|
|
8171
|
+
canvas?: {
|
|
8172
|
+
width: number;
|
|
8173
|
+
height: number;
|
|
8174
|
+
cellSize?: number;
|
|
8175
|
+
};
|
|
8176
|
+
}): Promise<ArtPaintingPlan>;
|
|
8177
|
+
paintImage(image: ArtPictureInput, options?: ArtPaintOptions): Promise<ArtPaintResult>;
|
|
8178
|
+
startPainting(image: ArtPictureInput, options?: ArtPaintOptions): Promise<ArtPaintStart>;
|
|
8179
|
+
stopPainting(): Promise<ArtPaintResult | null>;
|
|
8180
|
+
painting(): ArtPaintProgress | null;
|
|
8181
|
+
submit(options?: {
|
|
8182
|
+
confirm?: boolean;
|
|
8183
|
+
}): Promise<boolean>;
|
|
8184
|
+
createMasterpiece(): Promise<boolean>;
|
|
8185
|
+
openStorage(): Promise<void>;
|
|
8186
|
+
print(): Promise<boolean>;
|
|
8187
|
+
browse(step: number): Promise<boolean>;
|
|
8188
|
+
startColouring(): Promise<boolean>;
|
|
8189
|
+
onOpen(listener: (kind: ArtStudioKind) => void): Unsubscribe;
|
|
8190
|
+
onClose(listener: (kind: ArtStudioKind) => void): Unsubscribe;
|
|
8191
|
+
onStroke(listener: (stroke: ArtStroke) => void): Unsubscribe;
|
|
8192
|
+
onToolChange(listener: (change: ArtToolChange) => void): Unsubscribe;
|
|
8193
|
+
onColorChange(listener: (change: ArtColorChange) => void): Unsubscribe;
|
|
8194
|
+
onClear(listener: (kind: ArtCanvasKind) => void): Unsubscribe;
|
|
8195
|
+
onSubmit(listener: (start: ArtSubmitStart) => void): Unsubscribe;
|
|
8196
|
+
onSubmitted(listener: (result: ArtSubmitResult) => void): Unsubscribe;
|
|
8197
|
+
onMasterpieceBought(listener: (bought: ArtMasterpieceBought) => void): Unsubscribe;
|
|
8198
|
+
onSaved(listener: (kind: ArtCanvasKind) => void): Unsubscribe;
|
|
8199
|
+
onBrowse(listener: (browsed: ArtBrowsed) => void): Unsubscribe;
|
|
8200
|
+
onPaintProgress(listener: (progress: ArtPaintProgress) => void): Unsubscribe;
|
|
8201
|
+
onPaintDone(listener: (result: ArtPaintResult) => void): Unsubscribe;
|
|
8202
|
+
private openStudio;
|
|
8203
|
+
private canvas;
|
|
8204
|
+
private read;
|
|
8205
|
+
private gameDefIdOf;
|
|
8206
|
+
private brushSizeOf;
|
|
8207
|
+
private cellSizeFor;
|
|
8208
|
+
private paint;
|
|
8209
|
+
private tellStroke;
|
|
8210
|
+
private tell;
|
|
8211
|
+
private hear;
|
|
8212
|
+
private follow;
|
|
8213
|
+
private manager;
|
|
8214
|
+
}
|
|
5821
8215
|
type Phantom = {
|
|
5822
8216
|
readonly avatar: AvatarApi;
|
|
5823
8217
|
readonly player: PlayerApi;
|
|
@@ -5838,6 +8232,7 @@ type Phantom = {
|
|
|
5838
8232
|
readonly adventures: AdventuresApi;
|
|
5839
8233
|
readonly minigames: MinigamesApi;
|
|
5840
8234
|
readonly achievements: AchievementsApi;
|
|
8235
|
+
readonly membership: MembershipApi;
|
|
5841
8236
|
readonly currency: CurrencyApi;
|
|
5842
8237
|
readonly dailyGift: DailyGiftApi;
|
|
5843
8238
|
readonly sound: SoundApi;
|
|
@@ -5853,6 +8248,14 @@ type Phantom = {
|
|
|
5853
8248
|
readonly localization: LocalizationApi;
|
|
5854
8249
|
readonly ui: UiApi;
|
|
5855
8250
|
readonly community: CommunityApi;
|
|
8251
|
+
readonly customRooms: CustomRoomsApi;
|
|
8252
|
+
readonly realtime: RealtimeApi;
|
|
8253
|
+
readonly journeyBook: JourneyBookApi;
|
|
8254
|
+
readonly referrals: ReferralsApi;
|
|
8255
|
+
readonly input: InputApi;
|
|
8256
|
+
readonly view: ViewApi;
|
|
8257
|
+
readonly looks: LooksApi;
|
|
8258
|
+
readonly artStudio: ArtStudioApi;
|
|
5856
8259
|
readonly server: Side;
|
|
5857
8260
|
readonly client: Side;
|
|
5858
8261
|
readonly flash: PhantomFlash;
|
|
@@ -6031,7 +8434,8 @@ declare const NOT_FOR_PLUGINS: readonly [
|
|
|
6031
8434
|
"avatar.view",
|
|
6032
8435
|
"adventures.record",
|
|
6033
8436
|
"content.replaceOnScreen",
|
|
6034
|
-
"content.load"
|
|
8437
|
+
"content.load",
|
|
8438
|
+
"realtime.join"
|
|
6035
8439
|
];
|
|
6036
8440
|
type SdkPath = Exclude<SdkPathOfSdk, (typeof NOT_FOR_PLUGINS)[number]>;
|
|
6037
8441
|
type RemoteMember<Member> = Member extends (...args: infer Args) => infer Result ? Result extends Unsubscribe ? (...args: Args) => Unsubscribe : (...args: Args) => Promise<Awaited<Result>> : () => Promise<Member>;
|
|
@@ -6091,7 +8495,7 @@ type PluginContext = {
|
|
|
6091
8495
|
openUrl(url: string): Promise<void>;
|
|
6092
8496
|
log(...values: unknown[]): void;
|
|
6093
8497
|
};
|
|
6094
|
-
type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui"> & {
|
|
8498
|
+
type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui" | "realtime"> & {
|
|
6095
8499
|
readonly avatar: RemoteSdk["avatar"] & {
|
|
6096
8500
|
view(): Promise<FlashHandle>;
|
|
6097
8501
|
};
|
|
@@ -6099,6 +8503,9 @@ type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui">
|
|
|
6099
8503
|
record(): AdventureRecorder;
|
|
6100
8504
|
};
|
|
6101
8505
|
readonly content: RemoteSdk["content"] & Pick<ContentApi, "load" | "replaceOnScreen">;
|
|
8506
|
+
readonly realtime: RemoteSdk["realtime"] & {
|
|
8507
|
+
join<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject>(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions<Presence>): Promise<RealtimeChannel<Data, State, Presence>>;
|
|
8508
|
+
};
|
|
6102
8509
|
readonly ui: UiApi;
|
|
6103
8510
|
readonly recipes: PluginRecipes;
|
|
6104
8511
|
readonly id: string;
|
|
@@ -6135,37 +8542,37 @@ declare function usePhantom(id?: string): PluginPhantom;
|
|
|
6135
8542
|
declare function useGames(): ComputedRef<readonly PluginGameView[]>;
|
|
6136
8543
|
declare function usePreferences(): ComputedRef<Readonly<Record<string, PreferenceValue>>>;
|
|
6137
8544
|
declare function useThemeMode(): ComputedRef<"light" | "dark">;
|
|
6138
|
-
type __VLS_Props$
|
|
8545
|
+
type __VLS_Props$b = {
|
|
6139
8546
|
name: string;
|
|
6140
8547
|
imageUrl?: string | null | undefined;
|
|
6141
8548
|
size?: "sm" | "md" | "lg" | "xl";
|
|
6142
8549
|
};
|
|
6143
|
-
declare const __VLS_export$
|
|
8550
|
+
declare const __VLS_export$e: vue.DefineComponent<__VLS_Props$b, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$b> & Readonly<{}>, {
|
|
6144
8551
|
size: "sm" | "md" | "lg" | "xl";
|
|
6145
8552
|
imageUrl: string | null | undefined;
|
|
6146
8553
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6147
|
-
declare const _default$
|
|
8554
|
+
declare const _default$e: typeof __VLS_export$e;
|
|
6148
8555
|
type BadgeTone = "neutral" | "success" | "warning" | "danger" | "info";
|
|
6149
8556
|
type BadgeHue = "blue" | "violet" | "aqua" | "orange" | "magenta";
|
|
6150
|
-
type __VLS_Props$
|
|
8557
|
+
type __VLS_Props$a = {
|
|
6151
8558
|
tone?: BadgeTone | BadgeHue;
|
|
6152
8559
|
dot?: boolean;
|
|
6153
8560
|
size?: "sm" | "md";
|
|
6154
8561
|
quiet?: boolean;
|
|
6155
8562
|
};
|
|
6156
8563
|
declare var __VLS_1$1: {};
|
|
6157
|
-
type __VLS_Slots$
|
|
8564
|
+
type __VLS_Slots$6 = {} & {
|
|
6158
8565
|
default?: (props: typeof __VLS_1$1) => any;
|
|
6159
8566
|
};
|
|
6160
|
-
declare const __VLS_base$
|
|
8567
|
+
declare const __VLS_base$6: vue.DefineComponent<__VLS_Props$a, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$a> & Readonly<{}>, {
|
|
6161
8568
|
size: "sm" | "md";
|
|
6162
8569
|
tone: BadgeTone | BadgeHue;
|
|
6163
8570
|
dot: boolean;
|
|
6164
8571
|
quiet: boolean;
|
|
6165
8572
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6166
|
-
declare const __VLS_export$
|
|
6167
|
-
declare const _default$
|
|
6168
|
-
type __VLS_WithSlots$
|
|
8573
|
+
declare const __VLS_export$d: __VLS_WithSlots$7<typeof __VLS_base$6, __VLS_Slots$6>;
|
|
8574
|
+
declare const _default$d: typeof __VLS_export$d;
|
|
8575
|
+
type __VLS_WithSlots$7<T, S> = T & {
|
|
6169
8576
|
new (): {
|
|
6170
8577
|
$slots: S;
|
|
6171
8578
|
};
|
|
@@ -6184,10 +8591,10 @@ type ButtonProps = {
|
|
|
6184
8591
|
href?: string | undefined;
|
|
6185
8592
|
};
|
|
6186
8593
|
declare var __VLS_15: {};
|
|
6187
|
-
type __VLS_Slots$
|
|
8594
|
+
type __VLS_Slots$5 = {} & {
|
|
6188
8595
|
default?: (props: typeof __VLS_15) => any;
|
|
6189
8596
|
};
|
|
6190
|
-
declare const __VLS_base$
|
|
8597
|
+
declare const __VLS_base$5: vue.DefineComponent<ButtonProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
|
|
6191
8598
|
click: (e: MouseEvent) => any;
|
|
6192
8599
|
}, string, vue.PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
6193
8600
|
onClick?: (e: MouseEvent) => any;
|
|
@@ -6199,33 +8606,33 @@ declare const __VLS_base$4: vue.DefineComponent<ButtonProps, {}, {}, {}, {}, vue
|
|
|
6199
8606
|
type: "button" | "submit" | "reset";
|
|
6200
8607
|
fullWidth: boolean;
|
|
6201
8608
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6202
|
-
declare const __VLS_export$
|
|
6203
|
-
declare const _default$
|
|
6204
|
-
type __VLS_WithSlots$
|
|
8609
|
+
declare const __VLS_export$c: __VLS_WithSlots$6<typeof __VLS_base$5, __VLS_Slots$5>;
|
|
8610
|
+
declare const _default$c: typeof __VLS_export$c;
|
|
8611
|
+
type __VLS_WithSlots$6<T, S> = T & {
|
|
6205
8612
|
new (): {
|
|
6206
8613
|
$slots: S;
|
|
6207
8614
|
};
|
|
6208
8615
|
};
|
|
6209
|
-
type __VLS_Props$
|
|
8616
|
+
type __VLS_Props$9 = {
|
|
6210
8617
|
tone?: BadgeTone;
|
|
6211
8618
|
icon?: Component | undefined;
|
|
6212
8619
|
};
|
|
6213
8620
|
declare var __VLS_6$1: {};
|
|
6214
|
-
type __VLS_Slots$
|
|
8621
|
+
type __VLS_Slots$4 = {} & {
|
|
6215
8622
|
default?: (props: typeof __VLS_6$1) => any;
|
|
6216
8623
|
};
|
|
6217
|
-
declare const __VLS_base$
|
|
8624
|
+
declare const __VLS_base$4: vue.DefineComponent<__VLS_Props$9, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$9> & Readonly<{}>, {
|
|
6218
8625
|
icon: Component | undefined;
|
|
6219
8626
|
tone: BadgeTone;
|
|
6220
8627
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6221
|
-
declare const __VLS_export$
|
|
6222
|
-
declare const _default$
|
|
6223
|
-
type __VLS_WithSlots$
|
|
8628
|
+
declare const __VLS_export$b: __VLS_WithSlots$5<typeof __VLS_base$4, __VLS_Slots$4>;
|
|
8629
|
+
declare const _default$b: typeof __VLS_export$b;
|
|
8630
|
+
type __VLS_WithSlots$5<T, S> = T & {
|
|
6224
8631
|
new (): {
|
|
6225
8632
|
$slots: S;
|
|
6226
8633
|
};
|
|
6227
8634
|
};
|
|
6228
|
-
type __VLS_Props$
|
|
8635
|
+
type __VLS_Props$8 = {
|
|
6229
8636
|
title: string;
|
|
6230
8637
|
description?: string | undefined;
|
|
6231
8638
|
icon?: Component | undefined;
|
|
@@ -6233,24 +8640,24 @@ type __VLS_Props$7 = {
|
|
|
6233
8640
|
plain?: boolean;
|
|
6234
8641
|
};
|
|
6235
8642
|
declare var __VLS_6: {};
|
|
6236
|
-
type __VLS_Slots$
|
|
8643
|
+
type __VLS_Slots$3 = {} & {
|
|
6237
8644
|
default?: (props: typeof __VLS_6) => any;
|
|
6238
8645
|
};
|
|
6239
|
-
declare const __VLS_base$
|
|
8646
|
+
declare const __VLS_base$3: vue.DefineComponent<__VLS_Props$8, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$8> & Readonly<{}>, {
|
|
6240
8647
|
size: "sm" | "lg";
|
|
6241
8648
|
icon: Component | undefined;
|
|
6242
8649
|
description: string | undefined;
|
|
6243
8650
|
plain: boolean;
|
|
6244
8651
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6245
|
-
declare const __VLS_export$
|
|
6246
|
-
declare const _default$
|
|
6247
|
-
type __VLS_WithSlots$
|
|
8652
|
+
declare const __VLS_export$a: __VLS_WithSlots$4<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
8653
|
+
declare const _default$a: typeof __VLS_export$a;
|
|
8654
|
+
type __VLS_WithSlots$4<T, S> = T & {
|
|
6248
8655
|
new (): {
|
|
6249
8656
|
$slots: S;
|
|
6250
8657
|
};
|
|
6251
8658
|
};
|
|
6252
|
-
declare const _default$
|
|
6253
|
-
declare const __VLS_export$
|
|
8659
|
+
declare const _default$9: typeof __VLS_export$9;
|
|
8660
|
+
declare const __VLS_export$9: __VLS_WithSlots$3<vue.DefineComponent<{
|
|
6254
8661
|
for: string;
|
|
6255
8662
|
label?: string | undefined;
|
|
6256
8663
|
info?: string | undefined;
|
|
@@ -6278,19 +8685,19 @@ declare const __VLS_export$7: __VLS_WithSlots$2<vue.DefineComponent<{
|
|
|
6278
8685
|
} & {
|
|
6279
8686
|
default?: (props: {}) => any;
|
|
6280
8687
|
}>;
|
|
6281
|
-
type __VLS_WithSlots$
|
|
8688
|
+
type __VLS_WithSlots$3<T, S> = T & {
|
|
6282
8689
|
new (): {
|
|
6283
8690
|
$slots: S;
|
|
6284
8691
|
};
|
|
6285
8692
|
};
|
|
6286
|
-
type __VLS_Props$
|
|
8693
|
+
type __VLS_Props$7 = {
|
|
6287
8694
|
text: string;
|
|
6288
8695
|
label?: string | undefined;
|
|
6289
8696
|
};
|
|
6290
|
-
declare const __VLS_export$
|
|
6291
|
-
declare const _default$
|
|
8697
|
+
declare const __VLS_export$8: vue.DefineComponent<__VLS_Props$7, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$7> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
8698
|
+
declare const _default$8: typeof __VLS_export$8;
|
|
6292
8699
|
type InputValue = string | number;
|
|
6293
|
-
type __VLS_Props$
|
|
8700
|
+
type __VLS_Props$6 = {
|
|
6294
8701
|
modelValue?: InputValue;
|
|
6295
8702
|
id?: string | undefined;
|
|
6296
8703
|
label?: string | undefined;
|
|
@@ -6308,14 +8715,14 @@ type __VLS_Props$5 = {
|
|
|
6308
8715
|
};
|
|
6309
8716
|
declare var __VLS_9: {};
|
|
6310
8717
|
declare var __VLS_16: {};
|
|
6311
|
-
type __VLS_Slots$
|
|
8718
|
+
type __VLS_Slots$2 = {} & {
|
|
6312
8719
|
label?: (props: typeof __VLS_9) => any;
|
|
6313
8720
|
} & {
|
|
6314
8721
|
trailing?: (props: typeof __VLS_16) => any;
|
|
6315
8722
|
};
|
|
6316
|
-
declare const __VLS_base$
|
|
8723
|
+
declare const __VLS_base$2: vue.DefineComponent<__VLS_Props$6, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
6317
8724
|
"update:modelValue": (value: InputValue) => any;
|
|
6318
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
8725
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$6> & Readonly<{
|
|
6319
8726
|
"onUpdate:modelValue"?: (value: InputValue) => any;
|
|
6320
8727
|
}>, {
|
|
6321
8728
|
size: "xs" | "sm" | "md" | "lg";
|
|
@@ -6329,33 +8736,33 @@ declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, v
|
|
|
6329
8736
|
error: string | null | undefined;
|
|
6330
8737
|
optional: boolean;
|
|
6331
8738
|
hint: string | undefined;
|
|
6332
|
-
modelValue: InputValue;
|
|
6333
8739
|
placeholder: string | undefined;
|
|
8740
|
+
modelValue: InputValue;
|
|
6334
8741
|
suggestions: readonly string[] | undefined;
|
|
6335
8742
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6336
|
-
declare const __VLS_export$
|
|
6337
|
-
declare const _default$
|
|
6338
|
-
type __VLS_WithSlots$
|
|
8743
|
+
declare const __VLS_export$7: __VLS_WithSlots$2<typeof __VLS_base$2, __VLS_Slots$2>;
|
|
8744
|
+
declare const _default$7: typeof __VLS_export$7;
|
|
8745
|
+
type __VLS_WithSlots$2<T, S> = T & {
|
|
6339
8746
|
new (): {
|
|
6340
8747
|
$slots: S;
|
|
6341
8748
|
};
|
|
6342
8749
|
};
|
|
6343
|
-
type __VLS_Props$
|
|
8750
|
+
type __VLS_Props$5 = {
|
|
6344
8751
|
title: string;
|
|
6345
8752
|
eyebrow?: string | undefined;
|
|
6346
8753
|
description?: string | undefined;
|
|
6347
8754
|
};
|
|
6348
8755
|
declare var __VLS_1: {};
|
|
6349
|
-
type __VLS_Slots = {} & {
|
|
8756
|
+
type __VLS_Slots$1 = {} & {
|
|
6350
8757
|
actions?: (props: typeof __VLS_1) => any;
|
|
6351
8758
|
};
|
|
6352
|
-
declare const __VLS_base: vue.DefineComponent<__VLS_Props$
|
|
8759
|
+
declare const __VLS_base$1: vue.DefineComponent<__VLS_Props$5, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$5> & Readonly<{}>, {
|
|
6353
8760
|
description: string | undefined;
|
|
6354
8761
|
eyebrow: string | undefined;
|
|
6355
8762
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6356
|
-
declare const __VLS_export$
|
|
6357
|
-
declare const _default$
|
|
6358
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
8763
|
+
declare const __VLS_export$6: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
8764
|
+
declare const _default$6: typeof __VLS_export$6;
|
|
8765
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
6359
8766
|
new (): {
|
|
6360
8767
|
$slots: S;
|
|
6361
8768
|
};
|
|
@@ -6366,7 +8773,7 @@ type SegmentedOption = {
|
|
|
6366
8773
|
badge?: string | number | undefined;
|
|
6367
8774
|
icon?: Component | undefined;
|
|
6368
8775
|
};
|
|
6369
|
-
type __VLS_Props$
|
|
8776
|
+
type __VLS_Props$4 = {
|
|
6370
8777
|
modelValue: string;
|
|
6371
8778
|
options: SegmentedOption[];
|
|
6372
8779
|
variant?: "pill" | "underline";
|
|
@@ -6374,9 +8781,9 @@ type __VLS_Props$3 = {
|
|
|
6374
8781
|
track?: boolean;
|
|
6375
8782
|
block?: boolean;
|
|
6376
8783
|
};
|
|
6377
|
-
declare const __VLS_export$
|
|
8784
|
+
declare const __VLS_export$5: vue.DefineComponent<__VLS_Props$4, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
6378
8785
|
"update:modelValue": (value: string) => any;
|
|
6379
|
-
}, string, vue.PublicProps, Readonly<__VLS_Props$
|
|
8786
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$4> & Readonly<{
|
|
6380
8787
|
"onUpdate:modelValue"?: (value: string) => any;
|
|
6381
8788
|
}>, {
|
|
6382
8789
|
variant: "pill" | "underline";
|
|
@@ -6384,14 +8791,89 @@ declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {},
|
|
|
6384
8791
|
track: boolean;
|
|
6385
8792
|
block: boolean;
|
|
6386
8793
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6387
|
-
declare const _default$
|
|
6388
|
-
type
|
|
8794
|
+
declare const _default$5: typeof __VLS_export$5;
|
|
8795
|
+
type SelectValue = string | number | null;
|
|
8796
|
+
type SelectOption<T extends SelectValue = SelectValue> = {
|
|
8797
|
+
value: T;
|
|
8798
|
+
label: string;
|
|
8799
|
+
description?: string | undefined;
|
|
8800
|
+
detail?: string | undefined;
|
|
8801
|
+
icon?: Component | undefined;
|
|
8802
|
+
disabled?: boolean | undefined;
|
|
8803
|
+
};
|
|
8804
|
+
declare const __VLS_export$4: <T extends SelectValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8805
|
+
props: vue.PublicProps & __VLS_PrettifyLocal<{
|
|
8806
|
+
modelValue: T;
|
|
8807
|
+
options?: ReadonlyArray<SelectOption<T>> | undefined;
|
|
8808
|
+
ariaLabel?: string | undefined;
|
|
8809
|
+
label?: string | undefined;
|
|
8810
|
+
info?: string | undefined;
|
|
8811
|
+
hint?: string | undefined;
|
|
8812
|
+
error?: string | null | undefined;
|
|
8813
|
+
optional?: boolean;
|
|
8814
|
+
icon?: Component | undefined;
|
|
8815
|
+
disabled?: boolean;
|
|
8816
|
+
placeholder?: string;
|
|
8817
|
+
size?: "sm" | "md" | "lg";
|
|
8818
|
+
variant?: "default" | "ghost";
|
|
8819
|
+
id?: string | undefined;
|
|
8820
|
+
} & {
|
|
8821
|
+
"onUpdate:modelValue"?: (value: T) => any;
|
|
8822
|
+
}> & (typeof globalThis extends {
|
|
8823
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
8824
|
+
} ? P : {});
|
|
8825
|
+
expose: (exposed: {}) => void;
|
|
8826
|
+
attrs: any;
|
|
8827
|
+
slots: {};
|
|
8828
|
+
emit: (evt: "update:modelValue", value: T) => void;
|
|
8829
|
+
}>) => vue.VNode & {
|
|
8830
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
8831
|
+
};
|
|
8832
|
+
declare const _default$4: typeof __VLS_export$4;
|
|
8833
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
8834
|
+
[K in keyof T]: T[K];
|
|
8835
|
+
} : {
|
|
8836
|
+
[K in keyof T as K]: T[K];
|
|
8837
|
+
}) & {};
|
|
8838
|
+
type __VLS_Props$3 = {
|
|
6389
8839
|
size?: number;
|
|
6390
8840
|
};
|
|
6391
|
-
declare const __VLS_export$
|
|
8841
|
+
declare const __VLS_export$3: vue.DefineComponent<__VLS_Props$3, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props$3> & Readonly<{}>, {
|
|
6392
8842
|
size: number;
|
|
6393
8843
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
8844
|
+
declare const _default$3: typeof __VLS_export$3;
|
|
8845
|
+
type __VLS_Props$2 = {
|
|
8846
|
+
modelValue: boolean;
|
|
8847
|
+
label?: string | undefined;
|
|
8848
|
+
indeterminate?: boolean;
|
|
8849
|
+
disabled?: boolean;
|
|
8850
|
+
block?: boolean;
|
|
8851
|
+
align?: "center" | "start";
|
|
8852
|
+
id?: string | undefined;
|
|
8853
|
+
};
|
|
8854
|
+
declare var __VLS_18: {};
|
|
8855
|
+
type __VLS_Slots = {} & {
|
|
8856
|
+
default?: (props: typeof __VLS_18) => any;
|
|
8857
|
+
};
|
|
8858
|
+
declare const __VLS_base: vue.DefineComponent<__VLS_Props$2, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
8859
|
+
"update:modelValue": (value: boolean) => any;
|
|
8860
|
+
}, string, vue.PublicProps, Readonly<__VLS_Props$2> & Readonly<{
|
|
8861
|
+
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
8862
|
+
}>, {
|
|
8863
|
+
disabled: boolean;
|
|
8864
|
+
label: string | undefined;
|
|
8865
|
+
id: string | undefined;
|
|
8866
|
+
block: boolean;
|
|
8867
|
+
indeterminate: boolean;
|
|
8868
|
+
align: "center" | "start";
|
|
8869
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
8870
|
+
declare const __VLS_export$2: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
6394
8871
|
declare const _default$2: typeof __VLS_export$2;
|
|
8872
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
8873
|
+
new (): {
|
|
8874
|
+
$slots: S;
|
|
8875
|
+
};
|
|
8876
|
+
};
|
|
6395
8877
|
type __VLS_Props$1 = {
|
|
6396
8878
|
modelValue: boolean;
|
|
6397
8879
|
label?: string | undefined;
|
|
@@ -6414,12 +8896,17 @@ type __VLS_Props = {
|
|
|
6414
8896
|
title: string;
|
|
6415
8897
|
description?: string | undefined;
|
|
6416
8898
|
note?: string | undefined;
|
|
8899
|
+
place?: "beside" | "below";
|
|
6417
8900
|
};
|
|
6418
|
-
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8901
|
+
declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8902
|
+
description: string | undefined;
|
|
8903
|
+
note: string | undefined;
|
|
8904
|
+
place: "beside" | "below";
|
|
8905
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
6419
8906
|
declare const _default: typeof __VLS_export;
|
|
6420
8907
|
declare function tooltipBeside(element: Element, gap?: number): {
|
|
6421
8908
|
top: number;
|
|
6422
8909
|
left: number;
|
|
6423
8910
|
};
|
|
6424
|
-
export { _default$
|
|
6425
|
-
export type { BadgeHue, BadgeTone, SegmentedOption };
|
|
8911
|
+
export { _default$e as Avatar, _default$d as Badge, _default$c as Button, _default$b as Callout, _default$2 as Checkbox, _default$a as EmptyState, _default$9 as FieldFrame, _default$8 as InfoTip, _default$7 as Input, _default$6 as PageHeader, _default$5 as SegmentedControl, _default$4 as Select, _default$3 as Spinner, _default$1 as Switch, _default as Tooltip, tooltipBeside, useGames, usePhantom, usePlugin, usePreferences, useThemeMode };
|
|
8912
|
+
export type { BadgeHue, BadgeTone, SegmentedOption, SelectOption, SelectValue };
|