From f9c2ff77bd6668a35577b6c124b573050a9fcc3a Mon Sep 17 00:00:00 2001 From: heyshawtyy <108924601+heyshawtyy@users.noreply.github.com> Date: Fri, 13 Nov 2026 15:11:53 +0500 Subject: [PATCH] =?UTF-8?q?=D0=AD=D0=BA=D0=BE=D0=BD=D0=BE=D0=BC=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0=20v3:=20=D1=82=D0=B0=D0=B9=D0=BC=D0=B5=D1=80=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=B0=D1=80=D0=BA=D0=B0=20=D0=B2=20HUD,=20?= =?UTF-8?q?=D0=B0=D1=80=D0=B5=D0=BD=D0=B4=D0=B0=20=D0=B2=20=D0=BE=D0=BA?= =?UTF-8?q?=D0=BD=D0=B5=20=D0=B4=D0=BE=D0=BC=D0=B0,=20=D0=BE=D1=82=D0=BB?= =?UTF-8?q?=D0=B0=D0=B4=D0=BE=D1=87=D0=BD=D1=8B=D0=B5=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B4=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ServerScriptService/GameServer.server.lua | 21 +++++++++++++++++++ .../FishingClient.client.lua | 18 ++++++++++++++++ .../HouseClient.client.lua | 13 +++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) diff --git a/src/ServerScriptService/GameServer.server.lua b/src/ServerScriptService/GameServer.server.lua index 0f2c6a0..4dcf8b2 100644 --- a/src/ServerScriptService/GameServer.server.lua +++ b/src/ServerScriptService/GameServer.server.lua @@ -2254,6 +2254,27 @@ if RunService:IsStudio() then end elseif op == "action" then onRemote(player, a, b, c) + elseif op == "xp" then + -- опыт как за поимку (проверка наград за уровень) + local data = profiles[player] + if data then + addXp(player, data, a, "Debug") + end + return data and data.level + elseif op == "giftIn" then + -- следующий подарок за время — через a секунд + local g = Config.PlaytimeGifts[(giftIndex[player] or 0) + 1] + if g then + sessionStart[player] = os.time() - g.minutes * 60 + (a or 0) + setGiftAttr(player) + end + return player:GetAttribute("GiftNextAt") + elseif op == "houses" then + -- вызвать Houses[a](player, b, c) (spin, upgrade, collectRent с профилем) + if a == "collectRent" then + return Houses.collectRent(player, profiles[player]) + end + return Houses[a](player, b, c) elseif op == "grant" then -- выдать рыбу как пойманную (для проверок рынка) local data = profiles[player] diff --git a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua index 8f4bb99..403f799 100644 --- a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua @@ -3137,6 +3137,24 @@ do new("Frame", { Size = UDim2.new(1, 0, 0, 1), Position = UDim2.new(0, 0, 1, 1), BackgroundColor3 = C.goldDark, BorderSizePixel = 0, Parent = title }) end +-- подарок за время в игре: плашка под свитком «Цели» (атрибут GiftNextAt — время в секундах, 0 — подарки кончились) +do + H.giftChip, H.giftText = Theme.chip(rightCol, "gift", 3, C.goldBright) + H.giftChip.Visible = false + Theme.tooltip(H.giftChip, "Подарки за время в игре: серебро, наживка, жемчуг") + task.spawn(function() + while true do + local at = player:GetAttribute("GiftNextAt") or 0 + H.giftChip.Visible = at > 0 + if at > 0 then + local left = at - os.time() + H.giftText.Text = left > 0 and ("Подарок через %s"):format(timeStr(left)) or "Подарок вот-вот!" + end + task.wait(1) + end + end) +end + local function trackerLine(order, onClick) local root = new("TextButton", { Size = UDim2.new(1, 0, 0, 38), BackgroundTransparency = 1, AutoButtonColor = false, Text = "", LayoutOrder = order, Parent = tracker }) local label = text({ Size = UDim2.new(1, 0, 0, 22), Font = BODY, TextSize = 14, RichText = true, TextTruncate = Enum.TextTruncate.AtEnd, Text = "", diff --git a/src/StarterPlayer/StarterPlayerScripts/HouseClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/HouseClient.client.lua index 4ef2901..6ca9953 100644 --- a/src/StarterPlayer/StarterPlayerScripts/HouseClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/HouseClient.client.lua @@ -100,7 +100,7 @@ local function render() local coins = player:GetAttribute("Coins") or 0 local plot = player:GetAttribute("HousePlot") - local head = card(list, 1, 96, C.gold) + local head = card(list, 1, 120, C.gold) text({ Size = UDim2.new(1, -24, 0, 30), Position = UDim2.fromOffset(12, 8), Font = TITLE, TextSize = 24, TextColor3 = C.goldBright, Text = ("Ур. %d · %s"):format(lvl, HC.name(lvl)), Parent = head }) text({ Size = UDim2.new(1, -24, 0, 20), Position = UDim2.fromOffset(12, 38), TextSize = 15, TextColor3 = C.muted, @@ -112,6 +112,11 @@ local function render() new("Frame", { Size = UDim2.fromScale(lvl / HC.MaxLevel, 1), BackgroundColor3 = Color3.fromRGB(110, 200, 110), BorderSizePixel = 0, Parent = bar }, { corner(7) }) text({ Size = UDim2.fromScale(1, 1), TextSize = 12, TextXAlignment = CENTER, Font = TITLE, Text = lvl .. " / " .. HC.MaxLevel, TextStrokeTransparency = 0.4, TextStrokeColor3 = C.ink, Parent = bar }) + -- аренда: дом приносит серебро, пока тебя нет (копится до HC.Rent.maxHours часов) + local rent = HC.rentPerHour(lvl) + text({ Size = UDim2.new(1, -24, 0, 22), Position = UDim2.fromOffset(12, 90), TextSize = 16, TextColor3 = rent > 0 and Color3.fromRGB(160, 240, 160) or C.muted, + Text = rent > 0 and ("Аренда: %s %s/ч · копится до %d ч"):format(fmt(rent), Theme.SILVER, HC.Rent.maxHours) + or ("Аренда начнётся с 1-го уровня · копится до %d ч"):format(HC.Rent.maxHours), Parent = head }) if lvl < HC.MaxLevel then local nextLv = lvl + 1 @@ -158,6 +163,12 @@ local cos = { owned = {}, equip = {} } -- последнее состояние local lastSpin = {} -- [категория] = { [id] = сколько выпало в последней крутке } local spinning = false -- идёт открытие: строки не перерисовываем, повторно не крутим +task.spawn(function() -- для снимков в Studio: DevOpen = "house" + while not K.windows do + task.wait(0.2) + end + K.windows.house = win +end) local pcWin = K.makeWindow("💻 Компьютер", Color3.fromRGB(70, 200, 120), { { id = "spin", label = "🎲 Улучшения" } }) local pcList = K.scrollArea(pcWin.pages.spin) closeButton(pcWin.frame, function()