bc-stubs 131.0.0-Alpha.1 → 131.0.0-Beta.2
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/Assets/Female3DCG/Female3DCG_Types.d.ts +1 -0
- package/bc/NativeDeclarations/Scripts/Typedef.d.ts +37 -5
- package/bc/NativeDeclarations/Scripts/lib/webgl/resources/m4.d.ts +281 -1
- package/bc/Screens/Inventory/Futuristic/Futuristic.d.ts +3 -3
- package/bc/Screens/Inventory/ItemHead/DroneMask/DroneMask.d.ts +1 -1
- package/bc/Screens/Inventory/ItemPelvis/LoveChastityBelt/LoveChastityBelt.d.ts +1 -1
- package/bc/Screens/Online/AdvancedRule/AdvancedRule.d.ts +1 -1
- package/bc/Scripts/Dialog.d.ts +2 -2
- package/bc/Scripts/Element.d.ts +3 -3
- package/bc/Scripts/ExtendedItem.d.ts +15 -9
- package/bc/Scripts/Game.d.ts +5 -1
- package/bc/Scripts/Item.d.ts +1 -1
- package/bc/Scripts/Layering.d.ts +240 -50
- package/bc/Scripts/TypedItem.d.ts +2 -3
- package/bc/Scripts/VibratorMode.d.ts +2 -3
- package/package.json +1 -1
|
@@ -1331,6 +1331,7 @@ interface VibratingItemOption extends Omit<VibratingItemOptionConfig, "Archetype
|
|
|
1331
1331
|
ParentData: VibratingItemData;
|
|
1332
1332
|
Property: ItemProperties & Pick<Required<ItemProperties>, "TypeRecord" | "Intensity" | "Effect">;
|
|
1333
1333
|
ArchetypeData?: null;
|
|
1334
|
+
Advanced: boolean;
|
|
1334
1335
|
}
|
|
1335
1336
|
|
|
1336
1337
|
/** An object defining all of the required configuration for registering a vibrator item */
|
|
@@ -2721,7 +2721,7 @@ interface ExtendedItemDialog<
|
|
|
2721
2721
|
OptionType extends ExtendedItemOption,
|
|
2722
2722
|
> {
|
|
2723
2723
|
/** The dialogue prefix for the player prompt that is displayed on each module's menu screen */
|
|
2724
|
-
header
|
|
2724
|
+
header?: string | ExtendedItemHeaderCallback<DataType>;
|
|
2725
2725
|
/** The dialogue prefix for the name of each module */
|
|
2726
2726
|
module?: string;
|
|
2727
2727
|
/** The dialogue prefix for the name of each option */
|
|
@@ -2867,7 +2867,7 @@ declare namespace ExtendedItemCallbacks {
|
|
|
2867
2867
|
*/
|
|
2868
2868
|
type Validate<
|
|
2869
2869
|
OptionType extends ExtendedItemOption = ExtendedItemOption
|
|
2870
|
-
> = ExtendedItemCallback<[C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string>;
|
|
2870
|
+
> = ExtendedItemCallback<[C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string | null>;
|
|
2871
2871
|
/**
|
|
2872
2872
|
* Callback for extended item `PublishAction` functions.
|
|
2873
2873
|
* `PublishAction` functions are responsible for reporting any changes to an item's properties via a chat message.
|
|
@@ -2985,7 +2985,7 @@ declare namespace ExtendedItemScriptHookCallbacks {
|
|
|
2985
2985
|
type Validate<
|
|
2986
2986
|
DataType extends ExtendedItemData<any>,
|
|
2987
2987
|
OptionType extends ExtendedItemOption
|
|
2988
|
-
> = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string>;
|
|
2988
|
+
> = ExtendedItemScriptHookCallback<DataType, [C: Character, item: Item, newOption: OptionType, previousOption: OptionType, permitExisting?: boolean], string | undefined>;
|
|
2989
2989
|
/**
|
|
2990
2990
|
* Callback for extended item `PublishAction` script hooks.
|
|
2991
2991
|
* `PublishAction` functions are responsible for reporting any changes to an item's properties via a chat message.
|
|
@@ -3324,6 +3324,17 @@ interface ItemPropertiesBase {
|
|
|
3324
3324
|
/** KD modules */
|
|
3325
3325
|
// FIXME: Note that, as far as I can see, it's only ever set, never read
|
|
3326
3326
|
Modules?: number[];
|
|
3327
|
+
|
|
3328
|
+
/** Transformation properties */
|
|
3329
|
+
TranslationX?: number;
|
|
3330
|
+
TranslationY?: number;
|
|
3331
|
+
|
|
3332
|
+
/** Scale is currently limited from 0.01 to 3.00 (3 times the size) */
|
|
3333
|
+
ScaleX?: number;
|
|
3334
|
+
ScaleY?: number;
|
|
3335
|
+
|
|
3336
|
+
/** Rotation is in degrees from -180 to 180 */
|
|
3337
|
+
Rotation?: number;
|
|
3327
3338
|
}
|
|
3328
3339
|
|
|
3329
3340
|
/**
|
|
@@ -3532,7 +3543,17 @@ interface ItemPropertiesCustom {
|
|
|
3532
3543
|
// #endregion
|
|
3533
3544
|
}
|
|
3534
3545
|
|
|
3535
|
-
interface ItemProperties extends ItemPropertiesBase, AssetDefinitionProperties, ItemPropertiesCustom {
|
|
3546
|
+
interface ItemProperties extends ItemPropertiesBase, AssetDefinitionProperties, ItemPropertiesCustom {
|
|
3547
|
+
LayerTranslationX?: Record<string, number | undefined>;
|
|
3548
|
+
/** Translation Y */
|
|
3549
|
+
LayerTranslationY?: Record<string, number | undefined>;
|
|
3550
|
+
/** Scale X */
|
|
3551
|
+
LayerScaleX?: Record<string, number | undefined>;
|
|
3552
|
+
/** Scale Y */
|
|
3553
|
+
LayerScaleY?: Record<string, number | undefined>;
|
|
3554
|
+
/** Rotation */
|
|
3555
|
+
LayerRotation?: Record<string, number | undefined>;
|
|
3556
|
+
}
|
|
3536
3557
|
|
|
3537
3558
|
/** Base type for unparsed extended item properties */
|
|
3538
3559
|
interface ItemPropertiesConfig extends Omit<ItemProperties, "DrawingTop" | "DrawingLeft"> {
|
|
@@ -3900,7 +3921,7 @@ interface NoArchItemData extends ExtendedItemData<NoArchItemOption> {
|
|
|
3900
3921
|
drawData: ExtendedItemDrawData<ElementMetaData.NoArch>;
|
|
3901
3922
|
dialogPrefix: {
|
|
3902
3923
|
/** The dialog key for the item's load text (usually a prompt to select the type) */
|
|
3903
|
-
header
|
|
3924
|
+
header?: string | ExtendedItemHeaderCallback<NoArchItemData>;
|
|
3904
3925
|
/** The prefix used for dialog keys representing the display names of the item's types */
|
|
3905
3926
|
option?: string;
|
|
3906
3927
|
/** The prefix used for dialog keys representing the item's chatroom messages when its type is changed */
|
|
@@ -4135,6 +4156,16 @@ type DrawOptions = {
|
|
|
4135
4156
|
Mirror?: boolean;
|
|
4136
4157
|
/** Zoom factor */
|
|
4137
4158
|
Zoom?: number;
|
|
4159
|
+
/** Translation X */
|
|
4160
|
+
TranslationX?: number;
|
|
4161
|
+
/** Translation Y */
|
|
4162
|
+
TranslationY?: number;
|
|
4163
|
+
/** Scale X */
|
|
4164
|
+
ScaleX?: number;
|
|
4165
|
+
/** Scale Y */
|
|
4166
|
+
ScaleY?: number;
|
|
4167
|
+
/** Rotation */
|
|
4168
|
+
Rotation?: number;
|
|
4138
4169
|
/* Color of the image to draw */
|
|
4139
4170
|
HexColor?: HexColor;
|
|
4140
4171
|
/* Whether or not it is drawn in full alpha mode */
|
|
@@ -4792,6 +4823,7 @@ interface LogNameType {
|
|
|
4792
4823
|
| "ReleasedCollar"
|
|
4793
4824
|
| LogNameAdvanced
|
|
4794
4825
|
| "ForbiddenWords"
|
|
4826
|
+
| "ForbiddenWordsMute"
|
|
4795
4827
|
),
|
|
4796
4828
|
PrivateRoom: (
|
|
4797
4829
|
"RentRoom"
|
|
@@ -1 +1,281 @@
|
|
|
1
|
-
|
|
1
|
+
// NOTE: The matching (minified) .js files appears to be based on an unknown predecessor of https://github.com/greggman/twgl.js
|
|
2
|
+
// Docstrings have been supplemented with those from https://github.com/greggman/twgl.js/releases/tag/v0.0.1 (Copyright 2015, Gregg Tavares, MIT)
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2014, Gregg Tavares.
|
|
6
|
+
* All rights reserved.
|
|
7
|
+
*
|
|
8
|
+
* Redistribution and use in source and binary forms, with or without
|
|
9
|
+
* modification, are permitted provided that the following conditions are
|
|
10
|
+
* met:
|
|
11
|
+
*
|
|
12
|
+
* * Redistributions of source code must retain the above copyright
|
|
13
|
+
* notice, this list of conditions and the following disclaimer.
|
|
14
|
+
* * Redistributions in binary form must reproduce the above
|
|
15
|
+
* copyright notice, this list of conditions and the following disclaimer
|
|
16
|
+
* in the documentation and/or other materials provided with the
|
|
17
|
+
* distribution.
|
|
18
|
+
* * Neither the name of Gregg Tavares. nor the names of his
|
|
19
|
+
* contributors may be used to endorse or promote products derived from
|
|
20
|
+
* this software without specific prior written permission.
|
|
21
|
+
*
|
|
22
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
23
|
+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
24
|
+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
25
|
+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
26
|
+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
27
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
28
|
+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
29
|
+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
30
|
+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
31
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
33
|
+
*/
|
|
34
|
+
declare namespace m4 {
|
|
35
|
+
/** A [4, 4] matrix represented as a flattened length-16 array */
|
|
36
|
+
type Mat4 = Float32Array;
|
|
37
|
+
/** A length-3 vector */
|
|
38
|
+
type Vec3 = Float32Array;
|
|
39
|
+
/** A length-4 vector */
|
|
40
|
+
type Vec4 = Float32Array;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Copies a matrix.
|
|
44
|
+
* @param {Mat4} m The matrix.
|
|
45
|
+
* @param {Mat4?} dst The matrix.
|
|
46
|
+
* @return {Mat4} A copy of m.
|
|
47
|
+
*/
|
|
48
|
+
function copy(m: m4.Mat4, dst?: m4.Mat4): m4.Mat4;
|
|
49
|
+
/**
|
|
50
|
+
* Computes a 4-by-4 look-at transformation.
|
|
51
|
+
*
|
|
52
|
+
* This is a matrix which positions the camera itself. If you want
|
|
53
|
+
* a view matrix (a matrix which moves things in front of the camera)
|
|
54
|
+
* take the inverse of this.
|
|
55
|
+
*
|
|
56
|
+
* @param {Vec3} eye The position of the eye.
|
|
57
|
+
* @param {Vec3} target The position meant to be viewed.
|
|
58
|
+
* @param {Vec3} up A vector pointing up.
|
|
59
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
60
|
+
* @return {Mat4} The look-at matrix.
|
|
61
|
+
*/
|
|
62
|
+
function lookAt(eye: m4.Vec3, target: m4.Vec3, up: m4.Vec3, dst?: m4.Mat4): m4.Mat4;
|
|
63
|
+
function addVectors(vec1: m4.Vec3, vec2: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
64
|
+
function subtractVectors(vec1: m4.Vec3, vec2: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
65
|
+
function distance(vec1: m4.Vec3, vec2: m4.Vec3): number;
|
|
66
|
+
function distanceSq(vec1: m4.Vec3, vec2: m4.Vec3): number;
|
|
67
|
+
/**
|
|
68
|
+
* Divides a vector by its Euclidean length and returns the quotient.
|
|
69
|
+
* @param {Vec3} a The vector.
|
|
70
|
+
* @param {Vec3?} dst vector to hold result. If not new one is created..
|
|
71
|
+
* @return {Vec3} The normalized vector.
|
|
72
|
+
*/
|
|
73
|
+
function normalize(a: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
74
|
+
function compose(m: m4.Mat4, a: number, b: number, dst?: m4.Mat4): m4.Mat4;
|
|
75
|
+
/**
|
|
76
|
+
* Computes the cross product of two vectors; assumes both vectors have
|
|
77
|
+
* three entries.
|
|
78
|
+
* @param {Vec3} a Operand vector.
|
|
79
|
+
* @param {Vec3} b Operand vector.
|
|
80
|
+
* @param {Vec3?} dst vector to hold result. If not new one is created..
|
|
81
|
+
* @return {Vec3} The vector a cross b.
|
|
82
|
+
*/
|
|
83
|
+
function cross(a: m4.Vec3, b: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
84
|
+
function decompose(a: m4.Mat4, b: m4.Mat4, c: m4.Mat4, dst: m4.Mat4): m4.Mat4;
|
|
85
|
+
/**
|
|
86
|
+
* Computes the dot product of two vectors; assumes both vectors have
|
|
87
|
+
* three entries.
|
|
88
|
+
* @param {Vec3} a Operand vector.
|
|
89
|
+
* @param {Vec3} b Operand vector.
|
|
90
|
+
* @return {number} dot product
|
|
91
|
+
*/
|
|
92
|
+
function dot(a: m4.Vec3, b: m4.Vec3): number;
|
|
93
|
+
/**
|
|
94
|
+
* Creates an n-by-n identity matrix.
|
|
95
|
+
*
|
|
96
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
97
|
+
* @return {Mat4} An n-by-n identity matrix.
|
|
98
|
+
*/
|
|
99
|
+
function identity(dst?: m4.Mat4): number;
|
|
100
|
+
/**
|
|
101
|
+
* Takes the transpose of a matrix.
|
|
102
|
+
* @param {Mat4} m The matrix.
|
|
103
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
104
|
+
* @return {Mat4} The transpose of m.
|
|
105
|
+
*/
|
|
106
|
+
function transpose(m: m4.Mat4, dst?: m4.Mat4): m4.Mat4;
|
|
107
|
+
/**
|
|
108
|
+
* Computes the length of vector
|
|
109
|
+
* @param {Vec3} v vector.
|
|
110
|
+
* @return {number} length of vector.
|
|
111
|
+
*/
|
|
112
|
+
function length(v: m4.Vec3): number;
|
|
113
|
+
function orthographic(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: m4.Mat4): m4.Mat4;
|
|
114
|
+
/**
|
|
115
|
+
* Computes a 4-by-4 perspective transformation matrix given the left, right,
|
|
116
|
+
* top, bottom, near and far clipping planes. The arguments define a frustum
|
|
117
|
+
* extending in the negative z direction. The arguments near and far are the
|
|
118
|
+
* distances to the near and far clipping planes. Note that near and far are not
|
|
119
|
+
* z coordinates, but rather they are distances along the negative z-axis. The
|
|
120
|
+
* matrix generated sends the viewing frustum to the unit box. We assume a unit
|
|
121
|
+
* box extending from -1 to 1 in the x and y dimensions and from 0 to 1 in the z
|
|
122
|
+
* dimension.
|
|
123
|
+
* @param {number} left The x coordinate of the left plane of the box.
|
|
124
|
+
* @param {number} right The x coordinate of the right plane of the box.
|
|
125
|
+
* @param {number} bottom The y coordinate of the bottom plane of the box.
|
|
126
|
+
* @param {number} top The y coordinate of the right plane of the box.
|
|
127
|
+
* @param {number} near The negative z coordinate of the near plane of the box.
|
|
128
|
+
* @param {number} far The negative z coordinate of the far plane of the box.
|
|
129
|
+
* @param {Mat4?} dst Output matrix.
|
|
130
|
+
* @return {Mat4} The perspective projection matrix.
|
|
131
|
+
*/
|
|
132
|
+
function frustum(left: number, right: number, bottom: number, top: number, near: number, far: number, dst?: m4.Mat4): m4.Mat4;
|
|
133
|
+
/**
|
|
134
|
+
* Computes a 4-by-4 perspective transformation matrix given the angular height
|
|
135
|
+
* of the frustum, the aspect ratio, and the near and far clipping planes. The
|
|
136
|
+
* arguments define a frustum extending in the negative z direction. The given
|
|
137
|
+
* angle is the vertical angle of the frustum, and the horizontal angle is
|
|
138
|
+
* determined to produce the given aspect ratio. The arguments near and far are
|
|
139
|
+
* the distances to the near and far clipping planes. Note that near and far
|
|
140
|
+
* are not z coordinates, but rather they are distances along the negative
|
|
141
|
+
* z-axis. The matrix generated sends the viewing frustum to the unit box.
|
|
142
|
+
* We assume a unit box extending from -1 to 1 in the x and y dimensions and
|
|
143
|
+
* from 0 to 1 in the z dimension.
|
|
144
|
+
* @param {number} fieldOfViewYInRadians The camera angle from top to bottom (in radians).
|
|
145
|
+
* @param {number} aspect The aspect ratio width / height.
|
|
146
|
+
* @param {number} zNear The depth (negative z coordinate)
|
|
147
|
+
* of the near clipping plane.
|
|
148
|
+
* @param {number} zFar The depth (negative z coordinate)
|
|
149
|
+
* of the far clipping plane.
|
|
150
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
151
|
+
* @return {Mat4} The perspective matrix.
|
|
152
|
+
*/
|
|
153
|
+
function perspective(fieldOfViewYInRadians: number, aspect: number, zNear: number, zFar: number, dst?: m4.Mat4): m4.Mat4;
|
|
154
|
+
/**
|
|
155
|
+
* Creates a 4-by-4 matrix which translates by the given vector v.
|
|
156
|
+
* @param {number} x X component of the vector by which to translate
|
|
157
|
+
* @param {number} y Y component of the vector by which to translate
|
|
158
|
+
* @param {number} z Z component of the vector by which to translate
|
|
159
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
160
|
+
* @return {Mat4} The translation matrix.
|
|
161
|
+
*/
|
|
162
|
+
function translation(x: number, y: number, z: number, dst?: m4.Mat4): m4.Mat4;
|
|
163
|
+
/**
|
|
164
|
+
* Modifies the given 4-by-4 matrix by translation by the given vector v.
|
|
165
|
+
* @param {Mat4} m The matrix.
|
|
166
|
+
* @param {number} x X component of the vector by which to translate
|
|
167
|
+
* @param {number} y Y component of the vector by which to translate
|
|
168
|
+
* @param {number} z Z component of the vector by which to translate
|
|
169
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
170
|
+
* @return {Mat4} m once modified.
|
|
171
|
+
*/
|
|
172
|
+
function translate(m: m4.Mat4, x: number, y: number, z: number, dst?: m4.Mat4): m4.Mat4;
|
|
173
|
+
function xRotation(angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
174
|
+
function yRotation(angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
175
|
+
function zRotation(angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
176
|
+
function xRotate(m: m4.Mat4, angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
177
|
+
function yRotate(m: m4.Mat4, angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
178
|
+
function zRotate(m: m4.Mat4, angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
179
|
+
/**
|
|
180
|
+
* Creates a 4-by-4 matrix which rotates around the given axis by the given
|
|
181
|
+
* angle.
|
|
182
|
+
* @param {Vec3} axis The axis
|
|
183
|
+
* about which to rotate.
|
|
184
|
+
* @param {number} angleInRadians The angle by which to rotate (in radians).
|
|
185
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
186
|
+
* @return {Mat4} A matrix which rotates angle radians
|
|
187
|
+
* around the axis.
|
|
188
|
+
*/
|
|
189
|
+
function axisRotation(axis: m4.Vec3, angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
190
|
+
/**
|
|
191
|
+
* Modifies the given 4-by-4 matrix by rotation around the given axis by the
|
|
192
|
+
* given angle.
|
|
193
|
+
* @param {Mat4} m The matrix.
|
|
194
|
+
* @param {Vec3} axis The axis
|
|
195
|
+
* about which to rotate.
|
|
196
|
+
* @param {number} angleInRadians The angle by which to rotate (in radians).
|
|
197
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
198
|
+
* @return {Mat4} m once modified.
|
|
199
|
+
*/
|
|
200
|
+
function axisRotate(m: m4.Mat4, axis: m4.Vec3, angleInRadians: number, dst?: m4.Mat4): m4.Mat4;
|
|
201
|
+
/**
|
|
202
|
+
* Creates a 4-by-4 matrix which scales in each dimension by an amount given by
|
|
203
|
+
* the corresponding entry in the given vector; assumes the vector has three
|
|
204
|
+
* entries.
|
|
205
|
+
* @param {number} x X component of the vector by which to scale
|
|
206
|
+
* @param {number} y Y component of the vector by which to scale
|
|
207
|
+
* @param {number} z Z component of the vector by which to scale
|
|
208
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
209
|
+
* @return {Mat4} The scaling matrix.
|
|
210
|
+
*/
|
|
211
|
+
function scaling(x: number, y: number, z: number, dst?: m4.Mat4): m4.Mat4;
|
|
212
|
+
/**
|
|
213
|
+
* Modifies the given 4-by-4 matrix, scaling in each dimension by an amount
|
|
214
|
+
* given by the corresponding entry in the given vector; assumes the vector has
|
|
215
|
+
* three entries.
|
|
216
|
+
* @param {Mat4} m The matrix to be modified.
|
|
217
|
+
* @param {number} x X component of the vector by which to scale
|
|
218
|
+
* @param {number} y Y component of the vector by which to scale
|
|
219
|
+
* @param {number} z Z component of the vector by which to scale
|
|
220
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
221
|
+
* @return {Mat4} m once modified.
|
|
222
|
+
*/
|
|
223
|
+
function scale(m: m4.Mat4, x: number, y: number, z: number, dst?: m4.Mat4): m4.Mat4;
|
|
224
|
+
/**
|
|
225
|
+
* Multiplies two 4-by-4 matrices; assumes that the given matrices are 4-by-4;
|
|
226
|
+
* assumes matrix entries are accessed in [row][column] fashion.
|
|
227
|
+
* @param {Mat4} a The matrix on the left.
|
|
228
|
+
* @param {Mat4} b The matrix on the right.
|
|
229
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
230
|
+
* @return {Mat4} The matrix product of a and b.
|
|
231
|
+
*/
|
|
232
|
+
function multiply(a: m4.Mat4, b: m4.Mat4, dst?: m4.Mat4): m4.Mat4;
|
|
233
|
+
/**
|
|
234
|
+
* Computes the inverse of a 4-by-4 matrix.
|
|
235
|
+
* @param {Mat4} m The matrix.
|
|
236
|
+
* @param {Mat4?} dst matrix to hold result. If none new one is created..
|
|
237
|
+
* @return {Mat4} The inverse of m.
|
|
238
|
+
*/
|
|
239
|
+
function inverse(m: m4.Mat4, dst?: m4.Mat4): m4.Mat4;
|
|
240
|
+
function transformVector(a: m4.Vec4, b: m4.Vec4, dst?: m4.Vec4): m4.Vec4;
|
|
241
|
+
/**
|
|
242
|
+
* Takes a 4-by-4 matrix and a vector with 3 entries,
|
|
243
|
+
* interprets the vector as a point, transforms that point by the matrix, and
|
|
244
|
+
* returns the result as a vector with 3 entries.
|
|
245
|
+
* @param {Mat4} m The matrix.
|
|
246
|
+
* @param {Vec3} v The point.
|
|
247
|
+
* @param {Vec3} dst optional vec3 to store result
|
|
248
|
+
* @return {Vec3} dst or new vec3 if not provided
|
|
249
|
+
*/
|
|
250
|
+
function transformPoint(m: m4.Mat4, v: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
251
|
+
/**
|
|
252
|
+
* Takes a 4-by-4 matrix and a vector with 3 entries, interprets the vector as a
|
|
253
|
+
* direction, transforms that direction by the matrix, and returns the result;
|
|
254
|
+
* assumes the transformation of 3-dimensional space represented by the matrix
|
|
255
|
+
* is parallel-preserving, i.e. any combination of rotation, scaling and
|
|
256
|
+
* translation, but not a perspective distortion. Returns a vector with 3
|
|
257
|
+
* entries.
|
|
258
|
+
* @param {Mat4} m The matrix.
|
|
259
|
+
* @param {Vec3} v The direction.
|
|
260
|
+
* @param {Vec3} dst optional Vec3 to store result
|
|
261
|
+
* @return {Vec3} dst or new Vec3 if not provided
|
|
262
|
+
*/
|
|
263
|
+
function transformDirection(m: m4.Mat4, v: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
264
|
+
/**
|
|
265
|
+
* Takes a 4-by-4 matrix m and a vector v with 3 entries, interprets the vector
|
|
266
|
+
* as a normal to a surface, and computes a vector which is normal upon
|
|
267
|
+
* transforming that surface by the matrix. The effect of this function is the
|
|
268
|
+
* same as transforming v (as a direction) by the inverse-transpose of m. This
|
|
269
|
+
* function assumes the transformation of 3-dimensional space represented by the
|
|
270
|
+
* matrix is parallel-preserving, i.e. any combination of rotation, scaling and
|
|
271
|
+
* translation, but not a perspective distortion. Returns a vector with 3
|
|
272
|
+
* entries.
|
|
273
|
+
* @param {Mat4} m The matrix.
|
|
274
|
+
* @param {Vec3} v The normal.
|
|
275
|
+
* @param {Vec3?} dst The direction.
|
|
276
|
+
* @return {Vec3} The transformed direction.
|
|
277
|
+
*/
|
|
278
|
+
function transformNormal(m: m4.Mat4, v: m4.Vec3, dst?: m4.Vec3): m4.Vec3;
|
|
279
|
+
/** Do not touch */
|
|
280
|
+
const setDefaultType: never;
|
|
281
|
+
}
|
|
@@ -32,7 +32,7 @@ declare function FuturisticAccessDraw(Data: ExtendedItemData<any>, OriginalFunct
|
|
|
32
32
|
* @returns {void} - Nothing
|
|
33
33
|
*/
|
|
34
34
|
declare function FuturisticAccessExit(): void;
|
|
35
|
-
declare function FuturisticAccessValidate(data: ExtendedItemData<any>, originalFunction: ((C: Character, item: Item, newOption: any, previousOption: any, permitExisting?: boolean | undefined) => string) | null, C: Character, item: Item, newOption: any, previousOption: any, permitExisting?: boolean | undefined): string;
|
|
35
|
+
declare function FuturisticAccessValidate(data: ExtendedItemData<any>, originalFunction: ((C: Character, item: Item, newOption: any, previousOption: any, permitExisting?: boolean | undefined) => string | undefined) | null, C: Character, item: Item, newOption: any, previousOption: any, permitExisting?: boolean | undefined): string | undefined;
|
|
36
36
|
declare function InventoryItemFuturisticLoadAccessDenied(): void;
|
|
37
37
|
/**
|
|
38
38
|
* Draw the futuristic item ACCESS DENIED screen
|
|
@@ -49,9 +49,9 @@ declare function InventoryItemFuturisticClickAccessDenied(data: ExtendedItemData
|
|
|
49
49
|
* @param {Character} C - The character to validate the option
|
|
50
50
|
* @param {Item | null} Item - The equipped item
|
|
51
51
|
* @param {boolean} [changeWhenLocked] - See {@link ExtendedItemOption.ChangeWhenLocked}
|
|
52
|
-
* @returns {string} - Returns
|
|
52
|
+
* @returns {string | null} - Returns an explanation for the failed validation if the chosen option is not possible, or null.
|
|
53
53
|
*/
|
|
54
|
-
declare function InventoryItemFuturisticValidate(C: Character, Item?: Item | null, changeWhenLocked?: boolean): string;
|
|
54
|
+
declare function InventoryItemFuturisticValidate(C: Character, Item?: Item | null, changeWhenLocked?: boolean): string | null;
|
|
55
55
|
/**
|
|
56
56
|
* Publish a chat message for denied access.
|
|
57
57
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare function ItemHeadDroneMaskValidateHook(data: ModularItemData, originalFunction: ((C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined) => string) | null, C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined): string;
|
|
1
|
+
declare function ItemHeadDroneMaskValidateHook(data: ModularItemData, originalFunction: ((C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined) => string | undefined) | null, C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined): string | undefined;
|
|
2
2
|
declare function AssetsItemHeadDroneMaskAfterDrawHook(data: TextItemData, originalFunction: ((drawData: DynamicDrawingData<AnimationPersistentData>) => void) | null, drawData: DynamicDrawingData<AnimationPersistentData>): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare function InventoryItemPelvisLoveChastityBeltDrawHook(data: ModularItemData, originalFunction: () => void): void;
|
|
2
2
|
declare function InventoryItemPelvisLoveChastityBeltSetOptionHook(data: ModularItemData, originalFunction: ((C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, push: boolean, refresh: boolean) => void) | null, C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, push: boolean, refresh: boolean): void;
|
|
3
|
-
declare function InventoryItemPelvisLoveChastityBeltValidateHook(data: ModularItemData, originalFunction: ((C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined) => string) | null, C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined): string;
|
|
3
|
+
declare function InventoryItemPelvisLoveChastityBeltValidateHook(data: ModularItemData, originalFunction: ((C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined) => string | undefined) | null, C: Character, item: Item, newOption: ModularItemOption, previousOption: ModularItemOption, permitExisting?: boolean | undefined): string | undefined;
|
|
4
4
|
/** Map the names of the love chastity belt front + black shield options to its scifi pleasure panties equivalent. */
|
|
5
5
|
declare const InventoryItemPelvisLoveChastityBeltCrotchShield: Map<string, string>;
|
|
@@ -7,7 +7,7 @@ declare function AdvancedRuleLoad(): Promise<void>;
|
|
|
7
7
|
declare function AdvancedRuleOpen(RuleType: LogNameAdvanced): void;
|
|
8
8
|
/**
|
|
9
9
|
* Convert an option to its descriptive name
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {LogNameAdvanced} type
|
|
11
11
|
* @param {string} option
|
|
12
12
|
*/
|
|
13
13
|
declare function AdvancedRuleTextGet(type: LogNameAdvanced, option: string): string;
|
package/bc/Scripts/Dialog.d.ts
CHANGED
|
@@ -278,10 +278,10 @@ declare function DialogHasKey(C: Character, item: Item): boolean;
|
|
|
278
278
|
/**
|
|
279
279
|
* Checks whether the player is able to unlock the provided item on the provided character
|
|
280
280
|
* @param {Character} C - The character on whom the item is equipped
|
|
281
|
-
* @param {Item}
|
|
281
|
+
* @param {Item} item - The item that should be unlocked
|
|
282
282
|
* @returns {boolean} - Returns true, if the player can unlock the given item, false otherwise
|
|
283
283
|
*/
|
|
284
|
-
declare function DialogCanUnlock(C: Character,
|
|
284
|
+
declare function DialogCanUnlock(C: Character, item: Item): boolean;
|
|
285
285
|
/**
|
|
286
286
|
* Checks whether we can lockpick a lock.
|
|
287
287
|
* @param {Character} C
|
package/bc/Scripts/Element.d.ts
CHANGED
|
@@ -108,7 +108,7 @@ declare function ElementCreateDropdown(id: string | null, optionsList: readonly
|
|
|
108
108
|
name?: string;
|
|
109
109
|
}, htmlOptions?: null | Partial<Record<"select", Omit<HTMLOptions<"select">, "tag">>>): HTMLSelectElement;
|
|
110
110
|
/**
|
|
111
|
-
* Construct a custom searchable dropdown menu.
|
|
111
|
+
* Construct a custom searchable dropdown menu or, on mobile, a conventional `<select>` element.
|
|
112
112
|
*
|
|
113
113
|
* The element comprises a button trigger displaying the current selection,
|
|
114
114
|
* and a popup containing a search input and a scrollable list of options.
|
|
@@ -134,9 +134,9 @@ declare function ElementCreateDropdown(id: string | null, optionsList: readonly
|
|
|
134
134
|
* @param {readonly ElementSearchableDropdown.OptionItem[]} optionsList - The available options.
|
|
135
135
|
* @param {(value: string) => void} onChange - Called when the selection changes.
|
|
136
136
|
* @param {ElementSearchableDropdown.CreateOptions | null} [options]
|
|
137
|
-
* @returns {ElementSearchableDropdown.SearchableDropdownElement}
|
|
137
|
+
* @returns {ElementSearchableDropdown.SearchableDropdownElement | HTMLSelectElement}
|
|
138
138
|
*/
|
|
139
|
-
declare function ElementCreateSearchableDropdown(id: string | null, optionsList: readonly ElementSearchableDropdown.OptionItem[], onChange: (value: string) => void, options?: ElementSearchableDropdown.CreateOptions | null): ElementSearchableDropdown.SearchableDropdownElement;
|
|
139
|
+
declare function ElementCreateSearchableDropdown(id: string | null, optionsList: readonly ElementSearchableDropdown.OptionItem[], onChange: (value: string) => void, options?: ElementSearchableDropdown.CreateOptions | null): ElementSearchableDropdown.SearchableDropdownElement | HTMLSelectElement;
|
|
140
140
|
/**
|
|
141
141
|
* Creates a new div element in the main document. Does not create a new element if there is already an existing one with the same ID
|
|
142
142
|
* @param {string | null} ID - The id of the div tag to create.
|
|
@@ -119,24 +119,23 @@ declare function ExtendedItemRequirementCheckMessage<T extends ExtendedItemOptio
|
|
|
119
119
|
* wearer may select the option)
|
|
120
120
|
* @param {Character} C - The character on whom the bondage is applied
|
|
121
121
|
* @param {ExtendedItemOption} Option - The option whose requirements should be checked against
|
|
122
|
-
* @returns {string |
|
|
122
|
+
* @returns {string | null} - undefined if the
|
|
123
123
|
*/
|
|
124
|
-
declare function ExtendedItemCheckSelfSelect(C: Character, Option: ExtendedItemOption): string |
|
|
124
|
+
declare function ExtendedItemCheckSelfSelect(C: Character, Option: ExtendedItemOption): string | null;
|
|
125
125
|
/**
|
|
126
126
|
* Checks whether the player meets an option's self-bondage/bondage skill level requirements
|
|
127
127
|
* @param {Character} C - The character on whom the bondage is applied
|
|
128
128
|
* @param {Item} Item - The item whose options are being checked
|
|
129
129
|
* @param {ExtendedItemOption} Option - The option whose requirements should be checked against
|
|
130
|
-
* @returns {string|
|
|
131
|
-
* a string message informing them of the requirements they do not meet.
|
|
130
|
+
* @returns {string|null} - Returns a string message informing them of the requirements they do not meet, otherwise null.
|
|
132
131
|
*/
|
|
133
|
-
declare function ExtendedItemCheckSkillRequirements(C: Character, Item: Item, Option: ExtendedItemOption): string |
|
|
132
|
+
declare function ExtendedItemCheckSkillRequirements(C: Character, Item: Item, Option: ExtendedItemOption): string | null;
|
|
134
133
|
/**
|
|
135
134
|
* Checks whether the character meets an option's required bought items
|
|
136
135
|
* @param {ExtendedItemOption} Option - The option being checked
|
|
137
|
-
* @returns {string|
|
|
136
|
+
* @returns {string|null} undefined if the requirement is met, otherwise the error message
|
|
138
137
|
*/
|
|
139
|
-
declare function ExtendedItemCheckBuyGroups(Option: ExtendedItemOption): string |
|
|
138
|
+
declare function ExtendedItemCheckBuyGroups(Option: ExtendedItemOption): string | null;
|
|
140
139
|
/**
|
|
141
140
|
* Checks whether a change from the given current option to the newly selected option is valid.
|
|
142
141
|
* @template {ExtendedItemOption} T
|
|
@@ -147,9 +146,9 @@ declare function ExtendedItemCheckBuyGroups(Option: ExtendedItemOption): string
|
|
|
147
146
|
* @param {T} previousOption - The currently applied option on the item
|
|
148
147
|
* @param {boolean} [permitExisting] - Determines whether the validation should allow the new option and previous option
|
|
149
148
|
* to be identical. Defaults to false.
|
|
150
|
-
* @returns {string} - Returns a
|
|
149
|
+
* @returns {string | null} - Returns a reason if the item failed validation, or null otherwise
|
|
151
150
|
*/
|
|
152
|
-
declare function ExtendedItemValidate<T extends ExtendedItemOption>(data: null | ExtendedItemData<T>, C: Character, Item: Item, newOption: T, previousOption: T, permitExisting?: boolean): string;
|
|
151
|
+
declare function ExtendedItemValidate<T extends ExtendedItemOption>(data: null | ExtendedItemData<T>, C: Character, Item: Item, newOption: T, previousOption: T, permitExisting?: boolean): string | null;
|
|
153
152
|
/**
|
|
154
153
|
* Simple getter for the function prefix used for the passed extended item - used for calling standard
|
|
155
154
|
* extended item functions (e.g. if the currently focused it is the hemp rope arm restraint, this will return
|
|
@@ -388,6 +387,13 @@ declare function ExtendedItemGetDrawingOptions(item: Item): ExtendedItemOptionCo
|
|
|
388
387
|
* @constant
|
|
389
388
|
*/
|
|
390
389
|
declare var ExtendedItemOffsets: Record<string, number>;
|
|
390
|
+
/**
|
|
391
|
+
* A set of properties to-be ignored by the `Init()` validation.
|
|
392
|
+
* This more relaxed validation is required as these properties can be fully configured by the user in one way or another
|
|
393
|
+
* and are thus not guaranteed to be linked to specific `TypeRecord` values
|
|
394
|
+
* @type {ReadonlySet<keyof ItemProperties>}
|
|
395
|
+
*/
|
|
396
|
+
declare const ExtendedItemInitPropertyIgnore: ReadonlySet<keyof ItemProperties>;
|
|
391
397
|
/**
|
|
392
398
|
* The X & Y co-ordinates of each option's button, based on the number to be displayed per page.
|
|
393
399
|
* @type {[number, number][][]}
|
package/bc/Scripts/Game.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Start BC after the webpage has fully loaded
|
|
3
|
+
* @param {boolean} isNode Whether BC is run through the browser or via Node (_i.e._ the testing suite)
|
|
4
|
+
*/
|
|
5
|
+
declare function GameStart(isNode?: boolean): Promise<void>;
|
|
2
6
|
declare function GameHandleError(): void;
|
|
3
7
|
/**
|
|
4
8
|
* Periodically called in the background with low frequency, so the game doesn't freeze, even if the user switches to a different tab.
|
package/bc/Scripts/Item.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ declare function ItemModuleVoiceCommandHandle(C: Character, item: Item, LastTime
|
|
|
30
30
|
* @param {AssetGroupItemName[]} tamperZones
|
|
31
31
|
*/
|
|
32
32
|
declare function ItemModulePunishCheck(C: Character, item: Item, shockCooldown: number, tamperZones: AssetGroupItemName[]): "Struggle" | "Orgasm" | "StandUp" | "StruggleOther" | null;
|
|
33
|
-
declare namespace
|
|
33
|
+
declare namespace AppearanceItem {
|
|
34
34
|
/**
|
|
35
35
|
* Construct an item from the passed asset
|
|
36
36
|
* @param {Asset} asset The asset in question
|
package/bc/Scripts/Layering.d.ts
CHANGED
|
@@ -1,50 +1,240 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
declare namespace Layering {
|
|
2
|
+
let PropertyNames: ReadonlySet<keyof ItemProperties>;
|
|
3
|
+
let Character: null | Character;
|
|
4
|
+
let activeTab: string;
|
|
5
|
+
let Display: null | LayeringDisplay;
|
|
6
|
+
let Item: null | Item;
|
|
7
|
+
let Readonly: boolean;
|
|
8
|
+
const Asset: Asset;
|
|
9
|
+
let OverridePriority: undefined | AssetLayerOverridePriority;
|
|
10
|
+
let _PriorityDefault: undefined | AssetLayerOverridePriority;
|
|
11
|
+
let _Readonly: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Update an item's property, optionally for a specific layer, and refresh the character.
|
|
14
|
+
* @param {Item} item - The item to update.
|
|
15
|
+
* @param {string} propName - The property name (e.g., "Rotation", "ScaleX").
|
|
16
|
+
* @param {any} value - The new value.
|
|
17
|
+
* @param {string} [layerName] - Optional layer name to update. If provided, updates layer-specific property.
|
|
18
|
+
*/
|
|
19
|
+
function UpdateProperty(item: Item, propName: string, value: any, layerName?: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Return whether the layering sub screen has currently been initialized (be it either active or unloaded)
|
|
22
|
+
* @returns {this is Pick<Required<typeof Layering>, "Character" | "Display" | "Item">}
|
|
23
|
+
*/
|
|
24
|
+
function IsActive(): this is Pick<Required<typeof Layering>, "Character" | "Display" | "Item">;
|
|
25
|
+
let DisplayDefault: Readonly<LayeringDisplay>;
|
|
26
|
+
let ID: Readonly<{
|
|
27
|
+
root: "layering";
|
|
28
|
+
resetButton: "layering-reset-button";
|
|
29
|
+
exitButton: "layering-exit-button";
|
|
30
|
+
hideButton: "layering-hide-button";
|
|
31
|
+
hideTooltip: "layering-hide-button-tooltip";
|
|
32
|
+
lockButton: "layering-lock-button";
|
|
33
|
+
assetHeader: "layering-asset-header";
|
|
34
|
+
assetGrid: "layering-asset-grid";
|
|
35
|
+
layerHeader: "layering-layer-header";
|
|
36
|
+
layerDIV: "layering-layer-div";
|
|
37
|
+
layerOuterGrid: "layering-layer-outer-grid";
|
|
38
|
+
}>;
|
|
39
|
+
let _ExitCallbacks: ((screen: string, C: Character, item: Item) => void)[];
|
|
40
|
+
/**
|
|
41
|
+
* private
|
|
42
|
+
* Initialize the object-based variant of {@link AssetLayerOverridePriority}
|
|
43
|
+
*/
|
|
44
|
+
function _InitOverridePriorityObject(): void;
|
|
45
|
+
/**
|
|
46
|
+
* private
|
|
47
|
+
* @param {string} name - The name of the layer
|
|
48
|
+
* @param {number} priority - The stringified layer priority
|
|
49
|
+
* @param {string} defaultPriority - The stringified default priority of the layer
|
|
50
|
+
*/
|
|
51
|
+
function _ApplyLayerPriority(name: string, priority: number, defaultPriority: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* private
|
|
54
|
+
* @param {number} priority - The layer priority
|
|
55
|
+
* @param {string} defaultPriority - The stringified default priority of the layer
|
|
56
|
+
*/
|
|
57
|
+
function _ApplyAssetPriority(priority: number, defaultPriority: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Event listener for `input` events involving layer priorities
|
|
60
|
+
* private
|
|
61
|
+
* @param {Event} event
|
|
62
|
+
*/
|
|
63
|
+
function _LayerInputListener(event: Event): void;
|
|
64
|
+
/**
|
|
65
|
+
* Event listener for `input` events involving asset priorities
|
|
66
|
+
* private
|
|
67
|
+
* @param {Event} event
|
|
68
|
+
*/
|
|
69
|
+
function _AssetInputListener(event: Event): void;
|
|
70
|
+
let _CharacterRefresh: (C: Character, Push?: boolean | undefined, RefreshDialog?: boolean | undefined) => void;
|
|
71
|
+
/**
|
|
72
|
+
* Event listener for `click` events of the reset button
|
|
73
|
+
* @this {HTMLButtonElement}
|
|
74
|
+
* @param {Event} _event
|
|
75
|
+
* private
|
|
76
|
+
*/
|
|
77
|
+
function _ResetClickListener(this: HTMLButtonElement, _event: Event): void;
|
|
78
|
+
/**
|
|
79
|
+
* Event listener for `click` events of the show hidden layers button
|
|
80
|
+
* @this {HTMLButtonElement}
|
|
81
|
+
* @param {Event} _event
|
|
82
|
+
* private
|
|
83
|
+
*/
|
|
84
|
+
function _ShowLayersClickListener(this: HTMLButtonElement, _event: Event): void;
|
|
85
|
+
/**
|
|
86
|
+
* Update the background colors of the `number`-based input elements, the color change depending on whether one is changing an asset- or layer-specific priority.
|
|
87
|
+
* private
|
|
88
|
+
* @param {"layer-priority" | "asset-priority"} activeType
|
|
89
|
+
*/
|
|
90
|
+
function _UpdateInputColors(activeType: "layer-priority" | "asset-priority"): void;
|
|
91
|
+
let _inputCache: Record<string, HTMLInputElement[]>;
|
|
92
|
+
/**
|
|
93
|
+
* Updates the input validation limits for all relevant inputs based on the current combined values.
|
|
94
|
+
* private
|
|
95
|
+
*/
|
|
96
|
+
function _UpdateLimits(): void;
|
|
97
|
+
/**
|
|
98
|
+
* private
|
|
99
|
+
* @param {string} propType
|
|
100
|
+
* @param {string[]} properties
|
|
101
|
+
* @param {number} min
|
|
102
|
+
* @param {number} max
|
|
103
|
+
* @param {number} step
|
|
104
|
+
* @param {number} defaultValue
|
|
105
|
+
* @param {Record<string, [number, number]>} [constraints={}]
|
|
106
|
+
* @returns {Element[]}
|
|
107
|
+
*/
|
|
108
|
+
function _CreateTabContent(propType: string, properties: string[], min: number, max: number, step: number, defaultValue: number, isShowingHiddenLayers: any, constraints?: Record<string, [number, number]>): Element[];
|
|
109
|
+
/**
|
|
110
|
+
* private
|
|
111
|
+
* @param {AssetLayer} layer
|
|
112
|
+
* @param {string[]} properties
|
|
113
|
+
* @param {number} min
|
|
114
|
+
* @param {number} max
|
|
115
|
+
* @param {number} step
|
|
116
|
+
* @param {number} defaultValue
|
|
117
|
+
* @param {boolean} isShowingHiddenLayers
|
|
118
|
+
* @param {Record<string, [number, number]>} constraints
|
|
119
|
+
*/
|
|
120
|
+
function _CreateLayerFieldset(layer: AssetLayer, propType: any, properties: string[], min: number, max: number, step: number, defaultValue: number, isShowingHiddenLayers: boolean, constraints: Record<string, [number, number]>): {
|
|
121
|
+
tag: string;
|
|
122
|
+
classList: string[];
|
|
123
|
+
attributes: {
|
|
124
|
+
hidden: boolean;
|
|
125
|
+
};
|
|
126
|
+
children: {
|
|
127
|
+
tag: string;
|
|
128
|
+
classList: string[];
|
|
129
|
+
children: ({
|
|
130
|
+
tag: string;
|
|
131
|
+
classList: string[];
|
|
132
|
+
children: string[];
|
|
133
|
+
} | {
|
|
134
|
+
tag: string;
|
|
135
|
+
classList: string[];
|
|
136
|
+
children: {
|
|
137
|
+
tag: string;
|
|
138
|
+
classList: string[];
|
|
139
|
+
children: ({
|
|
140
|
+
tag: string;
|
|
141
|
+
attributes: {
|
|
142
|
+
type: string;
|
|
143
|
+
value: any;
|
|
144
|
+
step: number;
|
|
145
|
+
min: number;
|
|
146
|
+
max: number;
|
|
147
|
+
id: string;
|
|
148
|
+
class: string;
|
|
149
|
+
inputmode: string;
|
|
150
|
+
};
|
|
151
|
+
eventListeners: {
|
|
152
|
+
input: (event: Event) => void;
|
|
153
|
+
};
|
|
154
|
+
} | {
|
|
155
|
+
tag: string;
|
|
156
|
+
children: string[];
|
|
157
|
+
attributes: {
|
|
158
|
+
for: string;
|
|
159
|
+
};
|
|
160
|
+
})[];
|
|
161
|
+
}[];
|
|
162
|
+
})[];
|
|
163
|
+
}[];
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* private
|
|
167
|
+
* @param {AssetGroup} group
|
|
168
|
+
* @returns {boolean}
|
|
169
|
+
*/
|
|
170
|
+
function _IsBlacklisted(group: AssetGroup): boolean;
|
|
171
|
+
/**
|
|
172
|
+
* private
|
|
173
|
+
* @param {AssetGroup} group
|
|
174
|
+
* @returns {boolean}
|
|
175
|
+
*/
|
|
176
|
+
function _IsPussy(group: AssetGroup): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* private
|
|
179
|
+
* @param {string} tabKey
|
|
180
|
+
* @returns {Element[]}
|
|
181
|
+
*/
|
|
182
|
+
function _GetTabContents(tabKey: string): Element[];
|
|
183
|
+
/**
|
|
184
|
+
* Helper to build priority fieldset to avoid repetition
|
|
185
|
+
* private
|
|
186
|
+
*/
|
|
187
|
+
function _BuildLayerPriorityFieldset(isShowingHiddenLayers: any): HTMLFieldSetElement;
|
|
188
|
+
/**
|
|
189
|
+
* Group all layers by their {@link AssetLayer.CopyLayerColor} properties
|
|
190
|
+
* private
|
|
191
|
+
* @param {readonly AssetLayer[]} layers
|
|
192
|
+
* @returns {Record<string, AssetLayer[]>}
|
|
193
|
+
*/
|
|
194
|
+
function _GroupLayers(layers: readonly AssetLayer[]): Record<string, AssetLayer[]>;
|
|
195
|
+
/**
|
|
196
|
+
* Return the default `Property.OverridePriority` of the current item.
|
|
197
|
+
*
|
|
198
|
+
* This is generally `undefined`, though certain extended item options do overwrite it.
|
|
199
|
+
* private
|
|
200
|
+
* @returns {undefined | AssetLayerOverridePriority}
|
|
201
|
+
*/
|
|
202
|
+
function _GetDefaultPriority(): undefined | AssetLayerOverridePriority;
|
|
203
|
+
/**
|
|
204
|
+
* Update all input elements and buttons with the passed {@link Layering.Readonly} status.
|
|
205
|
+
* @param {boolean} isReadonly
|
|
206
|
+
* private
|
|
207
|
+
*/
|
|
208
|
+
function _ApplyReadonly(isReadonly: boolean): void;
|
|
209
|
+
/**
|
|
210
|
+
* Initialize the layering subscreen
|
|
211
|
+
* @param {Item} item - The affected item
|
|
212
|
+
* @param {Character} character - The item's owning character
|
|
213
|
+
* @param {null | Partial<LayeringDisplay>} display - The shape of the layering subscreen
|
|
214
|
+
* @param {boolean} reload - Whether we're loading or reloading the screen.
|
|
215
|
+
* A reload pushes any current changes towards the server and reinitializes all DOM elements.
|
|
216
|
+
* @returns {Promise<HTMLDivElement>} The div containing the layering subscreen
|
|
217
|
+
*/
|
|
218
|
+
function Init(item: Item, character: Character, display?: null | Partial<LayeringDisplay>, reload?: boolean, readonly?: boolean): Promise<HTMLDivElement>;
|
|
219
|
+
/**
|
|
220
|
+
* Apply translation to the layering screen
|
|
221
|
+
* private
|
|
222
|
+
*/
|
|
223
|
+
function _ApplyTranslations(): void;
|
|
224
|
+
function Load(): Promise<void>;
|
|
225
|
+
function Resize(load: boolean): void;
|
|
226
|
+
function Unload(): void;
|
|
227
|
+
/**
|
|
228
|
+
* @satisfies {ScreenExitHandler}
|
|
229
|
+
* @param {boolean} reload - Whether the exit call is part of a reload (see {@link Layering.Init})
|
|
230
|
+
*/
|
|
231
|
+
function Exit(reload?: boolean): void;
|
|
232
|
+
/**
|
|
233
|
+
* Register screen-specific callbacks to-be executed after calling {@link Layering.Exit}.
|
|
234
|
+
*
|
|
235
|
+
* Callbacks registered herein must be used _exclusively_ for setting up the next screen, and not for tearing down the layering sub screen.
|
|
236
|
+
* As such, they are ignored when performing a reload of the layering sub screen (see {@link Layering.Init})
|
|
237
|
+
* @param {readonly LayeringExitOptions[]} options
|
|
238
|
+
*/
|
|
239
|
+
function RegisterExitCallbacks(...options: readonly LayeringExitOptions[]): void;
|
|
240
|
+
}
|
|
@@ -119,10 +119,9 @@ declare function TypedItemGetOption(groupName: AssetGroupName, assetName: string
|
|
|
119
119
|
* @param {T} previousOption - The previously applied option
|
|
120
120
|
* @param {boolean} [permitExisting] - Determines whether the validation should allow the new option and previous option
|
|
121
121
|
* to be identical. Defaults to false.
|
|
122
|
-
* @returns {string|
|
|
123
|
-
* message informing the player of the requirements that are not met.
|
|
122
|
+
* @returns {string|null} - Returns a string message informing the player of the requirements that are not met, null otherwise.
|
|
124
123
|
*/
|
|
125
|
-
declare function TypedItemValidateOption<T extends ExtendedItemOption>(data: null | ExtendedItemData<T>, C: Character, item: Item, option: T, previousOption: T, permitExisting?: boolean): string |
|
|
124
|
+
declare function TypedItemValidateOption<T extends ExtendedItemOption>(data: null | ExtendedItemData<T>, C: Character, item: Item, option: T, previousOption: T, permitExisting?: boolean): string | null;
|
|
126
125
|
/**
|
|
127
126
|
* Sets a typed item's type and properties to the option whose name matches the provided option name parameter.
|
|
128
127
|
* @param {Character} C - The character on whom the item is equipped
|
|
@@ -52,10 +52,9 @@ declare function VibratorModeGetOptions(data: VibratingItemData, modeSet: readon
|
|
|
52
52
|
* @param {VibratingItemOption} previousOption - The previously applied option
|
|
53
53
|
* @param {boolean} permitExisting - Determines whether the validation should allow the new option and previous option
|
|
54
54
|
* to be identical. Defaults to `false`.
|
|
55
|
-
* @returns {string} -
|
|
56
|
-
* message informing the player of the requirements that are not met.
|
|
55
|
+
* @returns {string | null} - Returns a string message informing the player of the requirements that are not met, null otherwise.
|
|
57
56
|
*/
|
|
58
|
-
declare function VibratorModeValidate(data: VibratingItemData, C: Character, item: Item, newOption: VibratingItemOption, previousOption: VibratingItemOption, permitExisting?: boolean): string;
|
|
57
|
+
declare function VibratorModeValidate(data: VibratingItemData, C: Character, item: Item, newOption: VibratingItemOption, previousOption: VibratingItemOption, permitExisting?: boolean): string | null;
|
|
59
58
|
/**
|
|
60
59
|
* Publish a vibrator action and exit the dialog of applicable
|
|
61
60
|
* @param {VibratingItemData} data
|