brs-js 3.2.4 → 3.4.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.
package/README.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Read and write Brickadia save files (.brz, .brdb, .brs)
4
4
 
5
5
  **Warning:** **Unreal Engine uses numbers potentially larger than Javascript can handle.**
6
+ 64-bit integer fields outside the safe-integer range (±2⁵³−1) decode as JSON-safe
7
+ `{ $bigint: '<decimal>' }` wrappers instead of plain numbers; the write path accepts the
8
+ wrapper, a raw `bigint`, or a number interchangeably, so decoded data round-trips losslessly
9
+ (including through `JSON.stringify`/`parse`).
6
10
 
7
11
  ## Install
8
12
 
@@ -155,8 +159,16 @@ const output = w.addBrick(
155
159
  grid
156
160
  );
157
161
  w.addWire(
158
- { brick: input, component_type: CHIP_IN.NAME, port: CHIP_IN.PORTS.RER_Output },
159
- { brick: output, component_type: CHIP_OUT.NAME, port: CHIP_OUT.PORTS.RER_Input }
162
+ {
163
+ brick: input,
164
+ component_type: CHIP_IN.NAME,
165
+ port: CHIP_IN.PORTS.RER_Output,
166
+ },
167
+ {
168
+ brick: output,
169
+ component_type: CHIP_OUT.NAME,
170
+ port: CHIP_OUT.PORTS.RER_Input,
171
+ }
160
172
  );
161
173
 
162
174
  w.makePrefab({ isMicrochipPrefab: true });