- NpcLooks: 확인된 아이템 표(assets/npc_assets.md), 서버 시작 때 외형 템플릿을 만들어 두고 복제 - 화면 UI 통합 테스트를 새 화면에 맞게 다시 씀(서버 로직은 tests/cloud/server.luau) - GUI 미리보기를 장면 6개씩 나눠 뽑기(5분 제한·4MB 출력 제한) - 서버 통합 테스트 1416개, 화면 통합 테스트 379개 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.6 KiB
Bash
Executable File
44 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# 화면 UI 미리보기: 빌드 → 저장 버전 업로드 → 로블록스 서버에서 UI 덤프(장면 6개씩 나눠서) → 그림(PNG)으로.
|
|
# tools/preview.sh 출력폴더 [장면이름...]
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
export PATH="$HOME/.rokit/bin:$PATH"
|
|
out=${1:-.cache/preview}
|
|
shift || true
|
|
mkdir -p .cache "$out"
|
|
rojo build default.project.json -o build/BunsikTycoon.rbxl >/dev/null
|
|
ver=$(python3 tools/cloud.py publish build/BunsikTycoon.rbxl | awk '{print $2}')
|
|
if [ $# -gt 0 ]; then
|
|
names="$*"
|
|
else
|
|
names=$(grep -o 'shot(\s*"[a-z_0-9]*"\|^\s*"[a-z_0-9]*",$' tests/cloud/dump_gui.luau | grep -o '"[a-z_0-9]*"' | tr -d '"' | tr '\n' ' ')
|
|
fi
|
|
rm -f .cache/gui_part_*.json
|
|
i=0
|
|
batch=()
|
|
run_batch() {
|
|
local list
|
|
list=$(printf '"%s",' "${batch[@]}")
|
|
sed "s/^local ONLY: { string }? = nil/local ONLY: { string }? = { ${list%,} }/" tests/cloud/dump_gui.luau >.cache/dump_gui_batch.luau
|
|
python3 tools/cloud.py run .cache/dump_gui_batch.luau --version "$ver" --out ".cache/gui_part_$i.json" >.cache/dump_raw.txt ||
|
|
{ tail -20 .cache/dump_raw.txt; exit 1; }
|
|
i=$((i + 1))
|
|
batch=()
|
|
}
|
|
for n in $names; do
|
|
batch+=("$n")
|
|
if [ ${#batch[@]} -ge 6 ]; then run_batch; fi
|
|
done
|
|
if [ ${#batch[@]} -gt 0 ]; then run_batch; fi
|
|
python3 - <<'PY'
|
|
import glob, json
|
|
shots, images = [], {}
|
|
for f in sorted(glob.glob(".cache/gui_part_*.json")):
|
|
d = json.load(open(f))
|
|
shots += d["shots"]
|
|
images.update(d["images"])
|
|
json.dump({"shots": shots, "images": images}, open(".cache/gui_dump.json", "w"))
|
|
PY
|
|
python3 tools/gui_render.py .cache/gui_dump.json "$out"
|