Self test opens the bestiary too; bestiary screenshot with the portraits
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
918458df50
commit
6886b2e1a4
4 files changed
+10
-4
No files matched your search
@@ -5,7 +5,8 @@
|
||||
2. `cargo build --profile desktop`
|
||||
3. `python3 tools/shots_desktop.py [--style hd|pixel] [names...]` runs the game once per scene with
|
||||
DC_SHOT (see the self test in src/main.rs), makes its window float at 1280x800 (Hyprland), and
|
||||
writes docs/screenshots/<name>.png scaled to 1280x800. `title` is the title screen.
|
||||
writes docs/screenshots/<name>.png scaled to 1280x800. `title` is the title screen,
|
||||
`bestiary` the bestiary.
|
||||
Needs Pillow (for the scaling) and Hyprland's hyprctl.
|
||||
"""
|
||||
import json, os, subprocess, sys, time
|
||||
@@ -29,7 +30,7 @@ def window_to_1280x800():
|
||||
|
||||
def shot(name, style, after=8):
|
||||
out = f"/tmp/shot-{name}.png"
|
||||
env = dict(os.environ, DC_SHOT="title" if name == "title" else f"/tmp/scenes/{name}.json",
|
||||
env = dict(os.environ, DC_SHOT=name if name in ("title", "bestiary") else f"/tmp/scenes/{name}.json",
|
||||
DC_SHOT_STYLE=style, DC_SHOT_AFTER=str(after), DC_SHOT_OUT=out)
|
||||
p = subprocess.Popen([GAME], env=env, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
window_to_1280x800()
|
||||
|
||||
Reference in new issue
Block a user