bc-stubs 125.0.1 → 126.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.
- package/bc/NativeDeclarations/Element.d.ts +16 -0
- package/bc/NativeDeclarations/Female3DCG_Types.d.ts +4 -4
- package/bc/NativeDeclarations/Messages.d.ts +5 -5
- package/bc/NativeDeclarations/Typedef.d.ts +44 -33
- package/bc/Screens/Character/Appearance/Appearance.d.ts +6 -6
- package/bc/Screens/Character/ItemColor/ItemColor.d.ts +11 -11
- package/bc/Screens/Online/ChatRoom/ChatRoomMapView.d.ts +29 -23
- package/bc/Screens/Room/AsylumGGTS/AsylumGGTS.d.ts +10 -1
- package/bc/Screens/Room/CollegeTheater/CollegeTheater.d.ts +2 -1
- package/bc/Screens/Room/Crafting/Crafting.d.ts +9 -6
- package/bc/Screens/Room/Crafting/CraftingJSON.d.ts +8 -2
- package/bc/Screens/Room/MainHall/MainHall.d.ts +2 -1
- package/bc/Screens/Room/Management/Management.d.ts +2 -2
- package/bc/Screens/Room/Nursery/Nursery.d.ts +2 -2
- package/bc/Screens/Room/Private/Private.d.ts +2 -2
- package/bc/Scripts/Asset.d.ts +4 -4
- package/bc/Scripts/Character.d.ts +2 -2
- package/bc/Scripts/Common.d.ts +8 -2
- package/bc/Scripts/CommonDraw.d.ts +4 -4
- package/bc/Scripts/Dialog.d.ts +4 -4
- package/bc/Scripts/Drawing.d.ts +3 -3
- package/bc/Scripts/Element.d.ts +33 -6
- package/bc/Scripts/Inventory.d.ts +5 -5
- package/bc/Scripts/Server.d.ts +12 -9
- package/bc/Scripts/Toasts.d.ts +5 -0
- package/bc/Scripts/Validation.d.ts +2 -1
- package/package.json +1 -1
|
@@ -33,3 +33,19 @@ declare namespace ElementSwipe {
|
|
|
33
33
|
animation?: Animation;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
declare namespace ElementUnpackIDs {
|
|
38
|
+
/** Further options for {@link ElementUnpackIDs}. */
|
|
39
|
+
interface Options<T extends HTMLElement = HTMLElement> {
|
|
40
|
+
/**
|
|
41
|
+
* The root node.
|
|
42
|
+
* Generally only relevant when working within a shadow root or some other {@link DocumentFragment} that is not {@link document}.
|
|
43
|
+
*/
|
|
44
|
+
root?: Element;
|
|
45
|
+
/**
|
|
46
|
+
* An {@link Array.filter} callback for filtering out specific element types.
|
|
47
|
+
* Defaults to just filtering out `null` entries.
|
|
48
|
+
*/
|
|
49
|
+
filter?: (value: null | HTMLElement, index: number, array: (null | HTMLElement)[]) => value is T;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -346,7 +346,7 @@ interface AssetGroupDefinitionBase extends AssetCommonPropertiesGroupAsset, Asse
|
|
|
346
346
|
*
|
|
347
347
|
* Those are used when generating random appearances or cycling colors in the wardrobe
|
|
348
348
|
*/
|
|
349
|
-
Color?:
|
|
349
|
+
Color?: BCColor[];
|
|
350
350
|
|
|
351
351
|
/**
|
|
352
352
|
* A group that will be used to copy the size info from
|
|
@@ -412,7 +412,7 @@ interface AssetGroupDefinitionBase extends AssetCommonPropertiesGroupAsset, Asse
|
|
|
412
412
|
*/
|
|
413
413
|
ArousalZone?: AssetGroupItemName;
|
|
414
414
|
|
|
415
|
-
ColorSuffix?: Record<
|
|
415
|
+
ColorSuffix?: Partial<Record<"HEX_COLOR" | BCColor, BCColor>>;
|
|
416
416
|
ExpressionPrerequisite?: AssetPrerequisite[];
|
|
417
417
|
HasPreviewImages?: boolean;
|
|
418
418
|
}
|
|
@@ -464,7 +464,7 @@ interface AssetCommonPropertiesAssetLayer {
|
|
|
464
464
|
/** A list of alpha mask definitions. */
|
|
465
465
|
Alpha?: Alpha.Definition[];
|
|
466
466
|
|
|
467
|
-
ColorSuffix?: Record<
|
|
467
|
+
ColorSuffix?: Partial<Record<"HEX_COLOR" | BCColor, BCColor>>;
|
|
468
468
|
|
|
469
469
|
/** Whether the asset is drawn at an absolute position. */
|
|
470
470
|
FixedPosition?: boolean;
|
|
@@ -747,7 +747,7 @@ interface AssetDefinitionBase extends AssetCommonPropertiesGroupAsset, AssetComm
|
|
|
747
747
|
/** Applies screen tints when the asset is worn */
|
|
748
748
|
Tint?: TintDefinition[];
|
|
749
749
|
/** The default tint color (unless overriden by {@link TintDefinition.DefaultColor} */
|
|
750
|
-
DefaultTint?:
|
|
750
|
+
DefaultTint?: BCColor;
|
|
751
751
|
Gender?: AssetGender;
|
|
752
752
|
|
|
753
753
|
/**
|
|
@@ -53,7 +53,7 @@ interface ServerAccountData extends ServerAccountImmutableData {
|
|
|
53
53
|
ArousalSettings?: ArousalSettingsType;
|
|
54
54
|
OnlineSharedSettings?: CharacterOnlineSharedSettings;
|
|
55
55
|
Game?: CharacterGameParameters;
|
|
56
|
-
LabelColor?:
|
|
56
|
+
LabelColor?: "" | HexColor;
|
|
57
57
|
Appearance?: ServerAppearanceBundle;
|
|
58
58
|
Description?: string;
|
|
59
59
|
BlockItems?: ServerItemPermissionsPacked | ServerItemPermissions[];
|
|
@@ -436,7 +436,7 @@ interface ServerChatRoomSearchRequest {
|
|
|
436
436
|
Language: "" | ServerChatRoomLanguage | ServerChatRoomLanguage[];
|
|
437
437
|
SearchDescs?: boolean;
|
|
438
438
|
ShowLocked?: boolean;
|
|
439
|
-
MapTypes?:
|
|
439
|
+
MapTypes?: ChatRoomMapType[];
|
|
440
440
|
}
|
|
441
441
|
type ChatRoomSearchSettings = {
|
|
442
442
|
Language: "" | ServerChatRoomLanguage;
|
|
@@ -445,7 +445,7 @@ type ChatRoomSearchSettings = {
|
|
|
445
445
|
FullRooms: boolean;
|
|
446
446
|
ShowLocked: boolean;
|
|
447
447
|
SearchDescriptions: boolean;
|
|
448
|
-
MapTypes:
|
|
448
|
+
MapTypes: "" | ChatRoomMapType;
|
|
449
449
|
RoomMinSize: number;
|
|
450
450
|
RoomMaxSize: number;
|
|
451
451
|
FilterTerms: string;
|
|
@@ -1001,8 +1001,8 @@ interface ServerCharacterArousalResponse {
|
|
|
1001
1001
|
interface ServerCharacterItemUpdate {
|
|
1002
1002
|
Target: number;
|
|
1003
1003
|
Group: AssetGroupName;
|
|
1004
|
-
Name
|
|
1005
|
-
Color:
|
|
1004
|
+
Name: string | undefined;
|
|
1005
|
+
Color: ItemColor;
|
|
1006
1006
|
Difficulty: number;
|
|
1007
1007
|
Property?: ItemProperties;
|
|
1008
1008
|
Craft?: CraftingItem;
|
|
@@ -122,7 +122,7 @@ type HTMLOptions<T extends keyof HTMLElementTagNameMap> = {
|
|
|
122
122
|
/** Event listeners that will be attached to the HTML element (see {@link HTMLElement.addEventListener}). */
|
|
123
123
|
eventListeners?: { [k in keyof HTMLElementEventMap]?: (this: HTMLElementTagNameMap[T], event: HTMLElementEventMap[k]) => any };
|
|
124
124
|
/** The elements parent (if any) to which it will be attached (see {@link HTMLElement.parentElement}). */
|
|
125
|
-
parent?: ElementNoParent | Node;
|
|
125
|
+
parent?: null | ElementNoParent | Node;
|
|
126
126
|
/** A list of CSS classes to-be assigned to the element (see {@link HTMLElement.classList}). */
|
|
127
127
|
classList?: readonly (null | undefined | string)[];
|
|
128
128
|
/** Any to-be added child elements. */
|
|
@@ -1109,12 +1109,12 @@ interface AssetGroup {
|
|
|
1109
1109
|
readonly AllowColorize: boolean;
|
|
1110
1110
|
readonly AllowCustomize: boolean;
|
|
1111
1111
|
readonly Random?: boolean;
|
|
1112
|
-
readonly ColorSchema: readonly
|
|
1112
|
+
readonly ColorSchema: readonly BCColor[];
|
|
1113
1113
|
/**
|
|
1114
1114
|
* The first color in the groups {@link ColorSchema}.
|
|
1115
1115
|
* The value is used for padding the {@link Asset.DefaultColor} array if required.
|
|
1116
1116
|
*/
|
|
1117
|
-
readonly DefaultColor:
|
|
1117
|
+
readonly DefaultColor: BCColor;
|
|
1118
1118
|
readonly ParentSize: AssetGroupName | "";
|
|
1119
1119
|
readonly ParentColor: AssetGroupName | "";
|
|
1120
1120
|
readonly Clothing: boolean;
|
|
@@ -1153,7 +1153,7 @@ interface AssetGroup {
|
|
|
1153
1153
|
|
|
1154
1154
|
/** A dict mapping colors to custom filename suffices.
|
|
1155
1155
|
The "HEX_COLOR" key is special-cased to apply to all color hex codes. */
|
|
1156
|
-
readonly ColorSuffix: Readonly<Record<
|
|
1156
|
+
readonly ColorSuffix: Readonly<Partial<Record<"HEX_COLOR" | BCColor, BCColor>>>;
|
|
1157
1157
|
readonly ExpressionPrerequisite?: readonly AssetPrerequisite[];
|
|
1158
1158
|
readonly HasPreviewImages: boolean;
|
|
1159
1159
|
/** Return whether this group belongs to the `Appearance` {@link AssetGroup.Category} */
|
|
@@ -1258,13 +1258,13 @@ interface AssetLayer {
|
|
|
1258
1258
|
readonly ShowForAttribute: readonly AssetAttribute[] | null;
|
|
1259
1259
|
/** Used along with a hook to make layers of an asset disappear in some cases. */
|
|
1260
1260
|
readonly Visibility: "Player" | "AllExceptPlayerDialog" | "Others" | "OthersExceptDialog" | "Owner" | "Lovers" | "Mistresses" | null;
|
|
1261
|
-
readonly ColorSuffix: Readonly<Record<
|
|
1261
|
+
readonly ColorSuffix: Readonly<Partial<Record<"HEX_COLOR" | BCColor, BCColor>>> | null;
|
|
1262
1262
|
}
|
|
1263
1263
|
|
|
1264
1264
|
interface TintDefinition {
|
|
1265
|
-
Color: number |
|
|
1265
|
+
Color: number | BCColor;
|
|
1266
1266
|
Strength: number;
|
|
1267
|
-
DefaultColor?:
|
|
1267
|
+
DefaultColor?: BCColor;
|
|
1268
1268
|
}
|
|
1269
1269
|
|
|
1270
1270
|
interface ResolvedTintDefinition extends TintDefinition {
|
|
@@ -1375,7 +1375,7 @@ interface Asset {
|
|
|
1375
1375
|
/**
|
|
1376
1376
|
* The default color of the item: an array of length {@link Asset.ColorableLayerCount} consisting of {@link AssetGroup.DefaultColor} and/or valid color hex codes.
|
|
1377
1377
|
*/
|
|
1378
|
-
readonly DefaultColor: readonly
|
|
1378
|
+
readonly DefaultColor: readonly BCColor[];
|
|
1379
1379
|
readonly Opacity: number;
|
|
1380
1380
|
readonly MinOpacity: number;
|
|
1381
1381
|
readonly MaxOpacity: number;
|
|
@@ -1404,7 +1404,7 @@ interface Asset {
|
|
|
1404
1404
|
/** A list of {@link TypeRecord} keys for which a single layer expects multiple type-specific .png files. */
|
|
1405
1405
|
readonly CreateLayerTypes: readonly string[];
|
|
1406
1406
|
/** A record that maps {@link ExtendedItemData.name} to a set with all option indices that support locks */
|
|
1407
|
-
readonly AllowLockType: null | Record<string, Set<number
|
|
1407
|
+
readonly AllowLockType: null | Partial<Record<string, Set<number>>>;
|
|
1408
1408
|
/** @deprecated Removed without replacement: items _must_ support a "color all layers" button (to the extent that the item is colorable in the first place) */
|
|
1409
1409
|
readonly AllowColorizeAll?: never;
|
|
1410
1410
|
readonly AvailableLocations: readonly string[];
|
|
@@ -1421,10 +1421,10 @@ interface Asset {
|
|
|
1421
1421
|
readonly PreviewIcons: readonly InventoryIcon[];
|
|
1422
1422
|
readonly Tint: readonly Readonly<TintDefinition>[];
|
|
1423
1423
|
readonly AllowTint: boolean;
|
|
1424
|
-
readonly DefaultTint?:
|
|
1424
|
+
readonly DefaultTint?: BCColor;
|
|
1425
1425
|
readonly Gender?: AssetGender;
|
|
1426
1426
|
readonly CraftGroup: string;
|
|
1427
|
-
readonly ColorSuffix: Readonly<Record<
|
|
1427
|
+
readonly ColorSuffix: Readonly<Partial<Record<"HEX_COLOR" | BCColor, BCColor>>>;
|
|
1428
1428
|
readonly FullAlpha: boolean;
|
|
1429
1429
|
readonly ExpressionPrerequisite?: readonly AssetPrerequisite[];
|
|
1430
1430
|
readonly AllowColorize: boolean;
|
|
@@ -1520,7 +1520,7 @@ interface ItemActivity {
|
|
|
1520
1520
|
Blocked?: ItemActivityRestriction;
|
|
1521
1521
|
}
|
|
1522
1522
|
|
|
1523
|
-
type ItemColor =
|
|
1523
|
+
type ItemColor = BCColor | BCColor[];
|
|
1524
1524
|
|
|
1525
1525
|
/** An item is a pair of asset and its dynamic properties that define a worn asset. */
|
|
1526
1526
|
interface Item {
|
|
@@ -1538,7 +1538,7 @@ interface ItemColorProperties extends ItemProperties {
|
|
|
1538
1538
|
|
|
1539
1539
|
/** An item subtype with a guaranteed color and opacity field. */
|
|
1540
1540
|
interface ItemColorItem extends Item {
|
|
1541
|
-
Color:
|
|
1541
|
+
Color: BCColor[];
|
|
1542
1542
|
Property: ItemColorProperties;
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
@@ -2095,7 +2095,7 @@ interface Character {
|
|
|
2095
2095
|
AppearanceFull?: Item[]; // Private NPCs only
|
|
2096
2096
|
// Online character properties
|
|
2097
2097
|
Title?: TitleName;
|
|
2098
|
-
LabelColor?: HexColor;
|
|
2098
|
+
LabelColor?: "" | HexColor;
|
|
2099
2099
|
Creation?: number; // technically never as it is Online-only
|
|
2100
2100
|
Description?: string; // technically never as it is Online-only
|
|
2101
2101
|
OnlineSharedSettings?: CharacterOnlineSharedSettings; // technically never as it is Online-only
|
|
@@ -2283,7 +2283,7 @@ interface PlayerCharacter extends Character {
|
|
|
2283
2283
|
// All the following are guaranteed to be set on login
|
|
2284
2284
|
MemberNumber: number;
|
|
2285
2285
|
Nickname: string;
|
|
2286
|
-
LabelColor: HexColor;
|
|
2286
|
+
LabelColor: "" | HexColor;
|
|
2287
2287
|
Game: CharacterGameParameters;
|
|
2288
2288
|
Description: string;
|
|
2289
2289
|
Creation: number;
|
|
@@ -4051,7 +4051,7 @@ type DrawOptions = {
|
|
|
4051
4051
|
/** Zoom factor */
|
|
4052
4052
|
Zoom?: number;
|
|
4053
4053
|
/* Color of the image to draw */
|
|
4054
|
-
HexColor?:
|
|
4054
|
+
HexColor?: HexColor;
|
|
4055
4055
|
/* Whether or not it is drawn in full alpha mode */
|
|
4056
4056
|
FullAlpha?: boolean;
|
|
4057
4057
|
/** A list of alpha masks to apply to the call */
|
|
@@ -4108,7 +4108,7 @@ type DrawImageCallback = (
|
|
|
4108
4108
|
* @param {string} src - The URL of the image to draw
|
|
4109
4109
|
* @param {number} x - The x coordinate to draw the image at
|
|
4110
4110
|
* @param {number} y - The y coordinate to draw the image at
|
|
4111
|
-
* @param {
|
|
4111
|
+
* @param {BCColor} color - The color to apply to the image
|
|
4112
4112
|
* @param {boolean} fullAlpha - Whether or not to apply color to the entire image
|
|
4113
4113
|
* @param {RectTuple[]} [alphaMasks] - A list of alpha masks to apply to the image when drawing
|
|
4114
4114
|
* @param {number} [opacity=1] - The opacity at which to draw the image with
|
|
@@ -4163,7 +4163,7 @@ interface DynamicDrawingData<T extends Record<string, any> = Record<string, unkn
|
|
|
4163
4163
|
Y: number;
|
|
4164
4164
|
CA: Item;
|
|
4165
4165
|
GroupName: AssetGroupName;
|
|
4166
|
-
Color:
|
|
4166
|
+
Color: BCColor;
|
|
4167
4167
|
Opacity: number;
|
|
4168
4168
|
Property: ItemProperties;
|
|
4169
4169
|
A: Asset;
|
|
@@ -4186,7 +4186,7 @@ interface DynamicBeforeDrawOverrides {
|
|
|
4186
4186
|
Property?: ItemProperties;
|
|
4187
4187
|
CA?: Item;
|
|
4188
4188
|
GroupName?: AssetGroupName;
|
|
4189
|
-
Color?:
|
|
4189
|
+
Color?: BCColor;
|
|
4190
4190
|
Opacity?: number;
|
|
4191
4191
|
X?: number;
|
|
4192
4192
|
Y?: number;
|
|
@@ -4356,13 +4356,10 @@ interface CraftingItemSelected {
|
|
|
4356
4356
|
* The first member of the {@link CraftingItemSelected.Assets} array.
|
|
4357
4357
|
*
|
|
4358
4358
|
* The asset is guaranteed to satisfy `Asset.Group.Name === Asset.DynamicGroupName` _if_ any of the list members satisfy this condition.
|
|
4359
|
+
*
|
|
4360
|
+
* Will be `undefined` upon creating a new craft prior to the user picking the underlying item.
|
|
4359
4361
|
*/
|
|
4360
4362
|
get Asset(): Asset | undefined;
|
|
4361
|
-
/**
|
|
4362
|
-
* The crafted item propertty.
|
|
4363
|
-
* @deprecated superseded by {@link CraftingItemSelected .Effects}
|
|
4364
|
-
*/
|
|
4365
|
-
Property: CraftingPropertyType;
|
|
4366
4363
|
/** The crafted item properties mapped to their property strength. */
|
|
4367
4364
|
Effects: Partial<Record<CraftingPropertyType, number>>;
|
|
4368
4365
|
/** The lock as equipped on the item or, if absent, `null`. */
|
|
@@ -4381,8 +4378,8 @@ interface CraftingItemSelected {
|
|
|
4381
4378
|
*/
|
|
4382
4379
|
ItemProperty: ItemProperties;
|
|
4383
4380
|
/** Get or set the `OverridePriority` property of {@link CraftingItemSelected.ItemProperty} */
|
|
4384
|
-
get OverridePriority():
|
|
4385
|
-
set OverridePriority(value:
|
|
4381
|
+
get OverridePriority(): undefined | AssetLayerOverridePriority;
|
|
4382
|
+
set OverridePriority(value: undefined | AssetLayerOverridePriority);
|
|
4386
4383
|
}
|
|
4387
4384
|
|
|
4388
4385
|
/**
|
|
@@ -4452,9 +4449,9 @@ interface ColorGroup {
|
|
|
4452
4449
|
|
|
4453
4450
|
/** A fully mutable subset of {@link ItemColorStateType} */
|
|
4454
4451
|
interface ItemColorExitState extends Pick<ItemColorStateType, "colors" | "initialColors" | "defaultColors" | "opacity" | "initialOpacity" | "defaultOpacity" | "editOpacity" > {
|
|
4455
|
-
initialColors:
|
|
4452
|
+
initialColors: BCColor[];
|
|
4456
4453
|
initialOpacity: number[];
|
|
4457
|
-
defaultColors:
|
|
4454
|
+
defaultColors: BCColor[];
|
|
4458
4455
|
defaultOpacity: number[];
|
|
4459
4456
|
}
|
|
4460
4457
|
|
|
@@ -4474,14 +4471,14 @@ type ItemColorExitListener = (
|
|
|
4474
4471
|
interface ItemColorStateType {
|
|
4475
4472
|
colorGroups: ColorGroup[];
|
|
4476
4473
|
/** The colors of the item */
|
|
4477
|
-
colors:
|
|
4474
|
+
colors: BCColor[];
|
|
4478
4475
|
/** The initial colors of the item prior to editing */
|
|
4479
|
-
initialColors: readonly
|
|
4476
|
+
initialColors: readonly BCColor[];
|
|
4480
4477
|
/**
|
|
4481
4478
|
* The underlying assets default colors.
|
|
4482
4479
|
* @see {@link Asset.DefaultColor}
|
|
4483
4480
|
*/
|
|
4484
|
-
defaultColors: readonly
|
|
4481
|
+
defaultColors: readonly BCColor[];
|
|
4485
4482
|
/** The opacity of the item */
|
|
4486
4483
|
opacity: number[];
|
|
4487
4484
|
/** The initial opacity of the item prior to editing */
|
|
@@ -4508,7 +4505,21 @@ interface ItemColorStateType {
|
|
|
4508
4505
|
}
|
|
4509
4506
|
|
|
4510
4507
|
/** A hexadecimal color code */
|
|
4511
|
-
type HexColor = string
|
|
4508
|
+
type HexColor = `#${string}`;
|
|
4509
|
+
|
|
4510
|
+
/**
|
|
4511
|
+
* A hexadecimal color code or one of BC's more specialized color literals (which an item may or may not support).
|
|
4512
|
+
*
|
|
4513
|
+
* * `Default`: Use the default color of the .png without modification
|
|
4514
|
+
* * `White`/`Black`/`Asian`: Use skin color specific .png files (used by the body)
|
|
4515
|
+
*/
|
|
4516
|
+
type BCColor = (
|
|
4517
|
+
"Default"
|
|
4518
|
+
| "Black"
|
|
4519
|
+
| "White"
|
|
4520
|
+
| "Asian"
|
|
4521
|
+
| HexColor
|
|
4522
|
+
)
|
|
4512
4523
|
|
|
4513
4524
|
/** A HSV color value */
|
|
4514
4525
|
interface HSVColor {
|
|
@@ -5150,7 +5161,7 @@ interface ChatRoomMapEffectStaticLighting {
|
|
|
5150
5161
|
/**
|
|
5151
5162
|
* R [0; 255], G [0; 255], B [0; 255], A [0.0; 1.0]
|
|
5152
5163
|
*/
|
|
5153
|
-
Color: [number, number, number, number];
|
|
5164
|
+
Color: [r: number, g: number, b: number, a: number];
|
|
5154
5165
|
}
|
|
5155
5166
|
|
|
5156
5167
|
/**
|
|
@@ -191,13 +191,13 @@ declare function AppearancePreviewUseCharacter(assetGroup: AssetGroup | null): b
|
|
|
191
191
|
* @param {Character} C - The character whose appearance should be changed
|
|
192
192
|
* @param {AssetGroupName} Group - The name of the corresponding groupr for the item
|
|
193
193
|
* @param {Asset|null} ItemAsset - The asset collection of the item to be changed
|
|
194
|
-
* @param {
|
|
195
|
-
* @param {number} [DifficultyFactor=0] - The difficulty, on top of the base asset difficulty, that should be assigned
|
|
194
|
+
* @param {null | ItemColor} [NewColor] - The new color (as "#xxyyzz" hex value) for that item
|
|
195
|
+
* @param {null | number} [DifficultyFactor=0] - The difficulty, on top of the base asset difficulty, that should be assigned
|
|
196
196
|
* to the item
|
|
197
|
-
* @param {number} [ItemMemberNumber=-1] - The member number of the player adding the item - defaults to -1
|
|
197
|
+
* @param {null | number} [ItemMemberNumber=-1] - The member number of the player adding the item - defaults to -1
|
|
198
198
|
* @returns {Item | null} - Thew newly created item or `undefined` if the asset does not exist
|
|
199
199
|
*/
|
|
200
|
-
declare function CharacterAppearanceSetItem(C: Character, Group: AssetGroupName, ItemAsset: Asset | null, NewColor?:
|
|
200
|
+
declare function CharacterAppearanceSetItem(C: Character, Group: AssetGroupName, ItemAsset: Asset | null, NewColor?: null | ItemColor, DifficultyFactor?: null | number, ItemMemberNumber?: null | number): Item | null;
|
|
201
201
|
/**
|
|
202
202
|
* Cycle in the appearance assets to find the next item in a group
|
|
203
203
|
* @param {Character} C - The character whose assets are used
|
|
@@ -223,11 +223,11 @@ declare function CharacterAppearanceMoveGroup(C: Character, Move: number): void;
|
|
|
223
223
|
/**
|
|
224
224
|
* Sets the color for a specific group
|
|
225
225
|
* @param {Character} C - The character whose item group should be colored
|
|
226
|
-
* @param {
|
|
226
|
+
* @param {BCColor} Color - The color (in the format "#rrggbb") to be applied to the group
|
|
227
227
|
* @param {AssetGroupName} Group - The name of the group, whose color should be changed
|
|
228
228
|
* @returns {void} - Nothing
|
|
229
229
|
*/
|
|
230
|
-
declare function CharacterAppearanceSetColorForGroup(C: Character, Color:
|
|
230
|
+
declare function CharacterAppearanceSetColorForGroup(C: Character, Color: BCColor, Group: AssetGroupName): void;
|
|
231
231
|
/**
|
|
232
232
|
* Advance to the next reordering mode, or set the mode to the specified
|
|
233
233
|
* value. The reordering mode cycles through the values:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sanitize the color of the passed item, returning an array of valid color strings and of length {@link Asset.ColorableLayerCount}.
|
|
3
3
|
* @param {Item} item - The item whose colors are to be validated
|
|
4
|
-
* @returns {
|
|
4
|
+
* @returns {BCColor[]} - The validated colors returned as array
|
|
5
5
|
*/
|
|
6
|
-
declare function ItemColorSanitizeColor(item: Item):
|
|
6
|
+
declare function ItemColorSanitizeColor(item: Item): BCColor[];
|
|
7
7
|
/**
|
|
8
8
|
* Sanitize the properties of the passed item in relation to any and all color & opacity related fields.
|
|
9
9
|
* @param {Item} item - The item whose properties are to be validated
|
|
@@ -168,17 +168,17 @@ declare function ItemColorIsSimple(item: Item): boolean;
|
|
|
168
168
|
/**
|
|
169
169
|
* Fetches the color button text key for the provided item color. If the item's color is already a string, the color string is returned.
|
|
170
170
|
* Otherwise, returns "Many" or "Default" as appropriate.
|
|
171
|
-
* @param {
|
|
172
|
-
* @returns {
|
|
171
|
+
* @param {"None" | BCColor | readonly BCColor[]} color - The item color
|
|
172
|
+
* @returns {"Many" | BCColor} - The appropriate color button key for the provided item color(s)
|
|
173
173
|
*/
|
|
174
|
-
declare function ItemColorGetColorButtonTextKey(color:
|
|
174
|
+
declare function ItemColorGetColorButtonTextKey(color: "None" | BCColor | readonly BCColor[]): "Many" | BCColor;
|
|
175
175
|
/**
|
|
176
176
|
* Fetches the color button text for the provided item color. If the item's color is already a string, the color string is returned.
|
|
177
177
|
* Otherwise, returns "Many" or "Default" as appropriate.
|
|
178
|
-
* @param {
|
|
178
|
+
* @param {BCColor | readonly BCColor[]} color - The item color
|
|
179
179
|
* @returns {string} - The appropriate color button text for the provided item color(s), translated to the current game language
|
|
180
180
|
*/
|
|
181
|
-
declare function ItemColorGetColorButtonText(color:
|
|
181
|
+
declare function ItemColorGetColorButtonText(color: BCColor | readonly BCColor[]): string;
|
|
182
182
|
/**
|
|
183
183
|
* Registers an exit callback to the item color UI which will be called when the UI is exited.
|
|
184
184
|
* @param {ItemColorExitListener} callback - The exit listener to register
|
|
@@ -253,13 +253,13 @@ declare let ItemColorLayerNames: null | TextCache;
|
|
|
253
253
|
declare let ItemColorGroupNames: null | TextCache;
|
|
254
254
|
/**
|
|
255
255
|
* All (hex code) colors used within the current lifetime of the ItemColor subscreen.
|
|
256
|
-
* @type {Set<
|
|
256
|
+
* @type {Set<BCColor>}
|
|
257
257
|
*/
|
|
258
|
-
declare const ItemColorHistory: Set<
|
|
258
|
+
declare const ItemColorHistory: Set<BCColor>;
|
|
259
259
|
/**
|
|
260
260
|
* A debounced callback for when the item color picker changes its value. This sets the color for the currently selected set of color
|
|
261
261
|
* indices
|
|
262
262
|
* @deprecated - Superseded by {@link ColorPicker.eventListeners.inputItemColor}
|
|
263
|
-
* @type {(color:
|
|
263
|
+
* @type {(color: BCColor) => void}
|
|
264
264
|
*/
|
|
265
|
-
declare const ItemColorOnPickerChange: (color:
|
|
265
|
+
declare const ItemColorOnPickerChange: (color: BCColor) => void;
|
|
@@ -162,16 +162,16 @@ declare function ChatRoomMapViewGetConnectivityDirections(X: number, Y: number,
|
|
|
162
162
|
* Returns the object located at a X and Y position on the map, or NULL if nothing
|
|
163
163
|
* @param {number} X - The X position on the map
|
|
164
164
|
* @param {number} Y - The Y position on the map
|
|
165
|
-
* @returns {ChatRoomMapTile |
|
|
165
|
+
* @returns {ChatRoomMapTile | undefined} - The object at the position
|
|
166
166
|
*/
|
|
167
|
-
declare function ChatRoomMapViewGetTileAtPos(X: number, Y: number): ChatRoomMapTile |
|
|
167
|
+
declare function ChatRoomMapViewGetTileAtPos(X: number, Y: number): ChatRoomMapTile | undefined;
|
|
168
168
|
/**
|
|
169
169
|
* Returns the object located at a X and Y position on the map, or NULL if nothing
|
|
170
170
|
* @param {number} X - The X position on the map
|
|
171
171
|
* @param {number} Y - The Y position on the map
|
|
172
|
-
* @returns {ChatRoomMapObject |
|
|
172
|
+
* @returns {ChatRoomMapObject | undefined} - The object at the position
|
|
173
173
|
*/
|
|
174
|
-
declare function ChatRoomMapViewGetObjectAtPos(X: number, Y: number): ChatRoomMapObject |
|
|
174
|
+
declare function ChatRoomMapViewGetObjectAtPos(X: number, Y: number): ChatRoomMapObject | undefined;
|
|
175
175
|
/**
|
|
176
176
|
* Returns TRUE if a given position cannot be entered
|
|
177
177
|
* @param {number} X - The X position on the map
|
|
@@ -411,8 +411,10 @@ declare const ChatRoomMapViewRemoteRange: number;
|
|
|
411
411
|
declare var ChatRoomMapViewVisibilityMask: boolean[];
|
|
412
412
|
/** @type {boolean[]} */
|
|
413
413
|
declare var ChatRoomMapViewAudibilityMask: boolean[];
|
|
414
|
-
|
|
415
|
-
declare var
|
|
414
|
+
/** @type {Uint16Array | null} */
|
|
415
|
+
declare var ChatRoomMapViewTileFog: Uint16Array | null;
|
|
416
|
+
/** @type {Uint16Array | null} */
|
|
417
|
+
declare var ChatRoomMapViewObjectFog: Uint16Array | null;
|
|
416
418
|
declare namespace ChatRoomMapViewKeysPressed {
|
|
417
419
|
let u: boolean;
|
|
418
420
|
let d: boolean;
|
|
@@ -420,6 +422,12 @@ declare namespace ChatRoomMapViewKeysPressed {
|
|
|
420
422
|
let r: boolean;
|
|
421
423
|
}
|
|
422
424
|
declare var ChatRoomMapViewStartOfKeyPress: number;
|
|
425
|
+
/** @type {Record<number, ChatRoomMapTile | undefined>} */
|
|
426
|
+
declare var ChatRoomMapViewTileLookup: Record<number, ChatRoomMapTile | undefined>;
|
|
427
|
+
/** @type {Record<number, ChatRoomMapObject | undefined>} */
|
|
428
|
+
declare var ChatRoomMapViewObjectLookup: Record<number, ChatRoomMapObject | undefined>;
|
|
429
|
+
/** @type {Map<number, Character>} */
|
|
430
|
+
declare var ChatRoomMapViewCharacterMap: Map<number, Character>;
|
|
423
431
|
declare const ChatRoomMapViewEffectStartID: 10;
|
|
424
432
|
/**
|
|
425
433
|
* A list of predefined lighting effects. May be replaced with a color picker in the future.
|
|
@@ -431,7 +439,7 @@ declare const ChatRoomMapViewTileList: ChatRoomMapTile[];
|
|
|
431
439
|
/** @type {ChatRoomMapObject[]} */
|
|
432
440
|
declare const ChatRoomMapViewObjectList: ChatRoomMapObject[];
|
|
433
441
|
declare namespace ChatRoomMapManager {
|
|
434
|
-
|
|
442
|
+
let Map: {
|
|
435
443
|
/**
|
|
436
444
|
* @type {MapData}
|
|
437
445
|
* private
|
|
@@ -632,20 +640,18 @@ declare namespace ChatRoomMapManager {
|
|
|
632
640
|
*/
|
|
633
641
|
_decodeEffects(str: string | undefined): ChatRoomMapEffect[][] | undefined;
|
|
634
642
|
};
|
|
635
|
-
|
|
636
|
-
|
|
643
|
+
/**
|
|
644
|
+
* This function should be called each time the external code updates {@link ChatRoomData.MapData}.
|
|
645
|
+
*
|
|
646
|
+
* This function decodes the updated map data and replaces
|
|
647
|
+
* the data stored in ${@link ChatRoomMapManager.Map} with the decoded map.
|
|
648
|
+
* @returns {void}
|
|
649
|
+
*/
|
|
650
|
+
function OnMapDataUpdated(): void;
|
|
651
|
+
/**
|
|
652
|
+
* Initializes the map with the current global data if needed.
|
|
653
|
+
* Must be called in {@link ChatRoomMapViewActivate}.
|
|
654
|
+
* @returns {void}
|
|
655
|
+
*/
|
|
656
|
+
function OnViewActivate(): void;
|
|
637
657
|
}
|
|
638
|
-
/**
|
|
639
|
-
* This function should be called each time the external code updates {@link ChatRoomData.MapData}.
|
|
640
|
-
*
|
|
641
|
-
* This function decodes the updated map data and replaces
|
|
642
|
-
* the data stored in ${@link ChatRoomMapManager.Map} with the decoded map.
|
|
643
|
-
* @returns {void}
|
|
644
|
-
*/
|
|
645
|
-
declare function OnMapDataUpdated(): void;
|
|
646
|
-
/**
|
|
647
|
-
* Initializes the map with the current global data if needed.
|
|
648
|
-
* Must be called in {@link ChatRoomMapViewActivate}.
|
|
649
|
-
* @returns {void}
|
|
650
|
-
*/
|
|
651
|
-
declare function OnViewActivate(): void;
|
|
@@ -89,9 +89,10 @@ declare function AsylumGGTSBuildPrivate(): void;
|
|
|
89
89
|
/**
|
|
90
90
|
* Gets the new character name based on it's GGTS level
|
|
91
91
|
* @param {Character} C - The character to rename
|
|
92
|
+
* @param {string} Name - The normal (sanitized) display name of the character
|
|
92
93
|
* @returns {string} - The new name for that character
|
|
93
94
|
*/
|
|
94
|
-
declare function AsylumGGTSCharacterName(C: Character): string;
|
|
95
|
+
declare function AsylumGGTSCharacterName(C: Character, Name: string): string;
|
|
95
96
|
/**
|
|
96
97
|
* Sends a chat message from the GGTS. GGTS slowly replaces the player name by the player number as level rises.
|
|
97
98
|
* @param {string} Msg - The message to publish
|
|
@@ -104,6 +105,14 @@ declare function AsylumGGTSMessage(Msg: string, Target?: Character): void;
|
|
|
104
105
|
* @returns {void} - Nothing
|
|
105
106
|
*/
|
|
106
107
|
declare function AsylumGGTSSetTimer(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Replaces the punctuation and capitalization in given text depending on the GGTS level.
|
|
110
|
+
* Makes it easier to respond to GGTS queries on lower levels.
|
|
111
|
+
* @param {number} Level - GGTS level
|
|
112
|
+
* @param {string} Text - the text to sanitize
|
|
113
|
+
* @return {string} - sanitized text
|
|
114
|
+
*/
|
|
115
|
+
declare function AsylumGGTSSanitizeText(Level: number, Text: string): string;
|
|
107
116
|
/**
|
|
108
117
|
* Returns TRUE if the query was answered by character number M
|
|
109
118
|
* @param {number} Level - The player GGTS level, at level 4 or more, capital letters and punctuation matters
|
|
@@ -93,4 +93,5 @@ declare var CollegeTheaterBackground: string;
|
|
|
93
93
|
/** @type {null | NPCCharacter} */
|
|
94
94
|
declare var CollegeTheaterJulia: null | NPCCharacter;
|
|
95
95
|
declare var CollegeTheaterJuliaLove: number;
|
|
96
|
-
|
|
96
|
+
/** @type {BCColor[]} */
|
|
97
|
+
declare var CollegeTheaterRandomColors: BCColor[];
|
|
@@ -94,9 +94,9 @@ declare function CraftingDecompressServerData(Data: string | undefined | (null |
|
|
|
94
94
|
declare function CraftingLoadServer(Packet: string | (null | CraftingItem)[]): void;
|
|
95
95
|
/**
|
|
96
96
|
* Advance to the next crafting reordering mode, or set the mode to the specified value.
|
|
97
|
-
* @param {CraftingReorderType} newmode - The mode to set. If null, advance to next mode.
|
|
97
|
+
* @param {null | CraftingReorderType} newmode - The mode to set. If null, advance to next mode.
|
|
98
98
|
*/
|
|
99
|
-
declare function CraftingReorderModeSet(newmode?: CraftingReorderType): void;
|
|
99
|
+
declare function CraftingReorderModeSet(newmode?: null | CraftingReorderType): void;
|
|
100
100
|
declare function CraftingClick(event: MouseEvent | TouchEvent): void;
|
|
101
101
|
/**
|
|
102
102
|
* Refreshes the preview model with a slight delay so the item color process is done
|
|
@@ -105,9 +105,10 @@ declare function CraftingClick(event: MouseEvent | TouchEvent): void;
|
|
|
105
105
|
declare function CraftingRefreshPreview(): void;
|
|
106
106
|
/**
|
|
107
107
|
* Converts the currently selected item into a crafting item.
|
|
108
|
+
* @param {CraftingItemSelected} item
|
|
108
109
|
* @return {CraftingItem}
|
|
109
110
|
* */
|
|
110
|
-
declare function CraftingConvertSelectedToItem(): CraftingItem;
|
|
111
|
+
declare function CraftingConvertSelectedToItem(item: CraftingItemSelected): CraftingItem;
|
|
111
112
|
/**
|
|
112
113
|
* Convert a crafting item to its selected format.
|
|
113
114
|
* @param {CraftingItem} Craft
|
|
@@ -333,7 +334,8 @@ declare namespace CraftingEventListeners {
|
|
|
333
334
|
function _ClickPadlock(this: HTMLButtonElement, ev: Event): void;
|
|
334
335
|
function _ClickAsset(this: HTMLButtonElement, ev: Event): void;
|
|
335
336
|
function _ClickRadio(this: HTMLButtonElement, ev: Event): void;
|
|
336
|
-
|
|
337
|
+
function _InputSearch(this: HTMLInputElement): Promise<void>;
|
|
338
|
+
let _InputSearchEffect: (this: HTMLInputElement, ev: Event) => Promise<void>;
|
|
337
339
|
function _ClickAsciiDescription(this: HTMLInputElement, ev: Event): void;
|
|
338
340
|
function _ClickGroup(this: HTMLButtonElement, ev: MouseEvent): void;
|
|
339
341
|
let _FocusSearchAsset: (this: HTMLInputElement, ev: FocusEvent) => Promise<void>;
|
|
@@ -345,9 +347,10 @@ declare namespace CraftingElements {
|
|
|
345
347
|
* @param {string} id
|
|
346
348
|
* @param {string} controls
|
|
347
349
|
* @param {string} placeholder
|
|
350
|
+
* @param {"asset" | "lock" | "effect"} type
|
|
348
351
|
* @returns {HTMLInputElement}
|
|
349
352
|
*/
|
|
350
|
-
function _SearchInput(id: string, controls: string, placeholder: string,
|
|
353
|
+
function _SearchInput(id: string, controls: string, placeholder: string, type: "asset" | "lock" | "effect"): HTMLInputElement;
|
|
351
354
|
let _SearchCache: Map<"ALL" | AssetGroupItemName, readonly HTMLOptionElement[]>;
|
|
352
355
|
/**
|
|
353
356
|
* private
|
|
@@ -374,4 +377,4 @@ declare namespace CraftingElements {
|
|
|
374
377
|
* @see {@link CratingValidationStruct}
|
|
375
378
|
* @todo Let the Validate/GetDefault functions take the respective attribute rather than the entire {@link CraftingItem}
|
|
376
379
|
*/
|
|
377
|
-
declare
|
|
380
|
+
declare var CraftingValidationRecord: Record<keyof CraftingItem, CratingValidationStruct>;
|
|
@@ -13,13 +13,19 @@ declare namespace CraftingJSON {
|
|
|
13
13
|
/**
|
|
14
14
|
* private
|
|
15
15
|
* @param {Element} fieldset
|
|
16
|
-
* @param {Element} radioContainer
|
|
16
|
+
* @param {null | Element} radioContainer
|
|
17
17
|
* @param {Map<{ inputNew: HTMLInputElement, inputOld: HTMLInputElement }, boolean>} checkLog
|
|
18
18
|
*/
|
|
19
|
-
function _queueAdvance(fieldset: Element, radioContainer: Element, checkLog: Map<{
|
|
19
|
+
function _queueAdvance(fieldset: Element, radioContainer: null | Element, checkLog: Map<{
|
|
20
20
|
inputNew: HTMLInputElement;
|
|
21
21
|
inputOld: HTMLInputElement;
|
|
22
22
|
}, boolean>): void;
|
|
23
|
+
/**
|
|
24
|
+
* private
|
|
25
|
+
* @param {null | HTMLElement} el
|
|
26
|
+
* @returns {el is HTMLElement}
|
|
27
|
+
*/
|
|
28
|
+
function _isTooltip(el: null | HTMLElement): el is HTMLElement;
|
|
23
29
|
namespace eventListeners {
|
|
24
30
|
function focusTooltip(this: HTMLElement): void;
|
|
25
31
|
function blurTooltip(this: HTMLElement): void;
|
|
@@ -256,7 +256,8 @@ declare var MainHallPunishmentList: ({
|
|
|
256
256
|
ItemHands: string;
|
|
257
257
|
})[];
|
|
258
258
|
declare var MainHallPunishmentChoice: number;
|
|
259
|
-
|
|
259
|
+
/** @type {BCColor} */
|
|
260
|
+
declare var MainHallRopeColor: BCColor;
|
|
260
261
|
declare namespace MainHallAllowIDToScreenMap {
|
|
261
262
|
let Shop: string;
|
|
262
263
|
let Private: string;
|
|
@@ -456,10 +456,10 @@ declare function ManagementClubSlaveRandomActivityEnd(RepChange: number): void;
|
|
|
456
456
|
declare function ManagementClubSlaveTransferToRoom(): void;
|
|
457
457
|
/**
|
|
458
458
|
* Triggered when the player earns the mistress clothes.
|
|
459
|
-
* @param {
|
|
459
|
+
* @param {BCColor} Color - The color of the outfit
|
|
460
460
|
* @returns {void} - Nothing.
|
|
461
461
|
*/
|
|
462
|
-
declare function ManagementGetMistressOutfit(Color:
|
|
462
|
+
declare function ManagementGetMistressOutfit(Color: BCColor): void;
|
|
463
463
|
/**
|
|
464
464
|
* Triggered when the player starts the Mistress introduction cutscene.
|
|
465
465
|
* @returns {void} - Nothing.
|
|
@@ -62,8 +62,8 @@ declare var NurseryCoolDownTime: number;
|
|
|
62
62
|
/** @type {null | Item[]} */
|
|
63
63
|
declare var NurseryPlayerAppearance: null | Item[];
|
|
64
64
|
declare var RandomNumber: number;
|
|
65
|
-
/** @type {null |
|
|
66
|
-
declare var RandomResult: null |
|
|
65
|
+
/** @type {null | BCColor} */
|
|
66
|
+
declare var RandomResult: null | BCColor;
|
|
67
67
|
/** @type {null | string} */
|
|
68
68
|
declare var RandomResultB: null | string;
|
|
69
69
|
declare var PreviousDress: string;
|
|
@@ -634,10 +634,10 @@ declare function PrivateStartGirlfriend(): void;
|
|
|
634
634
|
/**
|
|
635
635
|
* Puts a wedding ring of a specified color on a specified character
|
|
636
636
|
* @param {Character} C - The character that must wear the ring.
|
|
637
|
-
* @param {
|
|
637
|
+
* @param {BCColor} Color - The color of the ring #D0D000 is gold, #B0B0B0 is silver.
|
|
638
638
|
* @returns {void} - Nothing.
|
|
639
639
|
*/
|
|
640
|
-
declare function PrivateWearRing(C: Character, Color:
|
|
640
|
+
declare function PrivateWearRing(C: Character, Color: BCColor): void;
|
|
641
641
|
/**
|
|
642
642
|
* Triggered when the player upgrades her NPC girlfriend to Fiancee
|
|
643
643
|
* @returns {void} - Nothing.
|
package/bc/Scripts/Asset.d.ts
CHANGED
|
@@ -223,11 +223,11 @@ declare function AssetLayerSort(layers: AssetLayer[]): AssetLayer[];
|
|
|
223
223
|
/**
|
|
224
224
|
* Convert {@link AssetDefinition} default color into a {@link Asset} default color list
|
|
225
225
|
* @param {number} colorableLayerCount The number of colorable layers
|
|
226
|
-
* @param {
|
|
227
|
-
* @param {
|
|
228
|
-
* @returns {
|
|
226
|
+
* @param {BCColor} fillValue The default color. Usually `"Default"` though skin colors can also be supplied on occasion.
|
|
227
|
+
* @param {BCColor | readonly BCColor[]} [color] See {@link AssetDefinition.DefaultColor}
|
|
228
|
+
* @returns {BCColor[]} See {@link Asset.DefaultColor}
|
|
229
229
|
*/
|
|
230
|
-
declare function AssetParseDefaultColor(colorableLayerCount: number, fillValue:
|
|
230
|
+
declare function AssetParseDefaultColor(colorableLayerCount: number, fillValue: BCColor, color?: BCColor | readonly BCColor[]): BCColor[];
|
|
231
231
|
/**
|
|
232
232
|
* Get the translated string for an asset-specific message
|
|
233
233
|
* @param {string} msg
|
|
@@ -38,10 +38,10 @@ declare function CharacterLoadCSVDialog(C: Character, info?: DialogInfo<any>): v
|
|
|
38
38
|
* Sets the clothes based on a character archetype
|
|
39
39
|
* @param {Character} C - Character to set the clothes for
|
|
40
40
|
* @param {"Maid" | "Mistress" | "Employee" | "AnimeGirl" | "Bunny" | "Succubus"} Archetype - Archetype to determine the clothes to put on
|
|
41
|
-
* @param {
|
|
41
|
+
* @param {BCColor} [ForceColor] - Color to use for the added clothes
|
|
42
42
|
* @returns {void} - Nothing
|
|
43
43
|
*/
|
|
44
|
-
declare function CharacterArchetypeClothes(C: Character, Archetype: "Maid" | "Mistress" | "Employee" | "AnimeGirl" | "Bunny" | "Succubus", ForceColor?:
|
|
44
|
+
declare function CharacterArchetypeClothes(C: Character, Archetype: "Maid" | "Mistress" | "Employee" | "AnimeGirl" | "Bunny" | "Succubus", ForceColor?: BCColor): void;
|
|
45
45
|
/**
|
|
46
46
|
* Loads an NPC into the character array. The appearance is randomized, and a type can be provided to dress them in a given style.
|
|
47
47
|
* @template {ModuleType} T
|
package/bc/Scripts/Common.d.ts
CHANGED
|
@@ -150,11 +150,11 @@ declare function CommonTime(): number;
|
|
|
150
150
|
* Checks if a given value is a valid HEX color code (optionally with alpha channel)
|
|
151
151
|
* @param {string | undefined} Value - Potential HEX color code
|
|
152
152
|
* @param {null | { allowAlpha?: boolean }} [options]
|
|
153
|
-
* @returns {
|
|
153
|
+
* @returns {Value is HexColor} - Returns TRUE if the string is a valid HEX color
|
|
154
154
|
*/
|
|
155
155
|
declare function CommonIsColor(Value: string | undefined, options?: null | {
|
|
156
156
|
allowAlpha?: boolean;
|
|
157
|
-
}):
|
|
157
|
+
}): Value is HexColor;
|
|
158
158
|
/**
|
|
159
159
|
* Checks whether an item's color has a valid value that can be interpreted by the drawing
|
|
160
160
|
* functions. Valid values are null, undefined, strings, and an array containing any of the
|
|
@@ -163,6 +163,12 @@ declare function CommonIsColor(Value: string | undefined, options?: null | {
|
|
|
163
163
|
* @returns {boolean} - Returns TRUE if the color is a valid item color
|
|
164
164
|
*/
|
|
165
165
|
declare function CommonColorIsValid(Color?: null | string | readonly (null | string)[]): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Remove the (potential present) alpha component of the passed color hex code, turning the likes of `RRGGBB(AA)` into `RRGGBB`.
|
|
168
|
+
* @param {HexColor} color The color hex code
|
|
169
|
+
* @returns {HexColor} The color hex code with its (potentially present) alpha component removed
|
|
170
|
+
*/
|
|
171
|
+
declare function CommonColorTrimAlpha(color: HexColor): HexColor;
|
|
166
172
|
/**
|
|
167
173
|
* Check that the passed string looks like an acceptable email address.
|
|
168
174
|
*
|
|
@@ -74,16 +74,16 @@ declare function CommonDrawApplyLayerAlphaMasks(C: Character, layer: AssetLayer,
|
|
|
74
74
|
* @param {Item} item
|
|
75
75
|
* @param {AssetLayer} layer
|
|
76
76
|
* @param {AssetGroupName} groupName
|
|
77
|
-
* @param {
|
|
77
|
+
* @param {BCColor} [initialColor] Used as the starting value to check that specific color and fully resolve it
|
|
78
78
|
*/
|
|
79
|
-
declare function CommonDrawResolveLayerColor(C: Character, item: Item, layer: AssetLayer, groupName: AssetGroupName, initialColor?:
|
|
79
|
+
declare function CommonDrawResolveLayerColor(C: Character, item: Item, layer: AssetLayer, groupName: AssetGroupName, initialColor?: BCColor): BCColor;
|
|
80
80
|
/**
|
|
81
81
|
* Determines whether the provided color is valid
|
|
82
82
|
* @param {string} Color - The color
|
|
83
83
|
* @param {AssetGroup} AssetGroup - The asset group the color is being used fo
|
|
84
|
-
* @returns {
|
|
84
|
+
* @returns {Color is BCColor} - Whether the color is valid
|
|
85
85
|
*/
|
|
86
|
-
declare function CommonDrawColorValid(Color: string, AssetGroup: AssetGroup):
|
|
86
|
+
declare function CommonDrawColorValid(Color: string, AssetGroup: AssetGroup): Color is BCColor;
|
|
87
87
|
/**
|
|
88
88
|
* Finds the correct pose to draw for drawable layer for the provided character from the provided list of allowed poses
|
|
89
89
|
* @param {Character} C - The character to check for poses against
|
package/bc/Scripts/Dialog.d.ts
CHANGED
|
@@ -649,10 +649,10 @@ declare function DialogSetTightenLoosenItem(Item: Item): void;
|
|
|
649
649
|
/**
|
|
650
650
|
* Validates that the player is allowed to change the item color and swaps it on the fly
|
|
651
651
|
* @param {Character} C - The player who wants to change the color
|
|
652
|
-
* @param {
|
|
652
|
+
* @param {BCColor} Color - The new color in the format "#rrggbb"
|
|
653
653
|
* @returns {void} - Nothing
|
|
654
654
|
*/
|
|
655
|
-
declare function DialogChangeItemColor(C: Character, Color:
|
|
655
|
+
declare function DialogChangeItemColor(C: Character, Color: BCColor): void;
|
|
656
656
|
/**
|
|
657
657
|
* Returns the button image name for a dialog menu button based on the button name.
|
|
658
658
|
* @param {DialogMenuButton} ButtonName - The menu button name
|
|
@@ -780,9 +780,9 @@ declare function DialogMouseDown(event: MouseEvent | TouchEvent): void;
|
|
|
780
780
|
declare var DialogTextDefaultDuration: number;
|
|
781
781
|
/**
|
|
782
782
|
* The default color to use when applying items.
|
|
783
|
-
* @type {null |
|
|
783
|
+
* @type {null | HexColor}
|
|
784
784
|
*/
|
|
785
|
-
declare var DialogColorSelect: null |
|
|
785
|
+
declare var DialogColorSelect: null | HexColor;
|
|
786
786
|
/**
|
|
787
787
|
* The list of available items for the selected group.
|
|
788
788
|
* @type {DialogInventoryItem[]}
|
package/bc/Scripts/Drawing.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
declare function DrawHexToRGB(color: string): RGBColor;
|
|
7
7
|
/**
|
|
8
8
|
* Converts a RGB color to a hex color string
|
|
9
|
-
* @param {readonly number
|
|
10
|
-
* @returns {
|
|
9
|
+
* @param {readonly [R: number, G: number, B: number]} color - RGB color to conver
|
|
10
|
+
* @returns {HexColor} - Hex color string
|
|
11
11
|
*/
|
|
12
|
-
declare function DrawRGBToHex(color: readonly number
|
|
12
|
+
declare function DrawRGBToHex(color: readonly [R: number, G: number, B: number]): HexColor;
|
|
13
13
|
/**
|
|
14
14
|
* Loads the canvas to draw on with its style and event listeners.
|
|
15
15
|
* @returns {void} - Nothing
|
package/bc/Scripts/Element.d.ts
CHANGED
|
@@ -659,6 +659,33 @@ declare namespace ElementDOMScreen {
|
|
|
659
659
|
*/
|
|
660
660
|
function setHeading(root: ElementHelp.ElementOrId, heading: string | Element | readonly (string | Element)[]): void;
|
|
661
661
|
}
|
|
662
|
+
declare namespace ElementUnpackIDs {
|
|
663
|
+
/**
|
|
664
|
+
* Convert a list of IDs into their corresponding elements.
|
|
665
|
+
* @template {HTMLElement} [T=HTMLElement]
|
|
666
|
+
* @param {readonly string[]} list The list of element IDs
|
|
667
|
+
* @param {null | ElementUnpackIDs.Options<T>} [options] Further options
|
|
668
|
+
* @returns {T[]} The list of elements (may or may not be shorter than the ID list)
|
|
669
|
+
*/
|
|
670
|
+
function fromList<T extends HTMLElement = HTMLElement>(list: readonly string[], options?: null | ElementUnpackIDs.Options<T>): T[];
|
|
671
|
+
/**
|
|
672
|
+
* Convert a space-separated stringified ID list into their corresponding elements.
|
|
673
|
+
* @template {HTMLElement} [T=HTMLElement]
|
|
674
|
+
* @param {string} string The stringified list of comma-separated element IDs
|
|
675
|
+
* @param {null | ElementUnpackIDs.Options<T>} [options] Further options
|
|
676
|
+
* @returns {T[]} The list of elements (may or may not be shorter than the ID list)
|
|
677
|
+
*/
|
|
678
|
+
function fromString<T extends HTMLElement = HTMLElement>(string: string, options?: null | ElementUnpackIDs.Options<T>): T[];
|
|
679
|
+
/**
|
|
680
|
+
* Grab an attribute containing a space-separated stringified ID list and convert them into their corresponding elements.
|
|
681
|
+
* @template {HTMLElement} [T=HTMLElement]
|
|
682
|
+
* @param {Element} element The element
|
|
683
|
+
* @param {string} attrName The name of the attribute with the element IDs
|
|
684
|
+
* @param {null | Exclude<ElementUnpackIDs.Options<T>, "root">} [options] Further options
|
|
685
|
+
* @returns {T[]} The list of elements (may or may not be shorter than the ID list)
|
|
686
|
+
*/
|
|
687
|
+
function fromAttribute<T extends HTMLElement = HTMLElement>(element: Element, attrName: string, options?: null | Exclude<ElementUnpackIDs.Options<T>, "root">): T[];
|
|
688
|
+
}
|
|
662
689
|
/**
|
|
663
690
|
* HTML element for color tint pickers, functioning as some kind of 2D `<input type='range'>` input for selecting the color's saturation and brightness.
|
|
664
691
|
*/
|
|
@@ -673,21 +700,21 @@ declare class HTMLColorTintElement extends HTMLElement {
|
|
|
673
700
|
*/
|
|
674
701
|
_pressedOldValue: null | string;
|
|
675
702
|
connectedCallback(): void;
|
|
703
|
+
set value(value: HexColor);
|
|
676
704
|
/**
|
|
677
705
|
* Sets or retrieves the initial contents of the object.
|
|
678
706
|
*
|
|
679
|
-
* See {@link HTMLInputElement.
|
|
680
|
-
* @type {
|
|
707
|
+
* See {@link HTMLInputElement.value}
|
|
708
|
+
* @type {HexColor}
|
|
681
709
|
*/
|
|
682
|
-
|
|
683
|
-
set value(value: string);
|
|
710
|
+
get value(): HexColor;
|
|
684
711
|
/**
|
|
685
712
|
* Sets or retrieves the initial contents of the object.
|
|
686
713
|
*
|
|
687
|
-
* See {@link HTMLInputElement.
|
|
714
|
+
* See {@link HTMLInputElement.defaultValue}
|
|
688
715
|
* @type {string}
|
|
689
716
|
*/
|
|
690
|
-
|
|
717
|
+
defaultValue: string;
|
|
691
718
|
/**
|
|
692
719
|
* @param {string} name
|
|
693
720
|
* @param {null | string} oldValue
|
|
@@ -181,14 +181,14 @@ declare function InventoryCraftPropertyIs(): void;
|
|
|
181
181
|
* @param {Character} C - The character that must wear the item
|
|
182
182
|
* @param {string} AssetName - The name of the asset to wear
|
|
183
183
|
* @param {AssetGroupName} AssetGroup - The name of the asset group to wear
|
|
184
|
-
* @param {
|
|
185
|
-
* @param {number} [Difficulty] - The difficulty, on top of the base asset difficulty, to assign to the item
|
|
186
|
-
* @param {number} [MemberNumber] - The member number of the character putting the item on - defaults to -1
|
|
187
|
-
* @param {CraftingItem} [Craft] - The crafting properties of the item
|
|
184
|
+
* @param {null | ItemColor} [ItemColor] - The hex color of the item, can be undefined or "Default"
|
|
185
|
+
* @param {null | number} [Difficulty] - The difficulty, on top of the base asset difficulty, to assign to the item
|
|
186
|
+
* @param {null | number} [MemberNumber] - The member number of the character putting the item on - defaults to -1
|
|
187
|
+
* @param {null | CraftingItem} [Craft] - The crafting properties of the item
|
|
188
188
|
* @param {boolean} [Refresh] - Whether to refresh the character and push the changes to the server
|
|
189
189
|
* @returns {Item | null} - Thew newly created item or `null` if the asset does not exist
|
|
190
190
|
*/
|
|
191
|
-
declare function InventoryWear(C: Character, AssetName: string, AssetGroup: AssetGroupName, ItemColor?:
|
|
191
|
+
declare function InventoryWear(C: Character, AssetName: string, AssetGroup: AssetGroupName, ItemColor?: null | ItemColor, Difficulty?: null | number, MemberNumber?: null | number, Craft?: null | CraftingItem, Refresh?: boolean): Item | null;
|
|
192
192
|
/**
|
|
193
193
|
* Sets the difficulty to remove an item for a body area
|
|
194
194
|
* @param {Character} C - The character that is wearing the item
|
package/bc/Scripts/Server.d.ts
CHANGED
|
@@ -156,11 +156,11 @@ declare function ServerBundledItemToAppearanceItem(assetFamily: IAssetFamily, it
|
|
|
156
156
|
/**
|
|
157
157
|
* Parses an item color, based on the allowed colorable layers on an asset, and the asset's color schema
|
|
158
158
|
* @param {Asset} asset - The asset on which the color is set
|
|
159
|
-
* @param {
|
|
160
|
-
* @param {readonly
|
|
161
|
-
* @returns {
|
|
159
|
+
* @param {BCColor | readonly BCColor[]} color - The color value to parse
|
|
160
|
+
* @param {readonly BCColor[]} schema - The color schema to validate against
|
|
161
|
+
* @returns {BCColor | BCColor[]} - A parsed valid item color
|
|
162
162
|
*/
|
|
163
|
-
declare function ServerParseColor(asset: Asset, color:
|
|
163
|
+
declare function ServerParseColor(asset: Asset, color: BCColor | readonly BCColor[], schema: readonly BCColor[]): BCColor | BCColor[];
|
|
164
164
|
/**
|
|
165
165
|
* Populates an appearance diff map with any required items, to ensure that all asset groups are present that need to
|
|
166
166
|
* be.
|
|
@@ -171,12 +171,12 @@ declare function ServerParseColor(asset: Asset, color: string | readonly string[
|
|
|
171
171
|
declare function ServerAddRequiredAppearance(assetFamily: IAssetFamily, diffMap: AppearanceDiffMap): void;
|
|
172
172
|
/**
|
|
173
173
|
* Validates and returns a color against a color schema
|
|
174
|
-
* @param {
|
|
175
|
-
* @param {readonly
|
|
176
|
-
* @returns {
|
|
174
|
+
* @param {BCColor} Color - The color to validate
|
|
175
|
+
* @param {readonly BCColor[]} Schema - The color schema to validate against (a list of accepted Color values)
|
|
176
|
+
* @returns {BCColor} - The color if it is a valid hex color string or part of the color schema, or the default color
|
|
177
177
|
* from the color schema otherwise
|
|
178
178
|
*/
|
|
179
|
-
declare function ServerValidateColorAgainstSchema(Color:
|
|
179
|
+
declare function ServerValidateColorAgainstSchema(Color: BCColor, Schema: readonly BCColor[]): BCColor;
|
|
180
180
|
/**
|
|
181
181
|
* Syncs the player appearance with the server database.
|
|
182
182
|
*
|
|
@@ -277,14 +277,17 @@ declare const ServerScriptWarningStyle: string;
|
|
|
277
277
|
/** @readonly */
|
|
278
278
|
declare var ServerAccountUpdate: {
|
|
279
279
|
/**
|
|
280
|
+
* private
|
|
280
281
|
* @type {Map<keyof ServerAccountUpdateRequest, any>}
|
|
281
282
|
*/
|
|
282
283
|
Queue: Map<keyof ServerAccountUpdateRequest, any>;
|
|
283
284
|
/**
|
|
285
|
+
* private
|
|
284
286
|
* @type {null | ReturnType<typeof setTimeout>}
|
|
285
287
|
*/
|
|
286
288
|
Timeout: null | ReturnType<typeof setTimeout>;
|
|
287
289
|
/**
|
|
290
|
+
* private
|
|
288
291
|
* @type {number}
|
|
289
292
|
*/
|
|
290
293
|
Start: number;
|
|
@@ -419,7 +422,7 @@ declare namespace ServerAccountDataSyncedValidate {
|
|
|
419
422
|
ClubCard: GameClubCardParameters;
|
|
420
423
|
Prison: GamePrisonParameters;
|
|
421
424
|
};
|
|
422
|
-
function LabelColor(arg: string
|
|
425
|
+
function LabelColor(arg: Partial<"" | `#${string}`>, C: Character): `#${string}`;
|
|
423
426
|
function Creation(arg: number, C: Character): number;
|
|
424
427
|
function Description(arg: string, C: Character): string;
|
|
425
428
|
function Ownership(arg: Partial<ServerOwnership>, C: Character): {
|
package/bc/Scripts/Toasts.d.ts
CHANGED
|
@@ -75,6 +75,7 @@ declare var ToastManager: {
|
|
|
75
75
|
* Fills in any missing option fields with default values, then
|
|
76
76
|
* attempts to process the queue to show toasts if slots are available.
|
|
77
77
|
*
|
|
78
|
+
* private
|
|
78
79
|
* @param {Toasts.Options} options - Configuration for the toast.
|
|
79
80
|
* @returns {void}
|
|
80
81
|
*/
|
|
@@ -84,6 +85,7 @@ declare var ToastManager: {
|
|
|
84
85
|
* if the active count is not currently at max capacity. Removes displayed toasts
|
|
85
86
|
* from the queue and updates the active count.
|
|
86
87
|
*
|
|
88
|
+
* private
|
|
87
89
|
* @returns {void}
|
|
88
90
|
*/
|
|
89
91
|
_process(): void;
|
|
@@ -91,6 +93,7 @@ declare var ToastManager: {
|
|
|
91
93
|
* Builds the toast element, hooks up animations, buttons, and timers,
|
|
92
94
|
* and tracks its lifetime until Void kidnaps it.
|
|
93
95
|
*
|
|
96
|
+
* private
|
|
94
97
|
* @param {Required<Toasts.Options>} _ - Fully resolved options for the toast to display.
|
|
95
98
|
* @returns {void}
|
|
96
99
|
*/
|
|
@@ -98,6 +101,7 @@ declare var ToastManager: {
|
|
|
98
101
|
/**
|
|
99
102
|
* Retrieves an existing container element for toasts, or creates a new one if none exists.
|
|
100
103
|
*
|
|
104
|
+
* private
|
|
101
105
|
* @returns {HTMLDivElement} The container <div> element.
|
|
102
106
|
*/
|
|
103
107
|
_getOrCreateContainer(): HTMLDivElement;
|
|
@@ -106,6 +110,7 @@ declare var ToastManager: {
|
|
|
106
110
|
* Calls onFinish when the progress reaches its maximum. Returns a function that can
|
|
107
111
|
* be called to stop the animation prematurely.
|
|
108
112
|
*
|
|
113
|
+
* private
|
|
109
114
|
* @param {HTMLProgressElement} progress - The <progress> element to animate.
|
|
110
115
|
* @param {() => void | undefined} onFinish - Callback invoked when the animation completes.
|
|
111
116
|
* @param {number} durationMs - Total time in milliseconds for the progress to fill.
|
|
@@ -15,10 +15,11 @@ declare function ValidationCreateDiffParams(C: Character, sourceMemberNumber: nu
|
|
|
15
15
|
* @param {Item|null} previousItem - The previous item that the target character had equipped (or null if none)
|
|
16
16
|
* @param {Item|null} newItem - The new item to equip (may be identical to the previous item, or null if removing)
|
|
17
17
|
* @param {AppearanceUpdateParameters} params - The appearance update parameters that apply to the diff
|
|
18
|
+
* @param {boolean} unknownAsset - Whether the incoming item is from an asset we're missing
|
|
18
19
|
* @returns {ItemDiffResolution} - The diff resolution - a wrapper object containing the final item and a flag
|
|
19
20
|
* indicating whether or not the change was valid.
|
|
20
21
|
*/
|
|
21
|
-
declare function ValidationResolveAppearanceDiff(groupName: AssetGroupName, previousItem: Item | null, newItem: Item | null, params: AppearanceUpdateParameters): ItemDiffResolution;
|
|
22
|
+
declare function ValidationResolveAppearanceDiff(groupName: AssetGroupName, previousItem: Item | null, newItem: Item | null, params: AppearanceUpdateParameters, unknownAsset: boolean): ItemDiffResolution;
|
|
22
23
|
/**
|
|
23
24
|
* Check whether newArray is different from oldArray.
|
|
24
25
|
* @template T
|