-- 로블록스 서버(Open Cloud Luau Execution)에서 돌리는 화면 UI·클라이언트 모듈 통합 테스트(서버 로직은 server.luau). -- python3 tools/cloud.py run tests/cloud/integration.luau --version <저장 버전> -- 이 환경에서는 플레이어가 없고 물리가 돌지 않으며 Script가 자동 실행되지 않으므로, -- 모듈을 직접 불러 가짜 플레이어(Folder)와 가상 시계로 가게를 돌립니다. local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerScriptService = game:GetService("ServerScriptService") local StarterPlayer = game:GetService("StarterPlayer") local Server = ServerScriptService.Server local failures = {} local count = 0 local function check(cond: any, msg: string) count += 1 if not cond then table.insert(failures, msg) print("FAIL " .. msg) end end local function eq(a: any, b: any, msg: string) check(a == b, `{msg} (기대 {tostring(b)}, 실제 {tostring(a)})`) end local function section(name: string) print("== " .. name) end local Economy = require(ReplicatedStorage.Shared.Economy) local Icons = require(ReplicatedStorage.Shared.Icons) local Locale = require(ReplicatedStorage.Shared.Locale) local Recipes = require(ReplicatedStorage.Shared.Recipes) section("맵·부지 글자·손님 버튼(클라이언트 모듈)") local World = require(Server.World) local slots = World.build() local Neighbor = require(Server.Neighbor) local Plots = require(StarterPlayer.StarterPlayerScripts.Client.Plots) local viewer = Instance.new("Folder") viewer:SetAttribute("Lang", "en") viewer:SetAttribute("KickCredits", 0) local nb2 = Neighbor.open(slots[6], 0) eq(Plots.nameText(slots[4].model, "en"), "Empty lot", "빈 자리 이름판") local detach = Plots.attach(slots[6].model, viewer, 999, function() end) local visitPrompt = slots[6].model.Base.VisitPoint:FindFirstChild("VisitPrompt") :: ProximityPrompt check(visitPrompt ~= nil and visitPrompt.Enabled, "이웃 가게 입구에 손님 버튼") eq(visitPrompt.ActionText, "Eat here as a customer", "손님 버튼 글자(영어)") local kickPrompt = slots[6].model.Base.VisitPoint:FindFirstChild("KickPrompt") :: ProximityPrompt check(kickPrompt ~= nil and kickPrompt.Enabled, "이웃 가게 입구에 쫓아내기 버튼") check(kickPrompt.KeyboardKeyCode ~= visitPrompt.KeyboardKeyCode, "두 버튼은 다른 키") local boardLabel = slots[6].model.Base.NameBoard:FindFirstChildOfClass("SurfaceGui"):FindFirstChildOfClass("TextLabel") check(string.find(boardLabel.Text, "Twigim King") ~= nil, `이름판 영어 ({boardLabel.Text})`) viewer:SetAttribute("Lang", "ja") check(string.find(boardLabel.Text, "天ぷら") ~= nil, `언어 바꾸면 이름판도 바뀜 ({boardLabel.Text})`) check(string.find(Plots.menuText(slots[6].model, "ko"), "떡볶이") ~= nil, "메뉴판(부지 속성 Menus)") -- 가게 이름·무지개: 이름판과 지붕·천막 간판(ShopNameLabel)에 보임 slots[6].model:SetAttribute("ShopName", "Yummy Land") check(string.find(boardLabel.Text, "Yummy Land") ~= nil, `가게 이름이 이름판에 ({boardLabel.Text})`) local valance = slots[6].model.Base.Stall.Valance:FindFirstChild("ShopNameLabel", true) :: TextLabel eq(valance and valance.Text, "Yummy Land", "천막 간판에 가게 이름") slots[6].model:SetAttribute("Rainbow", true) task.wait(0.2) check(boardLabel:FindFirstChild("RainbowGradient") ~= nil, "무지개 이름(그러데이션)") slots[6].model:SetAttribute("Rainbow", false) task.wait(0.2) eq(boardLabel:FindFirstChild("RainbowGradient"), nil, "무지개 끄면 사라짐") slots[6].model:SetAttribute("ShieldUntil", workspace:GetServerTimeNow() + 60) task.wait(0.2) check(not kickPrompt.Enabled, "보호 중인 가게엔 쫓아내기 버튼 꺼짐") Neighbor.close(nb2) check(not visitPrompt.Enabled, "닫힌 가게엔 손님 버튼 없음") slots[6].model:SetAttribute("OwnerId", 999) check(not visitPrompt.Enabled and not kickPrompt.Enabled, "내 가게엔 버튼 없음") slots[6].model:SetAttribute("OwnerId", nil) detach() section("마우스 회전 판단") local MouseLook = require(StarterPlayer.StarterPlayerScripts.Client.MouseLook) check(MouseLook.shouldLock(true, true, false, false), "켜짐 + 마우스 = 고정") check(not MouseLook.shouldLock(false, true, false, false), "설정 끄면 안 고정") check(not MouseLook.shouldLock(true, false, false, false), "마우스 없으면(모바일) 안 고정") check(not MouseLook.shouldLock(true, true, true, false), "Ctrl 누르면 커서 풀림") check(not MouseLook.shouldLock(true, true, false, true), "창 열리면 커서 풀림") section("화면 UI(서버에서 생성)") local Hud = require(StarterPlayer.StarterPlayerScripts.Client.Hud) local Theme = require(StarterPlayer.StarterPlayerScripts.Client.Theme) local state = Instance.new("Folder") state:SetAttribute("Lang", "ko") state:SetAttribute("Money", 5) state:SetAttribute("Levels", "") state:SetAttribute("Stage", 1) state:SetAttribute("Seats", 1) state:SetAttribute("Tables", 1) state:SetAttribute("Staff", "") state:SetAttribute("Tut", 3) local sent = {} local holder = Instance.new("Folder") local hud = Hud.build(holder, state, function(kind, arg) table.insert(sent, { kind, arg }) end) local root = hud.gui:FindFirstChild("Root") :: Frame local function label(o: Instance?): string? local t = o and o:FindFirstChild("Label", true) :: TextLabel? return t and t.Text end local moneyText = root:FindFirstChild("Money"):FindFirstChild("Text", true) :: TextLabel eq(moneyText.Text, "5", "돈 표시") check(root:FindFirstChild("Next") == nil, "아래 [사기] 막대 없음") local hintFrame = root:FindFirstChild("Hint") :: Frame check(hintFrame.Visible, "튜토리얼 말풍선 보임") local hintText = hintFrame:FindFirstChild("Text", true) :: TextLabel check( string.find(hintText.Text, "가게 꾸미기") ~= nil, `튜토리얼 3은 가게 꾸미기 안내 ({hintText.Text})` ) check((root:FindFirstChild("Pointer") :: ImageLabel).Visible, "튜토리얼 3: [가게 꾸미기] 가리키는 손") local lay0 = hud.layout() check(hintFrame.Position.Y.Offset > lay0.height / 2, "튜토리얼 말풍선은 화면 아래쪽") local listButton = root:FindFirstChild("ListButton") :: TextButton eq(label(listButton), "상점", "상점 버튼 글자") local decoButton = root:FindFirstChild("Decorate") :: TextButton eq(label(decoButton), "가게 꾸미기", "가게 꾸미기 버튼 글자") check(not (listButton:FindFirstChild("Badge") :: Frame).Visible, "살 것이 없으면 배지 없음") state:SetAttribute("Money", 15) check((listButton:FindFirstChild("Badge") :: Frame).Visible, "살 수 있으면 상점 버튼에 ! 배지") eq( (root:FindFirstChild("Gain") :: TextLabel?) and (root:FindFirstChild("Gain") :: TextLabel).Text, "+10", "늘어난 돈" ) for _, name in { "Promote", "Rush", "Double", "Boost", "Settings" } do check(root:FindFirstChild(name) ~= nil, `버튼 {name}`) end state:SetAttribute("Lang", "en") eq(label(decoButton), "Decorate", "영어 가게 꾸미기 버튼") state:SetAttribute("Lang", "ko") state:SetAttribute("Tut", 0) check( not hintFrame.Visible and not (root:FindFirstChild("Pointer") :: ImageLabel).Visible, "튜토리얼 끝나면 아래 말풍선 없음" ) section("상점 창(탭 3개)") hud.open("shop") local panel = root:FindFirstChild("Panel") :: Frame check(hud.menuOpen() and panel.Visible, "상점 창 열기") local function page(id: string): Frame return panel:FindFirstChild("Page_" .. id, true) :: Frame end for _, id in { "upgrade", "staff", "mine" } do check(page(id) ~= nil, `탭 {id}`) check(panel:FindFirstChild("Tab_" .. id, true) ~= nil, `탭 버튼 {id}`) end check(panel:FindFirstChild("Tab_decor", true) == nil, "상점에는 꾸미기 탭 없음") check(page("upgrade").Visible, "처음엔 업그레이드 탭") for _, id in Economy.TRACK_ORDER do local card = page("upgrade"):FindFirstChild("Track_" .. id, true) check(card ~= nil, `갈래 카드 {id}`) local nm = card and card:FindFirstChild("Name", true) :: TextLabel? check(nm and nm.Text ~= "" and not string.find(nm.Text, "track_"), `갈래 이름 {id} ({nm and nm.Text})`) end local tray = page("upgrade"):FindFirstChild("Track_Tray", true) :: Frame check((tray:FindFirstChild("Lock", true) :: ImageLabel).Visible, "쟁반은 포장마차에서 잠김") hud.open("decor") local decorPanel = root:FindFirstChild("DecorPanel") :: Frame check(decorPanel.Visible and not panel.Visible and hud.menuOpen(), "가게 꾸미기 창(상점과 따로)") local decorPage = decorPanel:FindFirstChild("Page_decor", true) :: Frame check(decorPage ~= nil, "가게 꾸미기 카드 자리") eq(label(decorPage:FindFirstChild("Place", true)), "옮기기", "옮기기 버튼") for _, id in { "Table", "Seat" } do check(decorPage:FindFirstChild("Decor_" .. id, true) ~= nil, `{id} 카드`) end for _, d in Economy.DECOR do check(decorPage:FindFirstChild("Decor_" .. d.id, true) ~= nil, `소품 카드 {d.id}`) end local tableCost = (decorPage:FindFirstChild("Decor_Table", true) :: Frame):FindFirstChild("Buy", true) eq(label(tableCost), Locale.number(Economy.tableCost(1)), "테이블 값(의자 없이)") hud.open("shop", "upgrade") check(not decorPanel.Visible and panel.Visible, "창은 하나만 열림(꾸미기 → 상점)") hud.open("shop", "staff") check((page("staff"):FindFirstChild("Locked", true) :: Frame).Visible, "알바생 기능 전에는 잠김") state:SetAttribute("Levels", "Staff=1") state:SetAttribute("Staff", "Cook=1,Server=0,Promoter=0") state:SetAttribute("Strike", true) check(not (page("staff"):FindFirstChild("Locked", true) :: Frame).Visible, "알바생 기능을 사면 열림") for _, r in Economy.ROLES do check(page("staff"):FindFirstChild("Role_" .. r.id, true) ~= nil, `알바 카드 {r.id}`) end hud.open("shop", "mine") check(page("mine"):FindFirstChild("NameBox", true) ~= nil, "가게 이름 입력칸") for _, d in Economy.DESIGNS do check(page("mine"):FindFirstChild("Design_" .. d.id, true) ~= nil, `디자인 {d.id}`) end hud.open("settings") local settingsPanel = root:FindFirstChild("SettingsPanel") :: Frame check(settingsPanel.Visible and not panel.Visible, "창은 하나만 열림") hud.open(nil) check(not hud.menuOpen(), "창 닫기") section("알림 글자(모든 알림 키, 4개 언어)") local Info = require(StarterPlayer.StarterPlayerScripts.Client.Info) local SAMPLES = { upgraded = { track = "Speed", level = 2 }, newMenu = { menu = "Gimbap" }, expanded = {}, floor2 = {}, seatAdded = {}, tableAdded = {}, decorAdded = { kind = "Teddy" }, noSpace = {}, seatMax = {}, tableMax = {}, tableFull = {}, needStage = {}, placeFail = { why = "blocked" }, hired = { role = "Cook" }, fired = { role = "Server" }, staffLocked = {}, staffMax = {}, strike = {}, strikeOver = {}, renamed = {}, nameRejected = {}, designSet = { design = "Hanok" }, designLocked = {}, promoted = { n = 2 }, promoteNone = {}, promoteFull = {}, promoteWait = { sec = 30 }, adUnavailable = {}, kicked = { n = 3 }, kickedBy = { name = "Mina" }, shielded = {}, kickOwn = {}, rushOn = { min = 10 }, notEnough = { need = "100" }, doubleOwned = {}, } for _, lang in { "ko", "en", "ja", "zh" } do for key, args in SAMPLES do local text = Info.toast(lang, key, args) check(text ~= key and not string.find(text, "{") and text ~= "", `{lang} 알림 {key}: {text}`) end end state:SetAttribute("Lang", "en") hud.notify("upgraded", { track = "Speed", level = 2 }) local toastText = root.Toasts:FindFirstChild("Toast"):FindFirstChild("Text") :: TextLabel check(string.find(toastText.Text, "Customer Speed") ~= nil, `알림에 갈래 이름(내 언어) ({toastText.Text})`) for _ = 1, 5 do hud.notify("seatAdded") end local toastCount = 0 for _, ch in root.Toasts:GetChildren() do if ch:IsA("Frame") then toastCount += 1 end end check(toastCount <= 3, `알림은 3개까지만 쌓임 ({toastCount})`) section("휴대폰·PC 배치") local doubleBtn = root:FindFirstChild("Double") :: TextButton hud.setLayout(Vector2.new(750, 332), true) local lay = hud.layout() local scaleObj = root:FindFirstChildOfClass("UIScale") :: UIScale check( root.Size.X.Offset * scaleObj.Scale - 750 >= -1e-3 and root.Size.X.Offset * scaleObj.Scale - 750 < scaleObj.Scale, "휴대폰: 루트 너비 = 화면" ) check(lay.double.y + lay.double.h < lay.height / 3, "휴대폰: 결제 버튼은 조이스틱 자리 위") check(not (settingsPanel:FindFirstChild("MouseLook") :: TextButton).Visible, "휴대폰: 마우스 회전 줄 숨김") eq(doubleBtn.Size.Y.Offset, lay.double.h, "휴대폰: 2배 수익 버튼 크기") hud.setLayout(Vector2.new(1366, 710), false) check((settingsPanel:FindFirstChild("MouseLook") :: TextButton).Visible, "PC: 마우스 회전 줄 보임") hud.destroy() section("꾸미기 화면(클라이언트 모듈)") local Decorate = require(StarterPlayer.StarterPlayerScripts.Client.Decorate) check(typeof(Decorate.build) == "function", "꾸미기 모듈") local dstate = Instance.new("Folder") dstate:SetAttribute("Lang", "ko") dstate:SetAttribute("Stage", 1) dstate:SetAttribute("Money", 100) local dplot = Instance.new("Model") dplot:SetAttribute("Origin", CFrame.new()) local dholder = Instance.new("Folder") local deco = Decorate.build(dholder, dstate, dplot, function() end) local Layout = require(StarterPlayer.StarterPlayerScripts.Client.Layout) deco.setLayout(Layout.compute(750, 332, true, false)) local droot = deco.gui:FindFirstChild("Root") :: Frame for _, name in { "Exit", "Info", "Rotate", "Cancel", "Place" } do check(droot:FindFirstChild(name) ~= nil, `꾸미기 {name}`) end check(droot:FindFirstChild("Floor") == nil and droot:FindFirstChild("Side1") == nil, "예전 층·쪽 버튼 없음") check(not deco.isOpen() and not deco.holding(), "처음엔 닫힘") deco.destroy() section("요리 창(메뉴 고르기 → 조리 과정 → 완성)") local kstate = Instance.new("Folder") kstate:SetAttribute("Lang", "ko") kstate:SetAttribute("Money", 0) kstate:SetAttribute("Levels", "Menu=2") -- 떡볶이·김밥·순대 해금 kstate:SetAttribute("Tut", 1) kstate:SetAttribute("Orders", "Gimbap=2") local ksent = {} local khud = Hud.build(Instance.new("Folder"), kstate, function(kind, arg) table.insert(ksent, { kind, arg }) end) local kroot = khud.gui:FindFirstChild("Root") :: Frame local kitchen = khud.kitchen local kframe = kroot:FindFirstChild("Kitchen") :: Frame check(not kframe.Visible, "요리 창은 처음엔 닫힘") khud.open("kitchen") check(kframe.Visible and kitchen.isOpen() and khud.menuOpen(), "요리 창 열림(커서 풀림)") check((kroot:FindFirstChild("Dim") :: TextButton).Visible, "요리 창 뒤 어둡게") local menuPage = kframe:FindFirstChild("MenuPage", true) :: Frame check(menuPage.Visible, "처음엔 메뉴 고르기") local function menuCard(m: string): Frame return menuPage:FindFirstChild("Menu_" .. m, true) :: Frame end for _, m in Economy.MENU_ORDER do check(menuCard(m) ~= nil, `메뉴 카드 {m}`) end check((menuCard("Gimbap"):FindFirstChild("Orders", true) :: Frame).Visible, "주문 있는 김밥에 손님 표시") eq((menuCard("Gimbap"):FindFirstChild("Orders", true):FindFirstChild("Text") :: TextLabel).Text, "x2", "주문 수 2") check( not (menuCard("Tteokbokki"):FindFirstChild("Orders", true) :: Frame).Visible, "주문 없는 떡볶이는 표시 없음" ) check((menuCard("Eomuk"):FindFirstChild("Lock", true) :: ImageLabel).Visible, "안 산 어묵은 자물쇠") check(not (menuCard("Sundae"):FindFirstChild("Lock", true) :: ImageLabel).Visible, "산 순대는 자물쇠 없음") check( (menuPage:FindFirstChild("Pointer") or menuCard("Gimbap"):FindFirstChild("Pointer", true)) ~= nil, "튜토리얼 손가락" ) eq(kitchen.choose("Tteokbokki"), false, "주문 없는 메뉴는 못 고름") eq(kitchen.choose("Eomuk"), false, "안 산 메뉴는 못 고름") eq(kitchen.choose("Gimbap"), true, "김밥 고름") local cookPage = kframe:FindFirstChild("CookPage", true) :: Frame check(cookPage.Visible and not menuPage.Visible, "조리 화면으로") eq((cookPage:FindFirstChild("Instruction") :: TextLabel).Text, "김 위에 재료를 올려요", "1단계 안내") check( (cookPage:FindFirstChild("Base", true) :: ImageLabel).Image == Icons.KITCHEN_ASSET, "조리 도구 그림(도마)" ) eq((cookPage:FindFirstChild("Base", true) :: ImageLabel).ImageRectOffset, Icons.KITCHEN.board, "김밥은 도마") local flowK = kitchen.flow() local need1 = flowK.need eq((cookPage:FindFirstChild("Gesture") :: TextLabel).Text, `톡톡! {need1}번`, "톡톡 남은 횟수") eq(kitchen.input("hold", 1), nil, "다른 동작은 무시") eq(kitchen.input("tap", 1), "progress", "톡 1") eq((cookPage:FindFirstChild("Gesture") :: TextLabel).Text, `톡톡! {need1 - 1}번`, "남은 횟수 줄어듦") local strip1 = cookPage:FindFirstChild("Strip1", true) :: Frame check(strip1 ~= nil and strip1.Visible, "누를 때마다 재료가 올라감") for _ = 2, need1 do kitchen.input("tap", 1) end eq(flowK.step, 2, "2단계(말기)") eq((cookPage:FindFirstChild("Instruction") :: TextLabel).Text, "돌돌 말아요", "2단계 안내") eq((cookPage:FindFirstChild("Gesture") :: TextLabel).Text, "문질문질!", "문지르기 안내") eq(kitchen.input("rub", flowK.need), "step", "다 문지름 → 3단계") check((cookPage:FindFirstChild("Roll", true) :: ImageLabel).Visible, "김밥이 말림") eq(#ksent, 1, "완성 전에는 시작만 보냄") eq(kitchen.input("tap", flowK.need), "done", "썰기 끝 → 완성") eq(ksent[1] and ksent[1][1], "cookStart", "메뉴를 고르면 서버에 cookStart") eq(ksent[1] and ksent[1][2], "Gimbap", "고른 메뉴로 시작") eq(ksent[2] and ksent[2][1], "cook", "다 만들면 서버에 cook") eq(ksent[2] and ksent[2][2], "Gimbap", "고른 메뉴를 보냄") local donePage = kframe:FindFirstChild("DonePage", true) :: Frame check(donePage.Visible, "완성 화면") eq((donePage:FindFirstChild("Dish") :: ImageLabel).ImageRectOffset, Icons.OFFSET.Gimbap, "완성 접시 그림") -- 주문이 남아 있고 손에 자리가 있으면 다시 메뉴 고르기, 아니면 닫힘 kstate:SetAttribute("Orders", "Gimbap=1") kstate:SetAttribute("Carry", 0) task.wait(1.5) check(kitchen.isOpen() and menuPage.Visible, "주문이 남으면 다음 접시 고르기") kitchen.choose("Gimbap") for _ = 1, 20 do local st = Recipes.current(kitchen.flow()) if not st then break end kitchen.input(st.kind, kitchen.flow().need) end kstate:SetAttribute("Carry", 1) -- 손이 꽉 참(쟁반 없음) kstate:SetAttribute("Orders", "") task.wait(1.5) check(not kitchen.isOpen() and not kframe.Visible, "더 만들 것이 없으면 창이 닫힘") check(not (kroot:FindFirstChild("Dim") :: TextButton).Visible, "닫히면 어둡게도 꺼짐") -- 메뉴마다 과정이 다르고 끝까지 갈 수 있음 for _, m in Economy.MENU_ORDER do kstate:SetAttribute("Levels", "Stage=1,Menu=4") kstate:SetAttribute("Carry", 0) kstate:SetAttribute("Orders", `{m}=1`) khud.open("kitchen") check(kitchen.choose(m), `{m} 고름`) eq( (cookPage:FindFirstChild("Base", true) :: ImageLabel).ImageRectOffset, Icons.KITCHEN[Recipes.LIST[m].stage], `{m} 조리 도구 그림` ) local guard = 0 while kitchen.flow().phase == "cook" and guard < 10 do local st = Recipes.current(kitchen.flow()) :: Recipes.Step check( Icons.OFFSET[({ roll = "mat", fire = "flame", skewer = "Eomuk" } :: any)[st.tool] or st.tool] ~= nil, `{m} 도구 그림 {st.tool}` ) kitchen.input(st.kind, kitchen.flow().need) guard += 1 end eq(kitchen.flow().phase, "done", `{m} 완성`) eq(ksent[#ksent][1], "cook", `{m} 완성 보냄`) eq(ksent[#ksent][2], m, `{m} 서버에 보냄`) eq(ksent[#ksent - 1][1], "cookStart", `{m} 시작 보냄`) khud.open(nil) check(not kitchen.isOpen(), `{m} 창 닫기`) end -- 요리 창은 화면 안에(휴대폰) khud.setLayout(Vector2.new(667, 317), true) local kl = khud.layout().kitchen check(kl.x >= 0 and kl.y >= 0 and kl.x + kl.w <= khud.layout().width + 1e-6, "휴대폰: 요리 창 화면 안") khud.destroy() section("조리대 버튼(클라이언트 모듈)") local Stove = require(StarterPlayer.StarterPlayerScripts.Client.Stove) local stove = slots[3].refs.stove local pstate = Instance.new("Folder") pstate:SetAttribute("Lang", "ko") local prompt = Stove.attach(stove, pstate, function() end) check(not prompt.Enabled, "주문 없으면 버튼 꺼짐") stove:SetAttribute("CookMenu", "Gimbap") check(prompt.Enabled, "주문 있으면 버튼 켜짐") eq(prompt.ActionText, "요리하기", "버튼 글자") eq(prompt.HoldDuration, 0, "누르면 바로 요리 창(꾹 누르지 않음)") prompt:Destroy() section("효과음(직접 만든 오디오 에셋)") local Sounds = require(ReplicatedStorage.Shared.Sounds) for name, id in Sounds do local num = tonumber(string.match(id, "%d+")) local okInfo, info = pcall(function() return game:GetService("MarketplaceService"):GetProductInfoAsync(num :: number, Enum.InfoType.Asset) end) check(okInfo, `효과음 {name} 정보 조회`) if okInfo then eq(info.AssetTypeId, 3, `효과음 {name}은 오디오`) eq(info.Creator.CreatorTargetId, game.CreatorId, `효과음 {name}은 게임 주인 소유`) end end section("UI 그림(직접 그린 이미지 에셋)") for _, asset in { Icons.ASSET, Icons.KITCHEN_ASSET } do local num = tonumber(string.match(asset, "%d+")) local okInfo, info = pcall(function() return game:GetService("MarketplaceService"):GetProductInfoAsync(num :: number, Enum.InfoType.Asset) end) check(okInfo, `그림 {num} 정보 조회`) if okInfo then eq(info.AssetTypeId, 1, `그림 {num}은 이미지`) eq(info.Creator.CreatorTargetId, game.CreatorId, `그림 {num}은 게임 주인 소유`) end end section("Products(게임패스·개발자 상품)") local Products = require(ReplicatedStorage.Shared.Products) local MarketplaceService = game:GetService("MarketplaceService") for key, id in Products do check(id ~= 0, `{key} ID 있음`) local isPass = string.find(key, "_PASS$") ~= nil local okInfo, info = pcall(function() return MarketplaceService:GetProductInfoAsync( id, if isPass then Enum.InfoType.GamePass else Enum.InfoType.Product ) end) check(okInfo, `{key} 정보 조회`) if okInfo then print(key, info.Name, info.PriceInRobux, info.IsForSale) check(info.PriceInRobux ~= nil and info.PriceInRobux > 0, `{key} 가격`) end end section("Game.start(실제 서버 시작 순서)") local Game = require(Server.Game) local okStart, errStart = pcall(Game.start) check(okStart, `Game.start 오류 없음 ({errStart})`) task.wait(1) eq(#workspace.BunsikWorld.Plots:GetChildren(), 6, "시작 후 부지 6칸") for _, plot in workspace.BunsikWorld.Plots:GetChildren() do check(plot:GetAttribute("Npc") ~= nil, `{plot.Name}: 빈 부지에 이웃 가게`) end task.wait(3) local npcCustomers = 0 for _, d in workspace.BunsikWorld.Plots:GetDescendants() do if d.Name == "Customer" then npcCustomers += 1 end end print("이웃 가게 손님 수", npcCustomers) check(npcCustomers > 0, "이웃 가게에 손님이 옴(실제 Heartbeat)") print(`통합 테스트: {count - #failures}/{count} 통과`) if #failures > 0 then error(`{#failures} failed: ` .. table.concat(failures, " | ")) end return { passed = count }