Skip to content

Commit

Permalink
APProcedurePatch: fix RLE/COPY incorrect sizing (ArchipelagoMW#3006)
Browse files Browse the repository at this point in the history
* change class variables to instance variables

* Update worlds/Files.py

Co-authored-by: black-sliver <[email protected]>

* Update worlds/Files.py

Co-authored-by: black-sliver <[email protected]>

* move required_extensions to tuple

* fix missing tuple ellipsis

* fix classvar mixup

* rename tokens to _tokens. use hasattr

* type hint cleanup

* Update Files.py

* check using isinstance instead

* Update Files.py

---------

Co-authored-by: black-sliver <[email protected]>
  • Loading branch information
2 people authored and EmilyV99 committed Apr 15, 2024
1 parent 6761254 commit 94b57fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion worlds/Files.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def get_token_binary(self) -> bytes:
data.append(args)
elif token_type in [APTokenTypes.COPY, APTokenTypes.RLE]:
assert isinstance(args, tuple), f"Arguments to COPY/RLE must be of type tuple, not {type(args)}"
data.extend(int.to_bytes(4, 4, "little"))
data.extend(int.to_bytes(8, 4, "little"))
data.extend(args[0].to_bytes(4, "little"))
data.extend(args[1].to_bytes(4, "little"))
elif token_type == APTokenTypes.WRITE:
Expand Down

0 comments on commit 94b57fe

Please sign in to comment.