bc-stubs 131.0.0-Beta.1 → 131.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.
@@ -222,6 +222,17 @@ declare namespace ElementButton {
222
222
  /** The {@link HTMLButtonElement.ariaHasPopup} of the button */
223
223
  ariaHasPopup?: boolean | "true" | "false" | "menu" | "listbox" | "tree" | "grid" | "dialog";
224
224
  }
225
+
226
+ interface AssetOptions extends Options {
227
+ /**
228
+ * Whether the crafted item is currently worn.
229
+ *
230
+ * Used for determining whether the presence of a lock will be inferred from `Item.Property` ("worn") or `Item.Craft` ("not worn").
231
+ * @default true
232
+ * @deprecated To-be removed for R132
233
+ */
234
+ _craftIsWorn?: boolean;
235
+ }
225
236
  }
226
237
 
227
238
  declare namespace ElementCheckbox {
@@ -3521,10 +3532,16 @@ interface ItemPropertiesCustom {
3521
3532
  /** PortalLink: Used to link a remote to its target asset. */
3522
3533
  PortalLinkCode?: string;
3523
3534
 
3524
- /** Override the top-position of a layer. A value of {@link AssetOverride} will be override the _relative_ position of each and every layer individually. */
3535
+ /**
3536
+ * Override the top-position of a layer. A value of {@link AssetOverride} will be override the _relative_ position of each and every layer individually.
3537
+ * @deprecated Superseded by {@link ItemProperties.TranslationY} and {@link ItemProperties.LayerTranslationY}
3538
+ */
3525
3539
  DrawingTop?: TopLeft.ItemData;
3526
3540
 
3527
- /** Override the left-position of a layer. A value of {@link AssetOverride} will be override the _relative_ position of each and every layer individually. */
3541
+ /**
3542
+ * Override the left-position of a layer. A value of {@link AssetOverride} will be override the _relative_ position of each and every layer individually.
3543
+ * @deprecated Superseded by {@link ItemProperties.TranslationX} and {@link ItemProperties.LayerTranslationX}
3544
+ */
3528
3545
  DrawingLeft?: TopLeft.ItemData;
3529
3546
 
3530
3547
  // #region Techno Chastity Cage settings */
@@ -4823,6 +4840,7 @@ interface LogNameType {
4823
4840
  | "ReleasedCollar"
4824
4841
  | LogNameAdvanced
4825
4842
  | "ForbiddenWords"
4843
+ | "ForbiddenWordsMute"
4826
4844
  ),
4827
4845
  PrivateRoom: (
4828
4846
  "RentRoom"
@@ -1 +1,281 @@
1
- declare const m4: any;
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
+ }
@@ -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} Item - The item that should be unlocked
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, Item: Item): boolean;
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
@@ -387,6 +387,13 @@ declare function ExtendedItemGetDrawingOptions(item: Item): ExtendedItemOptionCo
387
387
  * @constant
388
388
  */
389
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>;
390
397
  /**
391
398
  * The X & Y co-ordinates of each option's button, based on the number to be displayed per page.
392
399
  * @type {[number, number][][]}
@@ -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 Item {
33
+ declare namespace AppearanceItem {
34
34
  /**
35
35
  * Construct an item from the passed asset
36
36
  * @param {Asset} asset The asset in question
@@ -1,4 +1,5 @@
1
1
  declare namespace Layering {
2
+ let PropertyNames: ReadonlySet<keyof ItemProperties>;
2
3
  let Character: null | Character;
3
4
  let activeTab: string;
4
5
  let Display: null | LayeringDisplay;
@@ -18,7 +19,7 @@ declare namespace Layering {
18
19
  function UpdateProperty(item: Item, propName: string, value: any, layerName?: string): void;
19
20
  /**
20
21
  * Return whether the layering sub screen has currently been initialized (be it either active or unloaded)
21
- * @returns {this is typeof this & Pick<Required<typeof this>, "Character" | "Display" | "Item">}
22
+ * @returns {this is Pick<Required<typeof Layering>, "Character" | "Display" | "Item">}
22
23
  */
23
24
  function IsActive(): this is Pick<Required<typeof Layering>, "Character" | "Display" | "Item">;
24
25
  let DisplayDefault: Readonly<LayeringDisplay>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bc-stubs",
3
- "version": "131.0.0-Beta.1",
3
+ "version": "131.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@github.com/bananarama92/BC-stubs.git"