освещение, уведомления

This commit is contained in:
listik committed 2026-11-04 15:42:18 +03:00
1 parent 15c64d9eb2
commit bea9df1ab8
8 files changed
+238 -48

No files matched your search

+100 -23
View File
@@ -59390,27 +59390,27 @@ gReA/4D/gP+A54EXgP+A/4D/gOeBF4D/gP+A/4DngReA/4D/gP+A5w==]]></BinaryString>
<Item class="Camera" referent="RBX01E056795B054370B5DD08C0B49C7462"> <Item class="Camera" referent="RBX01E056795B054370B5DD08C0B49C7462">
<Properties> <Properties>
<CoordinateFrame name="CFrame"> <CoordinateFrame name="CFrame">
<X>20.2999058</X> <X>-18.8116379</X>
<Y>31.1698551</Y> <Y>12.8512745</Y>
<Z>1531.64453</Z> <Z>1557.479</Z>
<R00>-0.827154875</R00> <R00>-0.579209983</R00>
<R01>-0.234011233</R01> <R01>0.231809437</R01>
<R02>0.510933936</R02> <R02>-0.78152436</R02>
<R10>-0</R10> <R10>-0</R10>
<R11>0.909177184</R11> <R11>0.958715796</R11>
<R12>0.416409373</R12> <R12>0.284366518</R12>
<R20>-0.561973989</R20> <R20>0.815178394</R20>
<R21>0.344435036</R21> <R21>0.164707929</R21>
<R22>-0.752030373</R22> <R22>-0.555297673</R22>
</CoordinateFrame> </CoordinateFrame>
<Ref name="CameraSubject">null</Ref> <Ref name="CameraSubject">null</Ref>
<token name="CameraType">0</token> <token name="CameraType">0</token>
<float name="FieldOfView">70</float> <float name="FieldOfView">70</float>
<token name="FieldOfViewMode">0</token> <token name="FieldOfViewMode">0</token>
<CoordinateFrame name="Focus"> <CoordinateFrame name="Focus">
<X>19.2781429</X> <X>-17.2485886</X>
<Y>30.337122</Y> <Y>12.2825413</Y>
<Z>1533.14844</Z> <Z>1558.5896</Z>
<R00>1</R00> <R00>1</R00>
<R01>0</R01> <R01>0</R01>
<R02>0</R02> <R02>0</R02>
@@ -2762941,8 +2762941,8 @@ local function notify(msg, color)
items[1]:Destroy() items[1]:Destroy()
end end
local t, l = softPlate( local t, l = softPlate(
{ Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
{ TextSize = 30, TextColor3 = color or C.text, Text = msg } { TextSize = 24, TextColor3 = color or C.text, Text = msg }
) )
popIn(t) popIn(t)
t:SetAttribute("Msg", msg) 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 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 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) local function showCatch(fish, extra)
catchToken += 1 catchToken += 1
local my = catchToken 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), 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 "") (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "")
catchCard.Visible = true 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() 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() task.delay(3.4, function()
if my == catchToken then 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) }) 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() tw:Play()
H.placeToasts(false)
tw.Completed:Wait() tw.Completed:Wait()
if my == catchToken then if my == catchToken then
catchCard.Visible = false catchCard.Visible = false
@@ -2763791,7 +2763804,8 @@ do
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) 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) 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.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(toasts).Scale = compact and 0.75 or 1
scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1
scaleOf(mgFrame).Scale = compact and 0.85 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1
@@ -2765756,6 +2765770,63 @@ local function refreshPill(clock, night, w, placeId)
end end
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 clock = clockNow()
local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0 local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0
local night = nightness >= 0.5 local night = nightness >= 0.5
updateLamps(nightness)
local w = currentWeather() local w = currentWeather()
local _, placeId = currentPlace() local _, placeId = currentPlace()
@@ -2766934,7 +2767006,8 @@ end
---------------------------------------------------------------- баннер редкого улова ---------------------------------------------------------------- баннер редкого улова
local banner = new("Frame", { 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, 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) }) }, { new("UICorner", { CornerRadius = UDim.new(0, 12) }), Theme.woodGradient(C.wood, C.woodDark) })
local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner }) local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner })
@@ -2767878,19 +2767951,23 @@ Config.Worlds = {
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
look = { look = {
lighting = { 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), Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
ColorShift_Top = Color3.fromRGB(255, 232, 196), ColorShift_Top = Color3.fromRGB(255, 232, 196),
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6,
}, },
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
atmosphere = { atmosphere = {
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, 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 = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
}, },
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 },
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём
sunRays = { Intensity = 0.06, Spread = 0.6 }, 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 }, dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
}, },
+9 -5
View File
@@ -21,19 +21,23 @@ Config.Worlds = {
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
look = { look = {
lighting = { 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), Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
ColorShift_Top = Color3.fromRGB(255, 232, 196), ColorShift_Top = Color3.fromRGB(255, 232, 196),
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6,
}, },
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
atmosphere = { atmosphere = {
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, 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 = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
}, },
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 },
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём
sunRays = { Intensity = 0.06, Spread = 0.6 }, 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 }, dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
}, },
@@ -297,8 +297,8 @@ local function notify(msg, color)
items[1]:Destroy() items[1]:Destroy()
end end
local t, l = softPlate( local t, l = softPlate(
{ Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
{ TextSize = 30, TextColor3 = color or C.text, Text = msg } { TextSize = 24, TextColor3 = color or C.text, Text = msg }
) )
popIn(t) popIn(t)
t:SetAttribute("Msg", msg) 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 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 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) local function showCatch(fish, extra)
catchToken += 1 catchToken += 1
local my = catchToken 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), 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 "") (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "")
catchCard.Visible = true 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() 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() task.delay(3.4, function()
if my == catchToken then 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) }) 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() tw:Play()
H.placeToasts(false)
tw.Completed:Wait() tw.Completed:Wait()
if my == catchToken then if my == catchToken then
catchCard.Visible = false catchCard.Visible = false
@@ -1147,7 +1160,8 @@ do
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) 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) 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.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(toasts).Scale = compact and 0.75 or 1
scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1
scaleOf(mgFrame).Scale = compact and 0.85 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1
+26 -8
View File
@@ -30,19 +30,23 @@ Config.Worlds = {
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
look = { look = {
lighting = { 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), Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
ColorShift_Top = Color3.fromRGB(255, 232, 196), ColorShift_Top = Color3.fromRGB(255, 232, 196),
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6,
}, },
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
atmosphere = { atmosphere = {
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, 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 = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
}, },
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 },
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём
sunRays = { Intensity = 0.06, Spread = 0.6 }, 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 }, dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
}, },
@@ -6559,8 +6563,8 @@ local function notify(msg, color)
items[1]:Destroy() items[1]:Destroy()
end end
local t, l = softPlate( local t, l = softPlate(
{ Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
{ TextSize = 30, TextColor3 = color or C.text, Text = msg } { TextSize = 24, TextColor3 = color or C.text, Text = msg }
) )
popIn(t) popIn(t)
t:SetAttribute("Msg", msg) 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 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 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) local function showCatch(fish, extra)
catchToken += 1 catchToken += 1
local my = catchToken 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), 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 "") (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "")
catchCard.Visible = true 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() 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() task.delay(3.4, function()
if my == catchToken then 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) }) 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() tw:Play()
H.placeToasts(false)
tw.Completed:Wait() tw.Completed:Wait()
if my == catchToken then if my == catchToken then
catchCard.Visible = false catchCard.Visible = false
@@ -7409,7 +7426,8 @@ do
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) 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) 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.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(toasts).Scale = compact and 0.75 or 1
scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1
scaleOf(mgFrame).Scale = compact and 0.85 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1
+9 -5
View File
@@ -20,19 +20,23 @@ Config.Worlds = {
-- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder -- свет и эффекты: свойства Lighting и его эффектов; чего здесь нет, остаётся как в MapBuilder
look = { look = {
lighting = { 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), Ambient = Color3.fromRGB(62, 66, 84), OutdoorAmbient = Color3.fromRGB(105, 112, 132),
ColorShift_Top = Color3.fromRGB(255, 232, 196), ColorShift_Top = Color3.fromRGB(255, 232, 196),
EnvironmentDiffuseScale = 0.6, EnvironmentSpecularScale = 0.8, EnvironmentDiffuseScale = 0.5, EnvironmentSpecularScale = 0.6,
}, },
-- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта -- дымка вдали: Density — сколько тумана, Haze — насколько он плотный у горизонта
atmosphere = { atmosphere = {
Density = 0.38, Offset = 0.1, Haze = 1.2, Glare = 0.15, 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 = Color3.fromRGB(188, 204, 224), Decay = Color3.fromRGB(196, 176, 160),
}, },
color = { Saturation = 0.28, Contrast = 0.2, Brightness = -0.02 }, color = { Saturation = 0.16, Contrast = 0.12, Brightness = -0.04 },
bloom = { Intensity = 0.45, Size = 28, Threshold = 1.2 }, -- свечение только у по-настоящему ярких мест (огни ночью), без ореолов вокруг светлого днём
sunRays = { Intensity = 0.06, Spread = 0.6 }, 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 }, dof = { Enabled = true, FarIntensity = 0.2, FocusDistance = 60, InFocusRadius = 120, NearIntensity = 0 },
}, },
@@ -108,7 +108,8 @@ end
---------------------------------------------------------------- баннер редкого улова ---------------------------------------------------------------- баннер редкого улова
local banner = new("Frame", { 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, 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) }) }, { new("UICorner", { CornerRadius = UDim.new(0, 12) }), Theme.woodGradient(C.wood, C.woodDark) })
local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner }) local bannerStroke = new("UIStroke", { Thickness = 3, Color = C.gold, Parent = banner })
@@ -283,6 +283,63 @@ local function refreshPill(clock, night, w, placeId)
end end
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 clock = clockNow()
local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0 local nightness = Config.DayNight.enabled and Config.Nightness(clock) or 0
local night = nightness >= 0.5 local night = nightness >= 0.5
updateLamps(nightness)
local w = currentWeather() local w = currentWeather()
local _, placeId = currentPlace() local _, placeId = currentPlace()
@@ -296,8 +296,8 @@ local function notify(msg, color)
items[1]:Destroy() items[1]:Destroy()
end end
local t, l = softPlate( local t, l = softPlate(
{ Size = UDim2.new(0, 0, 0, 54), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts }, { Size = UDim2.new(0, 0, 0, 44), AutomaticSize = Enum.AutomaticSize.X, LayoutOrder = toastOrder, Parent = toasts },
{ TextSize = 30, TextColor3 = color or C.text, Text = msg } { TextSize = 24, TextColor3 = color or C.text, Text = msg }
) )
popIn(t) popIn(t)
t:SetAttribute("Msg", msg) 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 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 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) local function showCatch(fish, extra)
catchToken += 1 catchToken += 1
local my = catchToken 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), 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 "") (extra and extra.combo and extra.combo > 1.001) and (" 🔥 x%.1f"):format(extra.combo) or "")
catchCard.Visible = true 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() 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() task.delay(3.4, function()
if my == catchToken then 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) }) 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() tw:Play()
H.placeToasts(false)
tw.Completed:Wait() tw.Completed:Wait()
if my == catchToken then if my == catchToken then
catchCard.Visible = false catchCard.Visible = false
@@ -1146,7 +1159,8 @@ do
side.Position = compact and UDim2.fromOffset(8, 172) or UDim2.fromOffset(12, 216) 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) 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.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(toasts).Scale = compact and 0.75 or 1
scaleOf(catchCard).Scale = compact and 0.8 or 1 scaleOf(catchCard).Scale = compact and 0.8 or 1
scaleOf(mgFrame).Scale = compact and 0.85 or 1 scaleOf(mgFrame).Scale = compact and 0.85 or 1