- Shop.luau: 손님·주문·조리·서빙·구매 순수 로직(lune 단위 테스트, 시뮬레이터 공용) - 서버: World(부지 6칸), PlotBuilder(파트 모형), PlotController, Npc(트윈 이동), Data(ProfileStore), Receipts(결제 1회 = 지급 1회), Game - 클라이언트: Hud(돈·다음 업그레이드·목록·결제·언어·튜토리얼), 내 조리대 전용 버튼, 튜토리얼 화살표, 주인 전용 테스트 버튼 - 2단계 업그레이드 10개 추가, 파이썬 시뮬레이터를 실제 로직 기반 tools/sim.luau로 교체 - tools/cloud.py: 업로드, 원격 Luau 실행, 게임패스·개발자 상품 생성, 서버 인원 설정 - tests/cloud/integration.luau: 로블록스 서버 통합 테스트 514개 통과 - check.sh에 luau-lsp 타입 검사 추가, ProfileStore 고정 버전 포함 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
89 lines
2.9 KiB
Python
89 lines
2.9 KiB
Python
#!/usr/bin/env python3
|
|
"""게임패스·개발자 상품 아이콘(512x512 PNG)을 그립니다. 외부 그림을 쓰지 않아 저작권 걱정이 없습니다.
|
|
|
|
python3 tools/art.py # art/*.png 생성
|
|
"""
|
|
import math
|
|
import os
|
|
|
|
from PIL import Image, ImageDraw, ImageFilter, ImageFont
|
|
|
|
OUT = os.path.join(os.path.dirname(__file__), "..", "art")
|
|
BOLD = "/usr/share/fonts/opentype/noto/NotoSansCJK-Bold.ttc"
|
|
S = 512
|
|
|
|
|
|
def font(size):
|
|
return ImageFont.truetype(BOLD, size, index=1) # KR
|
|
|
|
|
|
def background(c1, c2):
|
|
img = Image.new("RGBA", (S, S))
|
|
d = ImageDraw.Draw(img)
|
|
for y in range(S):
|
|
t = y / S
|
|
col = tuple(int(c1[i] * (1 - t) + c2[i] * t) for i in range(3)) + (255,)
|
|
d.line([(0, y), (S, y)], fill=col)
|
|
# 햇살 무늬
|
|
rays = Image.new("RGBA", (S, S), (0, 0, 0, 0))
|
|
rd = ImageDraw.Draw(rays)
|
|
for i in range(16):
|
|
a0 = i * math.pi / 8
|
|
a1 = a0 + math.pi / 16
|
|
rd.polygon([(S / 2, S / 2), (S / 2 + 800 * math.cos(a0), S / 2 + 800 * math.sin(a0)),
|
|
(S / 2 + 800 * math.cos(a1), S / 2 + 800 * math.sin(a1))], fill=(255, 255, 255, 40))
|
|
img.alpha_composite(rays)
|
|
mask = Image.new("L", (S, S), 0)
|
|
ImageDraw.Draw(mask).rounded_rectangle([0, 0, S - 1, S - 1], radius=90, fill=255)
|
|
out = Image.new("RGBA", (S, S), (0, 0, 0, 0))
|
|
out.paste(img, (0, 0), mask)
|
|
return out
|
|
|
|
|
|
def coin(d, cx, cy, r):
|
|
d.ellipse([cx - r, cy - r, cx + r, cy + r], fill=(255, 200, 40), outline=(190, 120, 10), width=max(4, r // 8))
|
|
d.ellipse([cx - r * 0.65, cy - r * 0.65, cx + r * 0.65, cy + r * 0.65], outline=(230, 160, 20), width=max(3, r // 12))
|
|
f = font(int(r * 1.0))
|
|
d.text((cx, cy - r * 0.05), "₩", font=f, fill=(190, 120, 10), anchor="mm")
|
|
|
|
|
|
def outlined(d, xy, text, f, fill, stroke, width):
|
|
d.text(xy, text, font=f, fill=fill, anchor="mm", stroke_width=width, stroke_fill=stroke)
|
|
|
|
|
|
def shadow(img):
|
|
sh = img.copy().filter(ImageFilter.GaussianBlur(6))
|
|
return sh
|
|
|
|
|
|
def double_money():
|
|
img = background((170, 90, 230), (90, 40, 170))
|
|
d = ImageDraw.Draw(img)
|
|
for (x, y, r) in [(140, 330, 80), (370, 350, 70), (255, 395, 90)]:
|
|
coin(d, x, y, r)
|
|
outlined(d, (256, 190), "x2", font(250), (255, 230, 60), (90, 30, 120), 14)
|
|
return img
|
|
|
|
|
|
def money_boost():
|
|
img = background((255, 190, 60), (240, 110, 30))
|
|
d = ImageDraw.Draw(img)
|
|
for (x, y, r) in [(130, 380, 70), (385, 380, 70), (256, 410, 80)]:
|
|
coin(d, x, y, r)
|
|
bolt = [(290, 40), (150, 270), (245, 270), (205, 430), (360, 200), (265, 200), (320, 40)]
|
|
d.polygon(bolt, fill=(255, 250, 120), outline=(160, 70, 0))
|
|
d.line(bolt + [bolt[0]], fill=(160, 70, 0), width=12, joint="curve")
|
|
return img
|
|
|
|
|
|
def main():
|
|
os.makedirs(OUT, exist_ok=True)
|
|
for name, fn in [("double_money", double_money), ("money_boost", money_boost)]:
|
|
path = os.path.join(OUT, name + ".png")
|
|
fn().save(path)
|
|
print(path)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|