@etothepii/satisfactory-file-parser 3.2.3 → 3.3.1

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 (617) hide show
  1. package/.vscode/settings.json +6 -0
  2. package/CHANGELOG.md +15 -1
  3. package/README.md +18 -1
  4. package/build/index.d.ts +14 -3
  5. package/build/index.d.ts.map +1 -1
  6. package/build/index.js +15 -6
  7. package/build/index.js.map +1 -1
  8. package/build/parser/byte/byte-writer.class.d.ts +2 -0
  9. package/build/parser/byte/byte-writer.class.d.ts.map +1 -1
  10. package/build/parser/byte/byte-writer.class.js +8 -0
  11. package/build/parser/byte/byte-writer.class.js.map +1 -1
  12. package/build/parser/context/context.d.ts +2 -0
  13. package/build/parser/context/context.d.ts.map +1 -1
  14. package/build/parser/context/context.js.map +1 -1
  15. package/build/parser/parser.d.ts +2 -0
  16. package/build/parser/parser.d.ts.map +1 -1
  17. package/build/parser/parser.js +11 -7
  18. package/build/parser/parser.js.map +1 -1
  19. package/build/parser/satisfactory/blueprint/blueprint-header.js +5 -5
  20. package/build/parser/satisfactory/blueprint/blueprint-header.js.map +1 -1
  21. package/build/parser/satisfactory/save/level.d.ts.map +1 -1
  22. package/build/parser/satisfactory/save/level.js +32 -17
  23. package/build/parser/satisfactory/save/level.js.map +1 -1
  24. package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -1
  25. package/build/parser/satisfactory/types/objects/SaveObject.js +24 -5
  26. package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -1
  27. package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -1
  28. package/build/parser/satisfactory/types/property/PropertiesList.js +118 -97
  29. package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
  30. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +1 -0
  31. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -1
  32. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -1
  33. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts +2 -2
  34. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts.map +1 -1
  35. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js +3 -4
  36. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js.map +1 -1
  37. package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +1 -1
  38. package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +1 -1
  39. package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +2 -2
  40. package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
  41. package/build/parser/satisfactory/types/property/generic/ByteProperty.js +3 -4
  42. package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
  43. package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +2 -2
  44. package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
  45. package/build/parser/satisfactory/types/property/generic/EnumProperty.js +3 -4
  46. package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
  47. package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +2 -2
  48. package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -1
  49. package/build/parser/satisfactory/types/property/generic/MapProperty.js +8 -5
  50. package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -1
  51. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts +2 -2
  52. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts.map +1 -1
  53. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js +3 -4
  54. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js.map +1 -1
  55. package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +1 -1
  56. package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +1 -1
  57. package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +9 -7
  58. package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -1
  59. package/build/parser/satisfactory/types/property/generic/StructProperty.js +81 -47
  60. package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -1
  61. package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +1 -1
  62. package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -1
  63. package/build/parser/satisfactory/types/structs/GUIDInfo.js +1 -1
  64. package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -1
  65. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts +11 -0
  66. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts.map +1 -0
  67. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js +31 -0
  68. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js.map +1 -0
  69. package/build/parser/satisfactory/types/structs/binary/FColor.d.ts +9 -0
  70. package/build/parser/satisfactory/types/structs/binary/FColor.d.ts.map +1 -0
  71. package/build/parser/satisfactory/types/structs/binary/FColor.js +14 -0
  72. package/build/parser/satisfactory/types/structs/binary/FColor.js.map +1 -0
  73. package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts +9 -0
  74. package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts.map +1 -0
  75. package/build/parser/satisfactory/types/structs/binary/FLinearColor.js +14 -0
  76. package/build/parser/satisfactory/types/structs/binary/FLinearColor.js.map +1 -0
  77. package/build/parser/satisfactory/types/structs/binary/GUID.d.ts +8 -0
  78. package/build/parser/satisfactory/types/structs/binary/GUID.d.ts.map +1 -0
  79. package/build/parser/satisfactory/types/structs/binary/GUID.js +22 -0
  80. package/build/parser/satisfactory/types/structs/binary/GUID.js.map +1 -0
  81. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts +2 -2
  82. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts.map +1 -1
  83. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js +2 -2
  84. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js.map +1 -1
  85. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts +13 -0
  86. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts.map +1 -0
  87. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js +21 -0
  88. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js.map +1 -0
  89. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.d.ts +22 -0
  90. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.d.ts.map +1 -0
  91. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.js +40 -0
  92. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINLuaRuntimePersistenceState.js.map +1 -0
  93. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts +13 -0
  94. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts.map +1 -0
  95. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js +35 -0
  96. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js.map +1 -0
  97. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts +12 -0
  98. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts.map +1 -0
  99. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js +20 -0
  100. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js.map +1 -0
  101. package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -1
  102. package/build/parser/stream/reworked/readable-stream-parser.js +14 -11
  103. package/build/parser/stream/reworked/readable-stream-parser.js.map +1 -1
  104. package/docs/assets/navigation.js +1 -1
  105. package/docs/assets/search.js +1 -1
  106. package/docs/classes/BlueprintConfigReader.html +4 -4
  107. package/docs/classes/BlueprintReader.html +4 -4
  108. package/docs/classes/CompressionLibraryError.html +27 -6
  109. package/docs/classes/ContextReader.html +36 -0
  110. package/docs/classes/ContextWriter.html +41 -0
  111. package/docs/classes/CorruptBlueprintError.html +27 -6
  112. package/docs/classes/CorruptSaveError.html +27 -6
  113. package/docs/classes/Parser.html +8 -8
  114. package/docs/classes/ParserError.html +27 -6
  115. package/docs/classes/ReadableStreamParser.html +2 -2
  116. package/docs/classes/SatisfactorySave.html +2 -2
  117. package/docs/classes/SaveComponent.html +2 -2
  118. package/docs/classes/SaveEntity.html +2 -2
  119. package/docs/classes/SaveObject.html +2 -2
  120. package/docs/classes/SaveReader.html +4 -4
  121. package/docs/classes/SaveStreamJsonStringifier.html +2 -2
  122. package/docs/classes/SaveStreamWriter.html +2 -2
  123. package/docs/classes/SaveWriter.html +6 -4
  124. package/docs/classes/TimeoutError.html +27 -6
  125. package/docs/classes/UnimplementedError.html +27 -6
  126. package/docs/classes/UnsupportedVersionError.html +27 -6
  127. package/docs/enums/Alignment.html +3 -0
  128. package/docs/enums/BlueprintConfigVersion.html +2 -2
  129. package/docs/enums/BlueprintHeaderVersion.html +2 -2
  130. package/docs/enums/CompressionAlgorithmCode.html +2 -2
  131. package/docs/enums/FactoryGameCustomVersion.html +2 -2
  132. package/docs/enums/RuntimeBuildableInstanceDataVersion.html +2 -2
  133. package/docs/enums/SaveCustomVersion.html +10 -10
  134. package/docs/enums/SaveHeaderType.html +2 -2
  135. package/docs/functions/AbstractBaseProperty.Create.html +1 -1
  136. package/docs/functions/ArrayProperty.CalcOverhead.html +1 -1
  137. package/docs/functions/ArrayProperty.Parse.html +1 -1
  138. package/docs/functions/ArrayProperty.Serialize.html +1 -1
  139. package/docs/functions/BlueprintConfig.Parse.html +1 -1
  140. package/docs/functions/BlueprintConfig.Serialize.html +1 -1
  141. package/docs/functions/BlueprintHeader.Parse.html +1 -1
  142. package/docs/functions/BlueprintHeader.Serialize.html +1 -1
  143. package/docs/functions/BoolArrayProperty.Parse.html +1 -1
  144. package/docs/functions/BoolArrayProperty.Serialize.html +1 -1
  145. package/docs/functions/BoolProperty.CalcOverhead.html +1 -1
  146. package/docs/functions/BoolProperty.Parse.html +1 -1
  147. package/docs/functions/BoolProperty.ReadValue.html +1 -1
  148. package/docs/functions/BoolProperty.Serialize.html +1 -1
  149. package/docs/functions/BoolProperty.SerializeValue.html +1 -1
  150. package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
  151. package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -1
  152. package/docs/functions/BuildableTypeInstance.Parse.html +1 -1
  153. package/docs/functions/BuildableTypeInstance.Serialize.html +1 -1
  154. package/docs/functions/ByteArrayProperty.Parse.html +1 -1
  155. package/docs/functions/ByteArrayProperty.Serialize.html +1 -1
  156. package/docs/functions/ByteProperty.CalcOverhead.html +1 -1
  157. package/docs/functions/ByteProperty.Parse.html +1 -1
  158. package/docs/functions/ByteProperty.ReadValue.html +1 -1
  159. package/docs/functions/ByteProperty.Serialize.html +1 -1
  160. package/docs/functions/ByteProperty.SerializeValue.html +1 -1
  161. package/docs/functions/CircuitSpecialProperties.Parse.html +1 -1
  162. package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -1
  163. package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -1
  164. package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -1
  165. package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -1
  166. package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -1
  167. package/docs/functions/DoubleArrayProperty.Parse.html +1 -1
  168. package/docs/functions/DoubleArrayProperty.Serialize.html +1 -1
  169. package/docs/functions/DoubleProperty.CalcOverhead.html +1 -1
  170. package/docs/functions/DoubleProperty.Parse.html +1 -1
  171. package/docs/functions/DoubleProperty.ReadValue.html +1 -1
  172. package/docs/functions/DoubleProperty.Serialize.html +1 -1
  173. package/docs/functions/DoubleProperty.SerializeValue.html +1 -1
  174. package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
  175. package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
  176. package/docs/functions/EmptySpecialProperties.Parse.html +1 -1
  177. package/docs/functions/EmptySpecialProperties.Serialize.html +1 -1
  178. package/docs/functions/EnumArrayProperty.Parse.html +1 -1
  179. package/docs/functions/EnumArrayProperty.Serialize.html +1 -1
  180. package/docs/functions/EnumProperty.CalcOverhead.html +1 -1
  181. package/docs/functions/EnumProperty.Parse.html +1 -1
  182. package/docs/functions/EnumProperty.ReadValue.html +1 -1
  183. package/docs/functions/EnumProperty.Serialize.html +1 -1
  184. package/docs/functions/EnumProperty.SerializeValue.html +1 -1
  185. package/docs/functions/FClientIdentityInfo.read.html +1 -0
  186. package/docs/functions/FClientIdentityInfo.write.html +1 -0
  187. package/docs/functions/FColor.read.html +1 -0
  188. package/docs/functions/FColor.write.html +1 -0
  189. package/docs/functions/FGDynamicStruct.Parse.html +1 -1
  190. package/docs/functions/FGDynamicStruct.Serialize.html +1 -1
  191. package/docs/functions/FICFrameRange.read.html +1 -0
  192. package/docs/functions/FICFrameRange.write.html +1 -0
  193. package/docs/functions/FINGPUT1BufferPixel.read.html +1 -0
  194. package/docs/functions/FINGPUT1BufferPixel.write.html +1 -0
  195. package/docs/functions/FINItemStateFileSystem.IsFINItemStateFileSystem.html +1 -0
  196. package/docs/functions/FINItemStateFileSystem.read.html +1 -0
  197. package/docs/functions/FINItemStateFileSystem.write.html +1 -0
  198. package/docs/functions/FINNetworkTrace.read.html +1 -0
  199. package/docs/functions/FINNetworkTrace.write.html +1 -0
  200. package/docs/functions/FLBBalancerIndexing.read.html +1 -0
  201. package/docs/functions/FLBBalancerIndexing.write.html +1 -0
  202. package/docs/functions/FLinearColor.read.html +1 -0
  203. package/docs/functions/FLinearColor.write.html +1 -0
  204. package/docs/functions/FloatArrayProperty.Parse.html +1 -1
  205. package/docs/functions/FloatArrayProperty.Serialize.html +1 -1
  206. package/docs/functions/FloatProperty.CalcOverhead.html +1 -1
  207. package/docs/functions/FloatProperty.Parse.html +1 -1
  208. package/docs/functions/FloatProperty.ReadValue.html +1 -1
  209. package/docs/functions/FloatProperty.Serialize.html +1 -1
  210. package/docs/functions/FloatProperty.SerializeValue.html +1 -1
  211. package/docs/functions/GUID.read.html +1 -1
  212. package/docs/functions/GUID.write.html +1 -1
  213. package/docs/functions/GUIDInfo.read.html +1 -1
  214. package/docs/functions/GUIDInfo.write.html +1 -1
  215. package/docs/functions/Int32ArrayProperty.Parse.html +1 -1
  216. package/docs/functions/Int32ArrayProperty.Serialize.html +1 -1
  217. package/docs/functions/Int32Property.CalcOverhead.html +1 -1
  218. package/docs/functions/Int32Property.Parse.html +1 -1
  219. package/docs/functions/Int32Property.ReadValue.html +1 -1
  220. package/docs/functions/Int32Property.Serialize.html +1 -1
  221. package/docs/functions/Int32Property.SerializeValue.html +1 -1
  222. package/docs/functions/Int32SetProperty.Parse.html +1 -1
  223. package/docs/functions/Int32SetProperty.Serialize.html +1 -1
  224. package/docs/functions/Int64ArrayProperty.Parse.html +1 -1
  225. package/docs/functions/Int64ArrayProperty.Serialize.html +1 -1
  226. package/docs/functions/Int64Property.CalcOverhead.html +1 -1
  227. package/docs/functions/Int64Property.Parse.html +1 -1
  228. package/docs/functions/Int64Property.ReadValue.html +1 -1
  229. package/docs/functions/Int64Property.Serialize.html +1 -1
  230. package/docs/functions/Int64Property.SerializeValue.html +1 -1
  231. package/docs/functions/Int8Property.CalcOverhead.html +1 -1
  232. package/docs/functions/Int8Property.Parse.html +1 -1
  233. package/docs/functions/Int8Property.ReadValue.html +1 -1
  234. package/docs/functions/Int8Property.Serialize.html +1 -1
  235. package/docs/functions/Int8Property.SerializeValue.html +1 -1
  236. package/docs/functions/Level.ReadAllObjectContents.html +1 -1
  237. package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
  238. package/docs/functions/Level.ReadLevel.html +1 -1
  239. package/docs/functions/Level.ReadNObjectContents.html +1 -1
  240. package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
  241. package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
  242. package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
  243. package/docs/functions/Level.SerializeLevel.html +1 -1
  244. package/docs/functions/LevelToDestroyedActorsMap.read.html +1 -1
  245. package/docs/functions/LevelToDestroyedActorsMap.write.html +1 -1
  246. package/docs/functions/MD5Hash.read.html +1 -1
  247. package/docs/functions/MD5Hash.write.html +1 -1
  248. package/docs/functions/MapProperty.CalcOverhead.html +1 -1
  249. package/docs/functions/MapProperty.Parse.html +1 -1
  250. package/docs/functions/MapProperty.Serialize.html +1 -1
  251. package/docs/functions/ObjectArrayProperty.Parse.html +1 -1
  252. package/docs/functions/ObjectArrayProperty.Serialize.html +1 -1
  253. package/docs/functions/ObjectProperty.CalcOverhead.html +1 -1
  254. package/docs/functions/ObjectProperty.Parse.html +1 -1
  255. package/docs/functions/ObjectProperty.ReadValue.html +1 -1
  256. package/docs/functions/ObjectProperty.Serialize.html +1 -1
  257. package/docs/functions/ObjectProperty.SerializeValue.html +1 -1
  258. package/docs/functions/ObjectReference.IsEqual.html +1 -1
  259. package/docs/functions/ObjectReference.read.html +1 -1
  260. package/docs/functions/ObjectReference.write.html +1 -1
  261. package/docs/functions/ObjectSetProperty.Parse.html +1 -1
  262. package/docs/functions/ObjectSetProperty.Serialize.html +1 -1
  263. package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -1
  264. package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -1
  265. package/docs/functions/PlayerSpecialProperties.Parse.html +1 -1
  266. package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -1
  267. package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -1
  268. package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -1
  269. package/docs/functions/PropertiesList.ParseList.html +1 -1
  270. package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
  271. package/docs/functions/PropertiesList.SerializeList.html +1 -1
  272. package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
  273. package/docs/functions/SatisfactorySaveHeader.Parse.html +1 -1
  274. package/docs/functions/SatisfactorySaveHeader.Serialize.html +1 -1
  275. package/docs/functions/SaveBodyChunks.CompressDataIntoChunks.html +1 -1
  276. package/docs/functions/SaveBodyChunks.DecompressChunks.html +1 -1
  277. package/docs/functions/SaveBodyValidation.Parse.html +1 -1
  278. package/docs/functions/SaveBodyValidation.Serialize.html +1 -1
  279. package/docs/functions/SetProperty.CalcOverhead.html +1 -1
  280. package/docs/functions/SetProperty.Parse.html +1 -1
  281. package/docs/functions/SetProperty.Serialize.html +1 -1
  282. package/docs/functions/SoftObjectArrayProperty.Parse.html +1 -1
  283. package/docs/functions/SoftObjectArrayProperty.Serialize.html +1 -1
  284. package/docs/functions/SoftObjectProperty.CalcOverhead.html +1 -0
  285. package/docs/functions/SoftObjectProperty.Parse.html +1 -0
  286. package/docs/functions/SoftObjectProperty.ReadValue.html +1 -0
  287. package/docs/functions/SoftObjectProperty.Serialize.html +1 -0
  288. package/docs/functions/SoftObjectProperty.SerializeValue.html +1 -0
  289. package/docs/functions/SoftObjectReference.read.html +1 -1
  290. package/docs/functions/SoftObjectReference.write.html +1 -1
  291. package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -1
  292. package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -1
  293. package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
  294. package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
  295. package/docs/functions/StrArrayProperty.Parse.html +1 -1
  296. package/docs/functions/StrArrayProperty.Serialize.html +1 -1
  297. package/docs/functions/StrProperty.CalcOverhead.html +1 -1
  298. package/docs/functions/StrProperty.Parse.html +1 -1
  299. package/docs/functions/StrProperty.ReadValue.html +1 -1
  300. package/docs/functions/StrProperty.Serialize.html +1 -1
  301. package/docs/functions/StrProperty.SerializeValue.html +1 -1
  302. package/docs/functions/StrSetProperty.Parse.html +1 -1
  303. package/docs/functions/StrSetProperty.Serialize.html +1 -1
  304. package/docs/functions/StructArrayProperty.Parse.html +1 -1
  305. package/docs/functions/StructArrayProperty.Serialize.html +1 -1
  306. package/docs/functions/StructProperty.CalcOverhead.html +1 -1
  307. package/docs/functions/StructProperty.Parse.html +1 -1
  308. package/docs/functions/StructProperty.ParseValue.html +1 -1
  309. package/docs/functions/StructProperty.Serialize.html +1 -1
  310. package/docs/functions/StructProperty.SerializeValue.html +1 -1
  311. package/docs/functions/StructSetProperty.Parse.html +1 -1
  312. package/docs/functions/StructSetProperty.Serialize.html +1 -1
  313. package/docs/functions/TextArrayProperty.Parse.html +1 -1
  314. package/docs/functions/TextArrayProperty.Serialize.html +1 -1
  315. package/docs/functions/TextProperty.CalcOverhead.html +1 -1
  316. package/docs/functions/TextProperty.Parse.html +1 -1
  317. package/docs/functions/TextProperty.ReadValue.html +1 -1
  318. package/docs/functions/TextProperty.Serialize.html +1 -1
  319. package/docs/functions/TextProperty.SerializeValue.html +1 -1
  320. package/docs/functions/Transform.Parse.html +1 -1
  321. package/docs/functions/Transform.ParseF.html +1 -1
  322. package/docs/functions/Transform.Serialize.html +1 -1
  323. package/docs/functions/Transform.SerializeF.html +1 -1
  324. package/docs/functions/Uint32Property.CalcOverhead.html +1 -1
  325. package/docs/functions/Uint32Property.Parse.html +1 -1
  326. package/docs/functions/Uint32Property.ReadValue.html +1 -1
  327. package/docs/functions/Uint32Property.Serialize.html +1 -1
  328. package/docs/functions/Uint32Property.SerializeValue.html +1 -1
  329. package/docs/functions/Uint32SetProperty.Parse.html +1 -1
  330. package/docs/functions/Uint32SetProperty.Serialize.html +1 -1
  331. package/docs/functions/Uint64Property.CalcOverhead.html +1 -1
  332. package/docs/functions/Uint64Property.Parse.html +1 -1
  333. package/docs/functions/Uint64Property.ReadValue.html +1 -1
  334. package/docs/functions/Uint64Property.Serialize.html +1 -1
  335. package/docs/functions/Uint64Property.SerializeValue.html +1 -1
  336. package/docs/functions/Uint8Property.CalcOverhead.html +1 -1
  337. package/docs/functions/Uint8Property.Parse.html +1 -1
  338. package/docs/functions/Uint8Property.ReadValue.html +1 -1
  339. package/docs/functions/Uint8Property.Serialize.html +1 -1
  340. package/docs/functions/Uint8Property.SerializeValue.html +1 -1
  341. package/docs/functions/VehiclePhysicsData.Parse.html +1 -1
  342. package/docs/functions/VehiclePhysicsData.Serialize.html +1 -1
  343. package/docs/functions/VehicleSpecialProperties.Parse.html +1 -1
  344. package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -1
  345. package/docs/functions/col4.ParseBGRA.html +1 -1
  346. package/docs/functions/col4.ParseRGBA.html +1 -1
  347. package/docs/functions/col4.SerializeBGRA.html +1 -1
  348. package/docs/functions/col4.SerializeRGBA.html +1 -1
  349. package/docs/functions/isArrayProperty.html +1 -1
  350. package/docs/functions/isBoolArrayProperty.html +1 -1
  351. package/docs/functions/isBoolProperty.html +1 -1
  352. package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -1
  353. package/docs/functions/isByteArrayProperty.html +1 -1
  354. package/docs/functions/isByteProperty.html +1 -1
  355. package/docs/functions/isCircuitSpecialProperties.html +1 -1
  356. package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -1
  357. package/docs/functions/isConveyorSpecialProperties.html +1 -1
  358. package/docs/functions/isDoubleArrayProperty.html +1 -1
  359. package/docs/functions/isDoubleProperty.html +1 -1
  360. package/docs/functions/isEmptySpecialProperties.html +1 -1
  361. package/docs/functions/isEnumArrayProperty.html +1 -1
  362. package/docs/functions/isEnumProperty.html +1 -1
  363. package/docs/functions/isFloatArrayProperty.html +1 -1
  364. package/docs/functions/isFloatProperty.html +1 -1
  365. package/docs/functions/isInt32ArrayProperty.html +1 -1
  366. package/docs/functions/isInt32Property.html +1 -1
  367. package/docs/functions/isInt32SetProperty.html +1 -1
  368. package/docs/functions/isInt64ArrayProperty.html +1 -1
  369. package/docs/functions/isInt64Property.html +1 -1
  370. package/docs/functions/isInt8Property.html +1 -1
  371. package/docs/functions/isMapProperty.html +1 -1
  372. package/docs/functions/isObjectArrayProperty.html +1 -1
  373. package/docs/functions/isObjectProperty.html +1 -1
  374. package/docs/functions/isObjectSetProperty.html +1 -1
  375. package/docs/functions/isObjectsListSpecialProperties.html +1 -1
  376. package/docs/functions/isPlayerSpecialProperties.html +1 -1
  377. package/docs/functions/isPowerLineSpecialProperties.html +1 -1
  378. package/docs/functions/isSaveComponent.html +1 -1
  379. package/docs/functions/isSaveEntity.html +1 -1
  380. package/docs/functions/isSetProperty.html +1 -1
  381. package/docs/functions/isSoftObjectArrayProperty.html +1 -1
  382. package/docs/functions/isSoftObjectProperty.html +1 -0
  383. package/docs/functions/isSpecialDroneActionProperties.html +1 -1
  384. package/docs/functions/isStrArrayProperty.html +1 -1
  385. package/docs/functions/isStrProperty.html +1 -1
  386. package/docs/functions/isStrSetProperty.html +1 -1
  387. package/docs/functions/isStructArrayProperty.html +1 -1
  388. package/docs/functions/isStructProperty.html +1 -1
  389. package/docs/functions/isStructSetProperty.html +1 -1
  390. package/docs/functions/isTextArrayProperty.html +1 -1
  391. package/docs/functions/isTextProperty.html +1 -1
  392. package/docs/functions/isUInt64Property.html +1 -1
  393. package/docs/functions/isUint32Property.html +1 -1
  394. package/docs/functions/isUint32SetProperty.html +1 -1
  395. package/docs/functions/isUint8Property.html +1 -1
  396. package/docs/functions/isVehicleSpecialProperties.html +1 -1
  397. package/docs/functions/vec2.Parse.html +1 -1
  398. package/docs/functions/vec2.ParseF.html +1 -1
  399. package/docs/functions/vec2.Serialize.html +1 -1
  400. package/docs/functions/vec2.SerializeF.html +1 -1
  401. package/docs/functions/vec3.Parse.html +1 -1
  402. package/docs/functions/vec3.ParseF.html +1 -1
  403. package/docs/functions/vec3.ParseInt.html +1 -1
  404. package/docs/functions/vec3.Serialize.html +1 -1
  405. package/docs/functions/vec3.SerializeF.html +1 -1
  406. package/docs/functions/vec3.SerializeInt.html +1 -1
  407. package/docs/functions/vec3.add.html +1 -1
  408. package/docs/functions/vec3.length.html +1 -1
  409. package/docs/functions/vec3.mult.html +1 -1
  410. package/docs/functions/vec3.norm.html +1 -1
  411. package/docs/functions/vec3.sub.html +1 -1
  412. package/docs/functions/vec4.Parse.html +1 -1
  413. package/docs/functions/vec4.ParseF.html +1 -1
  414. package/docs/functions/vec4.Serialize.html +1 -1
  415. package/docs/functions/vec4.SerializeF.html +1 -1
  416. package/docs/hierarchy.html +1 -1
  417. package/docs/index.html +16 -4
  418. package/docs/interfaces/Blueprint.html +2 -2
  419. package/docs/interfaces/BlueprintConfig-1.html +2 -2
  420. package/docs/interfaces/SaveComponentHeader.html +2 -2
  421. package/docs/interfaces/SaveEntityHeader.html +2 -2
  422. package/docs/interfaces/SaveObjectHeader.html +2 -2
  423. package/docs/modules/AbstractBaseProperty.html +1 -1
  424. package/docs/modules/ArrayProperty.html +1 -1
  425. package/docs/modules/BlueprintConfig.html +1 -1
  426. package/docs/modules/BlueprintHeader.html +1 -1
  427. package/docs/modules/BoolArrayProperty.html +1 -1
  428. package/docs/modules/BoolProperty.html +1 -1
  429. package/docs/modules/BuildableSubsystemSpecialProperties.html +1 -1
  430. package/docs/modules/BuildableTypeInstance.html +1 -1
  431. package/docs/modules/ByteArrayProperty.html +1 -1
  432. package/docs/modules/ByteProperty.html +1 -1
  433. package/docs/modules/CircuitSpecialProperties.html +1 -1
  434. package/docs/modules/ConveyorChainActorSpecialProperties.html +1 -1
  435. package/docs/modules/ConveyorSpecialProperties.html +1 -1
  436. package/docs/modules/DoubleArrayProperty.html +1 -1
  437. package/docs/modules/DoubleProperty.html +1 -1
  438. package/docs/modules/DynamicStructPropertyValue.html +1 -1
  439. package/docs/modules/EmptySpecialProperties.html +1 -1
  440. package/docs/modules/EnumArrayProperty.html +1 -1
  441. package/docs/modules/EnumProperty.html +1 -1
  442. package/docs/modules/FClientIdentityInfo.html +3 -0
  443. package/docs/modules/FColor.html +3 -0
  444. package/docs/modules/FGDynamicStruct.html +1 -1
  445. package/docs/modules/FICFrameRange.html +3 -2
  446. package/docs/modules/FINGPUT1BufferPixel.html +4 -0
  447. package/docs/modules/FINItemStateFileSystem.html +5 -0
  448. package/docs/modules/FINNetworkTrace.html +4 -0
  449. package/docs/modules/FLBBalancerIndexing.html +3 -0
  450. package/docs/modules/FLinearColor.html +3 -0
  451. package/docs/modules/FloatArrayProperty.html +1 -1
  452. package/docs/modules/FloatProperty.html +1 -1
  453. package/docs/modules/GUID.html +1 -1
  454. package/docs/modules/GUIDInfo.html +1 -1
  455. package/docs/modules/Int32ArrayProperty.html +1 -1
  456. package/docs/modules/Int32Property.html +1 -1
  457. package/docs/modules/Int32SetProperty.html +1 -1
  458. package/docs/modules/Int64ArrayProperty.html +1 -1
  459. package/docs/modules/Int64Property.html +1 -1
  460. package/docs/modules/Int8Property.html +1 -1
  461. package/docs/modules/Level.html +1 -1
  462. package/docs/modules/LevelToDestroyedActorsMap.html +1 -1
  463. package/docs/modules/MD5Hash.html +1 -1
  464. package/docs/modules/MapProperty.html +1 -1
  465. package/docs/modules/ObjectArrayProperty.html +1 -1
  466. package/docs/modules/ObjectProperty.html +1 -1
  467. package/docs/modules/ObjectReference.html +1 -1
  468. package/docs/modules/ObjectSetProperty.html +1 -1
  469. package/docs/modules/ObjectsListSpecialProperties.html +1 -1
  470. package/docs/modules/PlayerSpecialProperties.html +1 -1
  471. package/docs/modules/PowerLineSpecialProperties.html +1 -1
  472. package/docs/modules/PropertiesList.html +1 -1
  473. package/docs/modules/SatisfactorySaveHeader.html +1 -1
  474. package/docs/modules/SaveBodyChunks.html +1 -1
  475. package/docs/modules/SaveBodyValidation.html +1 -1
  476. package/docs/modules/SetProperty.html +1 -1
  477. package/docs/modules/SoftObjectArrayProperty.html +1 -1
  478. package/docs/modules/SoftObjectProperty.html +6 -0
  479. package/docs/modules/SoftObjectReference.html +1 -1
  480. package/docs/modules/SpecialDroneActionProperties.html +1 -1
  481. package/docs/modules/SpecialProperties.html +1 -1
  482. package/docs/modules/StrArrayProperty.html +1 -1
  483. package/docs/modules/StrProperty.html +1 -1
  484. package/docs/modules/StrSetProperty.html +1 -1
  485. package/docs/modules/StructArrayProperty.html +1 -1
  486. package/docs/modules/StructProperty.html +1 -1
  487. package/docs/modules/StructSetProperty.html +1 -1
  488. package/docs/modules/TextArrayProperty.html +1 -1
  489. package/docs/modules/TextProperty.html +1 -1
  490. package/docs/modules/Transform.html +1 -1
  491. package/docs/modules/Uint32Property.html +1 -1
  492. package/docs/modules/Uint32SetProperty.html +1 -1
  493. package/docs/modules/Uint64Property.html +1 -1
  494. package/docs/modules/Uint8Property.html +1 -1
  495. package/docs/modules/VehiclePhysicsData.html +1 -1
  496. package/docs/modules/VehicleSpecialProperties.html +1 -1
  497. package/docs/modules/col4.html +1 -1
  498. package/docs/modules/vec2.html +1 -1
  499. package/docs/modules/vec3.html +1 -1
  500. package/docs/modules/vec4.html +1 -1
  501. package/docs/modules.html +24 -4
  502. package/docs/types/AbstractBaseProperty-1.html +7 -1
  503. package/docs/types/ArrayProperty.AvailableArrayPropertyTypes.html +1 -1
  504. package/docs/types/ArrayPropertyStructValueFields.html +1 -1
  505. package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
  506. package/docs/types/BasicStructPropertyValue.html +1 -1
  507. package/docs/types/BlueprintHeader-1.html +1 -1
  508. package/docs/types/BlueprintReaderWriterContext.html +2 -0
  509. package/docs/types/BoolArrayProperty-1.html +1 -1
  510. package/docs/types/BoolProperty-1.html +1 -1
  511. package/docs/types/BoxStructPropertyValue.html +1 -1
  512. package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -1
  513. package/docs/types/BuildableTypeInstance-1.html +1 -1
  514. package/docs/types/ByteArrayProperty-1.html +1 -1
  515. package/docs/types/ByteProperty-1.html +1 -1
  516. package/docs/types/BytePropertyValue.html +1 -1
  517. package/docs/types/ChunkCompressionInfo.html +1 -1
  518. package/docs/types/ChunkSummary.html +1 -1
  519. package/docs/types/CircuitSpecialProperties-1.html +1 -1
  520. package/docs/types/ConveyorChainActorSpecialProperties-1.html +1 -1
  521. package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
  522. package/docs/types/ConveyorItemSpecialProperties.html +1 -1
  523. package/docs/types/ConveyorSpecialProperties-1.html +1 -1
  524. package/docs/types/DoubleArrayProperty-1.html +1 -1
  525. package/docs/types/DoubleProperty-1.html +1 -1
  526. package/docs/types/DynamicStructPropertyValue-1.html +1 -1
  527. package/docs/types/EmptySpecialProperties-1.html +1 -1
  528. package/docs/types/EnumArrayProperty-1.html +1 -1
  529. package/docs/types/EnumProperty-1.html +1 -1
  530. package/docs/types/FClientIdentityInfo-1.html +2 -0
  531. package/docs/types/FColor-1.html +2 -0
  532. package/docs/types/FGDynamicStruct-1.html +1 -1
  533. package/docs/types/FICFrameRange-1.html +1 -1
  534. package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
  535. package/docs/types/FINGPUT1BufferPixel-1.html +1 -0
  536. package/docs/types/FINItemStateFileSystem-1.html +2 -0
  537. package/docs/types/FINNetworkTrace-1.html +1 -0
  538. package/docs/types/FLBBalancerIndexing-1.html +2 -0
  539. package/docs/types/FLinearColor-1.html +2 -0
  540. package/docs/types/FloatArrayProperty-1.html +1 -1
  541. package/docs/types/FloatProperty-1.html +1 -1
  542. package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
  543. package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
  544. package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
  545. package/docs/types/GUID-1.html +1 -1
  546. package/docs/types/GUIDInfo-1.html +1 -1
  547. package/docs/types/Grids.html +1 -1
  548. package/docs/types/Int32ArrayProperty-1.html +1 -1
  549. package/docs/types/Int32Property-1.html +1 -1
  550. package/docs/types/Int32SetProperty-1.html +1 -1
  551. package/docs/types/Int64ArrayProperty-1.html +1 -1
  552. package/docs/types/Int64Property-1.html +1 -1
  553. package/docs/types/Int8Property-1.html +1 -1
  554. package/docs/types/InventoryItemStructPropertyValue.html +1 -1
  555. package/docs/types/Level-1.html +1 -2
  556. package/docs/types/LevelToDestroyedActorsMap-1.html +1 -1
  557. package/docs/types/Levels.html +1 -1
  558. package/docs/types/MAP_STRUCT_PROXY.html +1 -1
  559. package/docs/types/MD5Hash-1.html +1 -1
  560. package/docs/types/MapProperty-1.html +1 -1
  561. package/docs/types/ModData.html +1 -1
  562. package/docs/types/ObjectArrayProperty-1.html +1 -1
  563. package/docs/types/ObjectProperty-1.html +1 -1
  564. package/docs/types/ObjectReference-1.html +1 -1
  565. package/docs/types/ObjectSetProperty-1.html +1 -1
  566. package/docs/types/ObjectsListSpecialProperties-1.html +1 -1
  567. package/docs/types/PlayerSpecialProperties-1.html +1 -1
  568. package/docs/types/PowerLineSpecialProperties-1.html +1 -1
  569. package/docs/types/PropertiesMap.html +1 -1
  570. package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
  571. package/docs/types/ReaderWriterContext.html +2 -0
  572. package/docs/types/RoughSaveVersion.html +1 -1
  573. package/docs/types/SatisfactoryModMetadata.html +1 -1
  574. package/docs/types/SatisfactorySaveHeader-1.html +1 -1
  575. package/docs/types/SaveBodyChunks-1.html +1 -1
  576. package/docs/types/SaveBodyValidation-1.html +1 -1
  577. package/docs/types/SaveReaderWriterContext.html +3 -0
  578. package/docs/types/SetProperty.AvailableSetPropertyTypes.html +1 -1
  579. package/docs/types/SoftObjectArrayProperty-1.html +1 -1
  580. package/docs/types/SoftObjectProperty-1.html +1 -0
  581. package/docs/types/SoftObjectReference-1.html +1 -1
  582. package/docs/types/SpecialDroneAction.html +1 -1
  583. package/docs/types/SpecialDroneActionProperties-1.html +1 -1
  584. package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -1
  585. package/docs/types/StrArrayProperty-1.html +1 -1
  586. package/docs/types/StrProperty-1.html +1 -1
  587. package/docs/types/StrSetProperty-1.html +1 -1
  588. package/docs/types/StructArrayProperty-1.html +1 -1
  589. package/docs/types/StructProperty-1.html +1 -1
  590. package/docs/types/StructSetProperty-1.html +1 -1
  591. package/docs/types/TextArrayProperty-1.html +1 -1
  592. package/docs/types/TextProperty-1.html +1 -1
  593. package/docs/types/TextPropertyValue.html +1 -1
  594. package/docs/types/Transform-1.html +1 -1
  595. package/docs/types/Uint32Property-1.html +1 -1
  596. package/docs/types/Uint32SetProperty-1.html +1 -1
  597. package/docs/types/Uint64Property-1.html +1 -1
  598. package/docs/types/Uint8Property-1.html +1 -1
  599. package/docs/types/VehiclePhysicsData-1.html +1 -1
  600. package/docs/types/VehicleSpecialProperties-1.html +1 -1
  601. package/docs/types/col4-1.html +1 -1
  602. package/docs/types/vec2-1.html +1 -1
  603. package/docs/types/vec3-1.html +1 -1
  604. package/docs/types/vec4-1.html +1 -1
  605. package/docs/variables/DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE.html +1 -1
  606. package/docs/variables/EDIT.html +1 -1
  607. package/docs/variables/FINItemStateFileSystem.ExactStructReference.html +1 -0
  608. package/docs/variables/SaveBodyChunks.HEADER_V1.html +1 -1
  609. package/docs/variables/SaveBodyChunks.HEADER_V2.html +1 -1
  610. package/jsr.json +1 -1
  611. package/package.json +6 -5
  612. package/tsconfig.test.json +13 -0
  613. package/docs/classes/BlueprintConfigWriter.html +0 -39
  614. package/docs/classes/BlueprintWriter.html +0 -42
  615. package/docs/functions/FICFrameRange.Parse.html +0 -1
  616. package/docs/functions/FICFrameRange.Serialize.html +0 -1
  617. package/docs/types/ClientIdentityInfo.html +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"PropertiesList.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/property/PropertiesList.ts"],"names":[],"mappings":";;;AAEA,8DAA0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AAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC;QAGD,MAAM,CAAC,2BAA2B,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;IACpE,CAAC,CAAA;AACF,CAAC,EA5RgB,cAAc,8BAAd,cAAc,QA4R9B","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { ParserError } from '../../../error/parser.error';\nimport { AbstractBaseProperty, PropertiesMap } from './generic/AbstractBaseProperty';\nimport { ArrayProperty } from './generic/ArrayProperty/ArrayProperty';\nimport { BoolProperty } from './generic/BoolProperty';\nimport { ByteProperty } from './generic/ByteProperty';\nimport { DoubleProperty } from './generic/DoubleProperty';\nimport { EnumProperty } from './generic/EnumProperty';\nimport { FloatProperty } from './generic/FloatProperty';\nimport { Int32Property } from './generic/Int32Property';\nimport { Int64Property } from './generic/Int64Property';\nimport { Int8Property } from './generic/Int8Property';\nimport { MapProperty } from './generic/MapProperty';\nimport { ObjectProperty } from './generic/ObjectProperty';\nimport { SetProperty } from './generic/SetProperty/SetProperty';\nimport { SoftObjectProperty } from './generic/SoftObjectProperty';\nimport { StrProperty } from './generic/StrProperty';\nimport { StructProperty } from './generic/StructProperty';\nimport { TextProperty } from './generic/TextProperty';\nimport { Uint32Property } from './generic/Uint32Property';\nimport { Uint64Property } from './generic/Uint64Property';\nimport { Uint8Property } from './generic/Uint8Property';\n\n\nexport namespace PropertiesList {\n\n\texport const ParseList = (reader: ContextReader): PropertiesMap => {\n\n\t\tconst properties: PropertiesMap = {};\n\t\tlet propertyName: string = reader.readString();\n\t\twhile (propertyName !== 'None') {\n\t\t\tconst parsedProperty = PropertiesList.ParseSingleProperty(reader, propertyName);\n\n\t\t\t// if it already exists, make it an array.\n\t\t\tif (properties[propertyName]) {\n\t\t\t\tif (!Array.isArray(properties[propertyName])) {\n\t\t\t\t\tproperties[propertyName] = [properties[propertyName] as AbstractBaseProperty];\n\t\t\t\t}\n\t\t\t\t(properties[propertyName] as AbstractBaseProperty[]).push(parsedProperty);\n\t\t\t} else {\n\t\t\t\tproperties[propertyName] = parsedProperty;\n\t\t\t}\n\n\t\t\tpropertyName = reader.readString();\n\t\t}\n\n\t\treturn properties;\n\t}\n\n\texport const SerializeList = (writer: ContextWriter, properties: PropertiesMap): void => {\n\t\tfor (const property of Object.values(properties).flatMap(val => Array.isArray(val) ? val : [val])) {\n\t\t\twriter.writeString(property.name);\n\t\t\tPropertiesList.SerializeSingleProperty(writer, property);\n\t\t}\n\t\twriter.writeString('None');\n\t}\n\n\texport const ParseSingleProperty = (reader: ContextReader, propertyName: string): AbstractBaseProperty => {\n\t\tlet currentProperty: any = {};\n\n\t\t//TODO assign type and index after parsing.\n\t\tconst propertyType = reader.readString();\n\t\tconst binarySize = reader.readInt32();\n\n\t\tconst index = reader.readInt32();\n\t\tconst before = reader.getBufferPosition();\n\n\t\tlet overhead = 0;\n\t\tswitch (propertyType) {\n\t\t\tcase 'BoolProperty':\n\t\t\t\tcurrentProperty = BoolProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = BoolProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\tcurrentProperty = ByteProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = ByteProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int8Property':\n\t\t\t\tcurrentProperty = Int8Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int8Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'UInt8Property':\n\t\t\t\tcurrentProperty = Uint8Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Uint8Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'IntProperty':\n\t\t\tcase 'Int32Property':\n\t\t\t\tcurrentProperty = Int32Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int32Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt32Property':\n\t\t\t\tcurrentProperty = Uint32Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Uint32Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int64Property':\n\t\t\t\tcurrentProperty = Int64Property.Parse(reader, propertyType, index);\n\t\t\t\toverhead = Int64Property.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt64Property':\n\t\t\t\tcurrentProperty = Uint64Property.Parse(reader, propertyType, index);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SingleProperty':\n\t\t\tcase 'FloatProperty':\n\t\t\t\tcurrentProperty = FloatProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = FloatProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'DoubleProperty':\n\t\t\t\tcurrentProperty = DoubleProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = DoubleProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StrProperty':\n\t\t\tcase 'NameProperty':\n\t\t\t\tcurrentProperty = StrProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = StrProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ObjectProperty':\n\t\t\tcase 'InterfaceProperty':\n\t\t\t\tcurrentProperty = ObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = ObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SoftObjectProperty':\n\t\t\t\tcurrentProperty = SoftObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'EnumProperty':\n\t\t\t\tcurrentProperty = EnumProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = EnumProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StructProperty':\n\t\t\t\tcurrentProperty = StructProperty.Parse(reader, propertyType, index, binarySize);\n\t\t\t\toverhead = StructProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrayProperty':\n\t\t\t\tcurrentProperty = ArrayProperty.Parse(reader, propertyType, index, binarySize);\n\t\t\t\toverhead = ArrayProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'MapProperty':\n\t\t\t\tcurrentProperty = MapProperty.Parse(reader, propertyName, binarySize);\n\t\t\t\toverhead = MapProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'TextProperty':\n\t\t\t\tcurrentProperty = TextProperty.Parse(reader, propertyType, index);\n\t\t\t\toverhead = TextProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SetProperty':\n\t\t\t\tcurrentProperty = SetProperty.Parse(reader, propertyType, index, propertyName);\n\t\t\t\toverhead = SetProperty.CalcOverhead(currentProperty);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unimplemented type ${propertyType}, at byte position ${reader.getBufferPosition()}`);\n\t\t}\n\n\t\tcurrentProperty.name = propertyName;\n\n\t\tconst readBytes = reader.getBufferPosition() - before - overhead;\n\t\tif (readBytes !== binarySize) {\n\t\t\tconsole.warn(`possibly corrupt. Read ${readBytes} for ${propertyType} ${propertyName}, but ${binarySize} were indicated.`);\n\t\t\tthrow new ParserError('ParserError', `possibly corrupt. Read ${readBytes} bytes for ${propertyType} ${propertyName}, but ${binarySize} bytes were indicated.`);\n\t\t}\n\n\t\treturn currentProperty;\n\t}\n\n\texport const SerializeSingleProperty = (writer: ContextWriter, property: AbstractBaseProperty): void => {\n\n\t\twriter.writeString(property.ueType);\n\n\t\t// binary length indicator\n\t\tconst lenIndicator = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\n\n\t\t// write index if it is not 0. Since it normally is.\n\t\twriter.writeInt32(property.index ?? 0);\n\n\t\tconst start = writer.getBufferPosition();\n\t\tlet overhead = 0;\n\t\tswitch (property.ueType) {\n\t\t\tcase 'BoolProperty':\n\t\t\t\toverhead = BoolProperty.CalcOverhead(property as BoolProperty);\n\t\t\t\tBoolProperty.Serialize(writer, property as BoolProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\toverhead = ByteProperty.CalcOverhead(property as ByteProperty);\n\t\t\t\tByteProperty.Serialize(writer, property as ByteProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int8Property':\n\t\t\t\toverhead = Int8Property.CalcOverhead(property as Int8Property);\n\t\t\t\tInt8Property.Serialize(writer, property as Int8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt8Property':\n\t\t\t\toverhead = Uint8Property.CalcOverhead(property as Uint8Property);\n\t\t\t\tUint8Property.Serialize(writer, property as Uint8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'IntProperty':\n\t\t\tcase 'Int32Property':\n\t\t\t\toverhead = Int32Property.CalcOverhead(property as Int32Property);\n\t\t\t\tInt32Property.Serialize(writer, property as Int32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt32Property':\n\t\t\t\toverhead = Uint32Property.CalcOverhead(property as Uint32Property);\n\t\t\t\tUint32Property.Serialize(writer, property as Uint32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int64Property':\n\t\t\t\toverhead = Int64Property.CalcOverhead(property as Int64Property);\n\t\t\t\tInt64Property.Serialize(writer, property as Int64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt64PRoperty':\n\t\t\t\toverhead = Uint64Property.CalcOverhead(property as Uint64Property);\n\t\t\t\tUint64Property.Serialize(writer, property as Uint64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SingleProperty':\n\t\t\tcase 'FloatProperty':\n\t\t\t\toverhead = FloatProperty.CalcOverhead(property as FloatProperty);\n\t\t\t\tFloatProperty.Serialize(writer, property as FloatProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'DoubleProperty':\n\t\t\t\toverhead = DoubleProperty.CalcOverhead(property as DoubleProperty);\n\t\t\t\tDoubleProperty.Serialize(writer, property as DoubleProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StrProperty':\n\t\t\tcase 'NameProperty':\n\t\t\t\toverhead = StrProperty.CalcOverhead(property as StrProperty);\n\t\t\t\tStrProperty.Serialize(writer, property as StrProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ObjectProperty':\n\t\t\tcase 'InterfaceProperty':\n\t\t\t\toverhead = ObjectProperty.CalcOverhead(property as ObjectProperty);\n\t\t\t\tObjectProperty.Serialize(writer, property as ObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SoftObjectProperty':\n\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(property as SoftObjectProperty);\n\t\t\t\tSoftObjectProperty.Serialize(writer, property as SoftObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'EnumProperty':\n\t\t\t\toverhead = EnumProperty.CalcOverhead(property as EnumProperty);\n\t\t\t\tEnumProperty.Serialize(writer, property as EnumProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\toverhead = ByteProperty.CalcOverhead(property as ByteProperty);\n\t\t\t\tByteProperty.Serialize(writer, property as ByteProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StructProperty':\n\t\t\t\toverhead = StructProperty.CalcOverhead(property as StructProperty);\n\t\t\t\tStructProperty.Serialize(writer, property as StructProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrayProperty':\n\t\t\t\toverhead = ArrayProperty.CalcOverhead(property as ArrayProperty.AvailableArrayPropertyTypes);\n\t\t\t\tArrayProperty.Serialize(writer, property as ArrayProperty.AvailableArrayPropertyTypes);\n\t\t\t\tbreak;\n\n\t\t\tcase 'MapProperty':\n\t\t\t\toverhead = MapProperty.CalcOverhead(property as MapProperty);\n\t\t\t\tMapProperty.Serialize(writer, property as MapProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'TextProperty':\n\t\t\t\toverhead = TextProperty.CalcOverhead(property as TextProperty);\n\t\t\t\tTextProperty.Serialize(writer, property as TextProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SetProperty':\n\t\t\t\toverhead = SetProperty.CalcOverhead(property as SetProperty.AvailableSetPropertyTypes);\n\t\t\t\tSetProperty.Serialize(writer, property as SetProperty.AvailableSetPropertyTypes);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unimplemented type ${property.type}`);\n\t\t}\n\n\t\t// replace len indicator.\n\t\twriter.writeBinarySizeFromPosition(lenIndicator, start + overhead);\n\t}\n}\n\n"]}
1
+ {"version":3,"file":"PropertiesList.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/property/PropertiesList.ts"],"names":[],"mappings":";;;AAEA,8DAA0D;AAE1D,yEAAsE;AACtE,yDAAsD;AACtD,yDAAsD;AACtD,6DAA0D;AAC1D,yDAAsD;AACtD,2DAAwD;AACxD,2DAAwD;AACxD,2DAAwD;AACxD,yDAAsD;AACtD,uDAAoD;AACpD,6DAA0D;AAC1D,mEAAgE;AAChE,qEAAkE;AAClE,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,6DAA0D;AAC1D,6DAA0D;AAC1D,2DAAwD;AAGxD,IAAiB,cAAc,CAqT9B;AArTD,WAAiB,cAAc;IAEjB,wBAAS,GAAG,CAAC,MAAqB,EAAiB,EAAE;QAEjE,MAAM,UAAU,GAAkB,EAAE,CAAC;QACrC,IAAI,YAAY,GAAW,MAAM,CAAC,UAAU,EAAE,CAAC;QAC/C,OAAO,YAAY,KAAK,MAAM,EAAE,CAAC;YAEhC,MAAM,cAAc,GAAG,cAAc,CAAC,mBAAmB,CAAC,MAAM,EAAE,Y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AAG,QAAsD,CAAC,OAAO,CAAC,CAAC;gBAC9J,6BAAa,CAAC,SAAS,CAAC,MAAM,EAAE,QAAqD,CAAC,CAAC;gBACvF,MAAM;YAEP,KAAK,aAAa;gBACjB,QAAQ,GAAG,yBAAW,CAAC,YAAY,CAAC,QAAuB,EAAG,QAAwB,CAAC,OAAO,EAAG,QAAwB,CAAC,SAAS,CAAC,CAAC;gBACrI,yBAAW,CAAC,SAAS,CAAC,MAAM,EAAE,QAAuB,CAAC,CAAC;gBACvD,MAAM;YAEP,KAAK,cAAc;gBAClB,QAAQ,GAAG,2BAAY,CAAC,YAAY,CAAC,QAAwB,CAAC,CAAC;gBAC/D,2BAAY,CAAC,SAAS,CAAC,MAAM,EAAE,QAAwB,CAAC,CAAC;gBACzD,MAAM;YAEP,KAAK,aAAa;gBACjB,QAAQ,GAAG,yBAAW,CAAC,YAAY,CAAC,QAAiD,EAAG,QAAkD,CAAC,OAAO,CAAC,CAAC;gBACpJ,yBAAW,CAAC,SAAS,CAAC,MAAM,EAAE,QAAiD,CAAC,CAAC;gBACjF,MAAM;YAEP;gBACC,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;QACzD,CAAC;QAGD,MAAM,CAAC,2BAA2B,CAAC,YAAY,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;IACpE,CAAC,CAAA;AACF,CAAC,EArTgB,cAAc,8BAAd,cAAc,QAqT9B","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { ParserError } from '../../../error/parser.error';\nimport { AbstractBaseProperty, PropertiesMap } from './generic/AbstractBaseProperty';\nimport { ArrayProperty } from './generic/ArrayProperty/ArrayProperty';\nimport { BoolProperty } from './generic/BoolProperty';\nimport { ByteProperty } from './generic/ByteProperty';\nimport { DoubleProperty } from './generic/DoubleProperty';\nimport { EnumProperty } from './generic/EnumProperty';\nimport { FloatProperty } from './generic/FloatProperty';\nimport { Int32Property } from './generic/Int32Property';\nimport { Int64Property } from './generic/Int64Property';\nimport { Int8Property } from './generic/Int8Property';\nimport { MapProperty } from './generic/MapProperty';\nimport { ObjectProperty } from './generic/ObjectProperty';\nimport { SetProperty } from './generic/SetProperty/SetProperty';\nimport { SoftObjectProperty } from './generic/SoftObjectProperty';\nimport { StrProperty } from './generic/StrProperty';\nimport { StructProperty } from './generic/StructProperty';\nimport { TextProperty } from './generic/TextProperty';\nimport { Uint32Property } from './generic/Uint32Property';\nimport { Uint64Property } from './generic/Uint64Property';\nimport { Uint8Property } from './generic/Uint8Property';\n\n\nexport namespace PropertiesList {\n\n\texport const ParseList = (reader: ContextReader): PropertiesMap => {\n\n\t\tconst properties: PropertiesMap = {};\n\t\tlet propertyName: string = reader.readString();\n\t\twhile (propertyName !== 'None') {\n\n\t\t\tconst parsedProperty = PropertiesList.ParseSingleProperty(reader, propertyName);\n\n\t\t\t// if it already exists, make it an array.\n\t\t\tif (properties[propertyName]) {\n\t\t\t\tif (!Array.isArray(properties[propertyName])) {\n\t\t\t\t\tproperties[propertyName] = [properties[propertyName] as AbstractBaseProperty];\n\t\t\t\t}\n\t\t\t\t(properties[propertyName] as AbstractBaseProperty[]).push(parsedProperty);\n\t\t\t} else {\n\t\t\t\tproperties[propertyName] = parsedProperty;\n\t\t\t}\n\n\t\t\tpropertyName = reader.readString();\n\t\t}\n\n\t\treturn properties;\n\t}\n\n\texport const SerializeList = (writer: ContextWriter, properties: PropertiesMap): void => {\n\t\tfor (const property of Object.values(properties).flatMap(val => Array.isArray(val) ? val : [val])) {\n\t\t\twriter.writeString(property.name);\n\t\t\tPropertiesList.SerializeSingleProperty(writer, property);\n\t\t}\n\t\twriter.writeString('None');\n\t}\n\n\texport const ParseSingleProperty = (reader: ContextReader, propertyName: string): AbstractBaseProperty => {\n\t\tlet currentProperty: any = {};\n\n\t\t//TODO assign type and index after parsing.\n\t\tconst propertyType = reader.readString();\n\t\tconst binarySize = reader.readInt32();\n\n\t\tconst index = reader.readInt32();\n\t\tconst before = reader.getBufferPosition();\n\t\tlet overhead = 0;\n\n\t\tlet subtype = '';\n\n\t\ttry {\n\t\t\tswitch (propertyType) {\n\t\t\t\tcase 'BoolProperty':\n\t\t\t\t\toverhead = BoolProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = BoolProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ByteProperty':\n\t\t\t\t\tconst type = reader.readString();\n\t\t\t\t\toverhead = ByteProperty.CalcOverhead(currentProperty, type);\n\t\t\t\t\tcurrentProperty = ByteProperty.Parse(reader, propertyType, index, type);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int8Property':\n\t\t\t\t\toverhead = Int8Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Int8Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase 'UInt8Property':\n\t\t\t\t\toverhead = Uint8Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Uint8Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'IntProperty':\n\t\t\t\tcase 'Int32Property':\n\t\t\t\t\toverhead = Int32Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Int32Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'UInt32Property':\n\t\t\t\t\toverhead = Uint32Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Uint32Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'Int64Property':\n\t\t\t\t\toverhead = Int64Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Int64Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'UInt64Property':\n\t\t\t\t\toverhead = Uint64Property.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = Uint64Property.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SingleProperty':\n\t\t\t\tcase 'FloatProperty':\n\t\t\t\t\toverhead = FloatProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = FloatProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'DoubleProperty':\n\t\t\t\t\toverhead = DoubleProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = DoubleProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'StrProperty':\n\t\t\t\tcase 'NameProperty':\n\t\t\t\t\toverhead = StrProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = StrProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ObjectProperty':\n\t\t\t\tcase 'InterfaceProperty':\n\t\t\t\t\toverhead = ObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = ObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SoftObjectProperty':\n\t\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = SoftObjectProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'EnumProperty':\n\t\t\t\t\tconst name = reader.readString();\n\t\t\t\t\toverhead = EnumProperty.CalcOverhead(currentProperty, name);\n\t\t\t\t\tcurrentProperty = EnumProperty.Parse(reader, propertyType, name, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'StructProperty':\n\t\t\t\t\tsubtype = reader.readString();\n\t\t\t\t\toverhead = StructProperty.CalcOverhead(currentProperty, subtype);\n\t\t\t\t\tcurrentProperty = StructProperty.Parse(reader, propertyType, index, binarySize, subtype);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ArrayProperty':\n\t\t\t\t\tsubtype = reader.readString();\n\t\t\t\t\toverhead = ArrayProperty.CalcOverhead(currentProperty, subtype);\n\t\t\t\t\tcurrentProperty = ArrayProperty.Parse(reader, propertyType, index, binarySize, subtype);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'MapProperty':\n\t\t\t\t\tconst keyType = reader.readString();\n\t\t\t\t\tconst valueType = reader.readString();\n\t\t\t\t\toverhead = MapProperty.CalcOverhead(currentProperty, keyType, valueType);\n\t\t\t\t\tcurrentProperty = MapProperty.Parse(reader, propertyName, binarySize, keyType, valueType);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'TextProperty':\n\t\t\t\t\toverhead = TextProperty.CalcOverhead(currentProperty);\n\t\t\t\t\tcurrentProperty = TextProperty.Parse(reader, propertyType, index);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'SetProperty':\n\t\t\t\t\tsubtype = reader.readString();\n\t\t\t\t\toverhead = SetProperty.CalcOverhead(currentProperty, subtype);\n\t\t\t\t\tcurrentProperty = SetProperty.Parse(reader, propertyType, index, propertyName, subtype);\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unimplemented type ${propertyType}, at byte position ${reader.getBufferPosition()}`);\n\t\t\t}\n\n\t\t\tcurrentProperty.name = propertyName;\n\n\t\t\tconst readBytes = reader.getBufferPosition() - before - overhead;\n\t\t\tif (readBytes !== binarySize) {\n\t\t\t\tthrow new ParserError('ParserError', `Property possibly corrupt. Read ${readBytes} bytes for ${propertyType} ${propertyName}, but ${binarySize} bytes were indicated.`);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (reader.context.throwErrors) {\n\t\t\t\tthrow error;\n\t\t\t} else {\n\n\t\t\t\t// we inform about the error and dump the calculated byte content of the property.\n\t\t\t\tconsole.warn(error);\n\t\t\t\tconsole.warn(`property ${propertyName} of type ${propertyType} is therefore dumped as raw bytes.`);\n\n\t\t\t\treader.skipBytes(before - reader.getBufferPosition());\n\t\t\t\t(currentProperty as AbstractBaseProperty).rawBytes = Array.from(reader.readBytes(binarySize + overhead));\n\t\t\t}\n\t\t}\n\n\t\treturn currentProperty;\n\t}\n\n\texport const SerializeSingleProperty = (writer: ContextWriter, property: AbstractBaseProperty): void => {\n\n\t\t// in case we have a property that we could not parse before.\n\t\tif (property.rawBytes !== undefined) {\n\t\t\twriter.writeBytesArray(property.rawBytes);\n\t\t\treturn;\n\t\t}\n\n\t\twriter.writeString(property.ueType);\n\n\t\t// binary length indicator\n\t\tconst lenIndicator = writer.getBufferPosition();\n\t\twriter.writeInt32(0);\n\n\t\t// write index if it is not 0. Since it normally is.\n\t\twriter.writeInt32(property.index ?? 0);\n\n\t\tconst start = writer.getBufferPosition();\n\t\tlet overhead = 0;\n\t\tswitch (property.ueType) {\n\t\t\tcase 'BoolProperty':\n\t\t\t\toverhead = BoolProperty.CalcOverhead(property as BoolProperty);\n\t\t\t\tBoolProperty.Serialize(writer, property as BoolProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ByteProperty':\n\t\t\t\toverhead = ByteProperty.CalcOverhead(property as ByteProperty, (property as ByteProperty).value.type);\n\t\t\t\tByteProperty.Serialize(writer, property as ByteProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int8Property':\n\t\t\t\toverhead = Int8Property.CalcOverhead(property as Int8Property);\n\t\t\t\tInt8Property.Serialize(writer, property as Int8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt8Property':\n\t\t\t\toverhead = Uint8Property.CalcOverhead(property as Uint8Property);\n\t\t\t\tUint8Property.Serialize(writer, property as Uint8Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'IntProperty':\n\t\t\tcase 'Int32Property':\n\t\t\t\toverhead = Int32Property.CalcOverhead(property as Int32Property);\n\t\t\t\tInt32Property.Serialize(writer, property as Int32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt32Property':\n\t\t\t\toverhead = Uint32Property.CalcOverhead(property as Uint32Property);\n\t\t\t\tUint32Property.Serialize(writer, property as Uint32Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'Int64Property':\n\t\t\t\toverhead = Int64Property.CalcOverhead(property as Int64Property);\n\t\t\t\tInt64Property.Serialize(writer, property as Int64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'UInt64PRoperty':\n\t\t\t\toverhead = Uint64Property.CalcOverhead(property as Uint64Property);\n\t\t\t\tUint64Property.Serialize(writer, property as Uint64Property);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SingleProperty':\n\t\t\tcase 'FloatProperty':\n\t\t\t\toverhead = FloatProperty.CalcOverhead(property as FloatProperty);\n\t\t\t\tFloatProperty.Serialize(writer, property as FloatProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'DoubleProperty':\n\t\t\t\toverhead = DoubleProperty.CalcOverhead(property as DoubleProperty);\n\t\t\t\tDoubleProperty.Serialize(writer, property as DoubleProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StrProperty':\n\t\t\tcase 'NameProperty':\n\t\t\t\toverhead = StrProperty.CalcOverhead(property as StrProperty);\n\t\t\t\tStrProperty.Serialize(writer, property as StrProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ObjectProperty':\n\t\t\tcase 'InterfaceProperty':\n\t\t\t\toverhead = ObjectProperty.CalcOverhead(property as ObjectProperty);\n\t\t\t\tObjectProperty.Serialize(writer, property as ObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SoftObjectProperty':\n\t\t\t\toverhead = SoftObjectProperty.CalcOverhead(property as SoftObjectProperty);\n\t\t\t\tSoftObjectProperty.Serialize(writer, property as SoftObjectProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'EnumProperty':\n\t\t\t\toverhead = EnumProperty.CalcOverhead(property as EnumProperty, (property as EnumProperty).value.name);\n\t\t\t\tEnumProperty.Serialize(writer, property as EnumProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'StructProperty':\n\t\t\t\toverhead = StructProperty.CalcOverhead(property as StructProperty, (property as StructProperty).subtype);\n\t\t\t\tStructProperty.Serialize(writer, property as StructProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrayProperty':\n\t\t\t\toverhead = ArrayProperty.CalcOverhead(property as ArrayProperty.AvailableArrayPropertyTypes, (property as ArrayProperty.AvailableArrayPropertyTypes).subtype);\n\t\t\t\tArrayProperty.Serialize(writer, property as ArrayProperty.AvailableArrayPropertyTypes);\n\t\t\t\tbreak;\n\n\t\t\tcase 'MapProperty':\n\t\t\t\toverhead = MapProperty.CalcOverhead(property as MapProperty, (property as MapProperty).keyType, (property as MapProperty).valueType);\n\t\t\t\tMapProperty.Serialize(writer, property as MapProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'TextProperty':\n\t\t\t\toverhead = TextProperty.CalcOverhead(property as TextProperty);\n\t\t\t\tTextProperty.Serialize(writer, property as TextProperty);\n\t\t\t\tbreak;\n\n\t\t\tcase 'SetProperty':\n\t\t\t\toverhead = SetProperty.CalcOverhead(property as SetProperty.AvailableSetPropertyTypes, (property as SetProperty.AvailableSetPropertyTypes).subtype);\n\t\t\t\tSetProperty.Serialize(writer, property as SetProperty.AvailableSetPropertyTypes);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthrow new Error(`Unimplemented type ${property.type}`);\n\t\t}\n\n\t\t// replace len indicator.\n\t\twriter.writeBinarySizeFromPosition(lenIndicator, start + overhead);\n\t}\n}\n\n"]}
@@ -15,6 +15,7 @@ export type AbstractBaseProperty = {
15
15
  name: string;
16
16
  index?: number;
17
17
  guidInfo?: GUIDInfo;
18
+ rawBytes?: number[];
18
19
  };
19
20
  export declare namespace AbstractBaseProperty {
20
21
  const Create: (options: AbstractBasePropertyOptions) => AbstractBaseProperty;
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractBaseProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,EAAE,CAAC;CAC9E,CAAC;AAUF,KAAK,2BAA2B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,yBAAiB,oBAAoB,CAAC;IAC9B,MAAM,MAAM,YAAa,2BAA2B,KAAG,oBAS7D,CAAC;CACF"}
1
+ {"version":3,"file":"AbstractBaseProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD,MAAM,MAAM,aAAa,GAAG;IAC3B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,EAAE,CAAC;CAC9E,CAAC;AAUF,KAAK,2BAA2B,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAUF,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,yBAAiB,oBAAoB,CAAC;IAC9B,MAAM,MAAM,YAAa,2BAA2B,KAAG,oBAS7D,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractBaseProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":";;;AA+BA,IAAiB,oBAAoB,CAWpC;AAXD,WAAiB,oBAAoB;IACvB,2BAAM,GAAG,CAAC,OAAoC,EAAwB,EAAE,CAAC,CACrF;QACC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC/E,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnH,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAG5E,CAAA,CAAC;AACH,CAAC,EAXgB,oBAAoB,oCAApB,oBAAoB,QAWpC","sourcesContent":["import { GUIDInfo } from '../../structs/GUIDInfo';\n\n\nexport type PropertiesMap = {\n\t[name: string]: (AbstractBaseProperty & any) | (AbstractBaseProperty & any)[];\n};\n\n\n/**\n * @type denotes the parser's internal type.\n * @ueType denotes the type like Unreal Engine calls it, like IntProperty. Several UE Types can be mapped to a single type in the parsers view.\n * @name property name\n * @guidInfo denotes the GUID info of this property, i think there never was one observed. they always were not defined.\n * @index index of a property, in case it is part of an array (NOT to confuse with ArrayProperty).\n */\ntype AbstractBasePropertyOptions = {\n\ttype: string;\n\tueType: string;\n\tname?: string;\n\tguidInfo?: GUIDInfo;\n\tindex?: number;\n};\n\nexport type AbstractBaseProperty = {\n\ttype: string;\n\tueType: string;\n\tname: string;\n\tindex?: number;\n\tguidInfo?: GUIDInfo;\n};\n\nexport namespace AbstractBaseProperty {\n\texport const Create = (options: AbstractBasePropertyOptions): AbstractBaseProperty => (\n\t\t{\n\t\t\ttype: options.type,\n\t\t\tueType: options.ueType,\n\t\t\tname: (options.name !== undefined && options.name !== null) ? options.name : '',\n\t\t\t...((options.index !== undefined && options.index !== null && options.index !== 0) ? { index: options.index } : {}),\n\t\t\t...((options.guidInfo !== undefined) ? { guidInfo: options.guidInfo } : {})\n\n\t\t} satisfies AbstractBaseProperty\n\t);\n}"]}
1
+ {"version":3,"file":"AbstractBaseProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/AbstractBaseProperty.ts"],"names":[],"mappings":";;;AAwCA,IAAiB,oBAAoB,CAWpC;AAXD,WAAiB,oBAAoB;IACvB,2BAAM,GAAG,CAAC,OAAoC,EAAwB,EAAE,CAAC,CACrF;QACC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC/E,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnH,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAG5E,CAAA,CAAC;AACH,CAAC,EAXgB,oBAAoB,oCAApB,oBAAoB,QAWpC","sourcesContent":["import { GUIDInfo } from '../../structs/GUIDInfo';\n\n\nexport type PropertiesMap = {\n\t[name: string]: (AbstractBaseProperty & any) | (AbstractBaseProperty & any)[];\n};\n\n\n/**\n * @param type denotes the parser's internal type.\n * @param ueType denotes the type like Unreal Engine calls it, like IntProperty. Several UE Types can be mapped to a single type in the parsers view.\n * @param name property name\n * @param guidInfo denotes the GUID info of this property, i think there never was one observed. they always were not defined.\n * @param index index of a property, in case it is part of an array (NOT to confuse with ArrayProperty).\n */\ntype AbstractBasePropertyOptions = {\n\ttype: string;\n\tueType: string;\n\tname?: string;\n\tguidInfo?: GUIDInfo;\n\tindex?: number;\n};\n\n/**\n * @param type denotes the parser's internal type.\n * @param ueType denotes the type like Unreal Engine calls it, like IntProperty. Several UE Types can be mapped to a single type in the parsers view.\n * @param name property name\n * @param guidInfo denotes the GUID info of this property, i think there never was one observed. they always were not defined.\n * @param index index of a property, in case it is part of an array (NOT to confuse with ArrayProperty).\n * @param rawBytes if the property could not be parsed, it fills the rawBytes array instead.\n */\nexport type AbstractBaseProperty = {\n\ttype: string;\n\tueType: string;\n\tname: string;\n\tindex?: number;\n\tguidInfo?: GUIDInfo;\n\trawBytes?: number[];\n};\n\nexport namespace AbstractBaseProperty {\n\texport const Create = (options: AbstractBasePropertyOptions): AbstractBaseProperty => (\n\t\t{\n\t\t\ttype: options.type,\n\t\t\tueType: options.ueType,\n\t\t\tname: (options.name !== undefined && options.name !== null) ? options.name : '',\n\t\t\t...((options.index !== undefined && options.index !== null && options.index !== 0) ? { index: options.index } : {}),\n\t\t\t...((options.guidInfo !== undefined) ? { guidInfo: options.guidInfo } : {})\n\n\t\t} satisfies AbstractBaseProperty\n\t);\n}"]}
@@ -15,8 +15,8 @@ import { TextArrayProperty } from './TextArrayProperty';
15
15
  export declare const isArrayProperty: (obj: any) => obj is ArrayProperty.AvailableArrayPropertyTypes;
16
16
  export declare namespace ArrayProperty {
17
17
  type AvailableArrayPropertyTypes = BoolArrayProperty | ByteArrayProperty | DoubleArrayProperty | EnumArrayProperty | FloatArrayProperty | Int32ArrayProperty | Int64ArrayProperty | ObjectArrayProperty | SoftObjectArrayProperty | StrArrayProperty | StructArrayProperty | TextArrayProperty;
18
- const Parse: (reader: ContextReader, ueType: string, index: number, size: number) => AvailableArrayPropertyTypes;
19
- const CalcOverhead: (property: AvailableArrayPropertyTypes) => number;
18
+ const Parse: (reader: ContextReader, ueType: string, index: number, size: number, subtype: string) => AvailableArrayPropertyTypes;
19
+ const CalcOverhead: (property: AvailableArrayPropertyTypes, subtype: string) => number;
20
20
  const Serialize: (writer: ContextWriter, property: AvailableArrayPropertyTypes) => void;
21
21
  }
22
22
  //# sourceMappingURL=ArrayProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayProperty.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,mBAAmB,EAAyB,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAuB,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAwB,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAyB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAA6B,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAsB,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAyB,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,eAAO,MAAM,eAAe,QAAS,GAAG,KAAG,GAAG,IAAI,aAAa,CAAC,2BAYjC,CAAC;AAEhC,yBAAiB,aAAa,CAAC;IAE3B,KAAY,2BAA2B,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,uBAAuB,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;IAE/R,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,KAAG,2BA+D1F,CAAA;IAEM,MAAM,YAAY,aAAc,2BAA2B,KAAG,MAEpE,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,2BAA2B,KAAG,IAiCxF,CAAA;CACJ"}
1
+ {"version":3,"file":"ArrayProperty.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.ts"],"names":[],"mappings":"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;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,2BAA2B,KAAG,IAiCxF,CAAA;CACJ"}
@@ -29,8 +29,7 @@ const isArrayProperty = (obj) => (0, BoolArrayProperty_1.isBoolArrayProperty)(ob
29
29
  exports.isArrayProperty = isArrayProperty;
30
30
  var ArrayProperty;
31
31
  (function (ArrayProperty) {
32
- ArrayProperty.Parse = (reader, ueType, index, size) => {
33
- const subtype = reader.readString();
32
+ ArrayProperty.Parse = (reader, ueType, index, size, subtype) => {
34
33
  reader.skipBytes(1);
35
34
  let property;
36
35
  const elementCount = reader.readInt32();
@@ -77,8 +76,8 @@ var ArrayProperty;
77
76
  }
78
77
  return property;
79
78
  };
80
- ArrayProperty.CalcOverhead = (property) => {
81
- return property.subtype.length + 5 + 1;
79
+ ArrayProperty.CalcOverhead = (property, subtype) => {
80
+ return subtype.length + 5 + 1;
82
81
  };
83
82
  ArrayProperty.Serialize = (writer, property) => {
84
83
  writer.writeString(property.subtype);
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,2DAA6E;AAC7E,2DAA6E;AAC7E,+DAAmF;AACnF,2DAA6E;AAC7E,6DAAgF;AAChF,6DAAgF;AAChF,6DAAgF;AAChF,+DAAmF;AACnF,uEAA+F;AAC/F,yDAA0E;AAC1E,+DAAmF;AACnF,2DAA6E;AAEtE,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAoD,EAAE,CAC1F,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACrB,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,2CAAqB,EAAC,GAAG,CAAC;OAC1B,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,yCAAoB,EAAC,GAAG,CAAC;OACzB,IAAA,yCAAoB,EAAC,GAAG,CAAC;OACzB,IAAA,yCAAoB,E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CAAkB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACtC,mCAAgB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC;aAAM,IAAI,IAAA,uCAAmB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,qCAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;aAAM,IAAI,IAAA,uCAAmB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,qCAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;aAAM,IAAI,IAAA,2CAAqB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,yCAAmB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;aAAM,IAAI,IAAA,mDAAyB,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC7C,iDAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACxD,CAAC;aAAM,IAAI,IAAA,2CAAqB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,yCAAmB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,iCAAkB,CAAC,wCAAyC,QAAgB,CAAC,IAAI,IAAI,EAAE,KAAM,QAAgB,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;QAC7I,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA3GgB,aAAa,6BAAb,aAAa,QA2G7B","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { BoolArrayProperty, isBoolArrayProperty } from './BoolArrayProperty';\nimport { ByteArrayProperty, isByteArrayProperty } from './ByteArrayProperty';\nimport { DoubleArrayProperty, isDoubleArrayProperty } from './DoubleArrayProperty';\nimport { EnumArrayProperty, isEnumArrayProperty } from './EnumArrayProperty';\nimport { FloatArrayProperty, isFloatArrayProperty } from './FloatArrayProperty';\nimport { Int32ArrayProperty, isInt32ArrayProperty } from './Int32ArrayProperty';\nimport { Int64ArrayProperty, isInt64ArrayProperty } from './Int64ArrayProperty';\nimport { isObjectArrayProperty, ObjectArrayProperty } from './ObjectArrayProperty';\nimport { isSoftObjectArrayProperty, SoftObjectArrayProperty } from './SoftObjectArrayProperty';\nimport { isStrArrayProperty, StrArrayProperty } from './StrArrayProperty';\nimport { isStructArrayProperty, StructArrayProperty } from './StructArrayProperty';\nimport { isTextArrayProperty, TextArrayProperty } from './TextArrayProperty';\n\nexport const isArrayProperty = (obj: any): obj is ArrayProperty.AvailableArrayPropertyTypes =>\n isBoolArrayProperty(obj)\n || isByteArrayProperty(obj)\n || isDoubleArrayProperty(obj)\n || isEnumArrayProperty(obj)\n || isFloatArrayProperty(obj)\n || isInt32ArrayProperty(obj)\n || isInt64ArrayProperty(obj)\n || isObjectArrayProperty(obj)\n || isSoftObjectArrayProperty(obj)\n || isStrArrayProperty(obj)\n || isStructArrayProperty(obj)\n || isTextArrayProperty(obj);\n\nexport namespace ArrayProperty {\n\n export type AvailableArrayPropertyTypes = BoolArrayProperty | ByteArrayProperty | DoubleArrayProperty | EnumArrayProperty | FloatArrayProperty | Int32ArrayProperty | Int64ArrayProperty | ObjectArrayProperty | SoftObjectArrayProperty | StrArrayProperty | StructArrayProperty | TextArrayProperty;\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, size: number): AvailableArrayPropertyTypes => {\n const subtype = reader.readString();\n reader.skipBytes(1); // 0\n\n let property: AvailableArrayPropertyTypes;\n const elementCount = reader.readInt32();\n switch (subtype) {\n case \"FloatProperty\":\n property = FloatArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"BoolProperty\":\n property = BoolArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"IntProperty\":\n property = Int32ArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"Int64Property\":\n property = Int64ArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"DoubleProperty\":\n property = DoubleArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"ByteProperty\":\n property = ByteArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"StrProperty\":\n property = StrArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"EnumProperty\":\n property = EnumArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"TextProperty\":\n property = TextArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"InterfaceProperty\":\n case \"ObjectProperty\":\n property = ObjectArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"SoftObjectProperty\":\n property = SoftObjectArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n\n case \"StructProperty\":\n property = StructArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n default:\n throw new UnimplementedError(`Unknown array property subtype ${subtype} for ${ueType}. Not implemented.`);\n\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: AvailableArrayPropertyTypes): number => {\n return property.subtype.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: AvailableArrayPropertyTypes): void => {\n\n writer.writeString(property.subtype);\n writer.writeByte(0);\n writer.writeInt32(property.values.length);\n\n if (isFloatArrayProperty(property)) {\n FloatArrayProperty.Serialize(writer, property);\n } else if (isBoolArrayProperty(property)) {\n BoolArrayProperty.Serialize(writer, property);\n } else if (isInt32ArrayProperty(property)) {\n Int32ArrayProperty.Serialize(writer, property);\n } else if (isInt64ArrayProperty(property)) {\n Int64ArrayProperty.Serialize(writer, property);\n } else if (isDoubleArrayProperty(property)) {\n DoubleArrayProperty.Serialize(writer, property);\n } else if (isByteArrayProperty(property)) {\n ByteArrayProperty.Serialize(writer, property);\n } else if (isStrArrayProperty(property)) {\n StrArrayProperty.Serialize(writer, property);\n } else if (isEnumArrayProperty(property)) {\n EnumArrayProperty.Serialize(writer, property);\n } else if (isTextArrayProperty(property)) {\n TextArrayProperty.Serialize(writer, property);\n } else if (isObjectArrayProperty(property)) {\n ObjectArrayProperty.Serialize(writer, property);\n } else if (isSoftObjectArrayProperty(property)) {\n SoftObjectArrayProperty.Serialize(writer, property);\n } else if (isStructArrayProperty(property)) {\n StructArrayProperty.Serialize(writer, property);\n } else {\n throw new UnimplementedError(`Unknown array property to serialize. ${(property as any).type ?? ''}, ${(property as any).subtype ?? ''}`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ArrayProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,2DAA6E;AAC7E,2DAA6E;AAC7E,+DAAmF;AACnF,2DAA6E;AAC7E,6DAAgF;AAChF,6DAAgF;AAChF,6DAAgF;AAChF,+DAAmF;AACnF,uEAA+F;AAC/F,yDAA0E;AAC1E,+DAAmF;AACnF,2DAA6E;AAEtE,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAoD,EAAE,CAC1F,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACrB,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,2CAAqB,EAAC,GAAG,CAAC;OAC1B,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,yCAAoB,EAAC,GAAG,CAAC;OACzB,IAAA,yCAAoB,EAAC,GAAG,CAAC;OACzB,IAAA,yCAAoB,EAAC,GAAG,CAAC;OACzB,IAAA,2CAAqB,EAAC,GAAG,CAAC;OAC1B,IAAA,mDAAyB,EAAC,GAAG,CAAC;OAC9B,IAAA,qCAAkB,EAAC,GAAG,CAAC;OACvB,IAAA,2CAAqB,EAAC,GAAG,CAAC;OAC1B,IAAA,uCAAmB,EAAC,GAAG,CA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IAAI,IAAA,uCAAmB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,qCAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;aAAM,IAAI,IAAA,2CAAqB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,yCAAmB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;aAAM,IAAI,IAAA,mDAAyB,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC7C,iDAAuB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACxD,CAAC;aAAM,IAAI,IAAA,2CAAqB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACzC,yCAAmB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,iCAAkB,CAAC,wCAAyC,QAAgB,CAAC,IAAI,IAAI,EAAE,KAAM,QAAgB,CAAC,OAAO,IAAI,EAAE,EAAE,CAAC,CAAC;QAC7I,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA1GgB,aAAa,6BAAb,aAAa,QA0G7B","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { BoolArrayProperty, isBoolArrayProperty } from './BoolArrayProperty';\nimport { ByteArrayProperty, isByteArrayProperty } from './ByteArrayProperty';\nimport { DoubleArrayProperty, isDoubleArrayProperty } from './DoubleArrayProperty';\nimport { EnumArrayProperty, isEnumArrayProperty } from './EnumArrayProperty';\nimport { FloatArrayProperty, isFloatArrayProperty } from './FloatArrayProperty';\nimport { Int32ArrayProperty, isInt32ArrayProperty } from './Int32ArrayProperty';\nimport { Int64ArrayProperty, isInt64ArrayProperty } from './Int64ArrayProperty';\nimport { isObjectArrayProperty, ObjectArrayProperty } from './ObjectArrayProperty';\nimport { isSoftObjectArrayProperty, SoftObjectArrayProperty } from './SoftObjectArrayProperty';\nimport { isStrArrayProperty, StrArrayProperty } from './StrArrayProperty';\nimport { isStructArrayProperty, StructArrayProperty } from './StructArrayProperty';\nimport { isTextArrayProperty, TextArrayProperty } from './TextArrayProperty';\n\nexport const isArrayProperty = (obj: any): obj is ArrayProperty.AvailableArrayPropertyTypes =>\n isBoolArrayProperty(obj)\n || isByteArrayProperty(obj)\n || isDoubleArrayProperty(obj)\n || isEnumArrayProperty(obj)\n || isFloatArrayProperty(obj)\n || isInt32ArrayProperty(obj)\n || isInt64ArrayProperty(obj)\n || isObjectArrayProperty(obj)\n || isSoftObjectArrayProperty(obj)\n || isStrArrayProperty(obj)\n || isStructArrayProperty(obj)\n || isTextArrayProperty(obj);\n\nexport namespace ArrayProperty {\n\n export type AvailableArrayPropertyTypes = BoolArrayProperty | ByteArrayProperty | DoubleArrayProperty | EnumArrayProperty | FloatArrayProperty | Int32ArrayProperty | Int64ArrayProperty | ObjectArrayProperty | SoftObjectArrayProperty | StrArrayProperty | StructArrayProperty | TextArrayProperty;\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, size: number, subtype: string): AvailableArrayPropertyTypes => {\n reader.skipBytes(1); // 0\n\n let property: AvailableArrayPropertyTypes;\n const elementCount = reader.readInt32();\n switch (subtype) {\n case \"FloatProperty\":\n property = FloatArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"BoolProperty\":\n property = BoolArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"IntProperty\":\n property = Int32ArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"Int64Property\":\n property = Int64ArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"DoubleProperty\":\n property = DoubleArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"ByteProperty\":\n property = ByteArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"StrProperty\":\n property = StrArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"EnumProperty\":\n property = EnumArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"TextProperty\":\n property = TextArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"InterfaceProperty\":\n case \"ObjectProperty\":\n property = ObjectArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"SoftObjectProperty\":\n property = SoftObjectArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n\n case \"StructProperty\":\n property = StructArrayProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n default:\n throw new UnimplementedError(`Unknown array property subtype ${subtype} for ${ueType}. Not implemented.`);\n\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: AvailableArrayPropertyTypes, subtype: string): number => {\n return subtype.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: AvailableArrayPropertyTypes): void => {\n\n writer.writeString(property.subtype);\n writer.writeByte(0);\n writer.writeInt32(property.values.length);\n\n if (isFloatArrayProperty(property)) {\n FloatArrayProperty.Serialize(writer, property);\n } else if (isBoolArrayProperty(property)) {\n BoolArrayProperty.Serialize(writer, property);\n } else if (isInt32ArrayProperty(property)) {\n Int32ArrayProperty.Serialize(writer, property);\n } else if (isInt64ArrayProperty(property)) {\n Int64ArrayProperty.Serialize(writer, property);\n } else if (isDoubleArrayProperty(property)) {\n DoubleArrayProperty.Serialize(writer, property);\n } else if (isByteArrayProperty(property)) {\n ByteArrayProperty.Serialize(writer, property);\n } else if (isStrArrayProperty(property)) {\n StrArrayProperty.Serialize(writer, property);\n } else if (isEnumArrayProperty(property)) {\n EnumArrayProperty.Serialize(writer, property);\n } else if (isTextArrayProperty(property)) {\n TextArrayProperty.Serialize(writer, property);\n } else if (isObjectArrayProperty(property)) {\n ObjectArrayProperty.Serialize(writer, property);\n } else if (isSoftObjectArrayProperty(property)) {\n SoftObjectArrayProperty.Serialize(writer, property);\n } else if (isStructArrayProperty(property)) {\n StructArrayProperty.Serialize(writer, property);\n } else {\n throw new UnimplementedError(`Unknown array property to serialize. ${(property as any).type ?? ''}, ${(property as any).subtype ?? ''}`);\n }\n }\n}\n"]}
@@ -45,7 +45,7 @@ var StructArrayProperty;
45
45
  });
46
46
  const readBytes = reader.getBufferPosition() - before;
47
47
  if (readBytes !== binarySize) {
48
- throw new Error('possibly corrupt in array of struct.');
48
+ throw new Error(`possibly corrupt in array of struct. read ${readBytes} bytes but ${binarySize} were indicated. ${elementCount} elements of struct subtype ${allStructType}.`);
49
49
  }
50
50
  return {
51
51
  ...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, type: '' }),
@@ -1 +1 @@
1
- {"version":3,"file":"StructArrayProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.ts"],"names":[],"mappings":";;;AAEA,wDAAqD;AACrD,kEAA+D;AAC/D,sDAAmD;AAE5C,MAAM,qBAAqB,GAAG,CAAC,QAAa,EAAmC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,qBAAqB,CAAC;AAAhJ,QAAA,qBAAqB,yBAA2H;AAS7J,IAAiB,mBAAmB,CAiFnC;AAjFD,WAAiB,mBAAmB;IAEnB,yBAAK,GAAG,CAAC,MAAqB,EAAE,YAAoB,EAAE,OAAe,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAuB,EAAE;QAE1I,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAEtC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEpC,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1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AAC,UAAU,CAAC,QAAQ,CAAC,iBAAkB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QAC5D,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAkB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QAC5D,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAkB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QAE5D,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,+BAAc,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,iBAAkB,CAAC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACxH,MAAM,CAAC,2BAA2B,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC,CAAA;AACL,CAAC,EAjFgB,mBAAmB,mCAAnB,mBAAmB,QAiFnC","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { GUIDInfo } from '../../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from '../AbstractBaseProperty';\nimport { StructProperty } from '../StructProperty';\n\nexport const isStructArrayProperty = (property: any): property is StructArrayProperty => !Array.isArray(property) && property.type === 'StructArrayProperty';\n\nexport type StructArrayProperty = AbstractBaseProperty & {\n type: 'StructArrayProperty';\n subtype: string;\n values: StructProperty[];\n structValueFields: ArrayPropertyStructValueFields;\n};\n\nexport namespace StructArrayProperty {\n\n export const Parse = (reader: ContextReader, elementCount: number, subtype: string, ueType: string, index: number = 0): StructArrayProperty => {\n\n const name = reader.readString(); // Same as currentProperty.name\n const allUEType = reader.readString(); // StructProperty\n\n const binarySize = reader.readInt32(); // structureSize\n const allIndex = reader.readInt32(); // Since ArrayProperty itself has an index already, this was never observed to be anything else than 0.\n\n const allStructType = reader.readString();\n const allGuid = GUIDInfo.read(reader);\n\n const allUnk1 = reader.readInt32();\n const allUnk2 = reader.readInt32();\n const allUnk3 = reader.readInt32();\n const allUnk4 = reader.readInt32();\n\n const structValueFields: ArrayPropertyStructValueFields = { allStructType, allIndex: allIndex > 0 ? allIndex : undefined, allGuid };\n if (allUnk1 !== 0) {\n structValueFields.allUnk1 = allUnk1;\n }\n if (allUnk2 !== 0) {\n structValueFields.allUnk2 = allUnk2;\n }\n if (allUnk3 !== 0) {\n structValueFields.allUnk3 = allUnk3;\n }\n if (allUnk4 !== 0) {\n structValueFields.allUnk4 = allUnk4;\n }\n\n\n const before = reader.getBufferPosition();\n const values = new Array(elementCount).fill(0).map(() => {\n\n const struct: StructProperty = {\n ...AbstractBaseProperty.Create({ index: allIndex, ueType: allUEType, guidInfo: allGuid, type: '' }),\n type: 'StructProperty',\n subtype: allStructType,\n value: { values: [] }\n };\n\n // we do NOT assign individual unk's here. Since they are only serialized always on ArrayProperty's Level once for all elements.\n struct.value = StructProperty.ParseValue(reader, allStructType, binarySize);\n return struct;\n });\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== binarySize) {\n throw new Error('possibly corrupt in array of struct.');\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'StructArrayProperty',\n structValueFields,\n subtype,\n values\n } satisfies StructArrayProperty;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructArrayProperty): void => {\n writer.writeString(property.name);\n writer.writeString(property.subtype);\n\n const lenIndicator = writer.getBufferPosition();\n writer.writeInt32(0);\n writer.writeInt32(property.structValueFields!.allIndex ?? 0);\n\n writer.writeString(property.structValueFields!.allStructType);\n GUIDInfo.write(writer, property.structValueFields!.allGuid)\n\n writer.writeInt32(property.structValueFields!.allUnk1 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk2 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk3 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk4 ?? 0);\n\n const before = writer.getBufferPosition();\n property.values.forEach(v => StructProperty.SerializeValue(writer, property.structValueFields!.allStructType, v.value));\n writer.writeBinarySizeFromPosition(lenIndicator, before);\n }\n}\n\nexport type ArrayPropertyStructValueFields = {\n allStructType: string;\n allIndex?: number;\n allGuid: GUIDInfo;\n allUnk1?: number;\n allUnk2?: number;\n allUnk3?: number;\n allUnk4?: number;\n};\n"]}
1
+ {"version":3,"file":"StructArrayProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.ts"],"names":[],"mappings":";;;AAEA,wDAAqD;AACrD,kEAA+D;AAC/D,sDAAmD;AAE5C,MAAM,qBAAqB,GAAG,CAAC,QAAa,EAAmC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,qBAAqB,CAAC;AAAhJ,QAAA,qBAAqB,yBAA2H;AAS7J,IAAiB,mBAAmB,CAiFnC;AAjFD,WAAiB,mBAAmB;IAEnB,yBAAK,GAAG,CAAC,MAAqB,EAAE,YAAoB,EAAE,OAAe,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAuB,EAAE;QAE1I,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAEtC,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEpC,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC1C,MAAM,OAAO,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEtC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QACnC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAC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AC,UAAU,CAAC,QAAQ,CAAC,iBAAkB,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QAE5D,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAC1C,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,+BAAc,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,iBAAkB,CAAC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACxH,MAAM,CAAC,2BAA2B,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;IAC7D,CAAC,CAAA;AACL,CAAC,EAjFgB,mBAAmB,mCAAnB,mBAAmB,QAiFnC","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { GUIDInfo } from '../../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from '../AbstractBaseProperty';\nimport { StructProperty } from '../StructProperty';\n\nexport const isStructArrayProperty = (property: any): property is StructArrayProperty => !Array.isArray(property) && property.type === 'StructArrayProperty';\n\nexport type StructArrayProperty = AbstractBaseProperty & {\n type: 'StructArrayProperty';\n subtype: string;\n values: StructProperty[];\n structValueFields: ArrayPropertyStructValueFields;\n};\n\nexport namespace StructArrayProperty {\n\n export const Parse = (reader: ContextReader, elementCount: number, subtype: string, ueType: string, index: number = 0): StructArrayProperty => {\n\n const name = reader.readString(); // Same as currentProperty.name\n const allUEType = reader.readString(); // StructProperty\n\n const binarySize = reader.readInt32(); // structureSize\n const allIndex = reader.readInt32(); // Since ArrayProperty itself has an index already, this was never observed to be anything else than 0.\n\n const allStructType = reader.readString();\n const allGuid = GUIDInfo.read(reader);\n\n const allUnk1 = reader.readInt32();\n const allUnk2 = reader.readInt32();\n const allUnk3 = reader.readInt32();\n const allUnk4 = reader.readInt32();\n\n const structValueFields: ArrayPropertyStructValueFields = { allStructType, allIndex: allIndex > 0 ? allIndex : undefined, allGuid };\n if (allUnk1 !== 0) {\n structValueFields.allUnk1 = allUnk1;\n }\n if (allUnk2 !== 0) {\n structValueFields.allUnk2 = allUnk2;\n }\n if (allUnk3 !== 0) {\n structValueFields.allUnk3 = allUnk3;\n }\n if (allUnk4 !== 0) {\n structValueFields.allUnk4 = allUnk4;\n }\n\n\n const before = reader.getBufferPosition();\n const values = new Array(elementCount).fill(0).map(() => {\n\n const struct: StructProperty = {\n ...AbstractBaseProperty.Create({ index: allIndex, ueType: allUEType, guidInfo: allGuid, type: '' }),\n type: 'StructProperty',\n subtype: allStructType,\n value: { values: [] }\n };\n\n // we do NOT assign individual unk's here. Since they are only serialized always on ArrayProperty's Level once for all elements.\n struct.value = StructProperty.ParseValue(reader, allStructType, binarySize);\n return struct;\n });\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== binarySize) {\n throw new Error(`possibly corrupt in array of struct. read ${readBytes} bytes but ${binarySize} were indicated. ${elementCount} elements of struct subtype ${allStructType}.`);\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'StructArrayProperty',\n structValueFields,\n subtype,\n values\n } satisfies StructArrayProperty;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructArrayProperty): void => {\n writer.writeString(property.name);\n writer.writeString(property.subtype);\n\n const lenIndicator = writer.getBufferPosition();\n writer.writeInt32(0);\n writer.writeInt32(property.structValueFields!.allIndex ?? 0);\n\n writer.writeString(property.structValueFields!.allStructType);\n GUIDInfo.write(writer, property.structValueFields!.allGuid)\n\n writer.writeInt32(property.structValueFields!.allUnk1 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk2 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk3 ?? 0);\n writer.writeInt32(property.structValueFields!.allUnk4 ?? 0);\n\n const before = writer.getBufferPosition();\n property.values.forEach(v => StructProperty.SerializeValue(writer, property.structValueFields!.allStructType, v.value));\n writer.writeBinarySizeFromPosition(lenIndicator, before);\n }\n}\n\nexport type ArrayPropertyStructValueFields = {\n allStructType: string;\n allIndex?: number;\n allGuid: GUIDInfo;\n allUnk1?: number;\n allUnk2?: number;\n allUnk3?: number;\n allUnk4?: number;\n};\n"]}
@@ -7,9 +7,9 @@ export type ByteProperty = AbstractBaseProperty & {
7
7
  value: BytePropertyValue;
8
8
  };
9
9
  export declare namespace ByteProperty {
10
- const Parse: (reader: ContextReader, ueType: string, index?: number) => ByteProperty;
10
+ const Parse: (reader: ContextReader, ueType: string, index: number | undefined, type: string) => ByteProperty;
11
11
  const ReadValue: (reader: ContextReader) => number;
12
- const CalcOverhead: (property: ByteProperty) => number;
12
+ const CalcOverhead: (property: ByteProperty, type: string) => number;
13
13
  const Serialize: (writer: ContextWriter, property: ByteProperty) => void;
14
14
  const SerializeValue: (writer: ContextWriter, value: number) => void;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ByteProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/ByteProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,cAAc,aAAc,GAAG,KAAG,QAAQ,IAAI,YAA4E,CAAC;AAExI,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAC9C,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,yBAAiB,YAAY,CAAC;IAEnB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,UAAS,MAAM,KAAO,YAyBhF,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,KAAG,MAEjD,CAAA;IAEM,MAAM,YAAY,aAAc,YAAY,KAAG,MAErD,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,YAAY,KAAG,IAUzE,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,SAAS,MAAM,KAAG,IAErE,CAAA;CACJ;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B,CAAC"}
1
+ {"version":3,"file":"ByteProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/ByteProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,cAAc,aAAc,GAAG,KAAG,QAAQ,IAAI,YAA4E,CAAC;AAExI,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAC9C,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,yBAAiB,YAAY,CAAC;IAEnB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,oBAAY,MAAM,KAAG,YAuB9F,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,KAAG,MAEjD,CAAA;IAEM,MAAM,YAAY,aAAc,YAAY,QAAQ,MAAM,KAAG,MAEnE,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,YAAY,KAAG,IAUzE,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,SAAS,MAAM,KAAG,IAErE,CAAA;CACJ;AACD,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B,CAAC"}
@@ -7,8 +7,7 @@ const isByteProperty = (property) => !Array.isArray(property) && property.type =
7
7
  exports.isByteProperty = isByteProperty;
8
8
  var ByteProperty;
9
9
  (function (ByteProperty) {
10
- ByteProperty.Parse = (reader, ueType, index = 0) => {
11
- const type = reader.readString();
10
+ ByteProperty.Parse = (reader, ueType, index = 0, type) => {
12
11
  const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
13
12
  let value;
14
13
  if (type === 'None') {
@@ -32,8 +31,8 @@ var ByteProperty;
32
31
  ByteProperty.ReadValue = (reader) => {
33
32
  return reader.readByte();
34
33
  };
35
- ByteProperty.CalcOverhead = (property) => {
36
- return property.value.type.length + 5 + 1;
34
+ ByteProperty.CalcOverhead = (property, type) => {
35
+ return type.length + 5 + 1;
37
36
  };
38
37
  ByteProperty.Serialize = (writer, property) => {
39
38
  writer.writeString(property.value.type);
@@ -1 +1 @@
1
- {"version":3,"file":"ByteProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/ByteProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAGvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAOxI,IAAiB,YAAY,CAoD5B;AApDD,WAAiB,YAAY;IAEZ,kBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAgB,EAAE;QAE5F,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAGvC,IAAI,KAAK,CAAC;QACV,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;YAClB,KAAK,GAAG;gBACJ,IAAI;gBACJ,KAAK,EAAE,aAAA,SAAS,CAAC,MAAM,CAAC;aAC3B,CAAC;QACN,CAAC;aACI,CAAC;YACF,KAAK,GAAG;gBACJ,IAAI;gBACJ,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE;aAC7B,CAAC;QACN,CAAC;QAED,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,cAAc;YACpB,KAAK;SACe,CAAC;IAC7B,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAU,EAAE;QACvD,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC,CAAA;IAEY,yBAAY,GAAG,CAAC,QAAsB,EAAU,EAAE;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAE,QAAsB,EAAQ,EAAE;QAC7E,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,mBAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAE1C,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACjC,aAAA,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;QAC3D,CAAC;aACI,CAAC;YACF,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAe,CAAC,CAAC;QACvD,CAAC;IACL,CAAC,CAAA;IAEY,2BAAc,GAAG,CAAC,MAAqB,EAAE,KAAa,EAAQ,EAAE;QACzE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAA;AACL,CAAC,EApDgB,YAAY,4BAAZ,YAAY,QAoD5B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport const isByteProperty = (property: any): property is ByteProperty => !Array.isArray(property) && property.type === 'ByteProperty';\n\nexport type ByteProperty = AbstractBaseProperty & {\n type: 'ByteProperty';\n value: BytePropertyValue;\n};\n\nexport namespace ByteProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, index: number = 0): ByteProperty => {\n\n const type = reader.readString();\n const guidInfo = GUIDInfo.read(reader);\n\n\n let value;\n if (type === 'None') {\n value = {\n type,\n value: ReadValue(reader)\n };\n }\n else {\n value = {\n type,\n value: reader.readString()\n };\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'ByteProperty',\n value\n } satisfies ByteProperty;\n }\n\n export const ReadValue = (reader: ContextReader): number => {\n return reader.readByte();\n }\n\n export const CalcOverhead = (property: ByteProperty): number => {\n return property.value.type.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: ByteProperty): void => {\n writer.writeString(property.value.type);\n GUIDInfo.write(writer, property.guidInfo);\n\n if (property.value.type === 'None') {\n SerializeValue(writer, property.value.value as number);\n }\n else {\n writer.writeString(property.value.value as string);\n }\n }\n\n export const SerializeValue = (writer: ContextWriter, value: number): void => {\n writer.writeByte(value);\n }\n}\nexport type BytePropertyValue = {\n type: string;\n value: string | number;\n};\n\n"]}
1
+ {"version":3,"file":"ByteProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/ByteProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAGvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAOxI,IAAiB,YAAY,CAkD5B;AAlDD,WAAiB,YAAY;IAEZ,kBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAE,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AAC,KAAe,CAAC,CAAC;QACvD,CAAC;IACL,CAAC,CAAA;IAEY,2BAAc,GAAG,CAAC,MAAqB,EAAE,KAAa,EAAQ,EAAE;QACzE,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAA;AACL,CAAC,EAlDgB,YAAY,4BAAZ,YAAY,QAkD5B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport const isByteProperty = (property: any): property is ByteProperty => !Array.isArray(property) && property.type === 'ByteProperty';\n\nexport type ByteProperty = AbstractBaseProperty & {\n type: 'ByteProperty';\n value: BytePropertyValue;\n};\n\nexport namespace ByteProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, index: number = 0, type: string): ByteProperty => {\n\n const guidInfo = GUIDInfo.read(reader);\n\n let value;\n if (type === 'None') {\n value = {\n type,\n value: ReadValue(reader)\n };\n }\n else {\n value = {\n type,\n value: reader.readString()\n };\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'ByteProperty',\n value\n } satisfies ByteProperty;\n }\n\n export const ReadValue = (reader: ContextReader): number => {\n return reader.readByte();\n }\n\n export const CalcOverhead = (property: ByteProperty, type: string): number => {\n return type.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: ByteProperty): void => {\n writer.writeString(property.value.type);\n GUIDInfo.write(writer, property.guidInfo);\n\n if (property.value.type === 'None') {\n SerializeValue(writer, property.value.value as number);\n }\n else {\n writer.writeString(property.value.value as string);\n }\n }\n\n export const SerializeValue = (writer: ContextWriter, value: number): void => {\n writer.writeByte(value);\n }\n}\nexport type BytePropertyValue = {\n type: string;\n value: string | number;\n};\n\n"]}
@@ -10,9 +10,9 @@ export type EnumProperty = AbstractBaseProperty & {
10
10
  };
11
11
  };
12
12
  export declare namespace EnumProperty {
13
- const Parse: (reader: ContextReader, ueType: string, index?: number) => EnumProperty;
13
+ const Parse: (reader: ContextReader, ueType: string, name: string, index?: number) => EnumProperty;
14
14
  const ReadValue: (reader: ContextReader) => string;
15
- const CalcOverhead: (property: EnumProperty) => number;
15
+ const CalcOverhead: (property: EnumProperty, name: EnumProperty["value"]["name"]) => number;
16
16
  const Serialize: (writer: ContextWriter, property: EnumProperty) => void;
17
17
  const SerializeValue: (writer: ContextWriter, value: string) => void;
18
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EnumProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/EnumProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,cAAc,aAAc,GAAG,KAAG,QAAQ,IAAI,YAA4E,CAAC;AAExI,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAC9C,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;KAAE,CAAC;CAC3C,CAAC;AAEF,yBAAiB,YAAY,CAAC;IAEnB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,UAAS,MAAM,KAAO,YAUhF,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,KAAG,MAEjD,CAAA;IAEM,MAAM,YAAY,aAAc,YAAY,KAAG,MAErD,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,YAAY,KAAG,IAIzE,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,SAAS,MAAM,KAAG,IAErE,CAAA;CACJ"}
1
+ {"version":3,"file":"EnumProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/EnumProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,eAAO,MAAM,cAAc,aAAc,GAAG,KAAG,QAAQ,IAAI,YAA4E,CAAC;AAExI,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG;IAC9C,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;KAAE,CAAC;CAC3C,CAAC;AAEF,yBAAiB,YAAY,CAAC;IAEnB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,QAAQ,MAAM,UAAS,MAAM,KAAO,YAS9F,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,KAAG,MAEjD,CAAA;IAEM,MAAM,YAAY,aAAc,YAAY,QAAQ,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAG,MAE1F,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,YAAY,KAAG,IAIzE,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,SAAS,MAAM,KAAG,IAErE,CAAA;CACJ"}
@@ -7,8 +7,7 @@ const isEnumProperty = (property) => !Array.isArray(property) && property.type =
7
7
  exports.isEnumProperty = isEnumProperty;
8
8
  var EnumProperty;
9
9
  (function (EnumProperty) {
10
- EnumProperty.Parse = (reader, ueType, index = 0) => {
11
- let name = reader.readString();
10
+ EnumProperty.Parse = (reader, ueType, name, index = 0) => {
12
11
  const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
13
12
  const value = EnumProperty.ReadValue(reader);
14
13
  return {
@@ -20,8 +19,8 @@ var EnumProperty;
20
19
  EnumProperty.ReadValue = (reader) => {
21
20
  return reader.readString();
22
21
  };
23
- EnumProperty.CalcOverhead = (property) => {
24
- return property.value.name.length + 5 + 1;
22
+ EnumProperty.CalcOverhead = (property, name) => {
23
+ return name.length + 5 + 1;
25
24
  };
26
25
  EnumProperty.Serialize = (writer, property) => {
27
26
  writer.writeString(property.value.name);
@@ -1 +1 @@
1
- {"version":3,"file":"EnumProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/EnumProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAOxI,IAAiB,YAAY,CA+B5B;AA/BD,WAAiB,YAAY;IAEZ,kBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAgB,EAAE;QAC5F,IAAI,IAAI,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,aAAA,SAAS,CAAC,MAAM,CAAC,CAAC;QAEhC,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACF,CAAC;IAC7B,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAU,EAAE;QACvD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAA;IAEY,yBAAY,GAAG,CAAC,QAAsB,EAAU,EAAE;QAC3D,OAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAE,QAAsB,EAAQ,EAAE;QAC7E,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,mBAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,aAAA,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC,CAAA;IAEY,2BAAc,GAAG,CAAC,MAAqB,EAAE,KAAa,EAAQ,EAAE;QACzE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAA;AACL,CAAC,EA/BgB,YAAY,4BAAZ,YAAY,QA+B5B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isEnumProperty = (property: any): property is EnumProperty => !Array.isArray(property) && property.type === 'EnumProperty';\n\nexport type EnumProperty = AbstractBaseProperty & {\n type: 'EnumProperty';\n value: { name: string; value: string; };\n};\n\nexport namespace EnumProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, index: number = 0): EnumProperty => {\n let name = reader.readString();\n const guidInfo = GUIDInfo.read(reader);\n const value = ReadValue(reader);\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'EnumProperty',\n value: { name, value },\n } satisfies EnumProperty;\n }\n\n export const ReadValue = (reader: ContextReader): string => {\n return reader.readString();\n }\n\n export const CalcOverhead = (property: EnumProperty): number => {\n return property.value.name.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: EnumProperty): void => {\n writer.writeString(property.value.name);\n GUIDInfo.write(writer, property.guidInfo);\n SerializeValue(writer, property.value.value);\n }\n\n export const SerializeValue = (writer: ContextWriter, value: string): void => {\n writer.writeString(value);\n }\n}\n"]}
1
+ {"version":3,"file":"EnumProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/EnumProperty.ts"],"names":[],"mappings":";;;AAEA,qDAAkD;AAClD,iEAA8D;AAEvD,MAAM,cAAc,GAAG,CAAC,QAAa,EAA4B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC;AAA3H,QAAA,cAAc,kBAA6G;AAOxI,IAAiB,YAAY,CA8B5B;AA9BD,WAAiB,YAAY;IAEZ,kBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,IAAY,EAAE,QAAgB,CAAC,EAAgB,EAAE;QAC1G,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,aAAA,SAAS,CAAC,MAAM,CAAC,CAAC;QAEhC,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,cAAc;YACpB,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;SACF,CAAC;IAC7B,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAU,EAAE;QACvD,OAAO,MAAM,CAAC,UAAU,EAAE,CAAC;IAC/B,CAAC,CAAA;IAEY,yBAAY,GAAG,CAAC,QAAsB,EAAE,IAAmC,EAAU,EAAE;QAChG,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC,CAAA;IAEY,sBAAS,GAAG,CAAC,MAAqB,EAAE,QAAsB,EAAQ,EAAE;QAC7E,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACxC,mBAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAC1C,aAAA,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACjD,CAAC,CAAA;IAEY,2BAAc,GAAG,CAAC,MAAqB,EAAE,KAAa,EAAQ,EAAE;QACzE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC,CAAA;AACL,CAAC,EA9BgB,YAAY,4BAAZ,YAAY,QA8B5B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\nexport const isEnumProperty = (property: any): property is EnumProperty => !Array.isArray(property) && property.type === 'EnumProperty';\n\nexport type EnumProperty = AbstractBaseProperty & {\n type: 'EnumProperty';\n value: { name: string; value: string; };\n};\n\nexport namespace EnumProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, name: string, index: number = 0): EnumProperty => {\n const guidInfo = GUIDInfo.read(reader);\n const value = ReadValue(reader);\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'EnumProperty',\n value: { name, value },\n } satisfies EnumProperty;\n }\n\n export const ReadValue = (reader: ContextReader): string => {\n return reader.readString();\n }\n\n export const CalcOverhead = (property: EnumProperty, name: EnumProperty['value']['name']): number => {\n return name.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: EnumProperty): void => {\n writer.writeString(property.value.name);\n GUIDInfo.write(writer, property.guidInfo);\n SerializeValue(writer, property.value.value);\n }\n\n export const SerializeValue = (writer: ContextWriter, value: string): void => {\n writer.writeString(value);\n }\n}\n"]}
@@ -18,8 +18,8 @@ export type MapProperty = AbstractBaseProperty & {
18
18
  values: [key: GENERIC_MAP_KEY_TYPE, value: GENERIC_MAP_VALUE_TYPE][];
19
19
  };
20
20
  export declare namespace MapProperty {
21
- const Parse: (reader: ContextReader, propertyName: string, size: number, ueType?: string, index?: number) => MapProperty;
22
- const CalcOverhead: (property: MapProperty) => number;
21
+ const Parse: (reader: ContextReader, propertyName: string, size: number, keyType: string, valueType: string, ueType?: string, index?: number) => MapProperty;
22
+ const CalcOverhead: (property: MapProperty, keyType: string, valueType: string) => number;
23
23
  const Serialize: (writer: ContextWriter, property: MapProperty) => void;
24
24
  }
25
25
  //# sourceMappingURL=MapProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/MapProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D,OAAO,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAChI,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,eAAe,GAAG,OAAO,GAAG,6BAA6B,GAAG,gBAAgB,CAAC;AACzH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,eAAe,GAAG,OAAO,GAAG,6BAA6B,GAAG,gBAAgB,CAAC;AAE3H,eAAO,MAAM,aAAa,aAAc,GAAG,KAAG,QAAQ,IAAI,WAA0E,CAAC;AAErI,MAAM,MAAM,WAAW,GAAG,oBAAoB,GAAG;IAC7C,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;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AG,6BAA6B,GAAG,gBAAgB,CAAC;AAE3H,eAAO,MAAM,aAAa,aAAc,GAAG,KAAG,QAAQ,IAAI,WAA0E,CAAC;AAErI,MAAM,MAAM,WAAW,GAAG,oBAAoB,GAAG;IAC7C,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,sBAAsB,CAAC,EAAE,CAAC;CACxE,CAAC;AAGF,yBAAiB,WAAW,CAAC;IAElB,MAAM,KAAK,WAAY,aAAa,gBAAgB,MAAM,QAAQ,MAAM,WAAW,MAAM,aAAa,MAAM,WAAU,MAAM,UAAyB,MAAM,KAAO,WAuGxK,CAAA;IAEM,MAAM,YAAY,aAAc,WAAW,WAAW,MAAM,aAAa,MAAM,KAAG,MAExF,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,WAAW,KAAG,IA+ExE,CAAA;CACJ"}
@@ -13,13 +13,13 @@ const isMapProperty = (property) => !Array.isArray(property) && property.type ==
13
13
  exports.isMapProperty = isMapProperty;
14
14
  var MapProperty;
15
15
  (function (MapProperty) {
16
- MapProperty.Parse = (reader, propertyName, size, ueType = 'MapProperty', index = 0) => {
16
+ MapProperty.Parse = (reader, propertyName, size, keyType, valueType, ueType = 'MapProperty', index = 0) => {
17
17
  const start = reader.getBufferPosition();
18
18
  const property = {
19
19
  ...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, type: '' }),
20
20
  type: 'MapProperty',
21
- keyType: reader.readString(),
22
- valueType: reader.readString(),
21
+ keyType,
22
+ valueType,
23
23
  guidInfo: undefined,
24
24
  modeType: 0,
25
25
  values: [],
@@ -70,6 +70,9 @@ var MapProperty;
70
70
  if (propertyName === 'mIndexMapping' && reader.context.mods.MLBAlternates !== undefined) {
71
71
  value = Array.from(reader.readBytes(12));
72
72
  }
73
+ else if (propertyName === 'Senders' && reader.context.mods.FicsItNetworks !== undefined) {
74
+ value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, property.valueType);
75
+ }
73
76
  else {
74
77
  value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, property.valueType);
75
78
  }
@@ -101,8 +104,8 @@ var MapProperty;
101
104
  }
102
105
  return property;
103
106
  };
104
- MapProperty.CalcOverhead = (property) => {
105
- return property.keyType.length + 5 + property.valueType.length + 5 + 1;
107
+ MapProperty.CalcOverhead = (property, keyType, valueType) => {
108
+ return keyType.length + 5 + valueType.length + 5 + 1;
106
109
  };
107
110
  MapProperty.Serialize = (writer, property) => {
108
111
  writer.writeString(property.keyType);
@@ -1 +1 @@
1
- {"version":3,"file":"MapProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/MapProperty.ts"],"names":[],"mappings":";;;AAEA,yFAAsF;AAEtF,iEAA8D;AAC9D,iDAA8C;AAC9C,iDAA8C;AAC9C,mDAAgD;AAChD,mDAAgD;AAChD,qDAAkD;AAClD,+CAA4C;AAQrC,MAAM,aAAa,GAAG,CAAC,QAAa,EAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC;AAAxH,QAAA,aAAa,iBAA2G;AAcrI,IAAiB,WAAW,CA4L3B;AA5LD,WAAiB,WAAW;IAEX,iBAAK,GAAG,CAAC,MAAqB,EAAE,YAAoB,EAAE,IAAY,EAAE,SAAiB,aAAa,EAAE,QAAgB,CAAC,EAAe,EAAE;QAC/I,MAAM,KAAK,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAgB;YAC1B,GAAG,2CAAoB,CAAC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,KAAK,SAAS,EAAE,CAAC;wBACvF,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAqB,CAAC,CAAC;oBACzD,CAAC;yBAAM,CAAC;wBACJ,uDAA0B,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAA+B,CAAC,CAAC;oBACrF,CAAC;oBAED,MAAM;gBACV,KAAK,gBAAgB;oBACjB,+BAAc,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAoB,CAAC,CAAC;oBACnE,MAAM;gBACV,KAAK,aAAa,CAAC;gBACnB,KAAK,cAAc;oBACf,yBAAW,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACvD,MAAM;gBACV,KAAK,cAAc;oBACf,2BAAY,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACxD,MAAM;gBACV,KAAK,aAAa,CAAC;gBACnB,KAAK,eAAe;oBAChB,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACzD,MAAM;gBACV,KAAK,eAAe;oBAChB,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACzD,MAAM;gBACV,KAAK,cAAc;oBACf,2BAAY,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACxD,MAAM;gBACV;oBACI,MAAM,IAAI,KAAK,CAAC,kCAAkC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;YAChF,CAAC;QACL,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA5LgB,WAAW,2BAAX,WAAW,QA4L3B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { ObjectReference } from '../../structs/ObjectReference';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\nimport { ByteProperty } from './ByteProperty';\nimport { EnumProperty } from './EnumProperty';\nimport { Int32Property } from './Int32Property';\nimport { Int64Property } from './Int64Property';\nimport { ObjectProperty } from './ObjectProperty';\nimport { StrProperty } from './StrProperty';\nimport { GENERIC_STRUCT_PROPERTY_VALUE } from './StructProperty';\n\n\nexport type MAP_STRUCT_PROXY = [number, number, number, number, number, number, number, number, number, number, number, number];\nexport type GENERIC_MAP_KEY_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE | MAP_STRUCT_PROXY;\nexport type GENERIC_MAP_VALUE_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE | MAP_STRUCT_PROXY;\n\nexport const isMapProperty = (property: any): property is MapProperty => !Array.isArray(property) && property.type === 'MapProperty';\n\nexport type MapProperty = AbstractBaseProperty & {\n type: 'MapProperty';\n keyType: string;\n valueType: string;\n modeType: number;\n modeUnk1: string | undefined;\n modeUnk2: string;\n modeUnk3: string;\n values: [key: GENERIC_MAP_KEY_TYPE, value: GENERIC_MAP_VALUE_TYPE][];\n};\n\n\nexport namespace MapProperty {\n\n export const Parse = (reader: ContextReader, propertyName: string, size: number, ueType: string = 'MapProperty', index: number = 0): MapProperty => {\n const start = reader.getBufferPosition();\n const property: MapProperty = {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'MapProperty',\n keyType: reader.readString(),\n valueType: reader.readString(),\n guidInfo: undefined,\n modeType: 0,\n values: [],\n modeUnk1: undefined,\n modeUnk2: '',\n modeUnk3: ''\n };\n\n reader.readByte(); //0\n property.modeType = reader.readInt32(); //0\n\n const elementCount = reader.readInt32();\n for (let i = 0; i < elementCount; i++) {\n let key: GENERIC_MAP_KEY_TYPE;\n let value: GENERIC_MAP_VALUE_TYPE;\n switch (property.keyType) {\n case 'StructProperty':\n\n // TODO use buildversion or saveversion to differentiate\n\n // TODO: extra for properties like mSaveData, the structure is specific here\n // don'T ask me why this has this weird form. But maybe it is for maps in general that have Struct as key? So far we only see this in those 2 properties.\n // F4 FF FF FF 26 00 00 00 FF FF FF FF - Save in Release 1.0\n // F5 FF FF FF 27 00 00 00 FF FF FF FF - Save started in U8\n // FD FF FF FF 2B 00 00 00 FF FF FF FF - another Save started in U8\n // 11 00 00 00 EF FF FF FF 02 00 00 00 - Save ported from U5 -> U8\n if (propertyName === 'mSaveData' || propertyName === 'mUnresolvedSaveData') {\n key = Array.from(reader.readBytes(12)) as MAP_STRUCT_PROXY;\n } else {\n key = DynamicStructPropertyValue.read(reader, property.keyType);\n }\n\n break;\n case 'ObjectProperty':\n key = ObjectProperty.ReadValue(reader);\n break;\n case 'StrProperty':\n case 'NameProperty':\n key = StrProperty.ReadValue(reader);\n break;\n case 'EnumProperty':\n key = EnumProperty.ReadValue(reader);\n break;\n case 'IntProperty':\n case 'Int32Property':\n key = Int32Property.ReadValue(reader);\n break;\n case 'Int64Property':\n key = Int64Property.ReadValue(reader);\n break;\n case 'ByteProperty':\n key = ByteProperty.ReadValue(reader);\n break;\n default:\n throw new Error(`not implemented map key type ${property.keyType}`);\n }\n\n switch (property.valueType) {\n case 'StructProperty':\n if (propertyName === 'mIndexMapping' && reader.context.mods.MLBAlternates !== undefined) {\n value = Array.from(reader.readBytes(12)) as MAP_STRUCT_PROXY;\n } else {\n value = DynamicStructPropertyValue.read(reader, property.valueType);\n }\n break;\n case 'ObjectProperty':\n value = ObjectProperty.ReadValue(reader);\n break;\n case 'StrProperty':\n case 'NameProperty':\n value = StrProperty.ReadValue(reader);\n break;\n case 'EnumProperty':\n value = EnumProperty.ReadValue(reader);\n break;\n case 'IntProperty':\n case 'Int32Property':\n value = Int32Property.ReadValue(reader);\n break;\n case 'Int64Property':\n value = Int64Property.ReadValue(reader);\n break;\n case 'ByteProperty':\n value = ByteProperty.ReadValue(reader);\n break;\n default:\n throw new Error(`not implemented map value type ${property.valueType}`);\n }\n\n property.values.push([key, value]);\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: MapProperty): number => {\n return property.keyType.length + 5 + property.valueType.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: MapProperty): void => {\n\n writer.writeString(property.keyType);\n writer.writeString(property.valueType);\n\n writer.writeByte(0);\n writer.writeInt32(property.modeType);\n\n writer.writeInt32(property.values.length);\n for (const entry of property.values) {\n\n switch (property.keyType) {\n case 'StructProperty':\n\n if (property.name === 'mSaveData' || property.name === 'mUnresolvedSaveData') {\n writer.writeBytesArray(entry[0] as MAP_STRUCT_PROXY);\n } else {\n DynamicStructPropertyValue.write(writer, entry[0] as DynamicStructPropertyValue);\n }\n\n break;\n case 'ObjectProperty':\n ObjectProperty.SerializeValue(writer, entry[0] as ObjectReference);\n break;\n case 'StrProperty':\n case 'NameProperty':\n StrProperty.SerializeValue(writer, entry[0] as string);\n break;\n case 'EnumProperty':\n EnumProperty.SerializeValue(writer, entry[0] as string);\n break;\n case 'IntProperty':\n case 'Int32Property':\n Int32Property.SerializeValue(writer, entry[0] as number);\n break;\n case 'Int64Property':\n Int64Property.SerializeValue(writer, entry[0] as string);\n break;\n case 'ByteProperty':\n ByteProperty.SerializeValue(writer, entry[0] as number);\n break;\n default:\n throw new Error(`not implemented map key type ${property.valueType}`);\n }\n\n switch (property.valueType) {\n case 'StructProperty':\n\n if (property.name === 'mIndexMapping' && writer.context.mods.MLBAlternates !== undefined) {\n writer.writeBytesArray(entry[1] as MAP_STRUCT_PROXY);\n } else {\n DynamicStructPropertyValue.write(writer, entry[1] as DynamicStructPropertyValue);\n }\n\n break;\n case 'ObjectProperty':\n ObjectProperty.SerializeValue(writer, entry[1] as ObjectReference);\n break;\n case 'StrProperty':\n case 'NameProperty':\n StrProperty.SerializeValue(writer, entry[1] as string);\n break;\n case 'EnumProperty':\n EnumProperty.SerializeValue(writer, entry[1] as string);\n break;\n case 'IntProperty':\n case 'Int32Property':\n Int32Property.SerializeValue(writer, entry[1] as number);\n break;\n case 'Int64Property':\n Int64Property.SerializeValue(writer, entry[1] as string);\n break;\n case 'ByteProperty':\n ByteProperty.SerializeValue(writer, entry[1] as number);\n break;\n default:\n throw new Error(`not implemented map value type ${property.valueType}`);\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"MapProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/MapProperty.ts"],"names":[],"mappings":";;;AAEA,yFAAsF;AAEtF,iEAA8D;AAC9D,iDAA8C;AAC9C,iDAA8C;AAC9C,mDAAgD;AAChD,mDAAgD;AAChD,qDAAkD;AAClD,+CAA4C;AAQrC,MAAM,aAAa,GAAG,CAAC,QAAa,EAA2B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,aAAa,CAAC;AAAxH,QAAA,aAAa,iBAA2G;AAcrI,IAAiB,WAAW,CA+L3B;AA/LD,WAAiB,WAAW;IAEX,iBAAK,GAAG,CAAC,MAAqB,EAAE,YAAoB,EAAE,IAAY,EAAE,OAAe,EAAE,SAAiB,EAAE,SAAiB,aAAa,EAAE,QAAgB,CAAC,EAAe,EAAE;QACnL,MAAM,KAAK,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAgB;YAC1B,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YAC3D,IAAI,EAAE,aAAa;YACnB,OAAO;YACP,SAAS;YACT,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;SACf,CAAC;QAEF,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClB,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAEvC,M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oBACjB,+BAAc,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAoB,CAAC,CAAC;oBACnE,MAAM;gBACV,KAAK,aAAa,CAAC;gBACnB,KAAK,cAAc;oBACf,yBAAW,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACvD,MAAM;gBACV,KAAK,cAAc;oBACf,2BAAY,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACxD,MAAM;gBACV,KAAK,aAAa,CAAC;gBACnB,KAAK,eAAe;oBAChB,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACzD,MAAM;gBACV,KAAK,eAAe;oBAChB,6BAAa,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACzD,MAAM;gBACV,KAAK,cAAc;oBACf,2BAAY,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAW,CAAC,CAAC;oBACxD,MAAM;gBACV;oBACI,MAAM,IAAI,KAAK,CAAC,kCAAkC,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC;YAChF,CAAC;QACL,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA/LgB,WAAW,2BAAX,WAAW,QA+L3B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { ObjectReference } from '../../structs/ObjectReference';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\nimport { ByteProperty } from './ByteProperty';\nimport { EnumProperty } from './EnumProperty';\nimport { Int32Property } from './Int32Property';\nimport { Int64Property } from './Int64Property';\nimport { ObjectProperty } from './ObjectProperty';\nimport { StrProperty } from './StrProperty';\nimport { GENERIC_STRUCT_PROPERTY_VALUE } from './StructProperty';\n\n\nexport type MAP_STRUCT_PROXY = [number, number, number, number, number, number, number, number, number, number, number, number];\nexport type GENERIC_MAP_KEY_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE | MAP_STRUCT_PROXY;\nexport type GENERIC_MAP_VALUE_TYPE = number | ObjectReference | boolean | GENERIC_STRUCT_PROPERTY_VALUE | MAP_STRUCT_PROXY;\n\nexport const isMapProperty = (property: any): property is MapProperty => !Array.isArray(property) && property.type === 'MapProperty';\n\nexport type MapProperty = AbstractBaseProperty & {\n type: 'MapProperty';\n keyType: string;\n valueType: string;\n modeType: number;\n modeUnk1: string | undefined;\n modeUnk2: string;\n modeUnk3: string;\n values: [key: GENERIC_MAP_KEY_TYPE, value: GENERIC_MAP_VALUE_TYPE][];\n};\n\n\nexport namespace MapProperty {\n\n export const Parse = (reader: ContextReader, propertyName: string, size: number, keyType: string, valueType: string, ueType: string = 'MapProperty', index: number = 0): MapProperty => {\n const start = reader.getBufferPosition();\n const property: MapProperty = {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'MapProperty',\n keyType,\n valueType,\n guidInfo: undefined,\n modeType: 0,\n values: [],\n modeUnk1: undefined,\n modeUnk2: '',\n modeUnk3: ''\n };\n\n reader.readByte(); //0\n property.modeType = reader.readInt32(); //0\n\n const elementCount = reader.readInt32();\n for (let i = 0; i < elementCount; i++) {\n let key: GENERIC_MAP_KEY_TYPE;\n let value: GENERIC_MAP_VALUE_TYPE;\n switch (property.keyType) {\n case 'StructProperty':\n\n // TODO use buildversion or saveversion to differentiate\n\n // TODO: extra for properties like mSaveData, the structure is specific here\n // don'T ask me why this has this weird form. But maybe it is for maps in general that have Struct as key? So far we only see this in those 2 properties.\n // F4 FF FF FF 26 00 00 00 FF FF FF FF - Save in Release 1.0\n // F5 FF FF FF 27 00 00 00 FF FF FF FF - Save started in U8\n // FD FF FF FF 2B 00 00 00 FF FF FF FF - another Save started in U8\n // 11 00 00 00 EF FF FF FF 02 00 00 00 - Save ported from U5 -> U8\n if (propertyName === 'mSaveData' || propertyName === 'mUnresolvedSaveData') {\n key = Array.from(reader.readBytes(12)) as MAP_STRUCT_PROXY;\n } else {\n key = DynamicStructPropertyValue.read(reader, property.keyType);\n }\n\n break;\n case 'ObjectProperty':\n key = ObjectProperty.ReadValue(reader);\n break;\n case 'StrProperty':\n case 'NameProperty':\n key = StrProperty.ReadValue(reader);\n break;\n case 'EnumProperty':\n key = EnumProperty.ReadValue(reader);\n break;\n case 'IntProperty':\n case 'Int32Property':\n key = Int32Property.ReadValue(reader);\n break;\n case 'Int64Property':\n key = Int64Property.ReadValue(reader);\n break;\n case 'ByteProperty':\n key = ByteProperty.ReadValue(reader);\n break;\n default:\n throw new Error(`not implemented map key type ${property.keyType}`);\n }\n\n switch (property.valueType) {\n case 'StructProperty':\n if (propertyName === 'mIndexMapping' && reader.context.mods.MLBAlternates !== undefined) {\n value = Array.from(reader.readBytes(12)) as MAP_STRUCT_PROXY;\n } else if (propertyName === 'Senders' && reader.context.mods.FicsItNetworks !== undefined) {\n //value = 0; // TODO fix\n value = DynamicStructPropertyValue.read(reader, property.valueType);\n } else {\n value = DynamicStructPropertyValue.read(reader, property.valueType);\n }\n break;\n case 'ObjectProperty':\n value = ObjectProperty.ReadValue(reader);\n break;\n case 'StrProperty':\n case 'NameProperty':\n value = StrProperty.ReadValue(reader);\n break;\n case 'EnumProperty':\n value = EnumProperty.ReadValue(reader);\n break;\n case 'IntProperty':\n case 'Int32Property':\n value = Int32Property.ReadValue(reader);\n break;\n case 'Int64Property':\n value = Int64Property.ReadValue(reader);\n break;\n case 'ByteProperty':\n value = ByteProperty.ReadValue(reader);\n break;\n default:\n throw new Error(`not implemented map value type ${property.valueType}`);\n }\n\n property.values.push([key, value]);\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: MapProperty, keyType: string, valueType: string): number => {\n return keyType.length + 5 + valueType.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: MapProperty): void => {\n\n writer.writeString(property.keyType);\n writer.writeString(property.valueType);\n\n writer.writeByte(0);\n writer.writeInt32(property.modeType);\n\n writer.writeInt32(property.values.length);\n for (const entry of property.values) {\n\n switch (property.keyType) {\n case 'StructProperty':\n\n if (property.name === 'mSaveData' || property.name === 'mUnresolvedSaveData') {\n writer.writeBytesArray(entry[0] as MAP_STRUCT_PROXY);\n } else {\n DynamicStructPropertyValue.write(writer, entry[0] as DynamicStructPropertyValue);\n }\n\n break;\n case 'ObjectProperty':\n ObjectProperty.SerializeValue(writer, entry[0] as ObjectReference);\n break;\n case 'StrProperty':\n case 'NameProperty':\n StrProperty.SerializeValue(writer, entry[0] as string);\n break;\n case 'EnumProperty':\n EnumProperty.SerializeValue(writer, entry[0] as string);\n break;\n case 'IntProperty':\n case 'Int32Property':\n Int32Property.SerializeValue(writer, entry[0] as number);\n break;\n case 'Int64Property':\n Int64Property.SerializeValue(writer, entry[0] as string);\n break;\n case 'ByteProperty':\n ByteProperty.SerializeValue(writer, entry[0] as number);\n break;\n default:\n throw new Error(`not implemented map key type ${property.valueType}`);\n }\n\n switch (property.valueType) {\n case 'StructProperty':\n\n if (property.name === 'mIndexMapping' && writer.context.mods.MLBAlternates !== undefined) {\n writer.writeBytesArray(entry[1] as MAP_STRUCT_PROXY);\n } else {\n DynamicStructPropertyValue.write(writer, entry[1] as DynamicStructPropertyValue);\n }\n\n break;\n case 'ObjectProperty':\n ObjectProperty.SerializeValue(writer, entry[1] as ObjectReference);\n break;\n case 'StrProperty':\n case 'NameProperty':\n StrProperty.SerializeValue(writer, entry[1] as string);\n break;\n case 'EnumProperty':\n EnumProperty.SerializeValue(writer, entry[1] as string);\n break;\n case 'IntProperty':\n case 'Int32Property':\n Int32Property.SerializeValue(writer, entry[1] as number);\n break;\n case 'Int64Property':\n Int64Property.SerializeValue(writer, entry[1] as string);\n break;\n case 'ByteProperty':\n ByteProperty.SerializeValue(writer, entry[1] as number);\n break;\n default:\n throw new Error(`not implemented map value type ${property.valueType}`);\n }\n }\n }\n}\n"]}
@@ -8,8 +8,8 @@ import { Uint32SetProperty } from './Uint32SetProperty';
8
8
  export declare const isSetProperty: (obj: any) => obj is SetProperty.AvailableSetPropertyTypes;
9
9
  export declare namespace SetProperty {
10
10
  type AvailableSetPropertyTypes = Uint32SetProperty | Int32SetProperty | ObjectSetProperty | StrSetProperty | StructSetProperty;
11
- const Parse: (reader: ContextReader, ueType: string, index: number, propertyName: string) => AvailableSetPropertyTypes;
12
- const CalcOverhead: (property: AvailableSetPropertyTypes) => number;
11
+ const Parse: (reader: ContextReader, ueType: string, index: number, propertyName: string, subtype: string) => AvailableSetPropertyTypes;
12
+ const CalcOverhead: (property: AvailableSetPropertyTypes, subtype: string) => number;
13
13
  const Serialize: (writer: ContextWriter, property: AvailableSetPropertyTypes) => void;
14
14
  }
15
15
  //# sourceMappingURL=SetProperty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SetProperty.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/SetProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAoB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,eAAO,MAAM,aAAa,QAAS,GAAG,KAAG,GAAG,IAAI,WAAW,CAAC,yBAK7B,CAAC;AAEhC,yBAAiB,WAAW,CAAC;IAEzB,KAAY,yBAAyB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC;IAE/H,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,gBAAgB,MAAM,KAAG,yBAuClG,CAAA;IAEM,MAAM,YAAY,aAAc,yBAAyB,KAAG,MAElE,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,yBAAyB,KAAG,IAmBtF,CAAA;CACJ"}
1
+ {"version":3,"file":"SetProperty.d.ts","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/SetProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAsB,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAoB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAuB,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,eAAO,MAAM,aAAa,QAAS,GAAG,KAAG,GAAG,IAAI,WAAW,CAAC,yBAK7B,CAAC;AAEhC,yBAAiB,WAAW,CAAC;IAEzB,KAAY,yBAAyB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,cAAc,GAAG,iBAAiB,CAAC;IAE/H,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,gBAAgB,MAAM,WAAW,MAAM,KAAG,yBAsCnH,CAAA;IAEM,MAAM,YAAY,aAAc,yBAAyB,WAAW,MAAM,KAAG,MAEnF,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,yBAAyB,KAAG,IAmBtF,CAAA;CACJ"}