From 087e9b0d9bd62c6cc2c22d7d0981267d6afe7d41 Mon Sep 17 00:00:00 2001 From: heyshawtyy <108924601+heyshawtyy@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:44:25 +0500 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B8=D0=BA=D0=BE=D0=B2=D0=B8=D0=BD?= =?UTF-8?q?=D0=BA=D0=B8:=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BA=D0=BE=D0=BB=D0=BB=D0=B5=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B8?= =?UTF-8?q?=20=D0=BF=D0=BB=D0=B0=D1=88=D0=BA=D0=B0=20=D0=BF=D0=BE=D0=B8?= =?UTF-8?q?=D0=BC=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ServerScriptService/GameServer.server.lua | 15 +++ .../FishingClient.client.lua | 93 +++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/src/ServerScriptService/GameServer.server.lua b/src/ServerScriptService/GameServer.server.lua index 813193c..b25c451 100644 --- a/src/ServerScriptService/GameServer.server.lua +++ b/src/ServerScriptService/GameServer.server.lua @@ -2337,6 +2337,21 @@ if RunService:IsStudio() then end elseif op == "action" then onRemote(player, a, b, c) + elseif op == "curio" then + -- поменять поле диковинки (chance, cond) на время проверки: Config.CurioById[a][b] = c + local def = Config.CurioById[a] + if def then + def[b] = c + end + return def ~= nil + elseif op == "roll" then + -- ручная поимка в мире a (perfect = b): rollFish → grantFish, как настоящая; возвращает id + local data = profiles[player] + local fish = data and rollFish(player, data, a, 1, { manual = true, perfect = b, bait = c }) + if fish then + grantFish(player, data, fish, { perfect = b, misses = 0 }) + return fish.id, fish.curio + end elseif op == "xp" then -- опыт как за поимку (проверка наград за уровень) local data = profiles[player] diff --git a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua index 403f799..aa78062 100644 --- a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua @@ -455,6 +455,27 @@ function H.placeToasts(cardShown) TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play() end +-- диковинка: золотая лента «✨ Диковинка!» над карточкой улова и пульсирующее сияние рамки +function H.curioFx(on) + if not H.curioBadge then + local b = new("Frame", { Name = "CurioBadge", Size = UDim2.fromOffset(0, 34), AutomaticSize = Enum.AutomaticSize.X, AnchorPoint = Vector2.new(0.5, 0.5), + Position = UDim2.new(0.5, 0, 0, -4), BackgroundColor3 = WHITE, ZIndex = 30, Visible = false, Parent = catchCard }, + { corner(6), gradient(C.goldBright, Color3.fromRGB(196, 128, 48), 90), stroke(C.ink, 2, 0), + new("UIPadding", { PaddingLeft = UDim.new(0, 16), PaddingRight = UDim.new(0, 16) }) }) + text({ Size = UDim2.fromScale(0, 1), AutomaticSize = Enum.AutomaticSize.X, Font = TITLE, TextSize = 20, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = C.ink, Text = "✨ Диковинка!", ZIndex = 31, Parent = b }) + local glow = new("Frame", { Name = "CurioGlow", Size = UDim2.new(1, 24, 1, 24), Position = UDim2.fromOffset(-12, -12), BackgroundColor3 = C.goldBright, + BackgroundTransparency = 0.6, ZIndex = 0, Visible = false, Parent = catchCard }, { corner(18) }) + H.curioBadge, H.curioGlow = b, glow + TweenService:Create(glow, TweenInfo.new(0.8, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, -1, true), { BackgroundTransparency = 0.9 }):Play() + end + H.curioBadge.Visible, H.curioGlow.Visible = on == true, on == true + if on then + catchStroke.Color = C.goldBright + popIn(H.curioBadge, 0.3) + end +end + local function showCatch(fish, extra) catchToken += 1 local my = catchToken @@ -466,6 +487,7 @@ local function showCatch(fish, extra) catchGrad.Color = ColorSequence.new(r.color:Lerp(C.bg, 0.55), C.bg) catchHeader.Text = extra and extra.new and "🆕 НОВЫЙ ВИД! В коллекцию" or (extra and extra.record and "🏆 НОВЫЙ РЕКОРД!" or "ПОЙМАНА РЫБА") catchHeader.TextColor3 = (extra and (extra.new or extra.record)) and C.gold or C.muted + H.curioFx(fish.curio) catchName.Text = fish.name catchName.TextColor3 = r.color catchInfo.Text = ("%s%s · %.2f кг"):format( @@ -1205,11 +1227,74 @@ local function rewardButton(parent, state, label, onClick) }, state == "ready" and onClick or nil) end +-- «✨ Диковинки»: пойманные — превью и рекорд, обычные непойманные — силуэт и загадка на пергаменте, +-- секретные непойманные — «???». Мастерство миров их не учитывает +function H.renderCurios() + local total, got = #Config.Curios, 0 + for _, c in ipairs(Config.Curios) do + if discovered[c.id] then + got += 1 + end + end + local head = new("Frame", { Size = UDim2.new(1, -4, 0, 64), BackgroundColor3 = WHITE, LayoutOrder = 0, Parent = dexList }, + { corner(10), stroke(C.gold, 2, 0.1), gradient(Color3.fromRGB(96, 70, 30), Color3.fromRGB(52, 36, 22), 90) }) + text({ Size = UDim2.new(1, -24, 0, 26), Position = UDim2.fromOffset(14, 6), Font = TITLE, TextSize = 20, RichText = true, + Text = ("✨ Диковинки — поймано %d / %d"):format(got, total), Parent = head }) + local _, setBar = Theme.bar(head, { Size = UDim2.new(1, -28, 0, 12), Position = UDim2.fromOffset(14, 40) }, C.goldBright) + setBar(got / math.max(1, total)) + local ITALIC = Font.new("rbxasset://fonts/families/Merriweather.json", Enum.FontWeight.Regular, Enum.FontStyle.Italic) + for wi, w in ipairs(Config.Worlds) do + local list = {} + for _, c in ipairs(Config.Curios) do + if c.world == w.id then + table.insert(list, c) + end + end + if #list > 0 then + Theme.section(dexList, wi * 2 - 1, w.icon .. " " .. w.name, "fish") + local grid = new("Frame", { Size = UDim2.new(1, -4, 0, 0), AutomaticSize = Enum.AutomaticSize.Y, BackgroundTransparency = 1, LayoutOrder = wi * 2, Parent = dexList }, + { new("UIGridLayout", { CellSize = UDim2.fromOffset(150, 190), CellPadding = UDim2.fromOffset(8, 8), SortOrder = Enum.SortOrder.LayoutOrder }) }) + for i, c in ipairs(list) do + local rec = discovered[c.id] + local r = Config.Rarities[c.rarity] or Config.Rarities.Common + if rec then + local card = fishCard(grid, i, r.color) + viewport(new("Frame", { Size = UDim2.new(1, -12, 0, 90), Position = UDim2.fromOffset(6, 6), BackgroundTransparency = 1, Parent = card }), + Models.buildFish(c.id, nil, 1, true), VIEW.fish, 0.72) + text({ Size = UDim2.new(1, -10, 0, 22), Position = UDim2.fromOffset(5, 98), Font = TITLE, TextScaled = true, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = r.color, Text = c.name, TextStrokeColor3 = C.ink, TextStrokeTransparency = 0.3, Parent = card }) + text({ Size = UDim2.new(1, -10, 0, 50), Position = UDim2.fromOffset(5, 124), Font = BODY2, TextSize = 13, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = C.muted, TextWrapped = true, Text = ("Поймано: %d\nРекорд: %.2f кг"):format(rec.count or 1, rec.best or 0), Parent = card }) + elseif c.secret then + local card = new("Frame", { BackgroundColor3 = WHITE, LayoutOrder = i, Parent = grid }, + { corner(10), stroke(C.goldDark, 2, 0), gradient(Color3.fromRGB(40, 30, 50), Color3.fromRGB(16, 12, 20), 90) }) + text({ Size = UDim2.new(1, 0, 0, 80), Position = UDim2.fromOffset(0, 40), Font = TITLE, TextSize = 52, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = C.goldDark, Text = "???", Parent = card }) + text({ Size = UDim2.new(1, 0, 0, 24), Position = UDim2.fromOffset(0, 128), Font = TITLE, TextSize = 17, TextXAlignment = Enum.TextXAlignment.Center, + TextColor3 = C.muted, Text = "Секрет", Parent = card }) + else + local card = new("Frame", { BackgroundColor3 = Color3.fromRGB(226, 208, 168), LayoutOrder = i, Parent = grid }, { corner(10), stroke(C.goldDark, 2, 0) }) + Theme.skin(card, "parchment", { keepStroke = true }) + viewport(new("Frame", { Size = UDim2.new(1, -16, 0, 78), Position = UDim2.fromOffset(8, 8), BackgroundTransparency = 1, Parent = card }), + silhouette(Models.buildFish(c.id, nil, 1, true)), VIEW.fish, 0.72) + local h = text({ Size = UDim2.new(1, -18, 0, 96), Position = UDim2.fromOffset(9, 88), TextSize = 13, TextWrapped = true, + TextXAlignment = Enum.TextXAlignment.Center, TextYAlignment = Enum.TextYAlignment.Top, TextColor3 = C.ink, Text = "«" .. (c.hint or "?") .. "»", Parent = card }) + h.FontFace = ITALIC + end + end + end + end +end + local function renderDex() clear(dexList) for id, b in pairs(dexTabButtons) do b.BackgroundColor3 = (id == dexWorld) and C.purple or C.panel2 end + if dexWorld == "Curios" then + H.renderCurios() + return + end local world = Config.Find(Config.Worlds, dexWorld) local all = Config.Zones[dexWorld].fish local found = 0 @@ -1302,6 +1387,10 @@ for i, w in ipairs(Config.Worlds) do end) end end +dexTabButtons.Curios = btn({ Size = UDim2.new(0, 170, 1, 0), Text = "✨ Диковинки", TextSize = 15, BackgroundColor3 = C.panel2, LayoutOrder = 99, Parent = dexTabs }, function() + dexWorld = "Curios" + renderDex() +end) -- только в Studio, для снимков окон: атрибут игрока DevFakeBag = N подставляет N рыб в сумку -- и отмечает их пойманными в коллекции (на сервер ничего не уходит, в игре не работает) @@ -1722,6 +1811,10 @@ sideButton(6, "⚙", "Звук", nil, Color3.fromRGB(150, 120, 80), function() end) Theme.kit.bagWin = bagWin -- кнопка «Рюкзак» внизу справа (HudBar.client.lua) Theme.kit.windows = { bag = bagWin, worlds = worldsWin, quests = questWin, donate = robuxWin, sound = settingsWin, shop = shopWin } +Theme.kit.windows.curios = { open = function() -- для снимков в Studio: DevOpen = "curios" + dexWorld = "Curios" + bagWin.open("dex") +end } -- только в Studio, для снимков: атрибут DevOpen = "окно" или "окно:вкладка" открывает окно (guild добавляет GuildClient) player:GetAttributeChangedSignal("DevOpen"):Connect(function() local v = RunService:IsStudio() and player:GetAttribute("DevOpen")