This commit is contained in:
listik committed 2026-11-04 00:09:13 +03:00
1 parent b48d1f68f6
commit 1ff7ef7e83
5 files changed
+37777 -1628

No files matched your search

+37441 -1624
View File
File diff suppressed because it is too large. Load diff
@@ -1986,6 +1986,25 @@ closeBoardView = function()
advanceTutorial(1) advanceTutorial(1)
end end
-- скупка «Тихого озера»: ведём к прилавку с подсказкой «Продать» внутри лавки (GuideTarget = "Sell"),
-- поэтому стрелка идёт за лавкой, куда бы её ни переставили; маркер GuideSell — запасной вариант
local function sellTargetW1()
local shop = guideObject("Sell")
if shop then
for _, d in ipairs(shop:GetDescendants()) do
if d:IsA("ProximityPrompt") and d:GetAttribute("Action") == "Sell" then
local p = d.Parent
local at = (p:IsA("BasePart") and p.Position) or (p:IsA("Attachment") and p.WorldPosition)
if at then
return at
end
end
end
return shop:IsA("Model") and shop:GetPivot().Position or shop.Position
end
return guideMarker("GuideSell")
end
-- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем
local function guideRoute(step, pos, world) local function guideRoute(step, pos, world)
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
@@ -1996,7 +2015,7 @@ local function guideRoute(step, pos, world)
elseif step == 2 and inW1 then elseif step == 2 and inW1 then
return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier"
elseif step == 3 and inW1 then elseif step == 3 and inW1 then
return { guideMarker("GuideSell") }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую
end end
return nil return nil
end end
@@ -2080,7 +2099,7 @@ RunService.RenderStepped:Connect(function()
end end
if not route and bagFull then if not route and bagFull then
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
local at = (inW1 and guideMarker("GuideSell")) or nearestSell(pos, world) local at = (inW1 and sellTargetW1()) or nearestSell(pos, world)
route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil
end end
guideHintText.Text = hint or "" guideHintText.Text = hint or ""
@@ -608,6 +608,99 @@ local function setBestiary(board, zoneId, title, titleHex)
writeBestiary(board) writeBestiary(board)
end end
-- Лавки в стиле low poly: без фотореалистичных текстур (доски, ткань), плоские цвета с разбросом оттенков.
-- Большие дощатые панели (стены, пол, крыша) режутся на отдельные доски, шарики-гирлянды становятся
-- ромбиками-флажками, неоновая рамка вывески — матовой золотой. frame — CFrame лавки (для флажков), может быть nil.
local LOWPOLY_FLAT = {
[Enum.Material.WoodPlanks] = true, [Enum.Material.Wood] = true, [Enum.Material.Fabric] = true,
[Enum.Material.Metal] = true, [Enum.Material.Brick] = true, [Enum.Material.Plastic] = true,
}
local function lowPolyShade(c, lrng, spread)
local k = 1 + lrng:NextNumber(-spread, spread)
return Color3.new(math.clamp(c.R * k, 0, 1), math.clamp(c.G * k, 0, 1), math.clamp(c.B * k, 0, 1))
end
local function lowPolyPlanks(p, lrng)
local s = p.Size
local dims = { s.X, s.Y, s.Z }
local thin = 1
for i = 2, 3 do
if dims[i] < dims[thin] then thin = i end
end
-- режем вдоль самой длинной горизонтальной оси (кроме тонкой): стены — вертикальные доски, пол — продольные
local axis = (thin ~= 1 and (thin == 3 or s.X >= s.Z)) and 1 or 3
local len = dims[axis]
local n = math.max(2, math.floor(len / 1.8 + 0.5))
local w = len / n
for i = 1, n do
local off = -len / 2 + w * (i - 0.5)
local depth = lrng:NextNumber(-0.06, 0.06)
local o = { 0, 0, 0 }
o[axis] = off
o[thin] = depth
local size = { s.X, s.Y, s.Z }
size[axis] = w
local plank = Instance.new("Part")
plank.Name = "Plank"
plank.Anchored = true
plank.TopSurface, plank.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth
plank.Material = Enum.Material.SmoothPlastic
plank.Size = V(size[1], size[2], size[3])
plank.CFrame = p.CFrame * CFrame.new(o[1], o[2], o[3])
plank.Color = lowPolyShade(p.Color, lrng, 0.09)
plank.CanCollide, plank.CastShadow, plank.CanQuery = p.CanCollide, p.CastShadow, p.CanQuery
plank.Parent = p.Parent
end
p:Destroy()
end
function Builder.lowPolyParts(parts, frame, seed)
local lrng = Random.new(seed or 5)
for _, p in ipairs(parts) do
if p:IsA("BasePart") and p.Parent and p.Transparency < 0.5 and not p.Name:find("Npc") then
local isBlock = p.ClassName == "Part" and p.Shape == Enum.PartType.Block
if p.Material == Enum.Material.Fabric and p.ClassName == "Part" and p.Shape == Enum.PartType.Ball and frame then
-- шарик гирлянды → ромбик-флажок, повёрнутый к покупателям
local d = p.Size.X
local flag = Instance.new("Part")
flag.Name = "Pennant"
flag.Anchored = true
flag.CanCollide = false
flag.Material = Enum.Material.SmoothPlastic
flag.Size = V(d * 1.15, d * 1.15, 0.25)
flag.CFrame = CFrame.new(p.Position) * (frame - frame.Position) * CFrame.Angles(0, 0, math.rad(45))
flag.Color = p.Color
flag.Parent = p.Parent
p:Destroy()
elseif p.Material == Enum.Material.Neon and math.max(p.Size.X, p.Size.Y, p.Size.Z) > 4 then
p.Material = Enum.Material.SmoothPlastic -- рамка вывески: без свечения
p.Color = Color3.fromRGB(214, 160, 70)
elseif p.Material == Enum.Material.WoodPlanks and isBlock and #p:GetChildren() == 0
and math.min(p.Size.X, p.Size.Y, p.Size.Z) <= 1.2 and math.max(p.Size.X, p.Size.Z) >= 4 then
lowPolyPlanks(p, lrng)
elseif LOWPOLY_FLAT[p.Material] then
p.Material = Enum.Material.SmoothPlastic
p.Color = lowPolyShade(p.Color, lrng, 0.06)
end
end
end
end
-- детали лавки, построенной stall(cf): всё, что лежит в её габаритах прямо в папке parent
function Builder.stallParts(cf, parent)
local list = {}
for _, p in ipairs(parent:GetChildren()) do
if p:IsA("BasePart") then
local l = cf:PointToObjectSpace(p.Position)
if math.abs(l.X) <= 15.5 and l.Y >= -0.5 and l.Y <= 21 and l.Z >= -14.5 and l.Z <= 9.5 then
table.insert(list, p)
end
end
end
return list
end
-- лавка: cf стоит на полу, сторона -Z смотрит на покупателей -- лавка: cf стоит на полу, сторона -Z смотрит на покупателей
local function stall(cf, opt) local function stall(cf, opt)
local function at(x, y, z) local function at(x, y, z)
@@ -664,6 +757,7 @@ local function stall(cf, opt)
if opt.decor then if opt.decor then
opt.decor(at) opt.decor(at)
end end
Builder.lowPolyParts(Builder.stallParts(cf, map), cf, math.floor(cf.Position.X + cf.Position.Z))
return counter return counter
end end
@@ -1098,6 +1192,10 @@ function Builder.build()
-- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново -- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново
local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel) local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel)
w1map.Parent = map w1map.Parent = map
local baitShop = not world1Prebuilt and w1map:FindFirstChild("BaitShop", true)
if baitShop then
Builder.lowPolyParts(baitShop:GetDescendants(), baitShop:GetPivot(), 11)
end
-- NPC встают на маркеры — их можно двигать в Studio -- NPC встают на маркеры — их можно двигать в Studio
local seller = w1map:FindFirstChild("World1NpcSeller", true) local seller = w1map:FindFirstChild("World1NpcSeller", true)
if seller and not seller:GetAttribute("NpcName") then if seller and not seller:GetAttribute("NpcName") then
+119 -2
View File
@@ -4280,6 +4280,99 @@ local function setBestiary(board, zoneId, title, titleHex)
writeBestiary(board) writeBestiary(board)
end end
-- Лавки в стиле low poly: без фотореалистичных текстур (доски, ткань), плоские цвета с разбросом оттенков.
-- Большие дощатые панели (стены, пол, крыша) режутся на отдельные доски, шарики-гирлянды становятся
-- ромбиками-флажками, неоновая рамка вывески — матовой золотой. frame — CFrame лавки (для флажков), может быть nil.
local LOWPOLY_FLAT = {
[Enum.Material.WoodPlanks] = true, [Enum.Material.Wood] = true, [Enum.Material.Fabric] = true,
[Enum.Material.Metal] = true, [Enum.Material.Brick] = true, [Enum.Material.Plastic] = true,
}
local function lowPolyShade(c, lrng, spread)
local k = 1 + lrng:NextNumber(-spread, spread)
return Color3.new(math.clamp(c.R * k, 0, 1), math.clamp(c.G * k, 0, 1), math.clamp(c.B * k, 0, 1))
end
local function lowPolyPlanks(p, lrng)
local s = p.Size
local dims = { s.X, s.Y, s.Z }
local thin = 1
for i = 2, 3 do
if dims[i] < dims[thin] then thin = i end
end
-- режем вдоль самой длинной горизонтальной оси (кроме тонкой): стены — вертикальные доски, пол — продольные
local axis = (thin ~= 1 and (thin == 3 or s.X >= s.Z)) and 1 or 3
local len = dims[axis]
local n = math.max(2, math.floor(len / 1.8 + 0.5))
local w = len / n
for i = 1, n do
local off = -len / 2 + w * (i - 0.5)
local depth = lrng:NextNumber(-0.06, 0.06)
local o = { 0, 0, 0 }
o[axis] = off
o[thin] = depth
local size = { s.X, s.Y, s.Z }
size[axis] = w
local plank = Instance.new("Part")
plank.Name = "Plank"
plank.Anchored = true
plank.TopSurface, plank.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth
plank.Material = Enum.Material.SmoothPlastic
plank.Size = V(size[1], size[2], size[3])
plank.CFrame = p.CFrame * CFrame.new(o[1], o[2], o[3])
plank.Color = lowPolyShade(p.Color, lrng, 0.09)
plank.CanCollide, plank.CastShadow, plank.CanQuery = p.CanCollide, p.CastShadow, p.CanQuery
plank.Parent = p.Parent
end
p:Destroy()
end
function Builder.lowPolyParts(parts, frame, seed)
local lrng = Random.new(seed or 5)
for _, p in ipairs(parts) do
if p:IsA("BasePart") and p.Parent and p.Transparency < 0.5 and not p.Name:find("Npc") then
local isBlock = p.ClassName == "Part" and p.Shape == Enum.PartType.Block
if p.Material == Enum.Material.Fabric and p.ClassName == "Part" and p.Shape == Enum.PartType.Ball and frame then
-- шарик гирлянды → ромбик-флажок, повёрнутый к покупателям
local d = p.Size.X
local flag = Instance.new("Part")
flag.Name = "Pennant"
flag.Anchored = true
flag.CanCollide = false
flag.Material = Enum.Material.SmoothPlastic
flag.Size = V(d * 1.15, d * 1.15, 0.25)
flag.CFrame = CFrame.new(p.Position) * (frame - frame.Position) * CFrame.Angles(0, 0, math.rad(45))
flag.Color = p.Color
flag.Parent = p.Parent
p:Destroy()
elseif p.Material == Enum.Material.Neon and math.max(p.Size.X, p.Size.Y, p.Size.Z) > 4 then
p.Material = Enum.Material.SmoothPlastic -- рамка вывески: без свечения
p.Color = Color3.fromRGB(214, 160, 70)
elseif p.Material == Enum.Material.WoodPlanks and isBlock and #p:GetChildren() == 0
and math.min(p.Size.X, p.Size.Y, p.Size.Z) <= 1.2 and math.max(p.Size.X, p.Size.Z) >= 4 then
lowPolyPlanks(p, lrng)
elseif LOWPOLY_FLAT[p.Material] then
p.Material = Enum.Material.SmoothPlastic
p.Color = lowPolyShade(p.Color, lrng, 0.06)
end
end
end
end
-- детали лавки, построенной stall(cf): всё, что лежит в её габаритах прямо в папке parent
function Builder.stallParts(cf, parent)
local list = {}
for _, p in ipairs(parent:GetChildren()) do
if p:IsA("BasePart") then
local l = cf:PointToObjectSpace(p.Position)
if math.abs(l.X) <= 15.5 and l.Y >= -0.5 and l.Y <= 21 and l.Z >= -14.5 and l.Z <= 9.5 then
table.insert(list, p)
end
end
end
return list
end
-- лавка: cf стоит на полу, сторона -Z смотрит на покупателей -- лавка: cf стоит на полу, сторона -Z смотрит на покупателей
local function stall(cf, opt) local function stall(cf, opt)
local function at(x, y, z) local function at(x, y, z)
@@ -4336,6 +4429,7 @@ local function stall(cf, opt)
if opt.decor then if opt.decor then
opt.decor(at) opt.decor(at)
end end
Builder.lowPolyParts(Builder.stallParts(cf, map), cf, math.floor(cf.Position.X + cf.Position.Z))
return counter return counter
end end
@@ -4770,6 +4864,10 @@ function Builder.build()
-- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново -- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново
local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel) local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel)
w1map.Parent = map w1map.Parent = map
local baitShop = not world1Prebuilt and w1map:FindFirstChild("BaitShop", true)
if baitShop then
Builder.lowPolyParts(baitShop:GetDescendants(), baitShop:GetPivot(), 11)
end
-- NPC встают на маркеры — их можно двигать в Studio -- NPC встают на маркеры — их можно двигать в Studio
local seller = w1map:FindFirstChild("World1NpcSeller", true) local seller = w1map:FindFirstChild("World1NpcSeller", true)
if seller and not seller:GetAttribute("NpcName") then if seller and not seller:GetAttribute("NpcName") then
@@ -7423,6 +7521,25 @@ closeBoardView = function()
advanceTutorial(1) advanceTutorial(1)
end end
-- скупка «Тихого озера»: ведём к прилавку с подсказкой «Продать» внутри лавки (GuideTarget = "Sell"),
-- поэтому стрелка идёт за лавкой, куда бы её ни переставили; маркер GuideSell — запасной вариант
local function sellTargetW1()
local shop = guideObject("Sell")
if shop then
for _, d in ipairs(shop:GetDescendants()) do
if d:IsA("ProximityPrompt") and d:GetAttribute("Action") == "Sell" then
local p = d.Parent
local at = (p:IsA("BasePart") and p.Position) or (p:IsA("Attachment") and p.WorldPosition)
if at then
return at
end
end
end
return shop:IsA("Model") and shop:GetPivot().Position or shop.Position
end
return guideMarker("GuideSell")
end
-- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем -- маршрут для текущего шага: точки ломаной (без игрока), подсказка и что подсветить; nil — линию не показываем
local function guideRoute(step, pos, world) local function guideRoute(step, pos, world)
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
@@ -7433,7 +7550,7 @@ local function guideRoute(step, pos, world)
elseif step == 2 and inW1 then elseif step == 2 and inW1 then
return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier" return { guideMarker("GuideFishSpot") }, "🎣 Зажми ЛКМ у воды", "Pier"
elseif step == 3 and inW1 then elseif step == 3 and inW1 then
return { guideMarker("GuideSell") }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую return { sellTargetW1() }, "💰 Продай рыбу", "Sell" -- лавка у самого причала, идём напрямую
end end
return nil return nil
end end
@@ -7517,7 +7634,7 @@ RunService.RenderStepped:Connect(function()
end end
if not route and bagFull then if not route and bagFull then
local inW1 = world and world.id == "World1" local inW1 = world and world.id == "World1"
local at = (inW1 and guideMarker("GuideSell")) or nearestSell(pos, world) local at = (inW1 and sellTargetW1()) or nearestSell(pos, world)
route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil route, hint, key = at and { at } or nil, "🎒 Сумка полна — продай рыбу!", inW1 and "Sell" or nil
end end
guideHintText.Text = hint or "" guideHintText.Text = hint or ""
+98
View File
@@ -607,6 +607,99 @@ local function setBestiary(board, zoneId, title, titleHex)
writeBestiary(board) writeBestiary(board)
end end
-- Лавки в стиле low poly: без фотореалистичных текстур (доски, ткань), плоские цвета с разбросом оттенков.
-- Большие дощатые панели (стены, пол, крыша) режутся на отдельные доски, шарики-гирлянды становятся
-- ромбиками-флажками, неоновая рамка вывески — матовой золотой. frame — CFrame лавки (для флажков), может быть nil.
local LOWPOLY_FLAT = {
[Enum.Material.WoodPlanks] = true, [Enum.Material.Wood] = true, [Enum.Material.Fabric] = true,
[Enum.Material.Metal] = true, [Enum.Material.Brick] = true, [Enum.Material.Plastic] = true,
}
local function lowPolyShade(c, lrng, spread)
local k = 1 + lrng:NextNumber(-spread, spread)
return Color3.new(math.clamp(c.R * k, 0, 1), math.clamp(c.G * k, 0, 1), math.clamp(c.B * k, 0, 1))
end
local function lowPolyPlanks(p, lrng)
local s = p.Size
local dims = { s.X, s.Y, s.Z }
local thin = 1
for i = 2, 3 do
if dims[i] < dims[thin] then thin = i end
end
-- режем вдоль самой длинной горизонтальной оси (кроме тонкой): стены — вертикальные доски, пол — продольные
local axis = (thin ~= 1 and (thin == 3 or s.X >= s.Z)) and 1 or 3
local len = dims[axis]
local n = math.max(2, math.floor(len / 1.8 + 0.5))
local w = len / n
for i = 1, n do
local off = -len / 2 + w * (i - 0.5)
local depth = lrng:NextNumber(-0.06, 0.06)
local o = { 0, 0, 0 }
o[axis] = off
o[thin] = depth
local size = { s.X, s.Y, s.Z }
size[axis] = w
local plank = Instance.new("Part")
plank.Name = "Plank"
plank.Anchored = true
plank.TopSurface, plank.BottomSurface = Enum.SurfaceType.Smooth, Enum.SurfaceType.Smooth
plank.Material = Enum.Material.SmoothPlastic
plank.Size = V(size[1], size[2], size[3])
plank.CFrame = p.CFrame * CFrame.new(o[1], o[2], o[3])
plank.Color = lowPolyShade(p.Color, lrng, 0.09)
plank.CanCollide, plank.CastShadow, plank.CanQuery = p.CanCollide, p.CastShadow, p.CanQuery
plank.Parent = p.Parent
end
p:Destroy()
end
function Builder.lowPolyParts(parts, frame, seed)
local lrng = Random.new(seed or 5)
for _, p in ipairs(parts) do
if p:IsA("BasePart") and p.Parent and p.Transparency < 0.5 and not p.Name:find("Npc") then
local isBlock = p.ClassName == "Part" and p.Shape == Enum.PartType.Block
if p.Material == Enum.Material.Fabric and p.ClassName == "Part" and p.Shape == Enum.PartType.Ball and frame then
-- шарик гирлянды → ромбик-флажок, повёрнутый к покупателям
local d = p.Size.X
local flag = Instance.new("Part")
flag.Name = "Pennant"
flag.Anchored = true
flag.CanCollide = false
flag.Material = Enum.Material.SmoothPlastic
flag.Size = V(d * 1.15, d * 1.15, 0.25)
flag.CFrame = CFrame.new(p.Position) * (frame - frame.Position) * CFrame.Angles(0, 0, math.rad(45))
flag.Color = p.Color
flag.Parent = p.Parent
p:Destroy()
elseif p.Material == Enum.Material.Neon and math.max(p.Size.X, p.Size.Y, p.Size.Z) > 4 then
p.Material = Enum.Material.SmoothPlastic -- рамка вывески: без свечения
p.Color = Color3.fromRGB(214, 160, 70)
elseif p.Material == Enum.Material.WoodPlanks and isBlock and #p:GetChildren() == 0
and math.min(p.Size.X, p.Size.Y, p.Size.Z) <= 1.2 and math.max(p.Size.X, p.Size.Z) >= 4 then
lowPolyPlanks(p, lrng)
elseif LOWPOLY_FLAT[p.Material] then
p.Material = Enum.Material.SmoothPlastic
p.Color = lowPolyShade(p.Color, lrng, 0.06)
end
end
end
end
-- детали лавки, построенной stall(cf): всё, что лежит в её габаритах прямо в папке parent
function Builder.stallParts(cf, parent)
local list = {}
for _, p in ipairs(parent:GetChildren()) do
if p:IsA("BasePart") then
local l = cf:PointToObjectSpace(p.Position)
if math.abs(l.X) <= 15.5 and l.Y >= -0.5 and l.Y <= 21 and l.Z >= -14.5 and l.Z <= 9.5 then
table.insert(list, p)
end
end
end
return list
end
-- лавка: cf стоит на полу, сторона -Z смотрит на покупателей -- лавка: cf стоит на полу, сторона -Z смотрит на покупателей
local function stall(cf, opt) local function stall(cf, opt)
local function at(x, y, z) local function at(x, y, z)
@@ -663,6 +756,7 @@ local function stall(cf, opt)
if opt.decor then if opt.decor then
opt.decor(at) opt.decor(at)
end end
Builder.lowPolyParts(Builder.stallParts(cf, map), cf, math.floor(cf.Position.X + cf.Position.Z))
return counter return counter
end end
@@ -1097,6 +1191,10 @@ function Builder.build()
-- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново -- отдельно собранное раньше «Тихое озеро» (Workspace.World1Map) переносим в карту, иначе строим заново
local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel) local w1map = world1Prebuilt or World1Builder.build(map, Builder.portalModel)
w1map.Parent = map w1map.Parent = map
local baitShop = not world1Prebuilt and w1map:FindFirstChild("BaitShop", true)
if baitShop then
Builder.lowPolyParts(baitShop:GetDescendants(), baitShop:GetPivot(), 11)
end
-- NPC встают на маркеры — их можно двигать в Studio -- NPC встают на маркеры — их можно двигать в Studio
local seller = w1map:FindFirstChild("World1NpcSeller", true) local seller = w1map:FindFirstChild("World1NpcSeller", true)
if seller and not seller:GetAttribute("NpcName") then if seller and not seller:GetAttribute("NpcName") then