bc-stubs 112.0.0 → 113.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -94,6 +94,20 @@ declare namespace AllowTypes {
94
94
  }
95
95
  }
96
96
 
97
+ declare namespace ParentGroup {
98
+ /**
99
+ * An object mapping pose names to group names from which to inherit body sizes.
100
+ * The {@link PoseType.DEFAULT} singleton is used for defining the default inheritance behavior when used as key, and disables inheritance when used as value.
101
+ */
102
+ type Data = Partial<Record<PoseTypeDefault | AssetPoseName, PoseTypeDefault | AssetGroupName>>;
103
+
104
+ /**
105
+ * An object mapping pose names to group names from which to inherit body sizes or a singular group name to apply it to _all_ poses.
106
+ * The {@link PoseType.DEFAULT} singleton is used for defining the default inheritance behavior when used as key, and disables inheritance when used as value.
107
+ */
108
+ type Definition = AssetGroupName | Data;
109
+ }
110
+
97
111
  /**
98
112
  * Properties common to groups, assets and layers
99
113
  *
@@ -129,8 +143,19 @@ interface AssetCommonPropertiesGroupAssetLayer {
129
143
  /** The group the target should inherit its color from. */
130
144
  InheritColor?: AssetGroupName;
131
145
 
132
- /** A group identifier that will be used to inherit the body size */
133
- ParentGroup?: AssetGroupName | null;
146
+ /**
147
+ * A group identifier that will be used to inherit the body size.
148
+ * Body sizes can be either be used for all poses (by passing a singular group) or on a pose-by-pose basis (via passing an object).
149
+ * In the latter case {@link PoseType.DEFAULT} can be used to override the default for _all_ groups when used as key, or to disable inheritance when used as value.
150
+ *
151
+ * @example
152
+ * // Inherit from the body sizes `BodyLower` by default, but do not inherit for the `AllFours` pose
153
+ * ParentGroup: {
154
+ * [PoseType.DEFAULT]: "BodyLower",
155
+ * AllFours: PoseType.DEFAULT,
156
+ * },
157
+ */
158
+ ParentGroup?: ParentGroup.Definition | null;
134
159
 
135
160
  /**
136
161
  * The poses that have pose-specific assets.
@@ -1189,8 +1214,6 @@ interface ModularItemOptionConfig extends Omit<ExtendedItemOptionConfig, "Name">
1189
1214
  HeightModifier?: number;
1190
1215
  /** Whether that option applies effects */
1191
1216
  Effect?: EffectName[];
1192
- /** Whether the option forces a given pose */
1193
- SetPose?: AssetPoseName;
1194
1217
  /** A list of activities enabled by that module */
1195
1218
  AllowActivity?: ActivityName[];
1196
1219
  Property?: Omit<ItemProperties, "TypeRecord">;
@@ -207,6 +207,7 @@ type ServerAppearanceBundle = ServerItemBundle[];
207
207
 
208
208
  type ServerChatRoomSpace = "X" | "" | "M" | "Asylum";
209
209
  type ServerChatRoomLanguage = "EN" | "DE" | "FR" | "ES" | "CN" | "RU" | "UA";
210
+ type ServerChatRoomRole = "All" | "Admin" | "Whitelist";
210
211
  type ServerChatRoomGame = "" | "ClubCard" | "LARP" | "MagicBattle" | "GGTS" | "Prison";
211
212
  type ServerChatRoomBlockCategory =
212
213
  /** Those are known as AssetCategory to the client */
@@ -229,8 +230,16 @@ type ServerChatRoomData = {
229
230
  /* FIXME: server actually expects a string there, but we cheat to make the typing simpler */
230
231
  Limit: number;
231
232
  Game: ServerChatRoomGame;
232
- Locked: boolean;
233
- Private: boolean;
233
+ Visibility: ServerChatRoomRole[];
234
+ Access: ServerChatRoomRole[];
235
+ /**
236
+ * @deprecated Use {@link ServerChatRoomData.Visibility} instead, this is temporarily maintained for backwards compatibility
237
+ */
238
+ Private: boolean; // TODO: Remove following completion of migration
239
+ /**
240
+ * @deprecated Use {@link ServerChatRoomData.Access} instead, this is temporarily maintained for backwards compatibility
241
+ */
242
+ Locked: boolean; // TODO: Remove following completion of migration
234
243
  BlockCategory: ServerChatRoomBlockCategory[];
235
244
  Language: ServerChatRoomLanguage;
236
245
  Space: ServerChatRoomSpace;
@@ -240,10 +249,10 @@ type ServerChatRoomData = {
240
249
  }
241
250
 
242
251
  interface ServerChatRoomMapData {
243
- Type: string;
252
+ Type: ChatRoomMapType;
244
253
  Fog?: boolean;
245
- Tiles: string;
246
- Objects: string;
254
+ Tiles?: string;
255
+ Objects?: string;
247
256
  }
248
257
 
249
258
  interface ServerChatRoomCustomData {
@@ -289,7 +298,7 @@ interface ServerAccountCreateResponseSuccess {
289
298
  MemberNumber: number;
290
299
  }
291
300
 
292
- type ServerAccountCreateResponse = ServerAccountCreateResponseSuccess | "Account already exists" | "Invalid account information";
301
+ type ServerAccountCreateResponse = ServerAccountCreateResponseSuccess | "Account already exists" | "Invalid account information" | "New accounts per day exceeded";
293
302
 
294
303
  type ServerPasswordResetRequest = string;
295
304
 
@@ -428,7 +437,10 @@ interface ServerChatRoomSearchRequest {
428
437
  Game?: ServerChatRoomGame;
429
438
  FullRooms?: boolean;
430
439
  Ignore?: string[];
431
- Language: string;
440
+ Language: "" | ServerChatRoomLanguage | ServerChatRoomLanguage[];
441
+ SearchDescs?: boolean;
442
+ ShowLocked?: boolean;
443
+ MapTypes?: string[];
432
444
  }
433
445
 
434
446
  interface ServerChatRoomSearchData {
@@ -436,14 +448,25 @@ interface ServerChatRoomSearchData {
436
448
  Language: string;
437
449
  Creator: string;
438
450
  CreatorMemberNumber: number;
451
+ Creation: number;
439
452
  MemberCount: number;
440
453
  MemberLimit: number;
441
454
  Description: string;
442
- BlockCategory: string[];
455
+ BlockCategory: AssetCategory[];
443
456
  Game: ServerChatRoomGame;
444
457
  Friends: ServerFriendInfo[];
445
458
  Space: ServerChatRoomSpace;
446
- MapType?: string;
459
+ Visibility: ServerChatRoomRole[];
460
+ Access: ServerChatRoomRole[];
461
+ /**
462
+ * @deprecated Use {@link ServerChatRoomData.Visibility} instead, this is maintained for backwards compatibility
463
+ */
464
+ Private?: boolean;
465
+ /**
466
+ * @deprecated Use {@link ServerChatRoomData.Access} instead, this is maintained for backwards compatibility
467
+ */
468
+ Locked?: boolean;
469
+ MapType: string;
447
470
  }
448
471
 
449
472
  type ServerChatRoomSearchResultResponse = ServerChatRoomSearchData[];
@@ -491,7 +514,7 @@ interface ServerChatRoomSyncMessage extends ServerChatRoomData {
491
514
  SourceMemberNumber: number;
492
515
  }
493
516
 
494
- interface ServerChatRoomSyncPropertiesMessage extends ServerChatRoomData {
517
+ interface ServerChatRoomSyncPropertiesMessage extends Omit<ServerChatRoomData, "Character"> {
495
518
  SourceMemberNumber: number;
496
519
  }
497
520
 
@@ -805,9 +828,27 @@ interface ServerChatRoomGameKDUpdateRequest {
805
828
  KinkyDungeon: any;
806
829
  }
807
830
 
831
+ interface ServerChatRoomGameCardGameData {
832
+ MemberNumber: number;
833
+ Playing: boolean;
834
+ Level: number;
835
+ Fame: number;
836
+ Money: number;
837
+ LastFamePerTurn: number;
838
+ LastMoneyPerTurn: number;
839
+ FullDeck: string;
840
+ Deck: string;
841
+ Hand: string;
842
+ Board: string;
843
+ Event: string;
844
+ DiscardPile: string;
845
+ CardsPlayedThisTurn: Record<number, ClubCard[]>;
846
+ ClubCardTurnCounter: number;
847
+ }
848
+
808
849
  interface ServerChatRoomGameCardGameQueryRequest {
809
850
  GameProgress: "Query";
810
- CCData?: any;
851
+ CCData?: ServerChatRoomGameCardGameData[];
811
852
  Player1?: number;
812
853
  Player2?: number;
813
854
  }
@@ -847,8 +888,8 @@ interface ServerChatRoomGameResponse extends ServerChatRoomMessageBase {
847
888
  /* Club Card */
848
889
  Player1?: number;
849
890
  Player2?: number;
850
- CCData: [any];
851
- CCLog: [any];
891
+ CCData: ServerChatRoomGameCardGameData[];
892
+ CCLog: ClubCardMessage;
852
893
  };
853
894
  RNG: number;
854
895
  }
@@ -218,6 +218,8 @@ type VariableContainer<T1, T2> = T1 & T2 & {
218
218
  //#region Enums
219
219
 
220
220
  type ChatRoomSpaceLabel = "MIXED" | "FEMALE_ONLY" | "MALE_ONLY" | "ASYLUM";
221
+ type ChatRoomVisibilityModeLabel = "PUBLIC" | "ADMIN_WHITELIST" | "ADMIN" | "UNLISTED";
222
+ type ChatRoomAccessModeLabel = "PUBLIC" | "ADMIN_WHITELIST" | "ADMIN";
221
223
 
222
224
  type DialogMenuMode = (
223
225
  "activities"
@@ -275,6 +277,22 @@ declare namespace DialogMenu {
275
277
  */
276
278
  resetDialogItems?: boolean;
277
279
  }
280
+
281
+ /** Internal {@link DialogMenu.Reload} parameters for dialog subscreens without a focus group */
282
+ interface ReloadParam {
283
+ root: HTMLElement;
284
+ C: Character;
285
+ currentC: Character;
286
+ textCache: TextCache;
287
+ focusGroup?: AssetItemGroup;
288
+ currentFocusGroup?: AssetItemGroup;
289
+ }
290
+
291
+ /** Internal {@link DialogMenu.Reload} parameters for dialog subscreens with a focus group */
292
+ interface ReloadFocusParam extends ReloadParam {
293
+ focusGroup: AssetItemGroup;
294
+ currentFocusGroup: AssetItemGroup;
295
+ }
278
296
  }
279
297
 
280
298
  type DialogSortOrder = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
@@ -777,7 +795,10 @@ interface AssetGroup {
777
795
  readonly Name: AssetGroupName;
778
796
  readonly Description: string;
779
797
  readonly Asset: readonly Asset[];
780
- readonly ParentGroupName: AssetGroupName | null;
798
+ /** @deprecated - superseded by {@link ParentGroup} */
799
+ readonly ParentGroupName?: never;
800
+ /** An object mapping pose names to group names from which to inherit body sizes. */
801
+ readonly ParentGroup: ParentGroup.Data;
781
802
  readonly Category: 'Appearance' | 'Item' | 'Script';
782
803
  readonly IsDefault: boolean;
783
804
  readonly IsRestraint: boolean;
@@ -889,9 +910,10 @@ interface AssetLayer {
889
910
  readonly AllowTypes: AllowTypes.Data | null;
890
911
  /** @deprecated - superceded by {@link CreateLayerTypes} */
891
912
  readonly HasType?: never;
892
- /** The name of the parent group for this layer. If null, the layer has no parent group. If
893
- undefined, the layer inherits its parent group from it's asset/group. */
894
- readonly ParentGroupName: AssetGroupName | null;
913
+ /** @deprecated - superseded by {@link ParentGroup} */
914
+ readonly ParentGroupName?: never;
915
+ /** An object mapping pose names to group names from which to inherit body sizes. */
916
+ readonly ParentGroup: ParentGroup.Data;
895
917
  /** @deprecated - Superceded by {@link PoseMapping} */
896
918
  readonly AllowPose?: never;
897
919
  /** @deprecated - Superceded by {@link PoseMapping} */
@@ -971,7 +993,10 @@ interface Asset {
971
993
  readonly Description: string;
972
994
  readonly Group: AssetGroup;
973
995
  readonly ParentItem?: string;
974
- readonly ParentGroupName: AssetGroupName | null;
996
+ /** @deprecated - superseded by {@link ParentGroup} */
997
+ readonly ParentGroupName?: never;
998
+ /** An object mapping pose names to group names from which to inherit body sizes. */
999
+ readonly ParentGroup: ParentGroup.Data;
975
1000
  readonly Enable: boolean;
976
1001
  readonly Visible: boolean;
977
1002
  readonly NotVisibleOnScreen?: readonly string[];
@@ -4252,6 +4277,7 @@ interface ClubCard {
4252
4277
  ExtraPlay?: number;
4253
4278
  Group?: string[];
4254
4279
  Location?: string;
4280
+ Negated?: boolean;
4255
4281
  GlowTimer?: number;
4256
4282
  GlowColor?: string;
4257
4283
  OnPlay?: (C: ClubCardPlayer) => void;
@@ -4276,6 +4302,7 @@ interface ClubCard {
4276
4302
  */
4277
4303
  onLeaveClub?: (C: ClubCardPlayer) => void;
4278
4304
  turnStart?: (C: ClubCardPlayer) => void;
4305
+ onLevelUp?: (C: ClubCardPlayer) => void;
4279
4306
  }
4280
4307
 
4281
4308
  interface ClubCardPlayer {
@@ -4299,12 +4326,20 @@ interface ClubCardPlayer {
4299
4326
  }
4300
4327
 
4301
4328
  interface ClubCardMessage {
4302
- Message: string,
4303
- MessageType: string,
4304
- PlayerId: string,
4305
- TurnCounter: number
4329
+ TextGetKey: string; // Localization key
4330
+ MessageText?: string; // Message Text
4331
+ MessageType: string; // Type of message (e.g., ACTION, SYSTEM, IMMEDIATE)
4332
+ PlayerId: string; // ID of the player who triggered the message
4333
+ TurnCounter: number; // Turn number when the message was created
4334
+ Placeholders: { // Dynamic data for text replacement
4335
+ [key: string]: string | number;
4336
+ };
4337
+ PlayerName?: string;
4338
+ SourcePlayer?: string;
4339
+ OpponentPlayer?: string;
4306
4340
  }
4307
4341
 
4342
+
4308
4343
  // #region drawing
4309
4344
 
4310
4345
  /** Drawing options for an item's preview box */
@@ -4374,6 +4409,7 @@ type ChatRoomMapObjectType = (
4374
4409
  | "FloorDecorationParty"
4375
4410
  | "FloorDecorationCamping"
4376
4411
  | "FloorDecorationExpanding"
4412
+ | "FloorDecorationAnimal"
4377
4413
  | "FloorItem"
4378
4414
  | "FloorObstacle"
4379
4415
  | "WallDecoration"
@@ -404,10 +404,10 @@ declare var CharacterAppearanceWardrobeName: string;
404
404
  declare var CharacterAppearanceForceUpCharacter: number;
405
405
  /** @type {"" | ExpressionNameMap["Emoticon"]} */
406
406
  declare var CharacterAppearancePreviousEmoticon: "" | ExpressionNameMap["Emoticon"];
407
- /** @type {"" | "Wardrobe" | "Cloth" | "Color"} */
408
- declare var CharacterAppearanceMode: "" | "Wardrobe" | "Cloth" | "Color";
409
- /** @type {"" | "Wardrobe" | "Cloth" | "Color"} */
410
- declare var CharacterAppearanceMenuMode: "" | "Wardrobe" | "Cloth" | "Color";
407
+ /** @type {"" | "Wardrobe" | "Cloth" | "Color" | "Permissions"} */
408
+ declare var CharacterAppearanceMode: "" | "Wardrobe" | "Cloth" | "Color" | "Permissions";
409
+ /** @type {"" | "Wardrobe" | "Cloth" | "Color" | "Permissions"} */
410
+ declare var CharacterAppearanceMenuMode: "" | "Wardrobe" | "Cloth" | "Color" | "Permissions";
411
411
  /** @type {null | Item} */
412
412
  declare var CharacterAppearanceCloth: null | Item;
413
413
  /** @type {DialogMenuButton[]} */