feat(bunsik): 손님 외형 다양화 — 로블록스 공식 머리·모자·옷·얼굴 조합(사람 75%), 공식 동물 번들 11종(펭귄·곰·북극곰·고양이·강아지·판다·여우·쥐 등, 25%)
- 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>
This commit is contained in:
@@ -1,20 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
# 화면 UI 미리보기: 빌드 → 저장 버전 업로드 → 로블록스 서버에서 UI 덤프 → 그림(PNG)으로.
|
||||
# tools/preview.sh 출력폴더
|
||||
# 화면 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}')
|
||||
python3 tools/cloud.py run tests/cloud/dump_gui.luau --version "$ver" >.cache/dump_raw.txt || { tail -20 .cache/dump_raw.txt; exit 1; }
|
||||
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 json
|
||||
raw = open(".cache/dump_raw.txt").read()
|
||||
line = [l for l in raw.splitlines() if l.startswith("output: ")][-1]
|
||||
out = json.loads(line[len("output: "):])
|
||||
data = out["results"][0]
|
||||
open(".cache/gui_dump.json", "w").write(data)
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user