Skip to content

Commit 9f0609f

Browse files
committed
2026-04-27T0811Z
1 parent f76ebff commit 9f0609f

7 files changed

Lines changed: 32 additions & 16 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"studio",
8383
"--config",
8484
"${file}",
85+
"--clear_temp_cache",
8586
],
8687
"console": "integratedTerminal",
8788
"justMyCode": true

Source/assets/serialisers/csg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def replace_header(data: bytes, fr_header: bytes, to_header: bytes) -> bytes:
1313

1414
new_version_header = bytes(
1515
v ^ fr ^ to
16-
for v, fr, to in zip[tuple[int, int, int]](
16+
for v, fr, to in zip(
1717
data[:data_start],
1818
fr_header,
1919
to_header,

Source/assets/serialisers/rbxl/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
fonts,
77
script_disabled,
88
skip_bytecode,
9+
strip_unsupported,
910
roblox_links,
1011
image_content,
1112
convert_csg,
@@ -21,6 +22,7 @@ class method(enum.Enum):
2122
script_disabled = enum.member(partial(script_disabled.replace))
2223
roblox_links = enum.member(partial(roblox_links.replace))
2324
skip_bytecode = enum.member(partial(skip_bytecode.replace))
25+
strip_unsupported = enum.member(partial(strip_unsupported.replace))
2426
convert_csg = enum.member(partial(convert_csg.replace))
2527
image_content = enum.member(partial(image_content.replace))
2628
physics_props = enum.member(partial(physics_props.replace))

Source/assets/serialisers/rbxl/convert_csg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ def replace(parser: _logic.rbxl_parser, chunk_data: _logic.chunk_data_type) -> _
1919
if not chunk_data.prop_name.startswith(b'MeshData'):
2020
return
2121

22-
if chunk_data.prop_type == 0x1c:
22+
if chunk_data.prop_type == 0x1C:
23+
# Skips `SharedString` types because they don't fit the format for `split_prop_strings`.
2324
return
2425

2526
splits = _logic.split_prop_strings(chunk_data.prop_values)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from . import _logic
2+
3+
REMOVAL_MAP = {
4+
b'Capabilities': 0x21,
5+
}
6+
7+
8+
def replace(parser: _logic.rbxl_parser, chunk_data: _logic.chunk_data_type) -> _logic.chunk_data_type | None:
9+
'''
10+
This function removes bytecode from any `rbxm` files.
11+
'''
12+
if not isinstance(chunk_data, _logic.chunk_data_type_prop):
13+
return None
14+
15+
if REMOVAL_MAP.get(chunk_data.prop_name) != chunk_data.prop_type:
16+
return None
17+
18+
chunk_data.prop_values = _logic.join_prop_strings(
19+
[b''] * len(chunk_data.prop_values)
20+
)
21+
22+
return chunk_data

Source/pretasks/clear_cache.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,10 @@ def check_host(full_path: str) -> bool:
1515
l = len(base_url_bytes)
1616
with open(full_path, 'rb') as f:
1717

18-
# The start of the URL is at address 0xC. Seeks 0x4 more bytes ahead to skip `http` string.
19-
f.seek(0xC + 0x4)
20-
21-
# Quickly seeks to the hostname, accounting for whether the URL begins with `http://` or `https://`.
22-
match f.read(0x2):
23-
case b's:':
24-
f.seek(2, os.SEEK_CUR)
25-
case b':/':
26-
f.seek(3, os.SEEK_CUR)
27-
case _:
28-
return False
29-
b = f.read(l)
30-
return b == base_url_bytes
18+
# The start of the URL is at address 0xC.
19+
f.seek(0xC)
20+
21+
return f.read(l) == base_url_bytes
3122

3223
# This error rarely happens when being called by `remove_hosts`.
3324
except FileNotFoundError:

Source/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
cryptography~=44.0.1
21
trustme~=1.2.0
32
urllib3~=2.6.0
43
pyzstd~=0.16.2

0 commit comments

Comments
 (0)