wip(bunsik): 서버 개편 — 갈래 업그레이드, 배치형 테이블·의자·조리대, 실내·2층 건물과 디자인 5종, 알바생 역할·시급, 홍보·쫓아내기·손님 러시, 가게 이름 필터·무지개, 세이브 버전 2 이전
로블록스 서버 통합 테스트 tests/cloud/server.luau 1003개 통과(저장 버전 25). 화면 UI는 다음 커밋. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,7 @@ Floor.X0 = -33
|
||||
Floor.X1 = 33
|
||||
Floor.Z0 = -37
|
||||
Floor.Z1 = 19
|
||||
Floor.BASE_Y = 0.2 -- 부지 바닥 윗면 높이(부지 원점 기준)
|
||||
Floor.FLOOR2_Y = 15 -- 2층 바닥 높이(1층 바닥 기준)
|
||||
Floor.CELL = 1
|
||||
|
||||
@@ -468,7 +469,19 @@ end
|
||||
|
||||
-- 새 테이블(+의자 1개)을 놓을 곳을 찾아 layout에 넣습니다. 놓으면 테이블 번호를 돌려줍니다.
|
||||
function Floor.addTable(layout: Layout, stage: number): number?
|
||||
local floors = if stage >= 3 then { 1, 2 } else { 1 }
|
||||
local floors: { number } = { 1 }
|
||||
if stage >= 3 then
|
||||
-- 2층 건물이면 테이블이 적은 층부터 채웁니다(2층이 바로 쓰이게).
|
||||
local n1, n2 = 0, 0
|
||||
for _, t in layout.tables do
|
||||
if t.f == 2 then
|
||||
n2 += 1
|
||||
else
|
||||
n1 += 1
|
||||
end
|
||||
end
|
||||
floors = if n2 < n1 then { 2, 1 } else { 1, 2 }
|
||||
end
|
||||
for _, f in floors do
|
||||
for _, c in candidates(f) do
|
||||
local test = Floor.clone(layout)
|
||||
@@ -515,7 +528,7 @@ function Floor.addDecor(layout: Layout, stage: number, kind: string): number?
|
||||
if not Floor.FOOTPRINT[kind] or kind == "Stove" then
|
||||
return nil
|
||||
end
|
||||
local floors = if stage >= 3 then { 1, 2 } else { 1 }
|
||||
local floors: { number } = if stage >= 3 then { 1, 2 } else { 1 }
|
||||
for _, f in floors do
|
||||
-- 소품은 벽 쪽부터 찾습니다.
|
||||
local list = {}
|
||||
@@ -636,7 +649,7 @@ function Floor.repair(layout: Layout, stage: number): Layout
|
||||
end
|
||||
end
|
||||
local placed = false
|
||||
local floors = if stage >= 3 then { 2, 1 } else { 1 }
|
||||
local floors: { number } = if stage >= 3 then { 2, 1 } else { 1 }
|
||||
for _, f in floors do
|
||||
if placed then
|
||||
break
|
||||
|
||||
@@ -4,4 +4,10 @@
|
||||
return {
|
||||
DOUBLE_MONEY_PASS = 2026574937,
|
||||
MONEY_BOOST_PRODUCT = 3717970589,
|
||||
RAINBOW_NAME_PASS = 0, -- 가게 이름 무지개
|
||||
CANDY_DESIGN_PASS = 0, -- 건물 디자인: 사탕 궁전
|
||||
HANOK_DESIGN_PASS = 0, -- 건물 디자인: 한옥 분식집
|
||||
RUSH_PRODUCT = 0, -- 손님 러시 10분(소모성)
|
||||
KICK_PRODUCT = 0, -- 옆 가게 손님 쫓아내기 1회(소모성)
|
||||
PROMOTE_AD_PRODUCT = 0, -- 보상형 광고 보상(홍보 1회). 광고 보상은 개발자 상품으로 받습니다
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ export type Recipe = {
|
||||
steps: { Step },
|
||||
}
|
||||
|
||||
Recipes.BASE_COOK = 2.5 -- Economy.START.cook과 같음
|
||||
Recipes.BASE_COOK = 2.5 -- Economy.START_COOK과 같음
|
||||
Recipes.RUB_UNIT = 260 -- 문지르기 1번 = 기준 단위 260만큼 움직이기
|
||||
|
||||
Recipes.LIST = {
|
||||
|
||||
@@ -9,8 +9,10 @@ local Economy: typeof(require(script.Parent.Economy)) = if script
|
||||
then require(script.Parent.Economy)
|
||||
else (require :: any)("./Economy")
|
||||
|
||||
type Stats = Economy.Stats
|
||||
type Levels = Economy.Levels
|
||||
type Stats = typeof(Economy.stats({}, 1))
|
||||
type Levels = { [string]: number }
|
||||
type Staff = { [string]: number }
|
||||
type Level = typeof(Economy.TRACKS[1].levels[1])
|
||||
|
||||
export type CustomerState = "walking" | "waiting" | "eating"
|
||||
|
||||
@@ -54,7 +56,7 @@ export type Shop = {
|
||||
hand: { string },
|
||||
counter: { string },
|
||||
trips: { [number]: Trip }, -- 서빙 알바 번호 -> 나르는 중
|
||||
staff: Economy.Staff,
|
||||
staff: Staff,
|
||||
strike: boolean, -- 시급이 모자라 알바생이 쉬는 중
|
||||
wageDue: number, -- 다음 시급 주는 시각
|
||||
cookNext: { [number]: number }, -- 요리 알바 번호 -> 다음에 만들 수 있는 시각
|
||||
@@ -71,7 +73,7 @@ export type Options = {
|
||||
money: number,
|
||||
levels: Levels?,
|
||||
seats: number?,
|
||||
staff: Economy.Staff?,
|
||||
staff: Staff?,
|
||||
now: number,
|
||||
rushLeft: number?,
|
||||
}
|
||||
@@ -81,7 +83,7 @@ local Shop = {}
|
||||
function Shop.new(opts: Options): Shop
|
||||
local levels = Economy.cleanLevels(opts.levels)
|
||||
local seats = math.max(1, opts.seats or 1)
|
||||
local staff: Economy.Staff = {}
|
||||
local staff: Staff = {}
|
||||
for _, r in Economy.ROLES do
|
||||
local n = if opts.staff then opts.staff[r.id] else nil
|
||||
staff[r.id] = if typeof(n) == "number" then math.clamp(math.floor(n), 0, r.max) else 0
|
||||
@@ -461,7 +463,7 @@ end
|
||||
|
||||
-- 업그레이드 갈래의 다음 단계를 삽니다. 성공하면 산 단계(Level)를 돌려줍니다.
|
||||
-- 실패 이유: "max"(다 삼), "stage"(건물 단계 부족), "money"
|
||||
function Shop.buyLevel(self: Shop, trackId: string): (Economy.Level?, string?)
|
||||
function Shop.buyLevel(self: Shop, trackId: string): (Level?, string?)
|
||||
local nl = Economy.nextLevel(self.levels, trackId)
|
||||
if not nl then
|
||||
return nil, "max"
|
||||
|
||||
Reference in New Issue
Block a user