@etothepii/satisfactory-file-parser 3.2.2 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (614) hide show
  1. package/CHANGELOG.md +16 -1
  2. package/README.md +16 -1
  3. package/build/index.d.ts +13 -3
  4. package/build/index.d.ts.map +1 -1
  5. package/build/index.js +14 -6
  6. package/build/index.js.map +1 -1
  7. package/build/parser/byte/byte-writer.class.d.ts +2 -0
  8. package/build/parser/byte/byte-writer.class.d.ts.map +1 -1
  9. package/build/parser/byte/byte-writer.class.js +8 -0
  10. package/build/parser/byte/byte-writer.class.js.map +1 -1
  11. package/build/parser/context/context.d.ts +2 -0
  12. package/build/parser/context/context.d.ts.map +1 -1
  13. package/build/parser/context/context.js.map +1 -1
  14. package/build/parser/parser.d.ts +2 -0
  15. package/build/parser/parser.d.ts.map +1 -1
  16. package/build/parser/parser.js +2 -0
  17. package/build/parser/parser.js.map +1 -1
  18. package/build/parser/satisfactory/blueprint/blueprint-header.js +5 -5
  19. package/build/parser/satisfactory/blueprint/blueprint-header.js.map +1 -1
  20. package/build/parser/satisfactory/save/level.d.ts.map +1 -1
  21. package/build/parser/satisfactory/save/level.js +32 -17
  22. package/build/parser/satisfactory/save/level.js.map +1 -1
  23. package/build/parser/satisfactory/types/objects/SaveObject.d.ts.map +1 -1
  24. package/build/parser/satisfactory/types/objects/SaveObject.js +24 -5
  25. package/build/parser/satisfactory/types/objects/SaveObject.js.map +1 -1
  26. package/build/parser/satisfactory/types/property/PropertiesList.d.ts.map +1 -1
  27. package/build/parser/satisfactory/types/property/PropertiesList.js +118 -97
  28. package/build/parser/satisfactory/types/property/PropertiesList.js.map +1 -1
  29. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts +2 -1
  30. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.d.ts.map +1 -1
  31. package/build/parser/satisfactory/types/property/generic/AbstractBaseProperty.js.map +1 -1
  32. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts +2 -2
  33. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.d.ts.map +1 -1
  34. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js +3 -4
  35. package/build/parser/satisfactory/types/property/generic/ArrayProperty/ArrayProperty.js.map +1 -1
  36. package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js +1 -1
  37. package/build/parser/satisfactory/types/property/generic/ArrayProperty/StructArrayProperty.js.map +1 -1
  38. package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts +2 -2
  39. package/build/parser/satisfactory/types/property/generic/ByteProperty.d.ts.map +1 -1
  40. package/build/parser/satisfactory/types/property/generic/ByteProperty.js +3 -4
  41. package/build/parser/satisfactory/types/property/generic/ByteProperty.js.map +1 -1
  42. package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts +2 -2
  43. package/build/parser/satisfactory/types/property/generic/EnumProperty.d.ts.map +1 -1
  44. package/build/parser/satisfactory/types/property/generic/EnumProperty.js +3 -4
  45. package/build/parser/satisfactory/types/property/generic/EnumProperty.js.map +1 -1
  46. package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts +2 -2
  47. package/build/parser/satisfactory/types/property/generic/MapProperty.d.ts.map +1 -1
  48. package/build/parser/satisfactory/types/property/generic/MapProperty.js +8 -5
  49. package/build/parser/satisfactory/types/property/generic/MapProperty.js.map +1 -1
  50. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts +2 -2
  51. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.d.ts.map +1 -1
  52. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js +3 -4
  53. package/build/parser/satisfactory/types/property/generic/SetProperty/SetProperty.js.map +1 -1
  54. package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js +1 -1
  55. package/build/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.js.map +1 -1
  56. package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts +8 -7
  57. package/build/parser/satisfactory/types/property/generic/StructProperty.d.ts.map +1 -1
  58. package/build/parser/satisfactory/types/property/generic/StructProperty.js +71 -47
  59. package/build/parser/satisfactory/types/property/generic/StructProperty.js.map +1 -1
  60. package/build/parser/satisfactory/types/structs/FGDynamicStruct.d.ts +1 -0
  61. package/build/parser/satisfactory/types/structs/FGDynamicStruct.d.ts.map +1 -1
  62. package/build/parser/satisfactory/types/structs/FGDynamicStruct.js +20 -13
  63. package/build/parser/satisfactory/types/structs/FGDynamicStruct.js.map +1 -1
  64. package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts +1 -1
  65. package/build/parser/satisfactory/types/structs/GUIDInfo.d.ts.map +1 -1
  66. package/build/parser/satisfactory/types/structs/GUIDInfo.js +1 -1
  67. package/build/parser/satisfactory/types/structs/GUIDInfo.js.map +1 -1
  68. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts +11 -0
  69. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.d.ts.map +1 -0
  70. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js +31 -0
  71. package/build/parser/satisfactory/types/structs/binary/FClientIdentityInfo.js.map +1 -0
  72. package/build/parser/satisfactory/types/structs/binary/FColor.d.ts +9 -0
  73. package/build/parser/satisfactory/types/structs/binary/FColor.d.ts.map +1 -0
  74. package/build/parser/satisfactory/types/structs/binary/FColor.js +14 -0
  75. package/build/parser/satisfactory/types/structs/binary/FColor.js.map +1 -0
  76. package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts +9 -0
  77. package/build/parser/satisfactory/types/structs/binary/FLinearColor.d.ts.map +1 -0
  78. package/build/parser/satisfactory/types/structs/binary/FLinearColor.js +14 -0
  79. package/build/parser/satisfactory/types/structs/binary/FLinearColor.js.map +1 -0
  80. package/build/parser/satisfactory/types/structs/binary/GUID.d.ts +8 -0
  81. package/build/parser/satisfactory/types/structs/binary/GUID.d.ts.map +1 -0
  82. package/build/parser/satisfactory/types/structs/binary/GUID.js +22 -0
  83. package/build/parser/satisfactory/types/structs/binary/GUID.js.map +1 -0
  84. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts +2 -2
  85. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.d.ts.map +1 -1
  86. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js +2 -2
  87. package/build/parser/satisfactory/types/structs/mods/FicsItCam/FICFrameRange.js.map +1 -1
  88. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts +13 -0
  89. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.d.ts.map +1 -0
  90. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js +21 -0
  91. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINGPUT1BufferPixel.js.map +1 -0
  92. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts +12 -0
  93. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.d.ts.map +1 -0
  94. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js +22 -0
  95. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINItemStateFileSystem.js.map +1 -0
  96. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts +13 -0
  97. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.d.ts.map +1 -0
  98. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js +35 -0
  99. package/build/parser/satisfactory/types/structs/mods/FicsItNetworks/FINNetworkTrace.js.map +1 -0
  100. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts +12 -0
  101. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.d.ts.map +1 -0
  102. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js +20 -0
  103. package/build/parser/satisfactory/types/structs/mods/ModularLoadBalancers/FLBBalancerIndexing.js.map +1 -0
  104. package/build/parser/stream/reworked/readable-stream-parser.d.ts.map +1 -1
  105. package/build/parser/stream/reworked/readable-stream-parser.js +6 -5
  106. package/build/parser/stream/reworked/readable-stream-parser.js.map +1 -1
  107. package/docs/assets/navigation.js +1 -1
  108. package/docs/assets/search.js +1 -1
  109. package/docs/classes/BlueprintConfigReader.html +4 -4
  110. package/docs/classes/BlueprintReader.html +4 -4
  111. package/docs/classes/CompressionLibraryError.html +2 -2
  112. package/docs/classes/ContextReader.html +36 -0
  113. package/docs/classes/ContextWriter.html +41 -0
  114. package/docs/classes/CorruptBlueprintError.html +2 -2
  115. package/docs/classes/CorruptSaveError.html +2 -2
  116. package/docs/classes/Parser.html +8 -8
  117. package/docs/classes/ParserError.html +2 -2
  118. package/docs/classes/ReadableStreamParser.html +2 -2
  119. package/docs/classes/SatisfactorySave.html +3 -4
  120. package/docs/classes/SaveComponent.html +2 -2
  121. package/docs/classes/SaveEntity.html +2 -2
  122. package/docs/classes/SaveObject.html +2 -2
  123. package/docs/classes/SaveReader.html +4 -5
  124. package/docs/classes/SaveStreamJsonStringifier.html +2 -2
  125. package/docs/classes/SaveStreamWriter.html +3 -4
  126. package/docs/classes/SaveWriter.html +6 -5
  127. package/docs/classes/TimeoutError.html +2 -2
  128. package/docs/classes/UnimplementedError.html +2 -2
  129. package/docs/classes/UnsupportedVersionError.html +2 -2
  130. package/docs/enums/Alignment.html +3 -0
  131. package/docs/enums/BlueprintConfigVersion.html +2 -2
  132. package/docs/enums/BlueprintHeaderVersion.html +2 -2
  133. package/docs/enums/CompressionAlgorithmCode.html +2 -2
  134. package/docs/enums/FactoryGameCustomVersion.html +2 -2
  135. package/docs/enums/RuntimeBuildableInstanceDataVersion.html +2 -2
  136. package/docs/enums/SaveCustomVersion.html +10 -10
  137. package/docs/enums/SaveHeaderType.html +2 -2
  138. package/docs/functions/AbstractBaseProperty.Create.html +1 -1
  139. package/docs/functions/ArrayProperty.CalcOverhead.html +1 -1
  140. package/docs/functions/ArrayProperty.Parse.html +1 -1
  141. package/docs/functions/ArrayProperty.Serialize.html +1 -1
  142. package/docs/functions/BlueprintConfig.Parse.html +1 -1
  143. package/docs/functions/BlueprintConfig.Serialize.html +1 -1
  144. package/docs/functions/BlueprintHeader.Parse.html +1 -1
  145. package/docs/functions/BlueprintHeader.Serialize.html +1 -1
  146. package/docs/functions/BoolArrayProperty.Parse.html +1 -1
  147. package/docs/functions/BoolArrayProperty.Serialize.html +1 -1
  148. package/docs/functions/BoolProperty.CalcOverhead.html +1 -1
  149. package/docs/functions/BoolProperty.Parse.html +1 -1
  150. package/docs/functions/BoolProperty.ReadValue.html +1 -1
  151. package/docs/functions/BoolProperty.Serialize.html +1 -1
  152. package/docs/functions/BoolProperty.SerializeValue.html +1 -1
  153. package/docs/functions/BuildableSubsystemSpecialProperties.Parse.html +1 -1
  154. package/docs/functions/BuildableSubsystemSpecialProperties.Serialize.html +1 -1
  155. package/docs/functions/BuildableTypeInstance.Parse.html +1 -1
  156. package/docs/functions/BuildableTypeInstance.Serialize.html +1 -1
  157. package/docs/functions/ByteArrayProperty.Parse.html +1 -1
  158. package/docs/functions/ByteArrayProperty.Serialize.html +1 -1
  159. package/docs/functions/ByteProperty.CalcOverhead.html +1 -1
  160. package/docs/functions/ByteProperty.Parse.html +1 -1
  161. package/docs/functions/ByteProperty.ReadValue.html +1 -1
  162. package/docs/functions/ByteProperty.Serialize.html +1 -1
  163. package/docs/functions/ByteProperty.SerializeValue.html +1 -1
  164. package/docs/functions/CircuitSpecialProperties.Parse.html +1 -1
  165. package/docs/functions/CircuitSpecialProperties.Serialize.html +1 -1
  166. package/docs/functions/ConveyorChainActorSpecialProperties.Parse.html +1 -1
  167. package/docs/functions/ConveyorChainActorSpecialProperties.Serialize.html +1 -1
  168. package/docs/functions/ConveyorSpecialProperties.Parse.html +1 -1
  169. package/docs/functions/ConveyorSpecialProperties.Serialize.html +1 -1
  170. package/docs/functions/DoubleArrayProperty.Parse.html +1 -1
  171. package/docs/functions/DoubleArrayProperty.Serialize.html +1 -1
  172. package/docs/functions/DoubleProperty.CalcOverhead.html +1 -1
  173. package/docs/functions/DoubleProperty.Parse.html +1 -1
  174. package/docs/functions/DoubleProperty.ReadValue.html +1 -1
  175. package/docs/functions/DoubleProperty.Serialize.html +1 -1
  176. package/docs/functions/DoubleProperty.SerializeValue.html +1 -1
  177. package/docs/functions/DynamicStructPropertyValue.read.html +1 -1
  178. package/docs/functions/DynamicStructPropertyValue.write.html +1 -1
  179. package/docs/functions/EmptySpecialProperties.Parse.html +1 -1
  180. package/docs/functions/EmptySpecialProperties.Serialize.html +1 -1
  181. package/docs/functions/EnumArrayProperty.Parse.html +1 -1
  182. package/docs/functions/EnumArrayProperty.Serialize.html +1 -1
  183. package/docs/functions/EnumProperty.CalcOverhead.html +1 -1
  184. package/docs/functions/EnumProperty.Parse.html +1 -1
  185. package/docs/functions/EnumProperty.ReadValue.html +1 -1
  186. package/docs/functions/EnumProperty.Serialize.html +1 -1
  187. package/docs/functions/EnumProperty.SerializeValue.html +1 -1
  188. package/docs/functions/FClientIdentityInfo.read.html +1 -0
  189. package/docs/functions/FClientIdentityInfo.write.html +1 -0
  190. package/docs/functions/FColor.read.html +1 -0
  191. package/docs/functions/FColor.write.html +1 -0
  192. package/docs/functions/FGDynamicStruct.Parse.html +1 -1
  193. package/docs/functions/FGDynamicStruct.Serialize.html +1 -1
  194. package/docs/functions/FICFrameRange.read.html +1 -0
  195. package/docs/functions/FICFrameRange.write.html +1 -0
  196. package/docs/functions/FINGPUT1BufferPixel.read.html +1 -0
  197. package/docs/functions/FINGPUT1BufferPixel.write.html +1 -0
  198. package/docs/functions/FINItemStateFileSystem.IsFINItemStateFileSystem.html +1 -0
  199. package/docs/functions/FINItemStateFileSystem.read.html +1 -0
  200. package/docs/functions/FINItemStateFileSystem.write.html +1 -0
  201. package/docs/functions/FINNetworkTrace.read.html +1 -0
  202. package/docs/functions/FINNetworkTrace.write.html +1 -0
  203. package/docs/functions/FLBBalancerIndexing.read.html +1 -0
  204. package/docs/functions/FLBBalancerIndexing.write.html +1 -0
  205. package/docs/functions/FLinearColor.read.html +1 -0
  206. package/docs/functions/FLinearColor.write.html +1 -0
  207. package/docs/functions/FloatArrayProperty.Parse.html +1 -1
  208. package/docs/functions/FloatArrayProperty.Serialize.html +1 -1
  209. package/docs/functions/FloatProperty.CalcOverhead.html +1 -1
  210. package/docs/functions/FloatProperty.Parse.html +1 -1
  211. package/docs/functions/FloatProperty.ReadValue.html +1 -1
  212. package/docs/functions/FloatProperty.Serialize.html +1 -1
  213. package/docs/functions/FloatProperty.SerializeValue.html +1 -1
  214. package/docs/functions/GUID.read.html +1 -1
  215. package/docs/functions/GUID.write.html +1 -1
  216. package/docs/functions/GUIDInfo.read.html +1 -1
  217. package/docs/functions/GUIDInfo.write.html +1 -1
  218. package/docs/functions/Int32ArrayProperty.Parse.html +1 -1
  219. package/docs/functions/Int32ArrayProperty.Serialize.html +1 -1
  220. package/docs/functions/Int32Property.CalcOverhead.html +1 -1
  221. package/docs/functions/Int32Property.Parse.html +1 -1
  222. package/docs/functions/Int32Property.ReadValue.html +1 -1
  223. package/docs/functions/Int32Property.Serialize.html +1 -1
  224. package/docs/functions/Int32Property.SerializeValue.html +1 -1
  225. package/docs/functions/Int32SetProperty.Parse.html +1 -1
  226. package/docs/functions/Int32SetProperty.Serialize.html +1 -1
  227. package/docs/functions/Int64ArrayProperty.Parse.html +1 -1
  228. package/docs/functions/Int64ArrayProperty.Serialize.html +1 -1
  229. package/docs/functions/Int64Property.CalcOverhead.html +1 -1
  230. package/docs/functions/Int64Property.Parse.html +1 -1
  231. package/docs/functions/Int64Property.ReadValue.html +1 -1
  232. package/docs/functions/Int64Property.Serialize.html +1 -1
  233. package/docs/functions/Int64Property.SerializeValue.html +1 -1
  234. package/docs/functions/Int8Property.CalcOverhead.html +1 -1
  235. package/docs/functions/Int8Property.Parse.html +1 -1
  236. package/docs/functions/Int8Property.ReadValue.html +1 -1
  237. package/docs/functions/Int8Property.Serialize.html +1 -1
  238. package/docs/functions/Int8Property.SerializeValue.html +1 -1
  239. package/docs/functions/Level.ReadAllObjectContents.html +1 -1
  240. package/docs/functions/Level.ReadAllObjectHeaders.html +1 -1
  241. package/docs/functions/Level.ReadLevel.html +1 -1
  242. package/docs/functions/Level.ReadNObjectContents.html +1 -1
  243. package/docs/functions/Level.ReadNObjectHeaders.html +1 -1
  244. package/docs/functions/Level.SerializeAllObjectContents.html +1 -1
  245. package/docs/functions/Level.SerializeAllObjectHeaders.html +1 -1
  246. package/docs/functions/Level.SerializeLevel.html +1 -1
  247. package/docs/functions/LevelToDestroyedActorsMap.read.html +1 -1
  248. package/docs/functions/LevelToDestroyedActorsMap.write.html +1 -1
  249. package/docs/functions/MD5Hash.read.html +1 -1
  250. package/docs/functions/MD5Hash.write.html +1 -1
  251. package/docs/functions/MapProperty.CalcOverhead.html +1 -1
  252. package/docs/functions/MapProperty.Parse.html +1 -1
  253. package/docs/functions/MapProperty.Serialize.html +1 -1
  254. package/docs/functions/ObjectArrayProperty.Parse.html +1 -1
  255. package/docs/functions/ObjectArrayProperty.Serialize.html +1 -1
  256. package/docs/functions/ObjectProperty.CalcOverhead.html +1 -1
  257. package/docs/functions/ObjectProperty.Parse.html +1 -1
  258. package/docs/functions/ObjectProperty.ReadValue.html +1 -1
  259. package/docs/functions/ObjectProperty.Serialize.html +1 -1
  260. package/docs/functions/ObjectProperty.SerializeValue.html +1 -1
  261. package/docs/functions/ObjectReference.IsEqual.html +1 -1
  262. package/docs/functions/ObjectReference.read.html +1 -1
  263. package/docs/functions/ObjectReference.write.html +1 -1
  264. package/docs/functions/ObjectSetProperty.Parse.html +1 -1
  265. package/docs/functions/ObjectSetProperty.Serialize.html +1 -1
  266. package/docs/functions/ObjectsListSpecialProperties.Parse.html +1 -1
  267. package/docs/functions/ObjectsListSpecialProperties.Serialize.html +1 -1
  268. package/docs/functions/PlayerSpecialProperties.Parse.html +1 -1
  269. package/docs/functions/PlayerSpecialProperties.Serialize.html +1 -1
  270. package/docs/functions/PowerLineSpecialProperties.Parse.html +1 -1
  271. package/docs/functions/PowerLineSpecialProperties.Serialize.html +1 -1
  272. package/docs/functions/PropertiesList.ParseList.html +1 -1
  273. package/docs/functions/PropertiesList.ParseSingleProperty.html +1 -1
  274. package/docs/functions/PropertiesList.SerializeList.html +1 -1
  275. package/docs/functions/PropertiesList.SerializeSingleProperty.html +1 -1
  276. package/docs/functions/SatisfactorySaveHeader.Parse.html +1 -1
  277. package/docs/functions/SatisfactorySaveHeader.Serialize.html +1 -1
  278. package/docs/functions/SaveBodyChunks.CompressDataIntoChunks.html +1 -1
  279. package/docs/functions/SaveBodyChunks.DecompressChunks.html +1 -1
  280. package/docs/functions/SaveBodyValidation.Parse.html +1 -0
  281. package/docs/functions/SaveBodyValidation.Serialize.html +1 -0
  282. package/docs/functions/SetProperty.CalcOverhead.html +1 -1
  283. package/docs/functions/SetProperty.Parse.html +1 -1
  284. package/docs/functions/SetProperty.Serialize.html +1 -1
  285. package/docs/functions/SoftObjectArrayProperty.Parse.html +1 -1
  286. package/docs/functions/SoftObjectArrayProperty.Serialize.html +1 -1
  287. package/docs/functions/SoftObjectReference.read.html +1 -1
  288. package/docs/functions/SoftObjectReference.write.html +1 -1
  289. package/docs/functions/SpecialDroneActionProperties.Parse.html +1 -1
  290. package/docs/functions/SpecialDroneActionProperties.Serialize.html +1 -1
  291. package/docs/functions/SpecialProperties.ParseClassSpecificSpecialProperties.html +1 -1
  292. package/docs/functions/SpecialProperties.SerializeClassSpecificSpecialProperties.html +1 -1
  293. package/docs/functions/StrArrayProperty.Parse.html +1 -1
  294. package/docs/functions/StrArrayProperty.Serialize.html +1 -1
  295. package/docs/functions/StrProperty.CalcOverhead.html +1 -1
  296. package/docs/functions/StrProperty.Parse.html +1 -1
  297. package/docs/functions/StrProperty.ReadValue.html +1 -1
  298. package/docs/functions/StrProperty.Serialize.html +1 -1
  299. package/docs/functions/StrProperty.SerializeValue.html +1 -1
  300. package/docs/functions/StrSetProperty.Parse.html +1 -1
  301. package/docs/functions/StrSetProperty.Serialize.html +1 -1
  302. package/docs/functions/StructArrayProperty.Parse.html +1 -1
  303. package/docs/functions/StructArrayProperty.Serialize.html +1 -1
  304. package/docs/functions/StructProperty.CalcOverhead.html +1 -1
  305. package/docs/functions/StructProperty.Parse.html +1 -1
  306. package/docs/functions/StructProperty.ParseValue.html +1 -1
  307. package/docs/functions/StructProperty.Serialize.html +1 -1
  308. package/docs/functions/StructProperty.SerializeValue.html +1 -1
  309. package/docs/functions/StructSetProperty.Parse.html +1 -1
  310. package/docs/functions/StructSetProperty.Serialize.html +1 -1
  311. package/docs/functions/TextArrayProperty.Parse.html +1 -1
  312. package/docs/functions/TextArrayProperty.Serialize.html +1 -1
  313. package/docs/functions/TextProperty.CalcOverhead.html +1 -1
  314. package/docs/functions/TextProperty.Parse.html +1 -1
  315. package/docs/functions/TextProperty.ReadValue.html +1 -1
  316. package/docs/functions/TextProperty.Serialize.html +1 -1
  317. package/docs/functions/TextProperty.SerializeValue.html +1 -1
  318. package/docs/functions/Transform.Parse.html +1 -1
  319. package/docs/functions/Transform.ParseF.html +1 -1
  320. package/docs/functions/Transform.Serialize.html +1 -1
  321. package/docs/functions/Transform.SerializeF.html +1 -1
  322. package/docs/functions/Uint32Property.CalcOverhead.html +1 -1
  323. package/docs/functions/Uint32Property.Parse.html +1 -1
  324. package/docs/functions/Uint32Property.ReadValue.html +1 -1
  325. package/docs/functions/Uint32Property.Serialize.html +1 -1
  326. package/docs/functions/Uint32Property.SerializeValue.html +1 -1
  327. package/docs/functions/Uint32SetProperty.Parse.html +1 -1
  328. package/docs/functions/Uint32SetProperty.Serialize.html +1 -1
  329. package/docs/functions/Uint64Property.CalcOverhead.html +1 -1
  330. package/docs/functions/Uint64Property.Parse.html +1 -1
  331. package/docs/functions/Uint64Property.ReadValue.html +1 -1
  332. package/docs/functions/Uint64Property.Serialize.html +1 -1
  333. package/docs/functions/Uint64Property.SerializeValue.html +1 -1
  334. package/docs/functions/Uint8Property.CalcOverhead.html +1 -1
  335. package/docs/functions/Uint8Property.Parse.html +1 -1
  336. package/docs/functions/Uint8Property.ReadValue.html +1 -1
  337. package/docs/functions/Uint8Property.Serialize.html +1 -1
  338. package/docs/functions/Uint8Property.SerializeValue.html +1 -1
  339. package/docs/functions/VehiclePhysicsData.Parse.html +1 -1
  340. package/docs/functions/VehiclePhysicsData.Serialize.html +1 -1
  341. package/docs/functions/VehicleSpecialProperties.Parse.html +1 -1
  342. package/docs/functions/VehicleSpecialProperties.Serialize.html +1 -1
  343. package/docs/functions/col4.ParseBGRA.html +1 -1
  344. package/docs/functions/col4.ParseRGBA.html +1 -1
  345. package/docs/functions/col4.SerializeBGRA.html +1 -1
  346. package/docs/functions/col4.SerializeRGBA.html +1 -1
  347. package/docs/functions/isArrayProperty.html +1 -1
  348. package/docs/functions/isBoolArrayProperty.html +1 -1
  349. package/docs/functions/isBoolProperty.html +1 -1
  350. package/docs/functions/isBuildableSubsystemSpecialProperties.html +1 -1
  351. package/docs/functions/isByteArrayProperty.html +1 -1
  352. package/docs/functions/isByteProperty.html +1 -1
  353. package/docs/functions/isCircuitSpecialProperties.html +1 -1
  354. package/docs/functions/isConveyorChainActorSpecialProperties.html +1 -1
  355. package/docs/functions/isConveyorSpecialProperties.html +1 -1
  356. package/docs/functions/isDoubleArrayProperty.html +1 -1
  357. package/docs/functions/isDoubleProperty.html +1 -1
  358. package/docs/functions/isEmptySpecialProperties.html +1 -1
  359. package/docs/functions/isEnumArrayProperty.html +1 -1
  360. package/docs/functions/isEnumProperty.html +1 -1
  361. package/docs/functions/isFloatArrayProperty.html +1 -1
  362. package/docs/functions/isFloatProperty.html +1 -1
  363. package/docs/functions/isInt32ArrayProperty.html +1 -1
  364. package/docs/functions/isInt32Property.html +1 -1
  365. package/docs/functions/isInt32SetProperty.html +1 -1
  366. package/docs/functions/isInt64ArrayProperty.html +1 -1
  367. package/docs/functions/isInt64Property.html +1 -1
  368. package/docs/functions/isInt8Property.html +1 -1
  369. package/docs/functions/isMapProperty.html +1 -1
  370. package/docs/functions/isObjectArrayProperty.html +1 -1
  371. package/docs/functions/isObjectProperty.html +1 -1
  372. package/docs/functions/isObjectSetProperty.html +1 -1
  373. package/docs/functions/isObjectsListSpecialProperties.html +1 -1
  374. package/docs/functions/isPlayerSpecialProperties.html +1 -1
  375. package/docs/functions/isPowerLineSpecialProperties.html +1 -1
  376. package/docs/functions/isSaveComponent.html +1 -1
  377. package/docs/functions/isSaveEntity.html +1 -1
  378. package/docs/functions/isSetProperty.html +1 -1
  379. package/docs/functions/isSoftObjectArrayProperty.html +1 -1
  380. package/docs/functions/isSpecialDroneActionProperties.html +1 -1
  381. package/docs/functions/isStrArrayProperty.html +1 -1
  382. package/docs/functions/isStrProperty.html +1 -1
  383. package/docs/functions/isStrSetProperty.html +1 -1
  384. package/docs/functions/isStructArrayProperty.html +1 -1
  385. package/docs/functions/isStructProperty.html +1 -1
  386. package/docs/functions/isStructSetProperty.html +1 -1
  387. package/docs/functions/isTextArrayProperty.html +1 -1
  388. package/docs/functions/isTextProperty.html +1 -1
  389. package/docs/functions/isUInt64Property.html +1 -1
  390. package/docs/functions/isUint32Property.html +1 -1
  391. package/docs/functions/isUint32SetProperty.html +1 -1
  392. package/docs/functions/isUint8Property.html +1 -1
  393. package/docs/functions/isVehicleSpecialProperties.html +1 -1
  394. package/docs/functions/vec2.Parse.html +1 -1
  395. package/docs/functions/vec2.ParseF.html +1 -1
  396. package/docs/functions/vec2.Serialize.html +1 -1
  397. package/docs/functions/vec2.SerializeF.html +1 -1
  398. package/docs/functions/vec3.Parse.html +1 -1
  399. package/docs/functions/vec3.ParseF.html +1 -1
  400. package/docs/functions/vec3.ParseInt.html +1 -1
  401. package/docs/functions/vec3.Serialize.html +1 -1
  402. package/docs/functions/vec3.SerializeF.html +1 -1
  403. package/docs/functions/vec3.SerializeInt.html +1 -1
  404. package/docs/functions/vec3.add.html +1 -1
  405. package/docs/functions/vec3.length.html +1 -1
  406. package/docs/functions/vec3.mult.html +1 -1
  407. package/docs/functions/vec3.norm.html +1 -1
  408. package/docs/functions/vec3.sub.html +1 -1
  409. package/docs/functions/vec4.Parse.html +1 -1
  410. package/docs/functions/vec4.ParseF.html +1 -1
  411. package/docs/functions/vec4.Serialize.html +1 -1
  412. package/docs/functions/vec4.SerializeF.html +1 -1
  413. package/docs/hierarchy.html +1 -1
  414. package/docs/index.html +17 -5
  415. package/docs/interfaces/Blueprint.html +2 -2
  416. package/docs/interfaces/BlueprintConfig-1.html +2 -2
  417. package/docs/interfaces/SaveComponentHeader.html +2 -2
  418. package/docs/interfaces/SaveEntityHeader.html +2 -2
  419. package/docs/interfaces/SaveObjectHeader.html +2 -2
  420. package/docs/modules/AbstractBaseProperty.html +1 -1
  421. package/docs/modules/ArrayProperty.html +1 -1
  422. package/docs/modules/BlueprintConfig.html +1 -1
  423. package/docs/modules/BlueprintHeader.html +1 -1
  424. package/docs/modules/BoolArrayProperty.html +1 -1
  425. package/docs/modules/BoolProperty.html +1 -1
  426. package/docs/modules/BuildableSubsystemSpecialProperties.html +1 -1
  427. package/docs/modules/BuildableTypeInstance.html +1 -1
  428. package/docs/modules/ByteArrayProperty.html +1 -1
  429. package/docs/modules/ByteProperty.html +1 -1
  430. package/docs/modules/CircuitSpecialProperties.html +1 -1
  431. package/docs/modules/ConveyorChainActorSpecialProperties.html +1 -1
  432. package/docs/modules/ConveyorSpecialProperties.html +1 -1
  433. package/docs/modules/DoubleArrayProperty.html +1 -1
  434. package/docs/modules/DoubleProperty.html +1 -1
  435. package/docs/modules/DynamicStructPropertyValue.html +1 -1
  436. package/docs/modules/EmptySpecialProperties.html +1 -1
  437. package/docs/modules/EnumArrayProperty.html +1 -1
  438. package/docs/modules/EnumProperty.html +1 -1
  439. package/docs/modules/FClientIdentityInfo.html +3 -0
  440. package/docs/modules/FColor.html +3 -0
  441. package/docs/modules/FGDynamicStruct.html +1 -1
  442. package/docs/modules/FICFrameRange.html +3 -2
  443. package/docs/modules/FINGPUT1BufferPixel.html +4 -0
  444. package/docs/modules/FINItemStateFileSystem.html +5 -0
  445. package/docs/modules/FINNetworkTrace.html +4 -0
  446. package/docs/modules/FLBBalancerIndexing.html +3 -0
  447. package/docs/modules/FLinearColor.html +3 -0
  448. package/docs/modules/FloatArrayProperty.html +1 -1
  449. package/docs/modules/FloatProperty.html +1 -1
  450. package/docs/modules/GUID.html +1 -1
  451. package/docs/modules/GUIDInfo.html +1 -1
  452. package/docs/modules/Int32ArrayProperty.html +1 -1
  453. package/docs/modules/Int32Property.html +1 -1
  454. package/docs/modules/Int32SetProperty.html +1 -1
  455. package/docs/modules/Int64ArrayProperty.html +1 -1
  456. package/docs/modules/Int64Property.html +1 -1
  457. package/docs/modules/Int8Property.html +1 -1
  458. package/docs/modules/Level.html +1 -1
  459. package/docs/modules/LevelToDestroyedActorsMap.html +1 -1
  460. package/docs/modules/MD5Hash.html +1 -1
  461. package/docs/modules/MapProperty.html +1 -1
  462. package/docs/modules/ObjectArrayProperty.html +1 -1
  463. package/docs/modules/ObjectProperty.html +1 -1
  464. package/docs/modules/ObjectReference.html +1 -1
  465. package/docs/modules/ObjectSetProperty.html +1 -1
  466. package/docs/modules/ObjectsListSpecialProperties.html +1 -1
  467. package/docs/modules/PlayerSpecialProperties.html +1 -1
  468. package/docs/modules/PowerLineSpecialProperties.html +1 -1
  469. package/docs/modules/PropertiesList.html +1 -1
  470. package/docs/modules/SatisfactorySaveHeader.html +1 -1
  471. package/docs/modules/SaveBodyChunks.html +1 -1
  472. package/docs/modules/SaveBodyValidation.html +6 -0
  473. package/docs/modules/SetProperty.html +1 -1
  474. package/docs/modules/SoftObjectArrayProperty.html +1 -1
  475. package/docs/modules/SoftObjectReference.html +1 -1
  476. package/docs/modules/SpecialDroneActionProperties.html +1 -1
  477. package/docs/modules/SpecialProperties.html +1 -1
  478. package/docs/modules/StrArrayProperty.html +1 -1
  479. package/docs/modules/StrProperty.html +1 -1
  480. package/docs/modules/StrSetProperty.html +1 -1
  481. package/docs/modules/StructArrayProperty.html +1 -1
  482. package/docs/modules/StructProperty.html +1 -1
  483. package/docs/modules/StructSetProperty.html +1 -1
  484. package/docs/modules/TextArrayProperty.html +1 -1
  485. package/docs/modules/TextProperty.html +1 -1
  486. package/docs/modules/Transform.html +1 -1
  487. package/docs/modules/Uint32Property.html +1 -1
  488. package/docs/modules/Uint32SetProperty.html +1 -1
  489. package/docs/modules/Uint64Property.html +1 -1
  490. package/docs/modules/Uint8Property.html +1 -1
  491. package/docs/modules/VehiclePhysicsData.html +1 -1
  492. package/docs/modules/VehicleSpecialProperties.html +1 -1
  493. package/docs/modules/col4.html +1 -1
  494. package/docs/modules/vec2.html +1 -1
  495. package/docs/modules/vec3.html +1 -1
  496. package/docs/modules/vec4.html +1 -1
  497. package/docs/modules.html +24 -7
  498. package/docs/types/AbstractBaseProperty-1.html +7 -1
  499. package/docs/types/ArrayProperty.AvailableArrayPropertyTypes.html +1 -1
  500. package/docs/types/ArrayPropertyStructValueFields.html +1 -1
  501. package/docs/types/BasicMultipleStructPropertyValue.html +1 -1
  502. package/docs/types/BasicStructPropertyValue.html +1 -1
  503. package/docs/types/BlueprintHeader-1.html +1 -1
  504. package/docs/types/BlueprintReaderWriterContext.html +2 -0
  505. package/docs/types/BoolArrayProperty-1.html +1 -1
  506. package/docs/types/BoolProperty-1.html +1 -1
  507. package/docs/types/BoxStructPropertyValue.html +1 -1
  508. package/docs/types/BuildableSubsystemSpecialProperties-1.html +1 -1
  509. package/docs/types/BuildableTypeInstance-1.html +1 -1
  510. package/docs/types/ByteArrayProperty-1.html +1 -1
  511. package/docs/types/ByteProperty-1.html +1 -1
  512. package/docs/types/BytePropertyValue.html +1 -1
  513. package/docs/types/ChunkCompressionInfo.html +1 -1
  514. package/docs/types/ChunkSummary.html +1 -1
  515. package/docs/types/CircuitSpecialProperties-1.html +1 -1
  516. package/docs/types/ConveyorChainActorSpecialProperties-1.html +1 -1
  517. package/docs/types/ConveyorChainSegmentSpecialProperties.html +1 -1
  518. package/docs/types/ConveyorItemSpecialProperties.html +1 -1
  519. package/docs/types/ConveyorSpecialProperties-1.html +1 -1
  520. package/docs/types/DoubleArrayProperty-1.html +1 -1
  521. package/docs/types/DoubleProperty-1.html +1 -1
  522. package/docs/types/DynamicStructPropertyValue-1.html +1 -1
  523. package/docs/types/EmptySpecialProperties-1.html +1 -1
  524. package/docs/types/EnumArrayProperty-1.html +1 -1
  525. package/docs/types/EnumProperty-1.html +1 -1
  526. package/docs/types/FClientIdentityInfo-1.html +2 -0
  527. package/docs/types/FColor-1.html +2 -0
  528. package/docs/types/FGDynamicStruct-1.html +6 -1
  529. package/docs/types/FICFrameRange-1.html +1 -1
  530. package/docs/types/FICFrameRangeStructPropertyValue.html +1 -1
  531. package/docs/types/FINGPUT1BufferPixel-1.html +1 -0
  532. package/docs/types/FINItemStateFileSystem-1.html +2 -0
  533. package/docs/types/FINNetworkTrace-1.html +1 -0
  534. package/docs/types/FLBBalancerIndexing-1.html +2 -0
  535. package/docs/types/FLinearColor-1.html +2 -0
  536. package/docs/types/FloatArrayProperty-1.html +1 -1
  537. package/docs/types/FloatProperty-1.html +1 -1
  538. package/docs/types/GENERIC_MAP_KEY_TYPE.html +1 -1
  539. package/docs/types/GENERIC_MAP_VALUE_TYPE.html +1 -1
  540. package/docs/types/GENERIC_STRUCT_PROPERTY_VALUE.html +1 -1
  541. package/docs/types/GUID-1.html +1 -1
  542. package/docs/types/GUIDInfo-1.html +1 -1
  543. package/docs/types/Grids.html +1 -1
  544. package/docs/types/Int32ArrayProperty-1.html +1 -1
  545. package/docs/types/Int32Property-1.html +1 -1
  546. package/docs/types/Int32SetProperty-1.html +1 -1
  547. package/docs/types/Int64ArrayProperty-1.html +1 -1
  548. package/docs/types/Int64Property-1.html +1 -1
  549. package/docs/types/Int8Property-1.html +1 -1
  550. package/docs/types/InventoryItemStructPropertyValue.html +1 -1
  551. package/docs/types/Level-1.html +1 -2
  552. package/docs/types/LevelToDestroyedActorsMap-1.html +1 -1
  553. package/docs/types/Levels.html +1 -1
  554. package/docs/types/MAP_STRUCT_PROXY.html +1 -0
  555. package/docs/types/MD5Hash-1.html +1 -1
  556. package/docs/types/MapProperty-1.html +1 -1
  557. package/docs/types/ModData.html +1 -1
  558. package/docs/types/ObjectArrayProperty-1.html +1 -1
  559. package/docs/types/ObjectProperty-1.html +1 -1
  560. package/docs/types/ObjectReference-1.html +1 -1
  561. package/docs/types/ObjectSetProperty-1.html +1 -1
  562. package/docs/types/ObjectsListSpecialProperties-1.html +1 -1
  563. package/docs/types/PlayerSpecialProperties-1.html +1 -1
  564. package/docs/types/PowerLineSpecialProperties-1.html +1 -1
  565. package/docs/types/PropertiesMap.html +1 -1
  566. package/docs/types/RailroadTrackPositionStructPropertyValue.html +1 -1
  567. package/docs/types/ReaderWriterContext.html +2 -0
  568. package/docs/types/RoughSaveVersion.html +1 -1
  569. package/docs/types/SatisfactoryModMetadata.html +1 -1
  570. package/docs/types/SatisfactorySaveHeader-1.html +1 -1
  571. package/docs/types/SaveBodyChunks-1.html +1 -1
  572. package/docs/types/SaveBodyValidation-1.html +1 -0
  573. package/docs/types/SaveReaderWriterContext.html +3 -0
  574. package/docs/types/SetProperty.AvailableSetPropertyTypes.html +1 -1
  575. package/docs/types/SoftObjectArrayProperty-1.html +1 -1
  576. package/docs/types/SoftObjectReference-1.html +1 -1
  577. package/docs/types/SpecialDroneAction.html +1 -1
  578. package/docs/types/SpecialDroneActionProperties-1.html +1 -1
  579. package/docs/types/SpecialProperties.AvailableSpecialPropertiesTypes.html +1 -1
  580. package/docs/types/StrArrayProperty-1.html +1 -1
  581. package/docs/types/StrProperty-1.html +1 -1
  582. package/docs/types/StrSetProperty-1.html +1 -1
  583. package/docs/types/StructArrayProperty-1.html +1 -1
  584. package/docs/types/StructProperty-1.html +1 -1
  585. package/docs/types/StructSetProperty-1.html +1 -1
  586. package/docs/types/TextArrayProperty-1.html +1 -1
  587. package/docs/types/TextProperty-1.html +1 -1
  588. package/docs/types/TextPropertyValue.html +1 -1
  589. package/docs/types/Transform-1.html +1 -1
  590. package/docs/types/Uint32Property-1.html +1 -1
  591. package/docs/types/Uint32SetProperty-1.html +1 -1
  592. package/docs/types/Uint64Property-1.html +1 -1
  593. package/docs/types/Uint8Property-1.html +1 -1
  594. package/docs/types/VehiclePhysicsData-1.html +1 -1
  595. package/docs/types/VehicleSpecialProperties-1.html +1 -1
  596. package/docs/types/col4-1.html +1 -1
  597. package/docs/types/vec2-1.html +1 -1
  598. package/docs/types/vec3-1.html +1 -1
  599. package/docs/types/vec4-1.html +1 -1
  600. package/docs/variables/DEFAULT_SATISFACTORY_CHUNK_HEADER_SIZE.html +1 -1
  601. package/docs/variables/EDIT.html +1 -1
  602. package/docs/variables/FINItemStateFileSystem.ExactStructReference.html +1 -0
  603. package/docs/variables/SaveBodyChunks.HEADER_V1.html +1 -1
  604. package/docs/variables/SaveBodyChunks.HEADER_V2.html +1 -1
  605. package/jsr.json +1 -1
  606. package/package.json +3 -3
  607. package/docs/classes/BlueprintConfigWriter.html +0 -39
  608. package/docs/classes/BlueprintWriter.html +0 -42
  609. package/docs/functions/FICFrameRange.Parse.html +0 -1
  610. package/docs/functions/FICFrameRange.Serialize.html +0 -1
  611. package/docs/types/ByteArray4.html +0 -1
  612. package/docs/types/ClientIdentityInfo.html +0 -1
  613. package/docs/types/MAP_STRUCT_KEY_PROXY.html +0 -1
  614. package/docs/types/SaveBodyValidation.html +0 -1
@@ -15,8 +15,7 @@ const isSetProperty = (obj) => (0, Uint32SetProperty_1.isUint32SetProperty)(obj)
15
15
  exports.isSetProperty = isSetProperty;
16
16
  var SetProperty;
17
17
  (function (SetProperty) {
18
- SetProperty.Parse = (reader, ueType, index, propertyName) => {
19
- const subtype = reader.readString();
18
+ SetProperty.Parse = (reader, ueType, index, propertyName, subtype) => {
20
19
  reader.skipBytes(1);
21
20
  const numElementsToRemove = reader.readInt32();
22
21
  if (numElementsToRemove > 0) {
@@ -45,8 +44,8 @@ var SetProperty;
45
44
  }
46
45
  return property;
47
46
  };
48
- SetProperty.CalcOverhead = (property) => {
49
- return property.subtype.length + 5 + 1;
47
+ SetProperty.CalcOverhead = (property, subtype) => {
48
+ return subtype.length + 5 + 1;
50
49
  };
51
50
  SetProperty.Serialize = (writer, property) => {
52
51
  writer.writeString(property.subtype);
@@ -1 +1 @@
1
- {"version":3,"file":"SetProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/SetProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,yDAA0E;AAC1E,2DAA6E;AAC7E,qDAAoE;AACpE,2DAA6E;AAC7E,2DAA6E;AAEtE,MAAM,aAAa,GAAG,CAAC,GAAQ,EAAgD,EAAE,CACpF,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACrB,IAAA,qCAAkB,EAAC,GAAG,CAAC;OACvB,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,iCAAgB,EAAC,GAAG,CAAC;OACrB,IAAA,uCAAmB,EAAC,GAAG,CAAC,CAAC;AALnB,QAAA,aAAa,iBAKM;AAEhC,IAAiB,WAAW,CAqE3B;AArED,WAAiB,WAAW;IAIX,iBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,KAAa,EAAE,YAAoB,EAA6B,EAAE;QAE3H,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAC/C,IAAI,mBAAmB,GAAG,CAAC,EAAE,CAAC;YAE1B,MAAM,IAAI,iCAAkB,CAAC,iGAAiG,CAAC,CAAC;QACpI,CAAC;QACD,MAA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M,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrB,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE1C,IAAI,IAAA,qCAAkB,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,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,iCAAgB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,+BAAc,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,IAAA,uCAAmB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,qCAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,iCAAkB,CAAC,8CAA+C,QAAgB,CAAC,OAAO,GAAG,CAAC,CAAC;QAC7G,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EArEgB,WAAW,2BAAX,WAAW,QAqE3B","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { Int32SetProperty, isInt32SetProperty } from './Int32SetProperty';\nimport { isObjectSetProperty, ObjectSetProperty } from './ObjectSetProperty';\nimport { isStrSetProperty, StrSetProperty } from './StrSetProperty';\nimport { isStructSetProperty, StructSetProperty } from './StructSetProperty';\nimport { isUint32SetProperty, Uint32SetProperty } from './Uint32SetProperty';\n\nexport const isSetProperty = (obj: any): obj is SetProperty.AvailableSetPropertyTypes =>\n isUint32SetProperty(obj)\n || isInt32SetProperty(obj)\n || isObjectSetProperty(obj)\n || isStrSetProperty(obj)\n || isStructSetProperty(obj);\n\nexport namespace SetProperty {\n\n export type AvailableSetPropertyTypes = Uint32SetProperty | Int32SetProperty | ObjectSetProperty | StrSetProperty | StructSetProperty;\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, propertyName: string): AvailableSetPropertyTypes => {\n\n const subtype = reader.readString();\n reader.skipBytes(1); // 0\n const numElementsToRemove = reader.readInt32();\n if (numElementsToRemove > 0) {\n // not observed so far.\n throw new UnimplementedError('SetPreperty does not yet support Number of Elements to be removed. Feel free to raise an issue.');\n }\n const elementCount = reader.readInt32();\n\n let property: AvailableSetPropertyTypes;\n switch (subtype) {\n\n case \"UInt32Property\":\n property = Uint32SetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"IntProperty\":\n property = Int32SetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"ObjectProperty\":\n property = ObjectSetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"NameProperty\":\n property = StrSetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"StructProperty\":\n property = StructSetProperty.Parse(reader, elementCount, subtype, ueType, index, propertyName);\n break;\n\n default:\n throw new Error(`Not Implemented SetProperty of ${subtype}.`);\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: AvailableSetPropertyTypes): number => {\n return property.subtype.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: AvailableSetPropertyTypes): void => {\n writer.writeString(property.subtype);\n writer.writeByte(0);\n writer.writeInt32(0);\n writer.writeInt32(property.values.length);\n\n if (isInt32SetProperty(property)) {\n Int32SetProperty.Serialize(writer, property);\n } else if (isUint32SetProperty(property)) {\n Uint32SetProperty.Serialize(writer, property);\n } else if (isObjectSetProperty(property)) {\n ObjectSetProperty.Serialize(writer, property);\n } else if (isStrSetProperty(property)) {\n StrSetProperty.Serialize(writer, property);\n } else if (isStructSetProperty(property)) {\n StructSetProperty.Serialize(writer, property);\n } else {\n throw new UnimplementedError(`Not Implemented Serializing SetProperty of ${(property as any).subtype}.`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"SetProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/SetProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,yDAA0E;AAC1E,2DAA6E;AAC7E,qDAAoE;AACpE,2DAA6E;AAC7E,2DAA6E;AAEtE,MAAM,aAAa,GAAG,CAAC,GAAQ,EAAgD,EAAE,CACpF,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACrB,IAAA,qCAAkB,EAAC,GAAG,CAAC;OACvB,IAAA,uCAAmB,EAAC,GAAG,CAAC;OACxB,IAAA,iCAAgB,EAAC,GAAG,CAAC;OACrB,IAAA,uCAAmB,EAAC,GAAG,CAAC,CAAC;AALnB,QAAA,aAAa,iBAKM;AAEhC,IAAiB,WAAW,CAoE3B;AApED,WAAiB,WAAW;IAIX,iBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,KAAa,EAAE,YAAoB,EAAE,OAAe,EAA6B,EAAE;QAE5I,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QACpB,MAAM,mBAAmB,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAC/C,IAAI,mBAAmB,GAAG,CAAC,EAAE,CAAC;YAE1B,MAAM,IAAI,iCAAkB,CAAC,iGAAiG,CAAC,CAAC;QACpI,CAAC;QACD,MAAM,YAAY,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAExC,IAAI,QAAmC,CAAC;QACxC,QAAQ,OAAO,EAAE,CAAC;YAEd,KAAK,gBAAgB;gBACjB,QAAQ,GAAG,qC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,CAAC,CAAC;QAE1C,IAAI,IAAA,qCAAkB,EAAC,QAAQ,CAAC,EAAE,CAAC;YAC/B,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,iCAAgB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACpC,+BAAc,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,IAAA,uCAAmB,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,qCAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAClD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,iCAAkB,CAAC,8CAA+C,QAAgB,CAAC,OAAO,GAAG,CAAC,CAAC;QAC7G,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EApEgB,WAAW,2BAAX,WAAW,QAoE3B","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { Int32SetProperty, isInt32SetProperty } from './Int32SetProperty';\nimport { isObjectSetProperty, ObjectSetProperty } from './ObjectSetProperty';\nimport { isStrSetProperty, StrSetProperty } from './StrSetProperty';\nimport { isStructSetProperty, StructSetProperty } from './StructSetProperty';\nimport { isUint32SetProperty, Uint32SetProperty } from './Uint32SetProperty';\n\nexport const isSetProperty = (obj: any): obj is SetProperty.AvailableSetPropertyTypes =>\n isUint32SetProperty(obj)\n || isInt32SetProperty(obj)\n || isObjectSetProperty(obj)\n || isStrSetProperty(obj)\n || isStructSetProperty(obj);\n\nexport namespace SetProperty {\n\n export type AvailableSetPropertyTypes = Uint32SetProperty | Int32SetProperty | ObjectSetProperty | StrSetProperty | StructSetProperty;\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, propertyName: string, subtype: string): AvailableSetPropertyTypes => {\n\n reader.skipBytes(1); // 0\n const numElementsToRemove = reader.readInt32();\n if (numElementsToRemove > 0) {\n // not observed so far.\n throw new UnimplementedError('SetPreperty does not yet support Number of Elements to be removed. Feel free to raise an issue.');\n }\n const elementCount = reader.readInt32();\n\n let property: AvailableSetPropertyTypes;\n switch (subtype) {\n\n case \"UInt32Property\":\n property = Uint32SetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"IntProperty\":\n property = Int32SetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"ObjectProperty\":\n property = ObjectSetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"NameProperty\":\n property = StrSetProperty.Parse(reader, elementCount, subtype, ueType, index);\n break;\n\n case \"StructProperty\":\n property = StructSetProperty.Parse(reader, elementCount, subtype, ueType, index, propertyName);\n break;\n\n default:\n throw new Error(`Not Implemented SetProperty of ${subtype}.`);\n }\n\n return property;\n }\n\n export const CalcOverhead = (property: AvailableSetPropertyTypes, subtype: string): number => {\n return subtype.length + 5 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: AvailableSetPropertyTypes): void => {\n writer.writeString(property.subtype);\n writer.writeByte(0);\n writer.writeInt32(0);\n writer.writeInt32(property.values.length);\n\n if (isInt32SetProperty(property)) {\n Int32SetProperty.Serialize(writer, property);\n } else if (isUint32SetProperty(property)) {\n Uint32SetProperty.Serialize(writer, property);\n } else if (isObjectSetProperty(property)) {\n ObjectSetProperty.Serialize(writer, property);\n } else if (isStrSetProperty(property)) {\n StrSetProperty.Serialize(writer, property);\n } else if (isStructSetProperty(property)) {\n StructSetProperty.Serialize(writer, property);\n } else {\n throw new UnimplementedError(`Not Implemented Serializing SetProperty of ${(property as any).subtype}.`);\n }\n }\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StructSetProperty = exports.isStructSetProperty = void 0;
4
4
  const parser_error_1 = require("../../../../../error/parser.error");
5
- const GUID_1 = require("../../../structs/GUID");
5
+ const GUID_1 = require("../../../structs/binary/GUID");
6
6
  const vec3_1 = require("../../../structs/vec3");
7
7
  const AbstractBaseProperty_1 = require("../AbstractBaseProperty");
8
8
  const isStructSetProperty = (property) => !Array.isArray(property) && property.type === 'StructSetProperty';
@@ -1 +1 @@
1
- {"version":3,"file":"StructSetProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,gDAA6C;AAC7C,gDAA6C;AAC7C,kEAA+D;AAExD,MAAM,mBAAmB,GAAG,CAAC,QAAa,EAAiC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,CAAC;AAA1I,QAAA,mBAAmB,uBAAuH;AAQvJ,IAAiB,iBAAiB,CA+BjC;AA/BD,WAAiB,iBAAiB;IAEjB,uBAAK,GAAG,CAAC,MAAqB,EAAE,YAAoB,EAAE,OAAe,EAAE,MAAc,EAAE,QAAgB,CAAC,EAAE,YAAoB,EAAqB,EAAE;QAE9J,IAAI,MAAiB,CAAC;QACtB,IAAI,YAAY,KAAK,mBAAmB,EAAE,CAAC;YACvC,MAAM,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,WAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5E,CAAC;aAAM,IAAI,YAAY,KAAK,mBAAmB,IAAI,YAAY,KAAK,iBAAiB,EAAE,CAAC;YACpF,MAAM,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,WAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1E,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,iCAAkB,CAAC,mEAAmE,YAAY,GAAG,CAAC,CAAC;QACrH,CAAC;QAED,OAAO;YACH,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YAC3D,IAAI,EAAE,mBAAmB;YACzB,OAAO;YACP,MAAM;SACmB,CAAC;IAClC,CAAC,CAAA;IAEY,2BAAS,GAAG,CAAC,MAAqB,EAAE,QAA2B,EAAQ,EAAE;QAElF,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACxC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,WAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QAC7D,CAAC;aAAM,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,IAAI,QAAQ,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACtF,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,WAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QACxD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,0EAA0E,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;QAChH,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA/BgB,iBAAiB,iCAAjB,iBAAiB,QA+BjC","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { GUID } from '../../../structs/GUID';\nimport { vec3 } from '../../../structs/vec3';\nimport { AbstractBaseProperty } from '../AbstractBaseProperty';\n\nexport const isStructSetProperty = (property: any): property is StructSetProperty => !Array.isArray(property) && property.type === 'StructSetProperty';\n\nexport type StructSetProperty = AbstractBaseProperty & {\n type: 'StructSetProperty';\n subtype: string;\n values: any[];\n};\n\nexport namespace StructSetProperty {\n\n export const Parse = (reader: ContextReader, elementCount: number, subtype: string, ueType: string, index: number = 0, propertyName: string): StructSetProperty => {\n\n let values: unknown[];\n if (propertyName === 'mRemovalLocations') {\n values = new Array(elementCount).fill(0).map(() => vec3.ParseF(reader));\n } else if (propertyName === 'mDestroyedPickups' || propertyName === 'mLootedDropPods') {\n values = new Array(elementCount).fill(0).map(() => GUID.read(reader));\n } else {\n throw new UnimplementedError(`Not Implemented SetProperty of StructProperty for property type ${propertyName}.`);\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'StructSetProperty',\n subtype,\n values\n } satisfies StructSetProperty;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructSetProperty): void => {\n\n if (property.name === 'mRemovalLocations') {\n property.values.forEach(v => vec3.SerializeF(writer, v));\n } else if (property.name === 'mDestroyedPickups' || property.name === 'mLootedDropPods') {\n property.values.forEach(v => GUID.write(writer, v));\n } else {\n throw new Error(`Not Implemented serializing SetProperty of StructProperty for property ${property.name}.`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"StructSetProperty.js","sourceRoot":"","sources":["../../../../../../../src/parser/satisfactory/types/property/generic/SetProperty/StructSetProperty.ts"],"names":[],"mappings":";;;AAEA,oEAAuE;AACvE,uDAAoD;AACpD,gDAA6C;AAC7C,kEAA+D;AAExD,MAAM,mBAAmB,GAAG,CAAC,QAAa,EAAiC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,CAAC;A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AM,IAAI,QAAQ,CAAC,IAAI,KAAK,mBAAmB,IAAI,QAAQ,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;YACtF,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,WAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;QACxD,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,KAAK,CAAC,0EAA0E,QAAQ,CAAC,IAAI,GAAG,CAAC,CAAC;QAChH,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA/BgB,iBAAiB,iCAAjB,iBAAiB,QA+BjC","sourcesContent":["import { ContextReader } from '../../../../../context/context-reader';\nimport { ContextWriter } from '../../../../../context/context-writer';\nimport { UnimplementedError } from '../../../../../error/parser.error';\nimport { GUID } from '../../../structs/binary/GUID';\nimport { vec3 } from '../../../structs/vec3';\nimport { AbstractBaseProperty } from '../AbstractBaseProperty';\n\nexport const isStructSetProperty = (property: any): property is StructSetProperty => !Array.isArray(property) && property.type === 'StructSetProperty';\n\nexport type StructSetProperty = AbstractBaseProperty & {\n type: 'StructSetProperty';\n subtype: string;\n values: any[];\n};\n\nexport namespace StructSetProperty {\n\n export const Parse = (reader: ContextReader, elementCount: number, subtype: string, ueType: string, index: number = 0, propertyName: string): StructSetProperty => {\n\n let values: unknown[];\n if (propertyName === 'mRemovalLocations') {\n values = new Array(elementCount).fill(0).map(() => vec3.ParseF(reader));\n } else if (propertyName === 'mDestroyedPickups' || propertyName === 'mLootedDropPods') {\n values = new Array(elementCount).fill(0).map(() => GUID.read(reader));\n } else {\n throw new UnimplementedError(`Not Implemented SetProperty of StructProperty for property type ${propertyName}.`);\n }\n\n return {\n ...AbstractBaseProperty.Create({ index, ueType, type: '' }),\n type: 'StructSetProperty',\n subtype,\n values\n } satisfies StructSetProperty;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructSetProperty): void => {\n\n if (property.name === 'mRemovalLocations') {\n property.values.forEach(v => vec3.SerializeF(writer, v));\n } else if (property.name === 'mDestroyedPickups' || property.name === 'mLootedDropPods') {\n property.values.forEach(v => GUID.write(writer, v));\n } else {\n throw new Error(`Not Implemented serializing SetProperty of StructProperty for property ${property.name}.`);\n }\n }\n}\n"]}
@@ -1,9 +1,14 @@
1
1
  import { ContextReader } from '../../../../context/context-reader';
2
2
  import { ContextWriter } from '../../../../context/context-writer';
3
+ import { FClientIdentityInfo } from '../../structs/binary/FClientIdentityInfo';
3
4
  import { col4 } from '../../structs/col4';
4
5
  import { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';
5
6
  import { FGDynamicStruct } from '../../structs/FGDynamicStruct';
7
+ import { FINGPUT1BufferPixel } from '../../structs/mods/FicsItNetworks/FINGPUT1BufferPixel';
8
+ import { FINNetworkTrace } from '../../structs/mods/FicsItNetworks/FINNetworkTrace';
9
+ import { FLBBalancerIndexing } from '../../structs/mods/ModularLoadBalancers/FLBBalancerIndexing';
6
10
  import { ObjectReference } from '../../structs/ObjectReference';
11
+ import { vec2 } from '../../structs/vec2';
7
12
  import { vec3 } from '../../structs/vec3';
8
13
  import { vec4 } from '../../structs/vec4';
9
14
  import { AbstractBaseProperty } from './AbstractBaseProperty';
@@ -33,11 +38,7 @@ export type FICFrameRangeStructPropertyValue = {
33
38
  begin: string;
34
39
  end: string;
35
40
  };
36
- export type ClientIdentityInfo = {
37
- offlineId: string;
38
- accountIds: Record<number, number[]>;
39
- };
40
- export type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue | InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | ClientIdentityInfo | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;
41
+ export type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue | InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | FClientIdentityInfo | DynamicStructPropertyValue | col4 | vec2 | vec3 | vec4 | string | FINNetworkTrace | FINGPUT1BufferPixel | FLBBalancerIndexing;
41
42
  export declare const isStructProperty: (property: any) => property is StructProperty;
42
43
  export type StructProperty = AbstractBaseProperty & {
43
44
  type: 'StructProperty';
@@ -49,9 +50,9 @@ export type StructProperty = AbstractBaseProperty & {
49
50
  unk4?: number;
50
51
  };
51
52
  export declare namespace StructProperty {
52
- const Parse: (reader: ContextReader, ueType: string, index: number, size: number) => StructProperty;
53
+ const Parse: (reader: ContextReader, ueType: string, index: number, size: number, subtype: string) => StructProperty;
53
54
  const ParseValue: (reader: ContextReader, subtype: string, size: number) => GENERIC_STRUCT_PROPERTY_VALUE;
54
- const CalcOverhead: (property: StructProperty) => number;
55
+ const CalcOverhead: (property: StructProperty, subtype: string) => number;
55
56
  const Serialize: (writer: ContextWriter, property: StructProperty) => void;
56
57
  const SerializeValue: (writer: ContextWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE) => void;
57
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"StructProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AA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AE,6BAA6B,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,cAAc,CAAC;IAErB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,KAAG,cA4C1F,CAAA;IAEM,MAAM,UAAU,WAAY,aAAa,WAAW,MAAM,QAAQ,MAAM,KAAG,6BAqHjF,CAAA;IAEM,MAAM,YAAY,aAAc,cAAc,KAAG,MAEvD,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,cAAc,KAAG,IAU3E,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,WAAW,MAAM,SAAS,6BAA6B,KAAG,IAgH7G,CAAA;CACJ"}
1
+ {"version":3,"file":"StructProperty.d.ts","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAI/E,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AA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AAI,EAAE,gBAAgB,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,6BAA6B,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,yBAAiB,cAAc,CAAC;IAErB,MAAM,KAAK,WAAY,aAAa,UAAU,MAAM,SAAS,MAAM,QAAQ,MAAM,WAAW,MAAM,KAAG,cA4C3G,CAAA;IAEM,MAAM,UAAU,WAAY,aAAa,WAAW,MAAM,QAAQ,MAAM,KAAG,6BA0HjF,CAAA;IAEM,MAAM,YAAY,aAAc,cAAc,WAAW,MAAM,KAAG,MAExE,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,YAAY,cAAc,KAAG,IAU3E,CAAA;IAEM,MAAM,cAAc,WAAY,aAAa,WAAW,MAAM,SAAS,6BAA6B,KAAG,IAqI7G,CAAA;CACJ"}
@@ -2,13 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StructProperty = exports.isStructProperty = void 0;
4
4
  const save_custom_version_1 = require("../../../save/save-custom-version");
5
- const col4_1 = require("../../structs/col4");
5
+ const FClientIdentityInfo_1 = require("../../structs/binary/FClientIdentityInfo");
6
+ const FColor_1 = require("../../structs/binary/FColor");
7
+ const FLinearColor_1 = require("../../structs/binary/FLinearColor");
8
+ const GUID_1 = require("../../structs/binary/GUID");
6
9
  const DynamicStructPropertyValue_1 = require("../../structs/DynamicStructPropertyValue");
7
10
  const FGDynamicStruct_1 = require("../../structs/FGDynamicStruct");
8
- const GUID_1 = require("../../structs/GUID");
9
11
  const GUIDInfo_1 = require("../../structs/GUIDInfo");
10
12
  const FICFrameRange_1 = require("../../structs/mods/FicsItCam/FICFrameRange");
13
+ const FINGPUT1BufferPixel_1 = require("../../structs/mods/FicsItNetworks/FINGPUT1BufferPixel");
14
+ const FINNetworkTrace_1 = require("../../structs/mods/FicsItNetworks/FINNetworkTrace");
15
+ const FLBBalancerIndexing_1 = require("../../structs/mods/ModularLoadBalancers/FLBBalancerIndexing");
11
16
  const ObjectReference_1 = require("../../structs/ObjectReference");
17
+ const vec2_1 = require("../../structs/vec2");
12
18
  const vec3_1 = require("../../structs/vec3");
13
19
  const vec4_1 = require("../../structs/vec4");
14
20
  const AbstractBaseProperty_1 = require("./AbstractBaseProperty");
@@ -16,8 +22,7 @@ const isStructProperty = (property) => !Array.isArray(property) && property.type
16
22
  exports.isStructProperty = isStructProperty;
17
23
  var StructProperty;
18
24
  (function (StructProperty) {
19
- StructProperty.Parse = (reader, ueType, index, size) => {
20
- const subtype = reader.readString();
25
+ StructProperty.Parse = (reader, ueType, index, size, subtype) => {
21
26
  const guidInfo = GUIDInfo_1.GUIDInfo.read(reader);
22
27
  const struct = {
23
28
  ...AbstractBaseProperty_1.AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),
@@ -58,33 +63,35 @@ var StructProperty;
58
63
  let value;
59
64
  switch (subtype) {
60
65
  case 'Color':
61
- value = col4_1.col4.ParseBGRA(reader);
66
+ value = FColor_1.FColor.read(reader);
62
67
  break;
63
68
  case 'IntPoint':
64
69
  value = reader.readInt64().toString();
65
70
  break;
66
71
  case 'LinearColor':
67
- value = col4_1.col4.ParseRGBA(reader);
72
+ value = FLinearColor_1.FLinearColor.read(reader);
73
+ break;
74
+ case 'Vector2D':
75
+ value = (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec2_1.vec2.Parse(reader) : vec2_1.vec2.ParseF(reader);
68
76
  break;
69
77
  case 'Vector':
70
78
  case 'Rotator':
71
- case 'Vector2D':
72
- value = (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) ? vec3_1.vec3.Parse(reader) : vec3_1.vec3.ParseF(reader);
79
+ value = (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec3_1.vec3.Parse(reader) : vec3_1.vec3.ParseF(reader);
73
80
  break;
74
81
  case 'Quat':
75
82
  case 'Vector4':
76
83
  case 'Vector4D':
77
- value = (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) ? vec4_1.vec4.Parse(reader) : vec4_1.vec4.ParseF(reader);
84
+ value = (reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec4_1.vec4.Parse(reader) : vec4_1.vec4.ParseF(reader);
78
85
  break;
79
86
  case 'Box':
80
- value = ((size === 25) ? {
81
- min: vec3_1.vec3.ParseF(reader),
82
- max: vec3_1.vec3.ParseF(reader),
83
- isValid: reader.readByte() >= 1
84
- } : {
87
+ value = ((reader.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) ? {
85
88
  min: vec3_1.vec3.Parse(reader),
86
89
  max: vec3_1.vec3.Parse(reader),
87
90
  isValid: reader.readByte() >= 1
91
+ } : {
92
+ min: vec3_1.vec3.ParseF(reader),
93
+ max: vec3_1.vec3.ParseF(reader),
94
+ isValid: reader.readByte() >= 1
88
95
  });
89
96
  break;
90
97
  case 'RailroadTrackPosition':
@@ -102,19 +109,7 @@ var StructProperty;
102
109
  value = GUID_1.GUID.read(reader);
103
110
  break;
104
111
  case 'ClientIdentityInfo':
105
- const offlineId = reader.readString();
106
- const numAccountIds = reader.readInt32();
107
- const accountIds = {};
108
- for (let i = 0; i < numAccountIds; i++) {
109
- const platformFlagMaybe = reader.readByte();
110
- const idSize = reader.readInt32();
111
- const accountId = Array.from(reader.readBytes(idSize));
112
- accountIds[platformFlagMaybe] = accountId;
113
- }
114
- value = {
115
- offlineId,
116
- accountIds
117
- };
112
+ value = FClientIdentityInfo_1.FClientIdentityInfo.read(reader);
118
113
  break;
119
114
  case 'InventoryItem':
120
115
  const before = reader.getBufferPosition();
@@ -140,15 +135,26 @@ var StructProperty;
140
135
  value = reader.readInt64().toString();
141
136
  break;
142
137
  case 'FICFrameRange':
143
- value = FICFrameRange_1.FICFrameRange.Parse(reader);
138
+ value = FICFrameRange_1.FICFrameRange.read(reader);
139
+ break;
140
+ case 'LBBalancerIndexing':
141
+ value = FLBBalancerIndexing_1.FLBBalancerIndexing.read(reader);
142
+ break;
143
+ case 'FINNetworkTrace':
144
+ case 'FIRTrace':
145
+ value = FINNetworkTrace_1.FINNetworkTrace.read(reader);
146
+ break;
147
+ case 'FINGPUT1BufferPixel':
148
+ value = FINGPUT1BufferPixel_1.FINGPUT1BufferPixel.read(reader);
144
149
  break;
145
150
  default:
146
151
  value = DynamicStructPropertyValue_1.DynamicStructPropertyValue.read(reader, subtype);
152
+ break;
147
153
  }
148
154
  return value;
149
155
  };
150
- StructProperty.CalcOverhead = (property) => {
151
- return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1;
156
+ StructProperty.CalcOverhead = (property, subtype) => {
157
+ return subtype.length + 5 + 4 + 4 + 4 + 4 + 1;
152
158
  };
153
159
  StructProperty.Serialize = (writer, property) => {
154
160
  writer.writeString(property.subtype);
@@ -162,21 +168,27 @@ var StructProperty;
162
168
  StructProperty.SerializeValue = (writer, subtype, value) => {
163
169
  switch (subtype) {
164
170
  case 'Color':
165
- value = value;
166
- col4_1.col4.SerializeBGRA(writer, value);
171
+ FColor_1.FColor.write(writer, value);
167
172
  break;
168
173
  case 'IntPoint':
169
174
  writer.writeInt64(BigInt(value));
170
175
  break;
171
176
  case 'LinearColor':
177
+ FLinearColor_1.FLinearColor.write(writer, value);
178
+ break;
179
+ case 'Vector2D':
172
180
  value = value;
173
- col4_1.col4.SerializeRGBA(writer, value);
181
+ if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) {
182
+ vec2_1.vec2.Serialize(writer, value);
183
+ }
184
+ else {
185
+ vec2_1.vec2.SerializeF(writer, value);
186
+ }
174
187
  break;
175
188
  case 'Vector':
176
189
  case 'Rotator':
177
- case 'Vector2D':
178
190
  value = value;
179
- if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) {
191
+ if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) {
180
192
  vec3_1.vec3.Serialize(writer, value);
181
193
  }
182
194
  else {
@@ -187,7 +199,7 @@ var StructProperty;
187
199
  case 'Vector4':
188
200
  case 'Vector4D':
189
201
  value = value;
190
- if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.UnrealEngine5) {
202
+ if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) {
191
203
  vec4_1.vec4.Serialize(writer, value);
192
204
  }
193
205
  else {
@@ -196,8 +208,14 @@ var StructProperty;
196
208
  break;
197
209
  case 'Box':
198
210
  value = value;
199
- vec3_1.vec3.Serialize(writer, value.min);
200
- vec3_1.vec3.Serialize(writer, value.max);
211
+ if (writer.context.saveVersion >= save_custom_version_1.SaveCustomVersion.SwitchTo64BitSaveArchive) {
212
+ vec3_1.vec3.Serialize(writer, value.min);
213
+ vec3_1.vec3.Serialize(writer, value.max);
214
+ }
215
+ else {
216
+ vec3_1.vec3.SerializeF(writer, value.min);
217
+ vec3_1.vec3.SerializeF(writer, value.max);
218
+ }
201
219
  writer.writeByte(value.isValid ? 1 : 0);
202
220
  break;
203
221
  case 'RailroadTrackPosition':
@@ -215,14 +233,7 @@ var StructProperty;
215
233
  GUID_1.GUID.write(writer, value);
216
234
  break;
217
235
  case 'ClientIdentityInfo':
218
- value = value;
219
- writer.writeString(value.offlineId);
220
- writer.writeInt32(Object.values(value.accountIds).length);
221
- for (const [platformFlagMaybe, accountId] of Object.entries(value.accountIds)) {
222
- writer.writeByte(Number(platformFlagMaybe));
223
- writer.writeInt32(accountId.length);
224
- writer.writeBytesArray(accountId);
225
- }
236
+ FClientIdentityInfo_1.FClientIdentityInfo.write(writer, value);
226
237
  break;
227
238
  case 'InventoryItem':
228
239
  value = value;
@@ -248,11 +259,24 @@ var StructProperty;
248
259
  break;
249
260
  case 'FICFrameRange':
250
261
  value = value;
251
- FICFrameRange_1.FICFrameRange.Serialize(writer, value);
262
+ FICFrameRange_1.FICFrameRange.write(writer, value);
263
+ break;
264
+ case 'LBBalancerIndexing':
265
+ FLBBalancerIndexing_1.FLBBalancerIndexing.write(writer, value);
266
+ break;
267
+ case 'FINNetworkTrace':
268
+ case 'FIRTrace':
269
+ value = value;
270
+ FINNetworkTrace_1.FINNetworkTrace.write(writer, value);
271
+ break;
272
+ case 'FINGPUT1BufferPixel':
273
+ value = value;
274
+ FINGPUT1BufferPixel_1.FINGPUT1BufferPixel.write(writer, value);
252
275
  break;
253
276
  default:
254
277
  value = value;
255
278
  DynamicStructPropertyValue_1.DynamicStructPropertyValue.write(writer, value);
279
+ break;
256
280
  }
257
281
  };
258
282
  })(StructProperty || (exports.StructProperty = StructProperty = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"StructProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":";;;AAEA,2EAAsE;AACtE,6CAA0C;AAC1C,yFAAsF;AACtF,mEAAgE;AAChE,6CAA0C;AAC1C,qDAAkD;AAClD,8EAA2E;AAC3E,mEAAgE;AAChE,6CAA0C;AAC1C,6CAA0C;AAC1C,iEAA8D;AA2CvD,MAAM,gBAAgB,GAAG,CAAC,QAAa,EAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAAjI,QAAA,gBAAgB,oBAAiH;AAY9I,IAAiB,cAAc,CAwS9B;AAxSD,WAAiB,cAAc;IAEd,oBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAkB,EAAE;QACxG,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,mBAAQ,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AAC;gBACD,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAiC,CAAC;gBAC1C,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;gBACjC,MAAM;YAEV,KAAK,YAAY;gBACb,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;gBAC1B,MAAM;YAEV,KAAK,UAAU;gBACX,KAAK,GAAG,KAAe,CAAC;gBACxB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjC,MAAM;YAGV,KAAK,eAAe;gBAChB,KAAK,GAAG,KAAsB,CAAC;gBAC/B,6BAAa,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACvC,MAAM;YAEV;gBAEI,KAAK,GAAG,KAAmC,CAAC;gBAC5C,uDAA0B,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACxD,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EAxSgB,cAAc,8BAAd,cAAc,QAwS9B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { SaveCustomVersion } from '../../../save/save-custom-version';\nimport { col4 } from '../../structs/col4';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { FGDynamicStruct } from '../../structs/FGDynamicStruct';\nimport { GUID } from '../../structs/GUID';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { FICFrameRange } from '../../structs/mods/FicsItCam/FICFrameRange';\nimport { ObjectReference } from '../../structs/ObjectReference';\nimport { vec3 } from '../../structs/vec3';\nimport { vec4 } from '../../structs/vec4';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport type BasicMultipleStructPropertyValue = {\n values: any;\n};\n\nexport type BasicStructPropertyValue = {\n value: any;\n};\n\nexport type BoxStructPropertyValue = {\n min: vec3;\n max: vec3;\n isValid: boolean;\n};\n\nexport type RailroadTrackPositionStructPropertyValue = {\n root: string;\n instanceName: string;\n offset: number;\n forward: number;\n};\n\nexport type InventoryItemStructPropertyValue = {\n itemReference: ObjectReference;\n itemState?: FGDynamicStruct;\n legacyItemStateActor?: ObjectReference;\n};\n\nexport type FICFrameRangeStructPropertyValue = {\n begin: string;\n end: string;\n};\n\nexport type ClientIdentityInfo = {\n offlineId: string;\n accountIds: Record<number, number[]>;\n};\n\nexport type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue |\n InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | ClientIdentityInfo | DynamicStructPropertyValue | col4 | vec3 | vec4 | string;\n\nexport const isStructProperty = (property: any): property is StructProperty => !Array.isArray(property) && property.type === 'StructProperty';\n\nexport type StructProperty = AbstractBaseProperty & {\n type: 'StructProperty';\n subtype: string;\n value: GENERIC_STRUCT_PROPERTY_VALUE;\n unk1?: number;\n unk2?: number;\n unk3?: number;\n unk4?: number;\n};\n\nexport namespace StructProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, size: number): StructProperty => {\n const subtype = reader.readString();\n const guidInfo = GUIDInfo.read(reader);\n\n const struct: StructProperty = {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'StructProperty',\n value: { values: [] },\n subtype\n };\n\n const unk1 = reader.readInt32();\n if (unk1 !== 0) {\n struct.unk1 = unk1;\n }\n\n const unk2 = reader.readInt32();\n if (unk2 !== 0) {\n struct.unk2 = unk2;\n }\n\n const unk3 = reader.readInt32();\n if (unk3 !== 0) {\n struct.unk3 = unk3;\n }\n\n const unk4 = reader.readInt32();\n if (unk4 !== 0) {\n struct.unk4 = unk4;\n }\n\n const before = reader.getBufferPosition();\n struct.value = ParseValue(reader, struct.subtype, size);\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== size) {\n if (size - readBytes === 4) {\n // U8, fine\n reader.skipBytes(size - readBytes);\n } else {\n throw new Error(`possibly corrupt. Read ${readBytes} for StructProperty Content of ${struct.subtype}, but ${size} were indicated.`);\n }\n }\n\n return struct;\n }\n\n export const ParseValue = (reader: ContextReader, subtype: string, size: number): GENERIC_STRUCT_PROPERTY_VALUE => {\n\n let value: GENERIC_STRUCT_PROPERTY_VALUE;\n\n switch (subtype) {\n case 'Color':\n value = col4.ParseBGRA(reader);\n break;\n\n case 'IntPoint':\n value = reader.readInt64().toString();\n break;\n\n case 'LinearColor':\n value = col4.ParseRGBA(reader);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) ? vec3.Parse(reader) : vec3.ParseF(reader);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = (reader.context.saveVersion >= SaveCustomVersion.UnrealEngine5) ? vec4.Parse(reader) : vec4.ParseF(reader);\n break;\n\n case 'Box':\n value = ((size === 25) ? {\n min: vec3.ParseF(reader),\n max: vec3.ParseF(reader),\n isValid: reader.readByte() >= 1\n } : {\n min: vec3.Parse(reader),\n max: vec3.Parse(reader),\n isValid: reader.readByte() >= 1\n }) satisfies BoxStructPropertyValue;\n break;\n\n case 'RailroadTrackPosition':\n value = {\n root: reader.readString(),\n instanceName: reader.readString(),\n offset: reader.readFloat32(),\n forward: reader.readFloat32()\n };\n break;\n\n case 'TimerHandle':\n value = reader.readString();\n break;\n\n case 'Guid':\n value = GUID.read(reader);\n break;\n\n case 'ClientIdentityInfo':\n const offlineId = reader.readString();\n const numAccountIds = reader.readInt32();\n\n const accountIds: Record<number, number[]> = {};\n for (let i = 0; i < numAccountIds; i++) {\n const platformFlagMaybe = reader.readByte(); // 1 for Epic, 6 for steam ? Only seen 1s and 6s so far.\n const idSize = reader.readInt32();\n const accountId = Array.from(reader.readBytes(idSize));\n accountIds[platformFlagMaybe] = accountId;\n }\n\n value = {\n offlineId,\n accountIds\n } satisfies ClientIdentityInfo;\n break;\n\n case 'InventoryItem':\n const before = reader.getBufferPosition();\n\n value = {\n itemReference: ObjectReference.read(reader)\n } satisfies InventoryItemStructPropertyValue;\n\n // inventory items have potentially an item state. but not before explicit version\n if (reader.context.saveVersion >= SaveCustomVersion.RefactoredInventoryItemState) {\n value.itemState = FGDynamicStruct.Parse(reader);\n } else {\n value.legacyItemStateActor = ObjectReference.read(reader);\n }\n\n break;\n\n case 'FluidBox':\n value = {\n value: reader.readFloat32()\n };\n break;\n\n case 'SlateBrush':\n value = reader.readString();\n break;\n\n case 'DateTime':\n value = reader.readInt64().toString();\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = FICFrameRange.Parse(reader);\n break;\n\n default:\n //TODO: use buildversion\n value = DynamicStructPropertyValue.read(reader, subtype);\n }\n\n return value;\n }\n\n export const CalcOverhead = (property: StructProperty): number => {\n return property.subtype.length + 5 + 4 + 4 + 4 + 4 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructProperty): void => {\n writer.writeString(property.subtype);\n GUIDInfo.write(writer, property.guidInfo);\n\n writer.writeInt32(property.unk1 ?? 0);\n writer.writeInt32(property.unk2 ?? 0);\n writer.writeInt32(property.unk3 ?? 0);\n writer.writeInt32(property.unk4 ?? 0);\n\n StructProperty.SerializeValue(writer, property.subtype, property.value);\n }\n\n export const SerializeValue = (writer: ContextWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE): void => {\n\n switch (subtype) {\n case 'Color':\n value = value as col4;\n col4.SerializeBGRA(writer, value);\n break;\n\n case 'IntPoint':\n writer.writeInt64(BigInt(value as string))\n break;\n\n case 'LinearColor':\n value = value as col4;\n col4.SerializeRGBA(writer, value);\n break;\n\n case 'Vector':\n case 'Rotator':\n case 'Vector2D':\n value = value as vec3;\n if (writer.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n vec3.Serialize(writer, value);\n } else {\n vec3.SerializeF(writer, value);\n }\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = value as vec4;\n if (writer.context.saveVersion >= SaveCustomVersion.UnrealEngine5) {\n vec4.Serialize(writer, value as vec4);\n } else {\n vec4.SerializeF(writer, value as vec4);\n }\n break;\n\n case 'Box':\n value = value as BoxStructPropertyValue;\n vec3.Serialize(writer, value.min);\n vec3.Serialize(writer, value.max);\n writer.writeByte(value.isValid ? 1 : 0);\n break;\n\n case 'RailroadTrackPosition':\n value = value as RailroadTrackPositionStructPropertyValue;\n writer.writeString(value.root);\n writer.writeString(value.instanceName);\n writer.writeFloat32(value.offset);\n writer.writeFloat32(value.forward);\n break;\n\n case 'TimerHandle':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'Guid':\n GUID.write(writer, value as GUID);\n break;\n\n case 'ClientIdentityInfo':\n value = value as ClientIdentityInfo;\n writer.writeString(value.offlineId);\n writer.writeInt32(Object.values(value.accountIds).length);\n for (const [platformFlagMaybe, accountId] of Object.entries(value.accountIds)) {\n writer.writeByte(Number(platformFlagMaybe));\n writer.writeInt32(accountId.length);\n writer.writeBytesArray(accountId);\n }\n\n break;\n\n case 'InventoryItem':\n value = value as InventoryItemStructPropertyValue;\n ObjectReference.write(writer, value.itemReference);\n\n if (writer.context.saveVersion >= SaveCustomVersion.RefactoredInventoryItemState) {\n FGDynamicStruct.Serialize(writer, value.itemState!);\n } else {\n ObjectReference.write(writer, value.legacyItemStateActor!);\n }\n break;\n\n case 'FluidBox':\n value = value as BasicStructPropertyValue;\n writer.writeFloat32(value.value);\n break;\n\n case 'SlateBrush':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'DateTime':\n value = value as string;\n writer.writeInt64(BigInt(value));\n break;\n\n // MODS\n case 'FICFrameRange': // https://github.com/Panakotta00/FicsIt-Cam/blob/master/Source/FicsItCam/Public/Data/FICTypes.h#35\n value = value as FICFrameRange;\n FICFrameRange.Serialize(writer, value);\n break;\n\n default:\n //TODO: use buildversion\n value = value as DynamicStructPropertyValue;\n DynamicStructPropertyValue.write(writer, value);\n }\n }\n}\n\n\n"]}
1
+ {"version":3,"file":"StructProperty.js","sourceRoot":"","sources":["../../../../../../src/parser/satisfactory/types/property/generic/StructProperty.ts"],"names":[],"mappings":";;;AAEA,2EAAsE;AACtE,kFAA+E;AAC/E,wDAAqD;AACrD,oEAAiE;AACjE,oDAAiD;AAEjD,yFAAsF;AACtF,mEAAgE;AAChE,qDAAkD;AAClD,8EAA2E;AAC3E,+FAA4F;AAC5F,uFAAoF;AACpF,qGAAkG;AAClG,mEAAgE;AAChE,6CAA0C;AAC1C,6CAA0C;AAC1C,6CAA0C;AAC1C,iEAA8D;AAuCvD,MAAM,gBAAgB,GAAG,CAAC,QAAa,EAA8B,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAAjI,QAAA,gBAAgB,oBAAiH;AAY9I,IAAiB,cAAc,CAkU9B;AAlUD,WAAiB,cAAc;IAEd,oBAAK,GAAG,CAAC,MAAqB,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAE,OAAe,EAAkB,EAAE;QAEzH,MAAM,QAAQ,GAAG,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEvC,MAAM,MAAM,GAAmB;YAC3B,GAAG,2CAAoB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;YACrE,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YACrB,OAAO;SACV,CAAC;QAEF,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;QAChC,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC;YACb,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC;QACvB,CAAC;QAED,MAAM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BACxB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjC,MAAM;YAGV,KAAK,eAAe;gBAChB,KAAK,GAAG,KAAsB,CAAC;gBAC/B,6BAAa,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACnC,MAAM;YAGV,KAAK,oBAAoB;gBACrB,yCAAmB,CAAC,KAAK,CAAC,MAAM,EAAE,KAA4B,CAAC,CAAC;gBAChE,MAAM;YAGV,KAAK,iBAAiB,CAAC;YACvB,KAAK,UAAU;gBACX,KAAK,GAAG,KAAwB,CAAC;gBACjC,iCAAe,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACrC,MAAM;YAEV,KAAK,qBAAqB;gBACtB,KAAK,GAAG,KAA4B,CAAC;gBACrC,yCAAmB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBACzC,MAAM;YAEV;gBAEI,KAAK,GAAG,KAAmC,CAAC;gBAC5C,uDAA0B,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAChD,MAAM;QACd,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EAlUgB,cAAc,8BAAd,cAAc,QAkU9B","sourcesContent":["import { ContextReader } from '../../../../context/context-reader';\nimport { ContextWriter } from '../../../../context/context-writer';\nimport { SaveCustomVersion } from '../../../save/save-custom-version';\nimport { FClientIdentityInfo } from '../../structs/binary/FClientIdentityInfo';\nimport { FColor } from '../../structs/binary/FColor';\nimport { FLinearColor } from '../../structs/binary/FLinearColor';\nimport { GUID } from '../../structs/binary/GUID';\nimport { col4 } from '../../structs/col4';\nimport { DynamicStructPropertyValue } from '../../structs/DynamicStructPropertyValue';\nimport { FGDynamicStruct } from '../../structs/FGDynamicStruct';\nimport { GUIDInfo } from '../../structs/GUIDInfo';\nimport { FICFrameRange } from '../../structs/mods/FicsItCam/FICFrameRange';\nimport { FINGPUT1BufferPixel } from '../../structs/mods/FicsItNetworks/FINGPUT1BufferPixel';\nimport { FINNetworkTrace } from '../../structs/mods/FicsItNetworks/FINNetworkTrace';\nimport { FLBBalancerIndexing } from '../../structs/mods/ModularLoadBalancers/FLBBalancerIndexing';\nimport { ObjectReference } from '../../structs/ObjectReference';\nimport { vec2 } from '../../structs/vec2';\nimport { vec3 } from '../../structs/vec3';\nimport { vec4 } from '../../structs/vec4';\nimport { AbstractBaseProperty } from './AbstractBaseProperty';\n\n\nexport type BasicMultipleStructPropertyValue = {\n values: any;\n};\n\nexport type BasicStructPropertyValue = {\n value: any;\n};\n\nexport type BoxStructPropertyValue = {\n min: vec3;\n max: vec3;\n isValid: boolean;\n};\n\nexport type RailroadTrackPositionStructPropertyValue = {\n root: string;\n instanceName: string;\n offset: number;\n forward: number;\n};\n\nexport type InventoryItemStructPropertyValue = {\n itemReference: ObjectReference;\n itemState?: FGDynamicStruct;\n legacyItemStateActor?: ObjectReference;\n};\n\nexport type FICFrameRangeStructPropertyValue = {\n begin: string;\n end: string;\n};\n\nexport type GENERIC_STRUCT_PROPERTY_VALUE = BasicMultipleStructPropertyValue | BasicStructPropertyValue | BoxStructPropertyValue | RailroadTrackPositionStructPropertyValue |\n InventoryItemStructPropertyValue | FICFrameRangeStructPropertyValue | FClientIdentityInfo | DynamicStructPropertyValue | col4 | vec2 | vec3 | vec4 | string |\n FINNetworkTrace | FINGPUT1BufferPixel | FLBBalancerIndexing;\n\nexport const isStructProperty = (property: any): property is StructProperty => !Array.isArray(property) && property.type === 'StructProperty';\n\nexport type StructProperty = AbstractBaseProperty & {\n type: 'StructProperty';\n subtype: string;\n value: GENERIC_STRUCT_PROPERTY_VALUE;\n unk1?: number;\n unk2?: number;\n unk3?: number;\n unk4?: number;\n};\n\nexport namespace StructProperty {\n\n export const Parse = (reader: ContextReader, ueType: string, index: number, size: number, subtype: string): StructProperty => {\n\n const guidInfo = GUIDInfo.read(reader);\n\n const struct: StructProperty = {\n ...AbstractBaseProperty.Create({ index, ueType, guidInfo, type: '' }),\n type: 'StructProperty',\n value: { values: [] },\n subtype\n };\n\n const unk1 = reader.readInt32();\n if (unk1 !== 0) {\n struct.unk1 = unk1;\n }\n\n const unk2 = reader.readInt32();\n if (unk2 !== 0) {\n struct.unk2 = unk2;\n }\n\n const unk3 = reader.readInt32();\n if (unk3 !== 0) {\n struct.unk3 = unk3;\n }\n\n const unk4 = reader.readInt32();\n if (unk4 !== 0) {\n struct.unk4 = unk4;\n }\n\n const before = reader.getBufferPosition();\n struct.value = ParseValue(reader, struct.subtype, size);\n const readBytes = reader.getBufferPosition() - before;\n if (readBytes !== size) {\n if (size - readBytes === 4) {\n // U8, fine\n reader.skipBytes(size - readBytes);\n } else {\n throw new Error(`possibly corrupt. Read ${readBytes} for StructProperty Content of ${struct.subtype}, but ${size} were indicated.`);\n }\n }\n\n return struct;\n }\n\n export const ParseValue = (reader: ContextReader, subtype: string, size: number): GENERIC_STRUCT_PROPERTY_VALUE => {\n\n let value: GENERIC_STRUCT_PROPERTY_VALUE;\n\n switch (subtype) {\n case 'Color':\n value = FColor.read(reader);\n break;\n\n case 'IntPoint':\n value = reader.readInt64().toString();\n break;\n\n case 'LinearColor':\n value = FLinearColor.read(reader);\n break;\n\n case 'Vector2D':\n value = (reader.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec2.Parse(reader) : vec2.ParseF(reader);\n break;\n\n case 'Vector':\n case 'Rotator':\n value = (reader.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec3.Parse(reader) : vec3.ParseF(reader);\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = (reader.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) ? vec4.Parse(reader) : vec4.ParseF(reader);\n break;\n\n case 'Box':\n value = ((reader.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) ? {\n min: vec3.Parse(reader),\n max: vec3.Parse(reader),\n isValid: reader.readByte() >= 1\n } : {\n min: vec3.ParseF(reader),\n max: vec3.ParseF(reader),\n isValid: reader.readByte() >= 1\n }) satisfies BoxStructPropertyValue;\n break;\n\n case 'RailroadTrackPosition':\n value = {\n root: reader.readString(),\n instanceName: reader.readString(),\n offset: reader.readFloat32(),\n forward: reader.readFloat32()\n };\n break;\n\n case 'TimerHandle':\n value = reader.readString();\n break;\n\n case 'Guid':\n value = GUID.read(reader);\n break;\n\n case 'ClientIdentityInfo':\n value = FClientIdentityInfo.read(reader);\n break;\n\n case 'InventoryItem':\n const before = reader.getBufferPosition();\n\n value = {\n itemReference: ObjectReference.read(reader)\n } satisfies InventoryItemStructPropertyValue;\n\n // inventory items have potentially an item state. but not before explicit version\n if (reader.context.saveVersion >= SaveCustomVersion.RefactoredInventoryItemState) {\n value.itemState = FGDynamicStruct.Parse(reader);\n } else {\n value.legacyItemStateActor = ObjectReference.read(reader);\n }\n\n break;\n\n case 'FluidBox':\n value = {\n value: reader.readFloat32()\n };\n break;\n\n case 'SlateBrush':\n value = reader.readString();\n break;\n\n case 'DateTime':\n value = reader.readInt64().toString();\n break;\n\n // FixsitCamera mod\n case 'FICFrameRange':\n value = FICFrameRange.read(reader);\n break;\n\n // MLB mod\n case 'LBBalancerIndexing':\n value = FLBBalancerIndexing.read(reader);\n break;\n\n // FicsIt-Networks mod\n case 'FINNetworkTrace':\n case 'FIRTrace':\n value = FINNetworkTrace.read(reader);\n break;\n\n case 'FINGPUT1BufferPixel':\n value = FINGPUT1BufferPixel.read(reader);\n break;\n\n default:\n //TODO: use buildversion\n value = DynamicStructPropertyValue.read(reader, subtype);\n break;\n }\n\n return value;\n }\n\n export const CalcOverhead = (property: StructProperty, subtype: string): number => {\n return subtype.length + 5 + 4 + 4 + 4 + 4 + 1;\n }\n\n export const Serialize = (writer: ContextWriter, property: StructProperty): void => {\n writer.writeString(property.subtype);\n GUIDInfo.write(writer, property.guidInfo);\n\n writer.writeInt32(property.unk1 ?? 0);\n writer.writeInt32(property.unk2 ?? 0);\n writer.writeInt32(property.unk3 ?? 0);\n writer.writeInt32(property.unk4 ?? 0);\n\n StructProperty.SerializeValue(writer, property.subtype, property.value);\n }\n\n export const SerializeValue = (writer: ContextWriter, subtype: string, value: GENERIC_STRUCT_PROPERTY_VALUE): void => {\n\n switch (subtype) {\n case 'Color':\n FColor.write(writer, value as FColor);\n break;\n\n case 'IntPoint':\n writer.writeInt64(BigInt(value as string))\n break;\n\n case 'LinearColor':\n FLinearColor.write(writer, value as FLinearColor);\n break;\n\n case 'Vector2D':\n value = value as vec2;\n if (writer.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) {\n vec2.Serialize(writer, value);\n } else {\n vec2.SerializeF(writer, value);\n }\n break;\n\n case 'Vector':\n case 'Rotator':\n value = value as vec3;\n if (writer.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) {\n vec3.Serialize(writer, value as vec3);\n } else {\n vec3.SerializeF(writer, value as vec3);\n }\n break;\n\n case 'Quat':\n case 'Vector4':\n case 'Vector4D':\n value = value as vec4;\n if (writer.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) {\n vec4.Serialize(writer, value as vec4);\n } else {\n vec4.SerializeF(writer, value as vec4);\n }\n break;\n\n case 'Box':\n value = value as BoxStructPropertyValue;\n if (writer.context.saveVersion >= SaveCustomVersion.SwitchTo64BitSaveArchive) {\n vec3.Serialize(writer, value.min);\n vec3.Serialize(writer, value.max);\n } else {\n vec3.SerializeF(writer, value.min);\n vec3.SerializeF(writer, value.max);\n }\n writer.writeByte(value.isValid ? 1 : 0);\n break;\n\n case 'RailroadTrackPosition':\n value = value as RailroadTrackPositionStructPropertyValue;\n writer.writeString(value.root);\n writer.writeString(value.instanceName);\n writer.writeFloat32(value.offset);\n writer.writeFloat32(value.forward);\n break;\n\n case 'TimerHandle':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'Guid':\n GUID.write(writer, value as GUID);\n break;\n\n case 'ClientIdentityInfo':\n FClientIdentityInfo.write(writer, value as FClientIdentityInfo);\n break;\n\n case 'InventoryItem':\n value = value as InventoryItemStructPropertyValue;\n ObjectReference.write(writer, value.itemReference);\n\n if (writer.context.saveVersion >= SaveCustomVersion.RefactoredInventoryItemState) {\n FGDynamicStruct.Serialize(writer, value.itemState!);\n } else {\n ObjectReference.write(writer, value.legacyItemStateActor!);\n }\n break;\n\n case 'FluidBox':\n value = value as BasicStructPropertyValue;\n writer.writeFloat32(value.value);\n break;\n\n case 'SlateBrush':\n value = value as string;\n writer.writeString(value);\n break;\n\n case 'DateTime':\n value = value as string;\n writer.writeInt64(BigInt(value));\n break;\n\n // MODS\n case 'FICFrameRange':\n value = value as FICFrameRange;\n FICFrameRange.write(writer, value);\n break;\n\n // MLB mod\n case 'LBBalancerIndexing':\n FLBBalancerIndexing.write(writer, value as FLBBalancerIndexing);\n break;\n\n // FicsItNetworks mod\n case 'FINNetworkTrace':\n case 'FIRTrace':\n value = value as FINNetworkTrace;\n FINNetworkTrace.write(writer, value);\n break;\n\n case 'FINGPUT1BufferPixel':\n value = value as FINGPUT1BufferPixel;\n FINGPUT1BufferPixel.write(writer, value);\n break;\n\n default:\n //TODO: use buildversion\n value = value as DynamicStructPropertyValue;\n DynamicStructPropertyValue.write(writer, value);\n break;\n }\n }\n}\n\n\n"]}
@@ -6,6 +6,7 @@ export type FGDynamicStruct = {
6
6
  hasValidStruct: boolean;
7
7
  structReference?: ObjectReference;
8
8
  properties?: PropertiesMap;
9
+ rawBytes?: number[];
9
10
  };
10
11
  export declare namespace FGDynamicStruct {
11
12
  const Parse: (reader: ContextReader) => FGDynamicStruct;
@@ -1 +1 @@
1
- {"version":3,"file":"FGDynamicStruct.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/FGDynamicStruct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,MAAM,eAAe,GAAG;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAA;AAED,yBAAiB,eAAe,CAAC;IACtB,MAAM,KAAK,WAAY,aAAa,KAAG,eAgB7C,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,UAAU,eAAe,KAAG,IAS1E,CAAA;CACJ"}
1
+ {"version":3,"file":"FGDynamicStruct.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/FGDynamicStruct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOpD,MAAM,MAAM,eAAe,GAAG;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,yBAAiB,eAAe,CAAC;IACtB,MAAM,KAAK,WAAY,aAAa,KAAG,eAmB7C,CAAA;IAEM,MAAM,SAAS,WAAY,aAAa,UAAU,eAAe,KAAG,IAc1E,CAAA;CACJ"}
@@ -2,23 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FGDynamicStruct = void 0;
4
4
  const PropertiesList_1 = require("../property/PropertiesList");
5
+ const FINItemStateFileSystem_1 = require("./mods/FicsItNetworks/FINItemStateFileSystem");
5
6
  const ObjectReference_1 = require("./ObjectReference");
6
7
  var FGDynamicStruct;
7
8
  (function (FGDynamicStruct) {
8
9
  FGDynamicStruct.Parse = (reader) => {
9
- const hasValidStruct = reader.readInt32() >= 1;
10
- let structReference;
11
- let properties;
12
- if (hasValidStruct) {
13
- structReference = ObjectReference_1.ObjectReference.read(reader);
14
- const binarySize = reader.readInt32();
15
- properties = PropertiesList_1.PropertiesList.ParseList(reader);
16
- }
17
- return {
18
- hasValidStruct,
19
- structReference,
20
- properties
10
+ const struct = {
11
+ hasValidStruct: reader.readInt32() >= 1
21
12
  };
13
+ if (struct.hasValidStruct) {
14
+ struct.structReference = ObjectReference_1.ObjectReference.read(reader);
15
+ if (reader.context.mods.FicsItNetworks !== undefined && FINItemStateFileSystem_1.FINItemStateFileSystem.IsFINItemStateFileSystem(struct)) {
16
+ struct.rawBytes = FINItemStateFileSystem_1.FINItemStateFileSystem.read(reader);
17
+ }
18
+ else {
19
+ const binarySize = reader.readInt32();
20
+ struct.properties = PropertiesList_1.PropertiesList.ParseList(reader);
21
+ }
22
+ }
23
+ return struct;
22
24
  };
23
25
  FGDynamicStruct.Serialize = (writer, struct) => {
24
26
  writer.writeInt32(struct.hasValidStruct ? 1 : 0);
@@ -26,7 +28,12 @@ var FGDynamicStruct;
26
28
  ObjectReference_1.ObjectReference.write(writer, struct.structReference);
27
29
  const before = writer.getBufferPosition();
28
30
  writer.writeInt32Zero();
29
- PropertiesList_1.PropertiesList.SerializeList(writer, struct.properties);
31
+ if (FINItemStateFileSystem_1.FINItemStateFileSystem.IsFINItemStateFileSystem(struct)) {
32
+ FINItemStateFileSystem_1.FINItemStateFileSystem.write(writer, struct.rawBytes);
33
+ }
34
+ else {
35
+ PropertiesList_1.PropertiesList.SerializeList(writer, struct.properties);
36
+ }
30
37
  writer.writeBinarySizeFromPosition(before, before + 4);
31
38
  }
32
39
  };
@@ -1 +1 @@
1
- {"version":3,"file":"FGDynamicStruct.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/FGDynamicStruct.ts"],"names":[],"mappings":";;;AAGA,+DAA4D;AAC5D,uDAAoD;AASpD,IAAiB,eAAe,CA6B/B;AA7BD,WAAiB,eAAe;IACf,qBAAK,GAAG,CAAC,MAAqB,EAAmB,EAAE;QAC5D,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC/C,IAAI,eAAe,CAAC;QACpB,IAAI,UAAU,CAAC;QAEf,IAAI,cAAc,EAAE,CAAC;YACjB,eAAe,GAAG,iCAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;YACtC,UAAU,GAAG,+BAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClD,CAAC;QAED,OAAO;YACH,cAAc;YACd,eAAe;YACf,UAAU;SACa,CAAC;IAChC,CAAC,CAAA;IAEY,yBAAS,GAAG,CAAC,MAAqB,EAAE,MAAuB,EAAQ,EAAE;QAC9E,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,iCAAe,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAgB,CAAC,CAAC;YACvD,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC1C,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,+BAAc,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,UAAW,CAAC,CAAC;YACzD,MAAM,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EA7BgB,eAAe,+BAAf,eAAe,QA6B/B","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { PropertiesMap } from '../property/generic/AbstractBaseProperty';\nimport { PropertiesList } from '../property/PropertiesList';\nimport { ObjectReference } from './ObjectReference';\n\n\nexport type FGDynamicStruct = {\n hasValidStruct: boolean;\n structReference?: ObjectReference;\n properties?: PropertiesMap;\n}\n\nexport namespace FGDynamicStruct {\n export const Parse = (reader: ContextReader): FGDynamicStruct => {\n const hasValidStruct = reader.readInt32() >= 1;\n let structReference;\n let properties;\n\n if (hasValidStruct) {\n structReference = ObjectReference.read(reader);\n const binarySize = reader.readInt32();\n properties = PropertiesList.ParseList(reader);\n }\n\n return {\n hasValidStruct,\n structReference,\n properties\n } satisfies FGDynamicStruct;\n }\n\n export const Serialize = (writer: ContextWriter, struct: FGDynamicStruct): void => {\n writer.writeInt32(struct.hasValidStruct ? 1 : 0);\n if (struct.hasValidStruct) {\n ObjectReference.write(writer, struct.structReference!);\n const before = writer.getBufferPosition();\n writer.writeInt32Zero();\n PropertiesList.SerializeList(writer, struct.properties!);\n writer.writeBinarySizeFromPosition(before, before + 4);\n }\n }\n}"]}
1
+ {"version":3,"file":"FGDynamicStruct.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/FGDynamicStruct.ts"],"names":[],"mappings":";;;AAGA,+DAA4D;AAC5D,yFAAsF;AACtF,uDAAoD;AAcpD,IAAiB,eAAe,CAqC/B;AArCD,WAAiB,eAAe;IACf,qBAAK,GAAG,CAAC,MAAqB,EAAmB,EAAE;QAE5D,MAAM,MAAM,GAAoB;YAC5B,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC;SAC1C,CAAC;QAEF,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,MAAM,CAAC,eAAe,GAAG,iCAAe,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAEtD,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,KAAK,SAAS,IAAI,+CAAsB,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9G,MAAM,CAAC,QAAQ,GAAG,+CAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC1D,CAAC;iBAAM,CAAC;gBACJ,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACtC,MAAM,CAAC,UAAU,GAAG,+BAAc,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzD,CAAC;QAEL,CAAC;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAA;IAEY,yBAAS,GAAG,CAAC,MAAqB,EAAE,MAAuB,EAAQ,EAAE;QAC9E,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,iCAAe,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,eAAgB,CAAC,CAAC;YAEvD,MAAM,MAAM,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC1C,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,IAAI,+CAAsB,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1D,+CAAsB,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,QAAS,CAAC,CAAC;YAC3D,CAAC;iBAAM,CAAC;gBACJ,+BAAc,CAAC,aAAa,CAAC,MAAM,EAAE,MAAM,CAAC,UAAW,CAAC,CAAC;YAC7D,CAAC;YACD,MAAM,CAAC,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;QAC3D,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EArCgB,eAAe,+BAAf,eAAe,QAqC/B","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { PropertiesMap } from '../property/generic/AbstractBaseProperty';\nimport { PropertiesList } from '../property/PropertiesList';\nimport { FINItemStateFileSystem } from './mods/FicsItNetworks/FINItemStateFileSystem';\nimport { ObjectReference } from './ObjectReference';\n\n\n/**\n * generic Dynamic struct. if @param hasValidStruct is true, it also has a @param structReference and @param properties. Else not.\n * @param rawBytes is only filled for the FIN mod so far.\n */\nexport type FGDynamicStruct = {\n hasValidStruct: boolean;\n structReference?: ObjectReference;\n properties?: PropertiesMap;\n rawBytes?: number[];\n};\n\nexport namespace FGDynamicStruct {\n export const Parse = (reader: ContextReader): FGDynamicStruct => {\n\n const struct: FGDynamicStruct = {\n hasValidStruct: reader.readInt32() >= 1\n };\n\n if (struct.hasValidStruct) {\n struct.structReference = ObjectReference.read(reader);\n\n if (reader.context.mods.FicsItNetworks !== undefined && FINItemStateFileSystem.IsFINItemStateFileSystem(struct)) {\n struct.rawBytes = FINItemStateFileSystem.read(reader);\n } else {\n const binarySize = reader.readInt32();\n struct.properties = PropertiesList.ParseList(reader);\n }\n\n }\n\n return struct;\n }\n\n export const Serialize = (writer: ContextWriter, struct: FGDynamicStruct): void => {\n writer.writeInt32(struct.hasValidStruct ? 1 : 0);\n if (struct.hasValidStruct) {\n ObjectReference.write(writer, struct.structReference!);\n\n const before = writer.getBufferPosition();\n writer.writeInt32Zero();\n if (FINItemStateFileSystem.IsFINItemStateFileSystem(struct)) {\n FINItemStateFileSystem.write(writer, struct.rawBytes!);\n } else {\n PropertiesList.SerializeList(writer, struct.properties!);\n }\n writer.writeBinarySizeFromPosition(before, before + 4);\n }\n }\n}"]}
@@ -1,6 +1,6 @@
1
1
  import { ContextReader } from '../../../context/context-reader';
2
2
  import { ContextWriter } from '../../../context/context-writer';
3
- import { GUID } from './GUID';
3
+ import { GUID } from './binary/GUID';
4
4
  export type GUIDInfo = undefined | GUID;
5
5
  export declare namespace GUIDInfo {
6
6
  const read: (reader: ContextReader) => GUIDInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"GUIDInfo.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/GUIDInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAM9B,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;AAExC,yBAAiB,QAAQ,CAAC;IACf,MAAM,IAAI,WAAY,aAAa,KAAG,QAO5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,QAAQ,QAAQ,KAAG,IAQ7D,CAAA;CACJ"}
1
+ {"version":3,"file":"GUIDInfo.d.ts","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/GUIDInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAMrC,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;AAExC,yBAAiB,QAAQ,CAAC;IACf,MAAM,IAAI,WAAY,aAAa,KAAG,QAO5C,CAAA;IAEM,MAAM,KAAK,WAAY,aAAa,QAAQ,QAAQ,KAAG,IAQ7D,CAAA;CACJ"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GUIDInfo = void 0;
4
- const GUID_1 = require("./GUID");
4
+ const GUID_1 = require("./binary/GUID");
5
5
  var GUIDInfo;
6
6
  (function (GUIDInfo) {
7
7
  GUIDInfo.read = (reader) => {
@@ -1 +1 @@
1
- {"version":3,"file":"GUIDInfo.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/GUIDInfo.ts"],"names":[],"mappings":";;;AAEA,iCAA8B;AAQ9B,IAAiB,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACR,aAAI,GAAG,CAAC,MAAqB,EAAY,EAAE;QAEpD,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,WAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACJ,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC,CAAA;IAEY,cAAK,GAAG,CAAC,MAAqB,EAAE,IAAc,EAAQ,EAAE;QACjE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACpB,OAAO;QACX,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACpB,WAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EAnBgB,QAAQ,wBAAR,QAAQ,QAmBxB;AAAA,CAAC","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { GUID } from './GUID';\n\n\n/**\n * contains a flag whether the Guid is valid, and the Guid itself if valid.\n */\nexport type GUIDInfo = undefined | GUID;\n\nexport namespace GUIDInfo {\n export const read = (reader: ContextReader): GUIDInfo => {\n // means whether it has guid.\n if (reader.readByte() === 1) {\n return GUID.read(reader);\n } else {\n return undefined;\n }\n }\n\n export const write = (writer: ContextWriter, guid: GUIDInfo): void => {\n if (guid === undefined) {\n writer.writeByte(0);\n return;\n } else {\n writer.writeByte(1);\n GUID.write(writer, guid);\n }\n }\n};"]}
1
+ {"version":3,"file":"GUIDInfo.js","sourceRoot":"","sources":["../../../../../src/parser/satisfactory/types/structs/GUIDInfo.ts"],"names":[],"mappings":";;;AAEA,wCAAqC;AAQrC,IAAiB,QAAQ,CAmBxB;AAnBD,WAAiB,QAAQ;IACR,aAAI,GAAG,CAAC,MAAqB,EAAY,EAAE;QAEpD,IAAI,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,WAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;aAAM,CAAC;YACJ,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC,CAAA;IAEY,cAAK,GAAG,CAAC,MAAqB,EAAE,IAAc,EAAQ,EAAE;QACjE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACrB,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACpB,OAAO;QACX,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YACpB,WAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;IACL,CAAC,CAAA;AACL,CAAC,EAnBgB,QAAQ,wBAAR,QAAQ,QAmBxB;AAAA,CAAC","sourcesContent":["import { ContextReader } from '../../../context/context-reader';\nimport { ContextWriter } from '../../../context/context-writer';\nimport { GUID } from './binary/GUID';\n\n\n/**\n * contains a flag whether the Guid is valid, and the Guid itself if valid.\n */\nexport type GUIDInfo = undefined | GUID;\n\nexport namespace GUIDInfo {\n export const read = (reader: ContextReader): GUIDInfo => {\n // means whether it has guid.\n if (reader.readByte() === 1) {\n return GUID.read(reader);\n } else {\n return undefined;\n }\n }\n\n export const write = (writer: ContextWriter, guid: GUIDInfo): void => {\n if (guid === undefined) {\n writer.writeByte(0);\n return;\n } else {\n writer.writeByte(1);\n GUID.write(writer, guid);\n }\n }\n};"]}