feat(bunsik): 꾸미기 모드(아래 물건 줄·이동·삭제), 가게 이름 색 10가지, 개발자 결제 테스트 모드
- [가게 꾸미기]를 누르면 창 없이 바로 꾸미기 모드: 아래 물건 줄(테이블·의자·소품 6가지, 값·개수)에서 고르면 투명 미리보기를 들고 걸어가 [배치]. [이동]은 고른 가구를 들고 옮기기, [삭제]는 고른 가구를 빨갛게 표시한 뒤 한 번 더 눌러 지우고 산 값 돌려받기(조리대·마지막 테이블/의자·의자가 보는 테이블·손님 앉은 의자는 막음) - 새 요청 remove, Floor.remove, Shop.removeSeat(뒤 자리 손님·걷는 시간 번호 당김) - 내 가게 탭: 이름 색 무료 10색 + 무지개(게임패스) 칸. 부지 속성 NameColor로 모두에게 보임 - 개발자 테스트 [결제 테스트 켜기/끄기]: 켜면 2배·부스트·러시·쫓아내기·광고 홍보·무지개·유료 디자인이 결제 창 없이 바로 지급(이번 접속만), 게임패스는 안 가진 상태로 바꿔 사는 흐름을 볼 수 있고 끄면 실제 보유로 복구 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ local StarterPlayer = game:GetService("StarterPlayer")
|
||||
|
||||
local Client = StarterPlayer.StarterPlayerScripts.Client
|
||||
local Hud = require(Client.Hud)
|
||||
local Decorate = require(Client.Decorate)
|
||||
local Layout = require(Client.Layout)
|
||||
local Icons = require(game:GetService("ReplicatedStorage").Shared.Icons)
|
||||
|
||||
@@ -176,8 +177,8 @@ local SHOTS = {
|
||||
),
|
||||
shot("phone_tut", PHONE, shopState("", 1, 1, { Money = 15, Tut = 3 })),
|
||||
shot("phone_shop", PHONE, shopState(EARLY, 2, 1, { Money = 150 }), { open = "shop" }),
|
||||
shot("phone_decor", PHONE, shopState(MID, 3, 2, { Money = 400, Layout = LAYOUT }), { open = "decor" }),
|
||||
shot("pc_decor", PC, shopState(MID, 3, 2, { Money = 60, Layout = LAYOUT }), { open = "decor" }),
|
||||
shot("phone_deco", PHONE, shopState(MID, 3, 2, { Money = 120, Layout = LAYOUT }), { deco = true }),
|
||||
shot("pc_deco", PC, shopState(MID, 3, 2, { Money = 120, Layout = LAYOUT }), { deco = true }),
|
||||
shot("pc_tut", PC, shopState("", 1, 1, { Money = 15, Tut = 3 })),
|
||||
shot(
|
||||
"phone_shop_staff",
|
||||
@@ -314,6 +315,17 @@ for _, s in SHOTS do
|
||||
end
|
||||
end
|
||||
hud.refresh()
|
||||
local gui = hud.gui
|
||||
local deco = nil
|
||||
if s.deco then
|
||||
-- 꾸미기 모드: 화면 UI는 숨기고 꾸미기 화면만
|
||||
local plotStub = Instance.new("Model")
|
||||
plotStub:SetAttribute("Origin", CFrame.new())
|
||||
deco = Decorate.build(holder, state, plotStub, function() end)
|
||||
deco.setLayout(hud.layout())
|
||||
deco.open()
|
||||
gui = deco.gui
|
||||
end
|
||||
task.wait(0.3)
|
||||
local zones = Layout.touchZones(s.w, s.h)
|
||||
table.insert(shots, {
|
||||
@@ -323,8 +335,11 @@ for _, s in SHOTS do
|
||||
inset = s.inset,
|
||||
touch = s.touch,
|
||||
zones = zones,
|
||||
gui = dump(hud.gui, 1),
|
||||
gui = dump(gui, 1),
|
||||
})
|
||||
if deco then
|
||||
deco.destroy()
|
||||
end
|
||||
hud.destroy()
|
||||
end
|
||||
|
||||
|
||||
@@ -161,22 +161,7 @@ for _, id in Economy.TRACK_ORDER do
|
||||
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, "창은 하나만 열림(꾸미기 → 상점)")
|
||||
check(root:FindFirstChild("DecorPanel") == nil, "가게 꾸미기 창 없음(바로 꾸미기 모드)")
|
||||
hud.open("shop", "staff")
|
||||
check((page("staff"):FindFirstChild("Locked", true) :: Frame).Visible, "알바생 기능 전에는 잠김")
|
||||
state:SetAttribute("Levels", "Staff=1")
|
||||
@@ -188,6 +173,17 @@ for _, r in Economy.ROLES do
|
||||
end
|
||||
hud.open("shop", "mine")
|
||||
check(page("mine"):FindFirstChild("NameBox", true) ~= nil, "가게 이름 입력칸")
|
||||
for n = 1, #Economy.NAME_COLORS do
|
||||
check(page("mine"):FindFirstChild("Color" .. n, true) ~= nil, `이름 색 {n}`)
|
||||
end
|
||||
local rainbowSw = page("mine"):FindFirstChild("Rainbow", true)
|
||||
check(rainbowSw ~= nil, "무지개 칸")
|
||||
state:SetAttribute("NameColor", 4)
|
||||
check((page("mine"):FindFirstChild("Color4", true) :: Frame):FindFirstChild("Done").Visible, "고른 색에 체크")
|
||||
check(
|
||||
not (page("mine"):FindFirstChild("Color3", true) :: Frame):FindFirstChild("Done").Visible,
|
||||
"안 고른 색은 체크 없음"
|
||||
)
|
||||
for _, d in Economy.DESIGNS do
|
||||
check(page("mine"):FindFirstChild("Design_" .. d.id, true) ~= nil, `디자인 {d.id}`)
|
||||
end
|
||||
@@ -235,6 +231,10 @@ local SAMPLES = {
|
||||
rushOn = { min = 10 },
|
||||
notEnough = { need = "100" },
|
||||
doubleOwned = {},
|
||||
removed = { thing = "chair", money = "45" },
|
||||
removeFail = { why = "hasChairs" },
|
||||
devFreeOn = {},
|
||||
devFreeOff = {},
|
||||
}
|
||||
for _, lang in { "ko", "en", "ja", "zh" } do
|
||||
for key, args in SAMPLES do
|
||||
@@ -292,6 +292,22 @@ for _, name in { "Exit", "Info", "Rotate", "Cancel", "Place" } do
|
||||
end
|
||||
check(droot:FindFirstChild("Floor") == nil and droot:FindFirstChild("Side1") == nil, "예전 층·쪽 버튼 없음")
|
||||
check(not deco.isOpen() and not deco.holding(), "처음엔 닫힘")
|
||||
local items = droot:FindFirstChild("Items") :: ScrollingFrame
|
||||
check(items ~= nil, "아래 물건 줄")
|
||||
for _, it in Decorate.ITEMS do
|
||||
check(items:FindFirstChild("Item_" .. (it.k or it.kind)) ~= nil, `물건 줄 {it.k or it.kind}`)
|
||||
end
|
||||
deco.open()
|
||||
check(deco.isOpen() and items.Visible, "꾸미기 모드: 물건 줄 보임")
|
||||
check((droot:FindFirstChild("Move") :: GuiObject).Visible, "이동 버튼")
|
||||
check((droot:FindFirstChild("Delete") :: GuiObject).Visible, "삭제 버튼")
|
||||
check(not (droot:FindFirstChild("Place") :: GuiObject).Visible, "고를 때는 배치 버튼 숨김")
|
||||
local itemTable = items:FindFirstChild("Item_table") :: TextButton
|
||||
eq((itemTable:FindFirstChild("Price") :: TextLabel).Text, Locale.number(Economy.tableCost(1)), "테이블 값")
|
||||
local infoT = (droot:FindFirstChild("Info") :: Frame):FindFirstChild("Text") :: TextLabel
|
||||
check(string.find(infoT.Text, "이동") ~= nil, `안내 글 ({infoT.Text})`)
|
||||
deco.close()
|
||||
check(not deco.isOpen(), "나가기")
|
||||
deco.destroy()
|
||||
|
||||
section("요리 창(메뉴 고르기 → 조리 과정 → 완성)")
|
||||
|
||||
@@ -312,6 +312,30 @@ for _, d in { { 0, -4 }, { 0, 4 }, { 4, 0 }, { -4, 0 }, { 6, 6 }, { -6, -6 } } d
|
||||
end
|
||||
end
|
||||
check(movedWith, "의자 붙은 테이블 옮기기")
|
||||
-- 지우기(산 값 돌려받기)
|
||||
local decorN = #c.layout.decor
|
||||
local m0 = c.shop.money
|
||||
check(c:removeItem("decor", 1), "소품 지우기")
|
||||
eq(#c.layout.decor, decorN - 1, "소품 하나 줄어듦")
|
||||
check(c.shop.money > m0, "소품 값 돌려받음")
|
||||
check(noted("removed"), "지운 알림")
|
||||
check(not c:removeItem("stove", 1), "조리대는 못 지움")
|
||||
check(noted("removeFail"), "못 지우는 이유 알림")
|
||||
local freeChair = nil
|
||||
for ci in c.layout.chairs do
|
||||
if c.shop.seatTaken[ci] == nil then
|
||||
freeChair = ci
|
||||
end
|
||||
end
|
||||
local seatsN = #c.layout.chairs
|
||||
check(freeChair ~= nil and c:removeItem("chair", freeChair), "빈 의자 지우기")
|
||||
eq(owner:GetAttribute("Seats"), seatsN - 1, "자리 수 줄어듦")
|
||||
eq(c.shop.stats.seats, seatsN - 1, "손님 자리 수도 줄어듦")
|
||||
check(furniture:FindFirstChild("Chair" .. seatsN) == nil, "의자 모형도 줄어듦")
|
||||
local busy = next(c.shop.seatTaken)
|
||||
if busy then
|
||||
check(not c:removeItem("chair", busy), "손님이 앉은 의자는 못 지움")
|
||||
end
|
||||
c.shop.money = 0
|
||||
check(not c:buyTable(), "돈 모자라면 테이블 못 삼")
|
||||
check(not c:buyItem("chair", nil, { kind = "chair", x = 0, z = 0, f = 1, r = 0 }), "돈 모자라면 의자 못 놓음")
|
||||
@@ -338,6 +362,14 @@ c:setRainbowOwned(true)
|
||||
eq(slots[1].model:GetAttribute("Rainbow"), true, "게임패스 있으면 무지개")
|
||||
c:setRainbow(false)
|
||||
eq(slots[1].model:GetAttribute("Rainbow"), false, "무지개 끄기")
|
||||
c:setRainbow(true)
|
||||
c:setNameColor(3)
|
||||
eq(slots[1].model:GetAttribute("NameColor"), 3, "이름 색 속성(모두에게)")
|
||||
eq(owner:GetAttribute("NameColor"), 3, "이름 색 속성(내 화면)")
|
||||
eq(slots[1].model:GetAttribute("Rainbow"), false, "색을 고르면 무지개는 꺼짐")
|
||||
eq(data.NameColor, 3, "세이브에 이름 색")
|
||||
c:setNameColor(99)
|
||||
eq(owner:GetAttribute("NameColor"), 0, "없는 색은 기본색")
|
||||
local Game = require(Server.Game)
|
||||
eq(Game._cleanName(" 가나다\n라 "), "가나다 라", "이름 공백 정리")
|
||||
eq(utf8.len(Game._cleanName(string.rep("가", 30)) :: string), Economy.NAME_MAX, "이름 길이 자르기")
|
||||
|
||||
Reference in New Issue
Block a user