@etothepii/satisfactory-file-parser 1.0.1 → 1.0.3

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.
Files changed (184) hide show
  1. package/README.md +14 -7
  2. package/build/parser/parser.d.ts +2 -6
  3. package/build/parser/parser.d.ts.map +1 -1
  4. package/build/parser/parser.js +5 -5
  5. package/build/parser/parser.js.map +1 -1
  6. package/docs/classes/AbstractBaseProperty.html +2 -2
  7. package/docs/classes/AbstractProperty.html +2 -2
  8. package/docs/classes/ArrayProperty.html +2 -2
  9. package/docs/classes/BasicProperty.html +2 -2
  10. package/docs/classes/BlueprintConfigReader.html +3 -3
  11. package/docs/classes/BlueprintConfigWriter.html +3 -3
  12. package/docs/classes/BlueprintReader.html +3 -3
  13. package/docs/classes/BlueprintWriter.html +3 -3
  14. package/docs/classes/BoolProperty.html +2 -2
  15. package/docs/classes/ByteProperty.html +2 -2
  16. package/docs/classes/CompressionLibraryError.html +2 -2
  17. package/docs/classes/CorruptSaveError.html +2 -2
  18. package/docs/classes/DoubleProperty.html +2 -2
  19. package/docs/classes/EnumProperty.html +2 -2
  20. package/docs/classes/FloatProperty.html +2 -2
  21. package/docs/classes/Int32Property.html +2 -2
  22. package/docs/classes/Int64Property.html +2 -2
  23. package/docs/classes/Int8Property.html +2 -2
  24. package/docs/classes/MapProperty.html +2 -2
  25. package/docs/classes/ObjectProperty.html +2 -2
  26. package/docs/classes/Parser.html +8 -8
  27. package/docs/classes/ParserError.html +2 -2
  28. package/docs/classes/ReadableStreamParser.html +2 -2
  29. package/docs/classes/SatisfactorySave.html +2 -2
  30. package/docs/classes/SaveComponent.html +2 -2
  31. package/docs/classes/SaveEntity.html +2 -2
  32. package/docs/classes/SaveReader.html +3 -3
  33. package/docs/classes/SaveStreamJsonStringifier.html +2 -2
  34. package/docs/classes/SaveStreamWriter.html +2 -2
  35. package/docs/classes/SaveWriter.html +3 -3
  36. package/docs/classes/SetProperty.html +2 -2
  37. package/docs/classes/StrProperty.html +2 -2
  38. package/docs/classes/StructProperty.html +2 -2
  39. package/docs/classes/TextProperty.html +2 -2
  40. package/docs/classes/TimeoutError.html +2 -2
  41. package/docs/classes/Uint32Property.html +2 -2
  42. package/docs/classes/Uint64Property.html +2 -2
  43. package/docs/classes/Uint8Property.html +2 -2
  44. package/docs/classes/UnimplementedError.html +2 -2
  45. package/docs/classes/UnsupportedVersionError.html +2 -2
  46. package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
  47. package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
  48. package/docs/functions/FICFrameRange.Parse.html +1 -1
  49. package/docs/functions/FICFrameRange.Serialize.html +1 -1
  50. package/docs/functions/GUID.read.html +1 -1
  51. package/docs/functions/GUID.write.html +1 -1
  52. package/docs/functions/GUIDInfo.read.html +1 -1
  53. package/docs/functions/GUIDInfo.write.html +1 -1
  54. package/docs/functions/Level.ReadAllObjectContents.html +1 -1
  55. package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
  56. package/docs/functions/Level.ReadLevel.html +1 -1
  57. package/docs/functions/Level.ReadNObjectContents.html +1 -1
  58. package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
  59. package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
  60. package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
  61. package/docs/functions/Level.SerializeLevel.html +1 -1
  62. package/docs/functions/MD5Hash.read.html +1 -1
  63. package/docs/functions/MD5Hash.write.html +1 -1
  64. package/docs/functions/ObjectReference.read.html +1 -1
  65. package/docs/functions/ObjectReference.write.html +1 -1
  66. package/docs/functions/PropertiesList.ParseList.html +1 -1
  67. package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
  68. package/docs/functions/PropertiesList.SerializeList.html +1 -1
  69. package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
  70. package/docs/functions/SoftObjectReference.read.html +1 -1
  71. package/docs/functions/SoftObjectReference.write.html +1 -1
  72. package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
  73. package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
  74. package/docs/functions/Transform.Parse.html +1 -1
  75. package/docs/functions/Transform.ParseF.html +1 -1
  76. package/docs/functions/Transform.Serialize.html +1 -1
  77. package/docs/functions/Transform.SerializeF.html +1 -1
  78. package/docs/functions/col4.ParseBGRA.html +1 -1
  79. package/docs/functions/col4.ParseRGBA.html +1 -1
  80. package/docs/functions/col4.SerializeBGRA.html +1 -1
  81. package/docs/functions/col4.SerializeRGBA.html +1 -1
  82. package/docs/functions/isArrayProperty.html +1 -1
  83. package/docs/functions/isBoolProperty.html +1 -1
  84. package/docs/functions/isByteProperty.html +1 -1
  85. package/docs/functions/isDoubleProperty.html +1 -1
  86. package/docs/functions/isEnumProperty.html +1 -1
  87. package/docs/functions/isFloatProperty.html +1 -1
  88. package/docs/functions/isInt32Property.html +1 -1
  89. package/docs/functions/isInt64Property.html +1 -1
  90. package/docs/functions/isInt8Property.html +1 -1
  91. package/docs/functions/isMapProperty.html +1 -1
  92. package/docs/functions/isObjectProperty.html +1 -1
  93. package/docs/functions/isSaveComponent.html +1 -1
  94. package/docs/functions/isSaveEntity.html +1 -1
  95. package/docs/functions/isSetProperty.html +1 -1
  96. package/docs/functions/isStrProperty.html +1 -1
  97. package/docs/functions/isStructProperty.html +1 -1
  98. package/docs/functions/isTextProperty.html +1 -1
  99. package/docs/functions/isUInt64Property.html +1 -1
  100. package/docs/functions/isUint32Property.html +1 -1
  101. package/docs/functions/isUint8Property.html +1 -1
  102. package/docs/functions/vec2.Parse.html +1 -1
  103. package/docs/functions/vec2.ParseF.html +1 -1
  104. package/docs/functions/vec2.Serialize.html +1 -1
  105. package/docs/functions/vec2.SerializeF.html +1 -1
  106. package/docs/functions/vec3.Parse.html +1 -1
  107. package/docs/functions/vec3.ParseF.html +1 -1
  108. package/docs/functions/vec3.ParseInt.html +1 -1
  109. package/docs/functions/vec3.Serialize.html +1 -1
  110. package/docs/functions/vec3.SerializeF.html +1 -1
  111. package/docs/functions/vec3.SerializeInt.html +1 -1
  112. package/docs/functions/vec3.add.html +1 -1
  113. package/docs/functions/vec3.length.html +1 -1
  114. package/docs/functions/vec3.mult.html +1 -1
  115. package/docs/functions/vec3.norm.html +1 -1
  116. package/docs/functions/vec3.sub.html +1 -1
  117. package/docs/functions/vec4.Parse.html +1 -1
  118. package/docs/functions/vec4.ParseF.html +1 -1
  119. package/docs/functions/vec4.Serialize.html +1 -1
  120. package/docs/functions/vec4.SerializeF.html +1 -1
  121. package/docs/index.html +10 -4
  122. package/docs/interfaces/Blueprint.html +2 -2
  123. package/docs/interfaces/BlueprintConfig.html +2 -2
  124. package/docs/interfaces/ModData.html +2 -2
  125. package/docs/interfaces/SatisfactoryModMetadata.html +2 -2
  126. package/docs/interfaces/SatisfactorySaveHeader.html +2 -2
  127. package/docs/interfaces/SaveComponentHeader.html +2 -2
  128. package/docs/interfaces/SaveEntityHeader.html +2 -2
  129. package/docs/modules/DynamicStructPropertyValue.html +1 -1
  130. package/docs/modules/FICFrameRange.html +1 -1
  131. package/docs/modules/GUID.html +1 -1
  132. package/docs/modules/GUIDInfo.html +1 -1
  133. package/docs/modules/Level.html +1 -1
  134. package/docs/modules/MD5Hash.html +1 -1
  135. package/docs/modules/ObjectReference.html +1 -1
  136. package/docs/modules/PropertiesList.html +1 -1
  137. package/docs/modules/SoftObjectReference.html +1 -1
  138. package/docs/modules/SpecialProperties.html +1 -1
  139. package/docs/modules/Transform.html +1 -1
  140. package/docs/modules/col4.html +1 -1
  141. package/docs/modules/vec2.html +1 -1
  142. package/docs/modules/vec3.html +1 -1
  143. package/docs/modules/vec4.html +1 -1
  144. package/docs/types/ArrayPropertyStructValueFields.html +1 -1
  145. package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
  146. package/docs/types/BasicStructPropertyValue.html +1 -1
  147. package/docs/types/BlueprintHeader.html +1 -1
  148. package/docs/types/BoxStructPropertyValue.html +1 -1
  149. package/docs/types/BuildableSubsystemSpecialProperties.html +1 -1
  150. package/docs/types/BuildableTypeInstance.html +1 -1
  151. package/docs/types/BytePropertyValue.html +1 -1
  152. package/docs/types/ClientIdentityInfo.html +1 -1
  153. package/docs/types/ConveyorChainActorSpecialProperties.html +1 -1
  154. package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
  155. package/docs/types/ConveyorItemSpecialProperties.html +1 -1
  156. package/docs/types/DynamicStructPropertyValue-1.html +1 -1
  157. package/docs/types/EmptySpecialProperties.html +1 -1
  158. package/docs/types/FICFrameRange-1.html +1 -1
  159. package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
  160. package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
  161. package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
  162. package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
  163. package/docs/types/GUID-1.html +1 -1
  164. package/docs/types/GUIDInfo-1.html +1 -1
  165. package/docs/types/InventoryItemStructPropertyValue.html +1 -1
  166. package/docs/types/Level-1.html +1 -1
  167. package/docs/types/MAP_STRUCT_KEY_PROXY.html +1 -1
  168. package/docs/types/MD5Hash-1.html +1 -1
  169. package/docs/types/ObjectReference-1.html +1 -1
  170. package/docs/types/PlayerSpecialProperties.html +1 -1
  171. package/docs/types/PowerLineSpecialProperties.html +1 -1
  172. package/docs/types/PropertiesMap.html +1 -1
  173. package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
  174. package/docs/types/RoughSaveVersion.html +1 -1
  175. package/docs/types/SoftObjectReference-1.html +1 -1
  176. package/docs/types/SpecialAnyProperties.html +1 -1
  177. package/docs/types/TextPropertyValue.html +1 -1
  178. package/docs/types/Transform-1.html +1 -1
  179. package/docs/types/col4-1.html +1 -1
  180. package/docs/types/vec2-1.html +1 -1
  181. package/docs/types/vec3-1.html +1 -1
  182. package/docs/types/vec4-1.html +1 -1
  183. package/docs/variables/EDIT.html +1 -1
  184. package/package.json +1 -1
package/README.md CHANGED
@@ -75,9 +75,7 @@ import { Parser } from "@etothepii/satisfactory-file-parser";
75
75
 
76
76
  let fileHeader: Uint8Array;
77
77
  const bodyChunks: Uint8Array[] = [];
78
- Parser.WriteSave(save, binaryBeforeCompressed => {
79
- console.log('on binary data before being compressed.');
80
- }, header => {
78
+ Parser.WriteSave(save, header => {
81
79
  console.log('on save header.');
82
80
  fileHeader = header;
83
81
  }, chunk => {
@@ -124,15 +122,16 @@ import { Parser } from "@etothepii/satisfactory-file-parser";
124
122
 
125
123
  let mainFileHeader: Uint8Array;
126
124
  const mainFileBodyChunks: Uint8Array[] = [];
127
- const summary = Parser.WriteBlueprintFiles(blueprint, {
128
- onMainFileHeader: header => {
125
+ const summary = Parser.WriteBlueprintFiles(blueprint,
126
+ header => {
129
127
  console.log('on main file header.');
130
128
  mainFileHeader = header;
131
- }, onMainFileChunk: chunk => {
129
+ },
130
+ chunk => {
132
131
  console.log('on main file body chunk.');
133
132
  mainFileBodyChunks.push(chunk);
134
133
  }
135
- });
134
+ );
136
135
 
137
136
  // write complete .sbp file back to disk
138
137
  fs.writeFileSync('./MyBlueprint.sbp', Buffer.concat([mainFileHeader!, ...mainFileBodyChunks]));
@@ -165,6 +164,14 @@ const blueprint = Parser.ParseBlueprintFiles('Myblueprint', file, configFile, {
165
164
  You can always raise an issue on the linked github project or hit me up on the satisfactory discord `etothepii`.
166
165
 
167
166
  # Changelog
167
+ ## [1.0.3] (2024-10-17)
168
+ #### Hotfix
169
+ * fix being forced to use callbacks when writing saves or blueprints.
170
+
171
+ ## [1.0.2] (2024-10-17)
172
+ #### Internal renaming
173
+ * `...SpecialProperty` got all renamed to `...SpecialProperties`.
174
+
168
175
  ### [1.0.1] (2024-10-17)
169
176
  #### Major breaking changes on Parser usage
170
177
  * Cleaned Usage methods of Save / Blueprint Parsing. The callbacks are an optional additional parameter object now instead of required.
@@ -6,15 +6,11 @@ export declare class Parser {
6
6
  onDecompressedSaveBody: (buffer: ArrayBuffer) => void;
7
7
  onProgressCallback: (progress: number, msg?: string) => void;
8
8
  }>): SatisfactorySave;
9
- static WriteSave(save: SatisfactorySave, options?: Partial<{
9
+ static WriteSave(save: SatisfactorySave, onHeader: (header: Uint8Array) => void, onChunk: (chunk: Uint8Array) => void, options?: Partial<{
10
10
  onBinaryBeforeCompressing: (buffer: ArrayBuffer) => void;
11
- onHeader: (header: Uint8Array) => void;
12
- onChunk: (chunk: Uint8Array) => void;
13
11
  }>): ChunkSummary[];
14
- static WriteBlueprintFiles(blueprint: Blueprint, options?: Partial<{
12
+ static WriteBlueprintFiles(blueprint: Blueprint, onMainFileHeader: (header: Uint8Array) => void, onMainFileChunk: (chunk: Uint8Array) => void, options?: Partial<{
15
13
  onMainFileBinaryBeforeCompressing: (binary: ArrayBuffer) => void;
16
- onMainFileHeader: (header: Uint8Array) => void;
17
- onMainFileChunk: (chunk: Uint8Array) => void;
18
14
  }>): {
19
15
  mainFileChunkSummary: ChunkSummary[];
20
16
  configFileBinary: ArrayBuffer;
@@ -1 +1 @@
1
- {"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/parser/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAMzE,qBAAa,MAAM;WASJ,SAAS,CACtB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,EACjB,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,sBAAsB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;QACtD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KAC5D,CAAC,GACA,gBAAgB;WA8CL,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;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EAAE,WAAW,KAAK,IAAI,CAAC;QACtD,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KAC5D,CAAC,GACA,gBAAgB;WA8CL,SAAS,CAAC,IAAI,EAAE,gBAAgB,EAC7C,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EACtC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACpC,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,yBAAyB,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;KACzD,CAAC,GACA,YAAY,EAAE;WAuBH,mBAAmB,CAChC,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EAC9C,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,iCAAiC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;KACjE,CAAC,GACA;QACF,oBAAoB,EAAE,YAAY,EAAE,CAAC;QACrC,gBAAgB,EAAE,WAAW,CAAA;KAC7B;WAuCa,mBAAmB,CAChC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM,EACrB,mBAAmB,EAAE,MAAM,EAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;QACjB,2BAA2B,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;KAC1D,CAAC,GACA,SAAS;IAmCZ,OAAc,qBAAqB,QAAS,GAAG,WAAU,MAAM,KAAO,MAAM,CAQjE;CAEX"}
@@ -32,7 +32,7 @@ class Parser {
32
32
  save.levels = reader.readLevels();
33
33
  return save;
34
34
  }
35
- static WriteSave(save, options) {
35
+ static WriteSave(save, onHeader, onChunk, options) {
36
36
  const writer = new save_writer_1.SaveWriter();
37
37
  save_writer_1.SaveWriter.WriteHeader(writer, save.header);
38
38
  const posAfterHeader = writer.getBufferPosition();
@@ -40,10 +40,10 @@ class Parser {
40
40
  save_writer_1.SaveWriter.WriteGrids(writer, save.grids);
41
41
  save_writer_1.SaveWriter.WriteLevels(writer, save, save.header.buildVersion);
42
42
  writer.endWriting();
43
- const chunkSummary = writer.generateChunks(save.compressionInfo, posAfterHeader, options?.onBinaryBeforeCompressing ?? (() => { }), options?.onHeader ?? (() => { }), options?.onChunk ?? (() => { }));
43
+ const chunkSummary = writer.generateChunks(save.compressionInfo, posAfterHeader, options?.onBinaryBeforeCompressing ?? (() => { }), onHeader, onChunk);
44
44
  return chunkSummary;
45
45
  }
46
- static WriteBlueprintFiles(blueprint, options) {
46
+ static WriteBlueprintFiles(blueprint, onMainFileHeader, onMainFileChunk, options) {
47
47
  const blueprintWriter = new blueprint_writer_1.BlueprintWriter();
48
48
  blueprint_writer_1.BlueprintWriter.SerializeHeader(blueprintWriter, blueprint.header);
49
49
  const saveBodyPos = blueprintWriter.getBufferPosition();
@@ -53,8 +53,8 @@ class Parser {
53
53
  let binaryHeader;
54
54
  const mainFileChunkSummary = blueprintWriter.generateChunks(blueprint.compressionInfo, saveBodyPos, {
55
55
  onBinaryBeforeCompressing: options?.onMainFileBinaryBeforeCompressing ?? (() => { }),
56
- onHeader: options?.onMainFileHeader ?? (() => { }),
57
- onChunk: options?.onMainFileChunk ?? (() => { })
56
+ onHeader: onMainFileHeader,
57
+ onChunk: onMainFileChunk
58
58
  });
59
59
  const configWriter = new blueprint_writer_1.BlueprintConfigWriter();
60
60
  blueprint_writer_1.BlueprintConfigWriter.SerializeConfig(configWriter, blueprint.config);
@@ -1 +1 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/parser/parser.ts"],"names":[],"mappings":";;;AAAA,uDAA+D;AAE/D,gFAAmG;AACnG,gFAAmG;AAEnG,6EAAyE;AACzE,iEAA6D;AAC7D,iEAA6D;AAI7D,MAAa,MAAM;IASX,MAAM,CA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,CAAC,CAAC;QACvE,MAAM,SAAS,GAAc;YAC5B,IAAI;YACJ,eAAe,EAAE,eAAe,CAAC,eAAe;YAChD,MAAM,EAAE,MAAM;YACd,MAAM;YACN,OAAO,EAAE,gBAAgB;SACzB,CAAC;QACF,OAAO,SAAS,CAAC;IAClB,CAAC;;AA5KF,wBAgMC;AAVc,4BAAqB,GAAG,CAAC,GAAQ,EAAE,SAAiB,CAAC,EAAU,EAAE,CAC9E,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;SAAM,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,EAAE,MAAM,CAAC,CAAA","sourcesContent":["import { UnsupportedVersionError } from './error/parser.error';\nimport { ChunkSummary } from \"./file.types\";\nimport { BlueprintConfigReader, BlueprintReader } from \"./satisfactory/blueprint/blueprint-reader\";\nimport { BlueprintConfigWriter, BlueprintWriter } from \"./satisfactory/blueprint/blueprint-writer\";\nimport { Blueprint } from \"./satisfactory/blueprint/blueprint.types\";\nimport { SatisfactorySave } from \"./satisfactory/save/satisfactory-save\";\nimport { SaveReader } from './satisfactory/save/save-reader';\nimport { SaveWriter } from \"./satisfactory/save/save-writer\";\n\n\n/** @public */\nexport class Parser {\n\n\t/**\n\t * Parses a given binary buffer as {@link SatisfactorySave}\n\t * @param name the save name. It won't be serialized, so it does not matter how you name it.\n\t * @param bytes the actual binary buffer\n\t * @param options provides callbacks. Either on the decompressed save body or on reported progress as a number [0,1] with an occasional message.\n\t * @returns \n\t */\n\tpublic static ParseSave(\n\t\tname: string,\n\t\tbytes: Uint8Array,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedSaveBody: (buffer: ArrayBuffer) => void,\n\t\t\tonProgressCallback: (progress: number, msg?: string) => void\n\t\t}>\n\t): SatisfactorySave {\n\n\t\tconst reader = new SaveReader(bytes.buffer, options?.onProgressCallback);\n\n\t\tconst header = reader.readHeader();\n\t\tconst save = new SatisfactorySave(name, header);\n\n\t\t// guard save version\n\t\tconst roughSaveVersion = SaveReader.GetRoughSaveVersion(header.saveVersion, header.saveHeaderType);\n\t\tif (roughSaveVersion === '<U6') {\n\t\t\tthrow new UnsupportedVersionError('Game Version < U6 is not supported.');\n\t\t} else if (roughSaveVersion === 'U6/U7') {\n\t\t\tthrow new UnsupportedVersionError('Game Version U6/U7 is not supported in this package version. Consider downgrading to the latest package version supporting it, which is 0.0.34');\n\t\t} else if (roughSaveVersion === 'U8') {\n\t\t\tthrow new UnsupportedVersionError('Game Version U8 is not supported in this package version. Consider downgrading to the latest package version supporting it, which is 0.3.7');\n\t\t}\n\n\t\t// inflate chunks\n\t\tconst inflateResult = reader.inflateChunks();\n\t\tsave.compressionInfo = reader.compressionInfo;\n\n\t\t// call callback on decompressed save body\n\t\tif (options?.onDecompressedSaveBody !== undefined) {\n\t\t\toptions.onDecompressedSaveBody(reader.getBuffer());\n\t\t}\n\n\t\t// save body validation hash\n\t\tsave.gridHash = reader.readSaveBodyHash();\n\n\t\t// parse grids\n\t\tsave.grids = reader.readGrids();\n\n\t\t// parse levels\n\t\tsave.levels = reader.readLevels();\n\n\t\treturn save;\n\t}\n\n\t/**\n\t * serializes a {@link SatisfactorySave} into binary and reports back on individual callbacks.\n\t * @param save the {@link SatisfactorySave} to serialize into binary.\n\t * @param options provides callbacks. onBinaryBeforeCompressing gets called on the binary save body before it is compressed.\n\t * onHeader gets called on the binary save header, which is always uncompressed.\n\t * onChunk gets called when a chunk of the compressed save body was generated. Often, files' save bodies consist of multiple chunks.\n\t * @returns a summary of the generated chunks.\n\t */\n\tpublic static WriteSave(save: SatisfactorySave,\n\t\toptions?: Partial<{\n\t\t\tonBinaryBeforeCompressing: (buffer: ArrayBuffer) => void,\n\t\t\tonHeader: (header: Uint8Array) => void,\n\t\t\tonChunk: (chunk: Uint8Array) => void\n\t\t}>\n\t): ChunkSummary[] {\n\n\t\tconst writer = new SaveWriter();\n\n\t\tSaveWriter.WriteHeader(writer, save.header);\n\t\tconst posAfterHeader = writer.getBufferPosition();\n\n\t\tSaveWriter.WriteSaveBodyHash(writer, save.gridHash);\n\t\tSaveWriter.WriteGrids(writer, save.grids);\n\t\tSaveWriter.WriteLevels(writer, save, save.header.buildVersion);\n\n\t\twriter.endWriting();\n\t\tconst chunkSummary = writer.generateChunks(save.compressionInfo!, posAfterHeader, options?.onBinaryBeforeCompressing ?? (() => { }), options?.onHeader ?? (() => { }), options?.onChunk ?? (() => { }));\n\t\treturn chunkSummary;\n\t}\n\n\t/**\n\t * Writes a {@link Blueprint} object to binary. And reports back on individual callbacks.\n\t * @param blueprint the blueprint to be written\n\t * @param options onMainFileBinaryBeforeCompressing gets called back when the main blueprint file binary is ready before compressing.\n\t * onMainFileHeader gets called back when the main blueprint file header is ready. onMainFileChunk gets called back when a main blueprint file chunk is ready.\n\t * @returns a chunk summary of the main file generated chunks. Plus the binary data of the config file, since it is often very small.\n\t */\n\tpublic static WriteBlueprintFiles(\n\t\tblueprint: Blueprint,\n\t\toptions?: Partial<{\n\t\t\tonMainFileBinaryBeforeCompressing: (binary: ArrayBuffer) => void,\n\t\t\tonMainFileHeader: (header: Uint8Array) => void,\n\t\t\tonMainFileChunk: (chunk: Uint8Array) => void,\n\t\t}>\n\t): {\n\t\tmainFileChunkSummary: ChunkSummary[],\n\t\tconfigFileBinary: ArrayBuffer\n\t} {\n\n\t\t// write main blueprint file\n\t\tconst blueprintWriter = new BlueprintWriter();\n\t\tBlueprintWriter.SerializeHeader(blueprintWriter, blueprint.header);\n\t\tconst saveBodyPos = blueprintWriter.getBufferPosition();\n\t\tBlueprintWriter.SerializeObjects(blueprintWriter, blueprint.objects);\n\t\tblueprintWriter.endWriting();\n\t\tlet binaryChunks: Uint8Array[] = [];\n\t\tlet binaryHeader: Uint8Array;\n\t\tconst mainFileChunkSummary = blueprintWriter.generateChunks(\n\t\t\tblueprint.compressionInfo,\n\t\t\tsaveBodyPos,\n\t\t\t{\n\t\t\t\tonBinaryBeforeCompressing: options?.onMainFileBinaryBeforeCompressing ?? (() => { }),\n\t\t\t\tonHeader: options?.onMainFileHeader ?? (() => { }),\n\t\t\t\tonChunk: options?.onMainFileChunk ?? (() => { })\n\t\t\t}\n\t\t);\n\n\t\t// write config as well.\n\t\tconst configWriter = new BlueprintConfigWriter();\n\t\tBlueprintConfigWriter.SerializeConfig(configWriter, blueprint.config);\n\t\tconst configFileBinary = configWriter.endWriting();\n\n\t\treturn {\n\t\t\tmainFileChunkSummary,\n\t\t\tconfigFileBinary\n\t\t}\n\t}\n\n\t/**\n\t * Parses two buffers (main blueprint file + config file) into a {@link Blueprint object}\n\t * @param name the name of the blueprint, since it is not part of the binary data and has to be passed.\n\t * @param blueprintFile the main blueprint file \".sbp\"\n\t * @param blueprintConfigFile the config blueprint file \".sbpcfg\"\n\t * @param options provides callbacks. onDecompressedBlueprintBody gets called when the body of the main blueprint file is decompressed.\n\t * @returns \n\t */\n\tpublic static ParseBlueprintFiles(\n\t\tname: string,\n\t\tblueprintFile: Buffer,\n\t\tblueprintConfigFile: Buffer,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedBlueprintBody: (buffer: ArrayBuffer) => void\n\t\t}>\n\t): Blueprint {\n\n\t\t// read config file\n\t\tconst blueprintConfigReader = new BlueprintConfigReader(new Uint8Array(blueprintConfigFile).buffer);\n\t\tconst config = BlueprintConfigReader.ParseConfig(blueprintConfigReader);\n\n\t\t// read actual blueprint file\n\t\tconst blueprintReader = new BlueprintReader(new Uint8Array(blueprintFile).buffer);\n\t\tconst header = BlueprintReader.ReadHeader(blueprintReader);\n\t\tconst inflateResult = blueprintReader.inflateChunks();\n\n\t\t// call back on decompressed body.\n\t\tif (options?.onDecompressedBlueprintBody !== undefined) {\n\t\t\toptions.onDecompressedBlueprintBody(inflateResult.inflatedData);\n\t\t}\n\n\t\tconst blueprintObjects = BlueprintReader.ParseObjects(blueprintReader);\n\t\tconst blueprint: Blueprint = {\n\t\t\tname,\n\t\t\tcompressionInfo: blueprintReader.compressionInfo,\n\t\t\theader: header,\n\t\t\tconfig,\n\t\t\tobjects: blueprintObjects\n\t\t};\n\t\treturn blueprint;\n\t}\n\n\t/**\n\t * It JSON.stringifies any parsed content safely. The original JSON.stringify() has some flaws that get in the way, so it is custom wrapped. The original has some problems:\n\t * 1. it cannot stringify bigints. So we help out by converting it into a string.\n\t * 2. It cannot distinguish between 0 and -0. But a float32 is encoded in a uint8Array for 0 to be [0,0,0,0] (0x00000000) and -0 to be [0,0,0,128] (0x00000080) in little endian.\n\t * @param obj basically anything that can be stringified\n\t * @param indent the indentation, just like with the real JSON stringify.\n\t * @returns a string that is safely stringified.\n\t */\n\tpublic static JSONStringifyModified = (obj: any, indent: number = 0): string =>\n\t\tJSON.stringify(obj, (key, value) => {\n\t\t\tif (typeof value === 'bigint') {\n\t\t\t\treturn value.toString();\n\t\t\t} else if (value === 0 && 1 / value < 0) {\t// -0\n\t\t\t\treturn '-0';\n\t\t\t}\n\t\t\treturn value;\n\t\t}, indent)\n\n}"]}
1
+ {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/parser/parser.ts"],"names":[],"mappings":";;;AAAA,uDAA+D;AAE/D,gFAAmG;AACnG,gFAAmG;AAEnG,6EAAyE;AACzE,iEAA6D;AAC7D,iEAA6D;AAI7D,MAAa,MAAM;IASX,MAAM,CAAC,SAAS,CACtB,IAAY,EACZ,KAAiB,EACjB,OAGE;QAGF,MAAM,MAAM,GAAG,IAAI,wBAAU,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;QAEzE,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACnC,MAAM,IAAI,GA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AAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;SAAM,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACb,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC,EAAE,MAAM,CAAC,CAAA","sourcesContent":["import { UnsupportedVersionError } from './error/parser.error';\nimport { ChunkSummary } from \"./file.types\";\nimport { BlueprintConfigReader, BlueprintReader } from \"./satisfactory/blueprint/blueprint-reader\";\nimport { BlueprintConfigWriter, BlueprintWriter } from \"./satisfactory/blueprint/blueprint-writer\";\nimport { Blueprint } from \"./satisfactory/blueprint/blueprint.types\";\nimport { SatisfactorySave } from \"./satisfactory/save/satisfactory-save\";\nimport { SaveReader } from './satisfactory/save/save-reader';\nimport { SaveWriter } from \"./satisfactory/save/save-writer\";\n\n\n/** @public */\nexport class Parser {\n\n\t/**\n\t * Parses a given binary buffer as {@link SatisfactorySave}\n\t * @param name the save name. It won't be serialized, so it does not matter how you name it.\n\t * @param bytes the actual binary buffer\n\t * @param options provides callbacks. Either on the decompressed save body or on reported progress as a number [0,1] with an occasional message.\n\t * @returns \n\t */\n\tpublic static ParseSave(\n\t\tname: string,\n\t\tbytes: Uint8Array,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedSaveBody: (buffer: ArrayBuffer) => void,\n\t\t\tonProgressCallback: (progress: number, msg?: string) => void\n\t\t}>\n\t): SatisfactorySave {\n\n\t\tconst reader = new SaveReader(bytes.buffer, options?.onProgressCallback);\n\n\t\tconst header = reader.readHeader();\n\t\tconst save = new SatisfactorySave(name, header);\n\n\t\t// guard save version\n\t\tconst roughSaveVersion = SaveReader.GetRoughSaveVersion(header.saveVersion, header.saveHeaderType);\n\t\tif (roughSaveVersion === '<U6') {\n\t\t\tthrow new UnsupportedVersionError('Game Version < U6 is not supported.');\n\t\t} else if (roughSaveVersion === 'U6/U7') {\n\t\t\tthrow new UnsupportedVersionError('Game Version U6/U7 is not supported in this package version. Consider downgrading to the latest package version supporting it, which is 0.0.34');\n\t\t} else if (roughSaveVersion === 'U8') {\n\t\t\tthrow new UnsupportedVersionError('Game Version U8 is not supported in this package version. Consider downgrading to the latest package version supporting it, which is 0.3.7');\n\t\t}\n\n\t\t// inflate chunks\n\t\tconst inflateResult = reader.inflateChunks();\n\t\tsave.compressionInfo = reader.compressionInfo;\n\n\t\t// call callback on decompressed save body\n\t\tif (options?.onDecompressedSaveBody !== undefined) {\n\t\t\toptions.onDecompressedSaveBody(reader.getBuffer());\n\t\t}\n\n\t\t// save body validation hash\n\t\tsave.gridHash = reader.readSaveBodyHash();\n\n\t\t// parse grids\n\t\tsave.grids = reader.readGrids();\n\n\t\t// parse levels\n\t\tsave.levels = reader.readLevels();\n\n\t\treturn save;\n\t}\n\n\t/**\n\t * serializes a {@link SatisfactorySave} into binary and reports back on individual callbacks.\n\t * @param save the {@link SatisfactorySave} to serialize into binary.\n\t * @param options provides callbacks. onBinaryBeforeCompressing gets called on the binary save body before it is compressed.\n\t * onHeader gets called on the binary save header, which is always uncompressed.\n\t * onChunk gets called when a chunk of the compressed save body was generated. Often, files' save bodies consist of multiple chunks.\n\t * @returns a summary of the generated chunks.\n\t */\n\tpublic static WriteSave(save: SatisfactorySave,\n\t\tonHeader: (header: Uint8Array) => void,\n\t\tonChunk: (chunk: Uint8Array) => void,\n\t\toptions?: Partial<{\n\t\t\tonBinaryBeforeCompressing: (buffer: ArrayBuffer) => void,\n\t\t}>\n\t): ChunkSummary[] {\n\n\t\tconst writer = new SaveWriter();\n\n\t\tSaveWriter.WriteHeader(writer, save.header);\n\t\tconst posAfterHeader = writer.getBufferPosition();\n\n\t\tSaveWriter.WriteSaveBodyHash(writer, save.gridHash);\n\t\tSaveWriter.WriteGrids(writer, save.grids);\n\t\tSaveWriter.WriteLevels(writer, save, save.header.buildVersion);\n\n\t\twriter.endWriting();\n\t\tconst chunkSummary = writer.generateChunks(save.compressionInfo!, posAfterHeader, options?.onBinaryBeforeCompressing ?? (() => { }), onHeader, onChunk);\n\t\treturn chunkSummary;\n\t}\n\n\t/**\n\t * Writes a {@link Blueprint} object to binary. And reports back on individual callbacks.\n\t * @param blueprint the blueprint to be written\n\t * @param options onMainFileBinaryBeforeCompressing gets called back when the main blueprint file binary is ready before compressing.\n\t * onMainFileHeader gets called back when the main blueprint file header is ready. onMainFileChunk gets called back when a main blueprint file chunk is ready.\n\t * @returns a chunk summary of the main file generated chunks. Plus the binary data of the config file, since it is often very small.\n\t */\n\tpublic static WriteBlueprintFiles(\n\t\tblueprint: Blueprint,\n\t\tonMainFileHeader: (header: Uint8Array) => void,\n\t\tonMainFileChunk: (chunk: Uint8Array) => void,\n\t\toptions?: Partial<{\n\t\t\tonMainFileBinaryBeforeCompressing: (binary: ArrayBuffer) => void,\n\t\t}>\n\t): {\n\t\tmainFileChunkSummary: ChunkSummary[],\n\t\tconfigFileBinary: ArrayBuffer\n\t} {\n\n\t\t// write main blueprint file\n\t\tconst blueprintWriter = new BlueprintWriter();\n\t\tBlueprintWriter.SerializeHeader(blueprintWriter, blueprint.header);\n\t\tconst saveBodyPos = blueprintWriter.getBufferPosition();\n\t\tBlueprintWriter.SerializeObjects(blueprintWriter, blueprint.objects);\n\t\tblueprintWriter.endWriting();\n\t\tlet binaryChunks: Uint8Array[] = [];\n\t\tlet binaryHeader: Uint8Array;\n\t\tconst mainFileChunkSummary = blueprintWriter.generateChunks(\n\t\t\tblueprint.compressionInfo,\n\t\t\tsaveBodyPos,\n\t\t\t{\n\t\t\t\tonBinaryBeforeCompressing: options?.onMainFileBinaryBeforeCompressing ?? (() => { }),\n\t\t\t\tonHeader: onMainFileHeader,\n\t\t\t\tonChunk: onMainFileChunk\n\t\t\t}\n\t\t);\n\n\t\t// write config as well.\n\t\tconst configWriter = new BlueprintConfigWriter();\n\t\tBlueprintConfigWriter.SerializeConfig(configWriter, blueprint.config);\n\t\tconst configFileBinary = configWriter.endWriting();\n\n\t\treturn {\n\t\t\tmainFileChunkSummary,\n\t\t\tconfigFileBinary\n\t\t}\n\t}\n\n\t/**\n\t * Parses two buffers (main blueprint file + config file) into a {@link Blueprint object}\n\t * @param name the name of the blueprint, since it is not part of the binary data and has to be passed.\n\t * @param blueprintFile the main blueprint file \".sbp\"\n\t * @param blueprintConfigFile the config blueprint file \".sbpcfg\"\n\t * @param options provides callbacks. onDecompressedBlueprintBody gets called when the body of the main blueprint file is decompressed.\n\t * @returns \n\t */\n\tpublic static ParseBlueprintFiles(\n\t\tname: string,\n\t\tblueprintFile: Buffer,\n\t\tblueprintConfigFile: Buffer,\n\t\toptions?: Partial<{\n\t\t\tonDecompressedBlueprintBody: (buffer: ArrayBuffer) => void\n\t\t}>\n\t): Blueprint {\n\n\t\t// read config file\n\t\tconst blueprintConfigReader = new BlueprintConfigReader(new Uint8Array(blueprintConfigFile).buffer);\n\t\tconst config = BlueprintConfigReader.ParseConfig(blueprintConfigReader);\n\n\t\t// read actual blueprint file\n\t\tconst blueprintReader = new BlueprintReader(new Uint8Array(blueprintFile).buffer);\n\t\tconst header = BlueprintReader.ReadHeader(blueprintReader);\n\t\tconst inflateResult = blueprintReader.inflateChunks();\n\n\t\t// call back on decompressed body.\n\t\tif (options?.onDecompressedBlueprintBody !== undefined) {\n\t\t\toptions.onDecompressedBlueprintBody(inflateResult.inflatedData);\n\t\t}\n\n\t\tconst blueprintObjects = BlueprintReader.ParseObjects(blueprintReader);\n\t\tconst blueprint: Blueprint = {\n\t\t\tname,\n\t\t\tcompressionInfo: blueprintReader.compressionInfo,\n\t\t\theader: header,\n\t\t\tconfig,\n\t\t\tobjects: blueprintObjects\n\t\t};\n\t\treturn blueprint;\n\t}\n\n\t/**\n\t * It JSON.stringifies any parsed content safely. The original JSON.stringify() has some flaws that get in the way, so it is custom wrapped. The original has some problems:\n\t * 1. it cannot stringify bigints. So we help out by converting it into a string.\n\t * 2. It cannot distinguish between 0 and -0. But a float32 is encoded in a uint8Array for 0 to be [0,0,0,0] (0x00000000) and -0 to be [0,0,0,128] (0x00000080) in little endian.\n\t * @param obj basically anything that can be stringified\n\t * @param indent the indentation, just like with the real JSON stringify.\n\t * @returns a string that is safely stringified.\n\t */\n\tpublic static JSONStringifyModified = (obj: any, indent: number = 0): string =>\n\t\tJSON.stringify(obj, (key, value) => {\n\t\t\tif (typeof value === 'bigint') {\n\t\t\t\treturn value.toString();\n\t\t\t} else if (value === 0 && 1 / value < 0) {\t// -0\n\t\t\t\treturn '-0';\n\t\t\t}\n\t\t\treturn value;\n\t\t}, indent)\n\n}"]}
@@ -1,6 +1,6 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractBaseProperty | @etothepii/satisfactory-file-parser</title><meta name="description" content="Documentation for @etothepii/satisfactory-file-parser"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@etothepii/satisfactory-file-parser</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@etothepii/satisfactory-file-parser</a></li><li><a href="AbstractBaseProperty.html">AbstractBaseProperty</a></li></ul><h1>Class AbstractBaseProperty<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#AbstractBaseProperty">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a><ul class="tsd-hierarchy"><li><span class="target">AbstractBaseProperty</span><ul class="tsd-hierarchy"><li><a href="BasicProperty.html" class="tsd-signature-type tsd-kind-class">BasicProperty</a></li><li><a href="StructProperty.html" class="tsd-signature-type tsd-kind-class">StructProperty</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L12">src/parser/satisfactory/types/property/generic/BasicProperty.ts:12</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="AbstractBaseProperty.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractBaseProperty | @etothepii/satisfactory-file-parser</title><meta name="description" content="Documentation for @etothepii/satisfactory-file-parser"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@etothepii/satisfactory-file-parser</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@etothepii/satisfactory-file-parser</a></li><li><a href="AbstractBaseProperty.html">AbstractBaseProperty</a></li></ul><h1>Class AbstractBaseProperty<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#AbstractBaseProperty">view full</a>)</h4><ul class="tsd-hierarchy"><li><a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a><ul class="tsd-hierarchy"><li><span class="target">AbstractBaseProperty</span><ul class="tsd-hierarchy"><li><a href="BasicProperty.html" class="tsd-signature-type tsd-kind-class">BasicProperty</a></li><li><a href="StructProperty.html" class="tsd-signature-type tsd-kind-class">StructProperty</a></li></ul></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L12">src/parser/satisfactory/types/property/generic/BasicProperty.ts:12</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="AbstractBaseProperty.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
2
2
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="AbstractBaseProperty.html#index" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index?</span></a>
3
3
  <a href="AbstractBaseProperty.html#name" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a>
4
4
  <a href="AbstractBaseProperty.html#type" class="tsd-index-link tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a>
5
5
  <a href="AbstractBaseProperty.html#ueType" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>ue<wbr/>Type</span></a>
6
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_AbstractBaseProperty" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Abstract<wbr/>Base<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span>, <span class="tsd-kind-parameter">ueType</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a><a href="#constructor.new_AbstractBaseProperty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">ueType</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a></h4><aside class="tsd-sources"><p>Overrides <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L17">src/parser/satisfactory/types/property/generic/BasicProperty.ts:17</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="index" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#index">index</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L14">src/parser/satisfactory/types/property/generic/BasicProperty.ts:14</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#type">type</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="ueType" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ue<wbr/>Type</span><a href="#ueType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">ue<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L17">src/parser/satisfactory/types/property/generic/BasicProperty.ts:17</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#index" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index</span></a><a href="#name" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a><a href="#type" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a><a href="#ueType" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>ue<wbr/>Type</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@etothepii/satisfactory-file-parser</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
6
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_AbstractBaseProperty" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Abstract<wbr/>Base<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span>, <span class="tsd-kind-parameter">ueType</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a><a href="#constructor.new_AbstractBaseProperty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">ueType</span>: <span class="tsd-signature-type">string</span></span></li><li><span><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a></h4><aside class="tsd-sources"><p>Overrides <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#constructor">constructor</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L17">src/parser/satisfactory/types/property/generic/BasicProperty.ts:17</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="index" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#index">index</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="name" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>name</span><a href="#name" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;&#39;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L14">src/parser/satisfactory/types/property/generic/BasicProperty.ts:14</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractProperty.html">AbstractProperty</a>.<a href="AbstractProperty.html#type">type</a></p><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="ueType" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>ue<wbr/>Type</span><a href="#ueType" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">ue<wbr/>Type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L17">src/parser/satisfactory/types/property/generic/BasicProperty.ts:17</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#index" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index</span></a><a href="#name" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>name</span></a><a href="#type" class="tsd-is-inherited"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a><a href="#ueType" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>ue<wbr/>Type</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@etothepii/satisfactory-file-parser</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractProperty | @etothepii/satisfactory-file-parser</title><meta name="description" content="Documentation for @etothepii/satisfactory-file-parser"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@etothepii/satisfactory-file-parser</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@etothepii/satisfactory-file-parser</a></li><li><a href="AbstractProperty.html">AbstractProperty</a></li></ul><h1>Class AbstractProperty<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#AbstractProperty">view full</a>)</h4><ul class="tsd-hierarchy"><li><span class="target">AbstractProperty</span><ul class="tsd-hierarchy"><li><a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L8">src/parser/satisfactory/types/property/generic/BasicProperty.ts:8</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="AbstractProperty.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
1
+ <!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractProperty | @etothepii/satisfactory-file-parser</title><meta name="description" content="Documentation for @etothepii/satisfactory-file-parser"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@etothepii/satisfactory-file-parser</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@etothepii/satisfactory-file-parser</a></li><li><a href="AbstractProperty.html">AbstractProperty</a></li></ul><h1>Class AbstractProperty<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#AbstractProperty">view full</a>)</h4><ul class="tsd-hierarchy"><li><span class="target">AbstractProperty</span><ul class="tsd-hierarchy"><li><a href="AbstractBaseProperty.html" class="tsd-signature-type tsd-kind-class">AbstractBaseProperty</a></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L8">src/parser/satisfactory/types/property/generic/BasicProperty.ts:8</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Constructors</h3><div class="tsd-index-list"><a href="AbstractProperty.html#constructor" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a>
2
2
  </div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="AbstractProperty.html#index" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index?</span></a>
3
3
  <a href="AbstractProperty.html#type" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a>
4
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_AbstractProperty" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Abstract<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a><a href="#constructor.new_AbstractProperty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/cc4d627c98c0e0c81392325a6b6aa4f76be0de07/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#index" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index</span></a><a href="#type" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@etothepii/satisfactory-file-parser</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
4
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Constructors"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Constructors</h2></summary><section><section class="tsd-panel tsd-member"><a id="constructor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>constructor</span><a href="#constructor" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class="tsd-signature tsd-anchor-link"><a id="constructor.new_AbstractProperty" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Abstract<wbr/>Property</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">type</span>, <span class="tsd-kind-parameter">index</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a><a href="#constructor.new_AbstractProperty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">type</span>: <span class="tsd-signature-type">string</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">index</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AbstractProperty.html" class="tsd-signature-type tsd-kind-class">AbstractProperty</a></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></li></ul></section></section></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><h2><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg> Properties</h2></summary><section><section class="tsd-panel tsd-member"><a id="index" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>index</span><a href="#index" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">index</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>type</span><a href="#type" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">type</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/etothepii4/satisfactory-file-parser/blob/ff8507a355a80a9b09ccaf8a6eebd21756a20f3a/src/parser/satisfactory/types/property/generic/BasicProperty.ts#L9">src/parser/satisfactory/types/property/generic/BasicProperty.ts:9</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Constructors"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Constructors</summary><div><a href="#constructor" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-512"></use></svg><span>constructor</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="tsd-otp-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#index" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>index</span></a><a href="#type" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>type</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@etothepii/satisfactory-file-parser</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>