bruce-models 7.1.78 → 7.1.80

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.
@@ -9177,6 +9177,22 @@
9177
9177
  function GetFindGeneratedTextureCacheKey(entityTypeSourceId, attribute) {
9178
9178
  return `client-file-find-generated-texture-${entityTypeSourceId}-${attribute}`;
9179
9179
  }
9180
+ const GENERATED_TEXTURE_PURPOSE = "Polygon Texture, ValueMap";
9181
+ const GENERATED_TEXTURE_SOURCE_PATH = "generation/Identity/EntityTypeSourceID";
9182
+ const GENERATED_TEXTURE_ATTRIBUTE_PATH = "generation/Identity/Attribute";
9183
+ /**
9184
+ * Whether a file is the generated value map for this source and attribute.
9185
+ */
9186
+ function IsGeneratedTextureFor(file, entityTypeSourceId, attribute) {
9187
+ var _a, _b;
9188
+ const identity = (_b = (_a = file === null || file === void 0 ? void 0 : file.Data) === null || _a === void 0 ? void 0 : _a.generation) === null || _b === void 0 ? void 0 : _b.Identity;
9189
+ if (!identity) {
9190
+ return false;
9191
+ }
9192
+ // A source ID reaches us as a number from the API and as a string from a filter echo.
9193
+ return Number(identity.EntityTypeSourceID) === Number(entityTypeSourceId) && identity.Attribute === attribute;
9194
+ }
9195
+ ClientFile.IsGeneratedTextureFor = IsGeneratedTextureFor;
9180
9196
  /**
9181
9197
  * Returns a generated texture file for given source ID + attribute combination.
9182
9198
  */
@@ -9198,11 +9214,11 @@
9198
9214
  filter: {
9199
9215
  PageSize: 300,
9200
9216
  PageIndex: 0,
9201
- Purpose: "Polygon Texture",
9217
+ Purpose: GENERATED_TEXTURE_PURPOSE,
9202
9218
  FilterRows: [
9203
9219
  {
9204
9220
  column: Filter.EColumn.Data,
9205
- path: "generation/EntityType.Source.ID",
9221
+ path: GENERATED_TEXTURE_SOURCE_PATH,
9206
9222
  rowOperator: Filter.ERowOperator.AND,
9207
9223
  value: String(entityTypeSourceId),
9208
9224
  includes: true,
@@ -9211,7 +9227,7 @@
9211
9227
  },
9212
9228
  {
9213
9229
  column: Filter.EColumn.Data,
9214
- path: "generation/Attribute",
9230
+ path: GENERATED_TEXTURE_ATTRIBUTE_PATH,
9215
9231
  rowOperator: Filter.ERowOperator.AND,
9216
9232
  value: attribute,
9217
9233
  includes: true,
@@ -9222,12 +9238,7 @@
9222
9238
  },
9223
9239
  req: reqParams
9224
9240
  });
9225
- const match = (res.clientFiles || []).find((file) => {
9226
- var _a;
9227
- const generation = (_a = file === null || file === void 0 ? void 0 : file.Data) === null || _a === void 0 ? void 0 : _a.generation;
9228
- return ((generation === null || generation === void 0 ? void 0 : generation["EntityType.Source.ID"]) === entityTypeSourceId &&
9229
- (generation === null || generation === void 0 ? void 0 : generation.Attribute) === attribute);
9230
- });
9241
+ const match = (res.clientFiles || []).find((file) => IsGeneratedTextureFor(file, entityTypeSourceId, attribute));
9231
9242
  return match || null;
9232
9243
  }))();
9233
9244
  api.SetCacheItem({
@@ -20082,7 +20093,7 @@
20082
20093
  })(exports.UrlUtils || (exports.UrlUtils = {}));
20083
20094
 
20084
20095
  // This is updated with the package.json version on build.
20085
- const VERSION = "7.1.78";
20096
+ const VERSION = "7.1.80";
20086
20097
 
20087
20098
  exports.VERSION = VERSION;
20088
20099
  exports.AbstractApi = AbstractApi;