From bea9df1ab8437aba5056673b1e93498647a586cf Mon Sep 17 00:00:00 2001 From: listik Date: Wed, 4 Nov 2026 15:42:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D1=81=D0=B2=D0=B5=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5,=20=D1=83=D0=B2=D0=B5=D0=B4=D0=BE=D0=BC=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Fishing.rbxlx | 123 ++++++++++++++---- install/1_FishConfig_ReplicatedStorage.rbxmx | 14 +- ...5_FishingClient_StarterPlayerScripts.rbxmx | 20 ++- install/INSTALL.lua | 34 +++-- src/ReplicatedStorage/FishConfig.lua | 14 +- .../ActivityFeed.client.lua | 3 +- .../StarterPlayerScripts/Ambience.client.lua | 58 +++++++++ .../FishingClient.client.lua | 20 ++- 8 files changed, 238 insertions(+), 48 deletions(-) diff --git a/Fishing.rbxlx b/Fishing.rbxlx index 7ab54b5..bef48f5 100644 --- a/Fishing.rbxlx +++ b/Fishing.rbxlx @@ -59390,27 +59390,27 @@ gReA/4D/gP+A54EXgP+A/4D/gOeBF4D/gP+A/4DngReA/4D/gP+A5w==]]> - 20.2999058 - 31.1698551 - 1531.64453 - -0.827154875 - -0.234011233 - 0.510933936 + -18.8116379 + 12.8512745 + 1557.479 + -0.579209983 + 0.231809437 + -0.78152436 -0 - 0.909177184 - 0.416409373 - -0.561973989 - 0.344435036 - -0.752030373 + 0.958715796 + 0.284366518 + 0.815178394 + 0.164707929 + -0.555297673 null 0 70 0 - 19.2781429 - 30.337122 - 1533.14844 + -17.2485886 + 12.2825413 + 1558.5896 1 0 0 @@ -2762941,8 +2762941,8 @@ local function notify(msg, color) items[1]:Destroy() end local t, l = softPlate( - { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, - { TextSize = 30, TextColor3 = color or C.text, Text = msg } + { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 24, TextColor3 = color or C.text, Text = msg } ) popIn(t) t:SetAttribute("Msg", msg) @@ -2762975,6 +2762975,17 @@ local catchInfo = text({ Size = UDim2.new(1, -160, 0, 20), Position = UDim2.from local catchValue = text({ Size = UDim2.new(1, -160, 0, 26), Position = UDim2.fromOffset(152, 90), Font = TITLE, TextSize = 21, TextColor3 = C.gold, Text = "", Parent = catchCard }) local catchToken = 0 +-- уведомления и карточка улова — в одной колонке сверху: пока карточка видна, уведомления уходят под неё +H.toastBaseY = 84 +function H.placeToasts(cardShown) + local y = H.toastBaseY + if cardShown then + local sc = catchCard:FindFirstChildOfClass("UIScale") + y = 120 + catchCard.Size.Y.Offset * (sc and sc.Scale or 1) + 10 + end + TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play() +end + local function showCatch(fish, extra) catchToken += 1 local my = catchToken @@ -2762993,11 +2763004,13 @@ local function showCatch(fish, extra) catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true + H.placeToasts(true) TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() task.delay(3.4, function() if my == catchToken then local tw = TweenService:Create(catchCard, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, 0, 0, -220) }) tw:Play() + H.placeToasts(false) tw.Completed:Wait() if my == catchToken then catchCard.Visible = false @@ -2763791,7 +2763804,8 @@ do side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) - toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84) + H.toastBaseY = compact and 66 or 84 + toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY) scaleOf(toasts).Scale = compact and 0.75 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1 @@ -2765756,6 +2765770,63 @@ local function refreshPill(clock, night, w, placeId) end end +---------------------------------------------------------------- фонари: днём погашены, к ночи зажигаются +-- лампа — небольшая неоновая деталь со светом внутри (фонари площади, лавок, досок лидеров, домиков). +-- Днём неон и свет дают пересвет и ореолы, поэтому лампа становится матовым тёплым стеклом без света. +-- Порталы и прочее крупное свечение не трогаем. + +local LAMP_ON_AT = 0.3 -- с какой «ночности» (0 — день, 1 — ночь) фонари зажигаются +local lamps, lampScanAt, lampsLit = {}, -math.huge, nil + +local function scanLamps() + local map = workspace:FindFirstChild("FishingMap") + if not map then + return + end + for _, d in ipairs(map:GetDescendants()) do + if d:IsA("Light") and d.Parent:IsA("BasePart") and not lamps[d.Parent] then + local bulb = d.Parent + local s = bulb.Size + if bulb.Material == Enum.Material.Neon and math.max(s.X, s.Y, s.Z) <= 2.5 then + lamps[bulb] = { color = bulb.Color, lights = {} } + end + end + end + for bulb, l in pairs(lamps) do + table.clear(l.lights) + for _, c in ipairs(bulb:GetChildren()) do + if c:IsA("Light") then + table.insert(l.lights, c) + end + end + end +end + +local function updateLamps(nightness) + if os.clock() - lampScanAt > 10 then + lampScanAt = os.clock() + scanLamps() + lampsLit = nil -- новые лампы — применить ещё раз + end + local lit = nightness >= LAMP_ON_AT + if lit == lampsLit then + return + end + lampsLit = lit + for bulb, l in pairs(lamps) do + if bulb.Parent then + bulb.Material = lit and Enum.Material.Neon or Enum.Material.SmoothPlastic + -- погашенная лампа — тёплое матовое стекло чуть темнее горящей + bulb.Color = lit and l.color or l.color:Lerp(Color3.fromRGB(150, 120, 90), 0.35) + for _, light in ipairs(l.lights) do + light.Enabled = lit + end + else + lamps[bulb] = nil + end + end +end + ---------------------------------------------------------------- главный цикл -- часы двигаются каждый кадр (плавно), остальное проверяется раз в полсекунды @@ -2765778,6 +2765849,7 @@ task.spawn(function() local clock = clockNow() local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0 local night = nightness >= 0.5 + updateLamps(nightness) local w = currentWeather() local _, placeId = currentPlace() @@ -2766934,7 +2767006,8 @@ end ---------------------------------------------------------------- баннер редкого улова local banner = new("Frame", { - Size = UDim2.fromOffset(560, 92), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0.28, 0), + -- внизу над полосой подсечки (она занимает 100…224 px от низа): верх экрана — для своих уведомлений и карточки улова + Size = UDim2.fromOffset(560, 92), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -240), BackgroundColor3 = Color3.new(1, 1, 1), Visible = false, ZIndex = 20, Parent = root, }, { new("UICorner", { CornerRadius = UDim.new(0, 12) }), Theme.woodGradient(C.wood, C.woodDark) }) local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner }) @@ -2767878,19 +2767951,23 @@ Config.Worlds = { -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder look = { lighting = { - Brightness = 2.6, ExposureCompensation = -0.15, + -- днём солнце не выжигает светлый песок и траву: яркость и экспозиция ниже + Brightness = 2.0, ExposureCompensation = -0.35, Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132), ColorShift_Top = Color3.fromRGB(255, 232, 196), - EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, + EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6, }, -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта atmosphere = { Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160), }, - color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, - bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, - sunRays = { Intensity = 0.06, Spread = 0.6 }, + color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 }, + -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём + bloom = { Intensity = 0.25, Size = 24, Threshold = 1.9 }, + sunRays = { Intensity = 0.05, Spread = 0.6 }, + -- мягкий тонмаппинг: светлое не выгорает в белое + grading = { TonemapperPreset = Enum.TonemapperPreset.Default }, -- лёгкое размытие дальнего плана dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 }, }, diff --git a/install/1_FishConfig_ReplicatedStorage.rbxmx b/install/1_FishConfig_ReplicatedStorage.rbxmx index e5254d9..8626f06 100644 --- a/install/1_FishConfig_ReplicatedStorage.rbxmx +++ b/install/1_FishConfig_ReplicatedStorage.rbxmx @@ -21,19 +21,23 @@ Config.Worlds = { -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder look = { lighting = { - Brightness = 2.6, ExposureCompensation = -0.15, + -- днём солнце не выжигает светлый песок и траву: яркость и экспозиция ниже + Brightness = 2.0, ExposureCompensation = -0.35, Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132), ColorShift_Top = Color3.fromRGB(255, 232, 196), - EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, + EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6, }, -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта atmosphere = { Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160), }, - color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, - bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, - sunRays = { Intensity = 0.06, Spread = 0.6 }, + color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 }, + -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём + bloom = { Intensity = 0.25, Size = 24, Threshold = 1.9 }, + sunRays = { Intensity = 0.05, Spread = 0.6 }, + -- мягкий тонмаппинг: светлое не выгорает в белое + grading = { TonemapperPreset = Enum.TonemapperPreset.Default }, -- лёгкое размытие дальнего плана dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 }, }, diff --git a/install/5_FishingClient_StarterPlayerScripts.rbxmx b/install/5_FishingClient_StarterPlayerScripts.rbxmx index 761e89f..e644c0d 100644 --- a/install/5_FishingClient_StarterPlayerScripts.rbxmx +++ b/install/5_FishingClient_StarterPlayerScripts.rbxmx @@ -297,8 +297,8 @@ local function notify(msg, color) items[1]:Destroy() end local t, l = softPlate( - { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, - { TextSize = 30, TextColor3 = color or C.text, Text = msg } + { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 24, TextColor3 = color or C.text, Text = msg } ) popIn(t) t:SetAttribute("Msg", msg) @@ -331,6 +331,17 @@ local catchInfo = text({ Size = UDim2.new(1, -160, 0, 20), Position = UDim2.from local catchValue = text({ Size = UDim2.new(1, -160, 0, 26), Position = UDim2.fromOffset(152, 90), Font = TITLE, TextSize = 21, TextColor3 = C.gold, Text = "", Parent = catchCard }) local catchToken = 0 +-- уведомления и карточка улова — в одной колонке сверху: пока карточка видна, уведомления уходят под неё +H.toastBaseY = 84 +function H.placeToasts(cardShown) + local y = H.toastBaseY + if cardShown then + local sc = catchCard:FindFirstChildOfClass("UIScale") + y = 120 + catchCard.Size.Y.Offset * (sc and sc.Scale or 1) + 10 + end + TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play() +end + local function showCatch(fish, extra) catchToken += 1 local my = catchToken @@ -349,11 +360,13 @@ local function showCatch(fish, extra) catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true + H.placeToasts(true) TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() task.delay(3.4, function() if my == catchToken then local tw = TweenService:Create(catchCard, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, 0, 0, -220) }) tw:Play() + H.placeToasts(false) tw.Completed:Wait() if my == catchToken then catchCard.Visible = false @@ -1147,7 +1160,8 @@ do side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) - toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84) + H.toastBaseY = compact and 66 or 84 + toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY) scaleOf(toasts).Scale = compact and 0.75 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1 diff --git a/install/INSTALL.lua b/install/INSTALL.lua index e177358..d955a32 100644 --- a/install/INSTALL.lua +++ b/install/INSTALL.lua @@ -30,19 +30,23 @@ Config.Worlds = { -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder look = { lighting = { - Brightness = 2.6, ExposureCompensation = -0.15, + -- днём солнце не выжигает светлый песок и траву: яркость и экспозиция ниже + Brightness = 2.0, ExposureCompensation = -0.35, Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132), ColorShift_Top = Color3.fromRGB(255, 232, 196), - EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, + EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6, }, -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта atmosphere = { Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160), }, - color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, - bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, - sunRays = { Intensity = 0.06, Spread = 0.6 }, + color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 }, + -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём + bloom = { Intensity = 0.25, Size = 24, Threshold = 1.9 }, + sunRays = { Intensity = 0.05, Spread = 0.6 }, + -- мягкий тонмаппинг: светлое не выгорает в белое + grading = { TonemapperPreset = Enum.TonemapperPreset.Default }, -- лёгкое размытие дальнего плана dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 }, }, @@ -6559,8 +6563,8 @@ local function notify(msg, color) items[1]:Destroy() end local t, l = softPlate( - { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, - { TextSize = 30, TextColor3 = color or C.text, Text = msg } + { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 24, TextColor3 = color or C.text, Text = msg } ) popIn(t) t:SetAttribute("Msg", msg) @@ -6593,6 +6597,17 @@ local catchInfo = text({ Size = UDim2.new(1, -160, 0, 20), Position = UDim2.from local catchValue = text({ Size = UDim2.new(1, -160, 0, 26), Position = UDim2.fromOffset(152, 90), Font = TITLE, TextSize = 21, TextColor3 = C.gold, Text = "", Parent = catchCard }) local catchToken = 0 +-- уведомления и карточка улова — в одной колонке сверху: пока карточка видна, уведомления уходят под неё +H.toastBaseY = 84 +function H.placeToasts(cardShown) + local y = H.toastBaseY + if cardShown then + local sc = catchCard:FindFirstChildOfClass("UIScale") + y = 120 + catchCard.Size.Y.Offset * (sc and sc.Scale or 1) + 10 + end + TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play() +end + local function showCatch(fish, extra) catchToken += 1 local my = catchToken @@ -6611,11 +6626,13 @@ local function showCatch(fish, extra) catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true + H.placeToasts(true) TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() task.delay(3.4, function() if my == catchToken then local tw = TweenService:Create(catchCard, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, 0, 0, -220) }) tw:Play() + H.placeToasts(false) tw.Completed:Wait() if my == catchToken then catchCard.Visible = false @@ -7409,7 +7426,8 @@ do side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) - toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84) + H.toastBaseY = compact and 66 or 84 + toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY) scaleOf(toasts).Scale = compact and 0.75 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1 diff --git a/src/ReplicatedStorage/FishConfig.lua b/src/ReplicatedStorage/FishConfig.lua index f63abe5..493256d 100644 --- a/src/ReplicatedStorage/FishConfig.lua +++ b/src/ReplicatedStorage/FishConfig.lua @@ -20,19 +20,23 @@ Config.Worlds = { -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder look = { lighting = { - Brightness = 2.6, ExposureCompensation = -0.15, + -- днём солнце не выжигает светлый песок и траву: яркость и экспозиция ниже + Brightness = 2.0, ExposureCompensation = -0.35, Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132), ColorShift_Top = Color3.fromRGB(255, 232, 196), - EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, + EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6, }, -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта atmosphere = { Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, Color = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160), }, - color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, - bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, - sunRays = { Intensity = 0.06, Spread = 0.6 }, + color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 }, + -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём + bloom = { Intensity = 0.25, Size = 24, Threshold = 1.9 }, + sunRays = { Intensity = 0.05, Spread = 0.6 }, + -- мягкий тонмаппинг: светлое не выгорает в белое + grading = { TonemapperPreset = Enum.TonemapperPreset.Default }, -- лёгкое размытие дальнего плана dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 }, }, diff --git a/src/StarterPlayer/StarterPlayerScripts/ActivityFeed.client.lua b/src/StarterPlayer/StarterPlayerScripts/ActivityFeed.client.lua index 260822f..d25c612 100644 --- a/src/StarterPlayer/StarterPlayerScripts/ActivityFeed.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/ActivityFeed.client.lua @@ -108,7 +108,8 @@ end ---------------------------------------------------------------- баннер редкого улова local banner = new("Frame", { - Size = UDim2.fromOffset(560, 92), AnchorPoint = Vector2.new(0.5, 0), Position = UDim2.new(0.5, 0, 0.28, 0), + -- внизу над полосой подсечки (она занимает 100…224 px от низа): верх экрана — для своих уведомлений и карточки улова + Size = UDim2.fromOffset(560, 92), AnchorPoint = Vector2.new(0.5, 1), Position = UDim2.new(0.5, 0, 1, -240), BackgroundColor3 = Color3.new(1, 1, 1), Visible = false, ZIndex = 20, Parent = root, }, { new("UICorner", { CornerRadius = UDim.new(0, 12) }), Theme.woodGradient(C.wood, C.woodDark) }) local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner }) diff --git a/src/StarterPlayer/StarterPlayerScripts/Ambience.client.lua b/src/StarterPlayer/StarterPlayerScripts/Ambience.client.lua index 89a5ad0..24a9e52 100644 --- a/src/StarterPlayer/StarterPlayerScripts/Ambience.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/Ambience.client.lua @@ -283,6 +283,63 @@ local function refreshPill(clock, night, w, placeId) end end +---------------------------------------------------------------- фонари: днём погашены, к ночи зажигаются +-- лампа — небольшая неоновая деталь со светом внутри (фонари площади, лавок, досок лидеров, домиков). +-- Днём неон и свет дают пересвет и ореолы, поэтому лампа становится матовым тёплым стеклом без света. +-- Порталы и прочее крупное свечение не трогаем. + +local LAMP_ON_AT = 0.3 -- с какой «ночности» (0 — день, 1 — ночь) фонари зажигаются +local lamps, lampScanAt, lampsLit = {}, -math.huge, nil + +local function scanLamps() + local map = workspace:FindFirstChild("FishingMap") + if not map then + return + end + for _, d in ipairs(map:GetDescendants()) do + if d:IsA("Light") and d.Parent:IsA("BasePart") and not lamps[d.Parent] then + local bulb = d.Parent + local s = bulb.Size + if bulb.Material == Enum.Material.Neon and math.max(s.X, s.Y, s.Z) <= 2.5 then + lamps[bulb] = { color = bulb.Color, lights = {} } + end + end + end + for bulb, l in pairs(lamps) do + table.clear(l.lights) + for _, c in ipairs(bulb:GetChildren()) do + if c:IsA("Light") then + table.insert(l.lights, c) + end + end + end +end + +local function updateLamps(nightness) + if os.clock() - lampScanAt > 10 then + lampScanAt = os.clock() + scanLamps() + lampsLit = nil -- новые лампы — применить ещё раз + end + local lit = nightness >= LAMP_ON_AT + if lit == lampsLit then + return + end + lampsLit = lit + for bulb, l in pairs(lamps) do + if bulb.Parent then + bulb.Material = lit and Enum.Material.Neon or Enum.Material.SmoothPlastic + -- погашенная лампа — тёплое матовое стекло чуть темнее горящей + bulb.Color = lit and l.color or l.color:Lerp(Color3.fromRGB(150, 120, 90), 0.35) + for _, light in ipairs(l.lights) do + light.Enabled = lit + end + else + lamps[bulb] = nil + end + end +end + ---------------------------------------------------------------- главный цикл -- часы двигаются каждый кадр (плавно), остальное проверяется раз в полсекунды @@ -305,6 +362,7 @@ task.spawn(function() local clock = clockNow() local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0 local night = nightness >= 0.5 + updateLamps(nightness) local w = currentWeather() local _, placeId = currentPlace() diff --git a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua index 24ffa72..8216188 100644 --- a/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua +++ b/src/StarterPlayer/StarterPlayerScripts/FishingClient.client.lua @@ -296,8 +296,8 @@ local function notify(msg, color) items[1]:Destroy() end local t, l = softPlate( - { Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, - { TextSize = 30, TextColor3 = color or C.text, Text = msg } + { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, + { TextSize = 24, TextColor3 = color or C.text, Text = msg } ) popIn(t) t:SetAttribute("Msg", msg) @@ -330,6 +330,17 @@ local catchInfo = text({ Size = UDim2.new(1, -160, 0, 20), Position = UDim2.from local catchValue = text({ Size = UDim2.new(1, -160, 0, 26), Position = UDim2.fromOffset(152, 90), Font = TITLE, TextSize = 21, TextColor3 = C.gold, Text = "", Parent = catchCard }) local catchToken = 0 +-- уведомления и карточка улова — в одной колонке сверху: пока карточка видна, уведомления уходят под неё +H.toastBaseY = 84 +function H.placeToasts(cardShown) + local y = H.toastBaseY + if cardShown then + local sc = catchCard:FindFirstChildOfClass("UIScale") + y = 120 + catchCard.Size.Y.Offset * (sc and sc.Scale or 1) + 10 + end + TweenService:Create(toasts, TweenInfo.new(0.3, Enum.EasingStyle.Quad), { Position = UDim2.new(0.5, 0, 0, y) }):Play() +end + local function showCatch(fish, extra) catchToken += 1 local my = catchToken @@ -348,11 +359,13 @@ local function showCatch(fish, extra) catchValue.Text = ("⚪ %s ⭐ +%d XP%s"):format(fmt(fish.value), fish.xp * ((extra and extra.new) and 2 or 1), (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "") catchCard.Visible = true + H.placeToasts(true) TweenService:Create(catchCard, TweenInfo.new(0.45, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 120) }):Play() task.delay(3.4, function() if my == catchToken then local tw = TweenService:Create(catchCard, TweenInfo.new(0.35, Enum.EasingStyle.Quad, Enum.EasingDirection.In), { Position = UDim2.new(0.5, 0, 0, -220) }) tw:Play() + H.placeToasts(false) tw.Completed:Wait() if my == catchToken then catchCard.Visible = false @@ -1146,7 +1159,8 @@ do side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) side.Size = compact and UDim2.fromOffset(170, 240) or UDim2.fromOffset(70, 480) toasts.Size = compact and UDim2.fromOffset(640, 200) or UDim2.fromOffset(900, 200) - toasts.Position = compact and UDim2.new(0.5, 0, 0, 66) or UDim2.new(0.5, 0, 0, 84) + H.toastBaseY = compact and 66 or 84 + toasts.Position = UDim2.new(0.5, 0, 0, H.toastBaseY) scaleOf(toasts).Scale = compact and 0.75 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1