diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-06-16 15:20:00 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-06-16 15:20:00 -0400 |
| commit | 71ef7208ac4911ce4d61a58fc9d02584f200efba (patch) | |
| tree | f3c08c082ec2ac81a430a58e3749071bc267cdd5 /tools | |
| parent | cc561b1b099109839b9e828d2435130d41acba7b (diff) | |
Add comment to res headers about them being automatically generated
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/converters/res_arc.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/converters/res_arc.py b/tools/converters/res_arc.py index eb0a28a1..5ef25422 100755 --- a/tools/converters/res_arc.py +++ b/tools/converters/res_arc.py @@ -227,6 +227,12 @@ def convert_binary_to_resource_enum(src_path: Path, dest_path: Path) -> None: out_lines.append(f"#ifndef RES_{arc_name}_H") out_lines.append(f"#define RES_{arc_name}_H\n") + out_lines.append(f"//") + out_lines.append(f"// Generated by res_arc.py from archive: {src_path.name.removesuffix(".decompressed")}") + out_lines.append(f"// Do not manually modify this file or your changes will be overwritten.") + out_lines.append(f"//") + out_lines.append(f"") + out_ids:list[str] = [] out_idxs:list[str] = [] @@ -274,9 +280,9 @@ def convert_binary_to_resource_enum(src_path: Path, dest_path: Path) -> None: for joint_enum in joint_enums.enums: out_lines.append(make_enum(joint_enum) + "\n") - out_lines.append(f"#endif /* !RES_{arc_name}_H */") + out_lines.append(f"#endif /* RES_{arc_name}_H */") - out = "\n".join(out_lines) + out = "\n".join(out_lines) + "\n" ensure_dir(dest_path.parent) with dest_path.open("w") as f: f.write(out) |
