освещение, уведомления
This commit is contained in:
1 parent
15c64d9eb2
commit
bea9df1ab8
8 files changed
+238
-48
No files matched your search
+100
-23
@@ -59390,27 +59390,27 @@ gReA/4D/gP+A54EXgP+A/4D/gOeBF4D/gP+A/4DngReA/4D/gP+A5w==]]></BinaryString>
|
||||
<Item class="Camera" referent="RBX01E056795B054370B5DD08C0B49C7462">
|
||||
<Properties>
|
||||
<CoordinateFrame name="CFrame">
|
||||
<X>20.2999058</X>
|
||||
<Y>31.1698551</Y>
|
||||
<Z>1531.64453</Z>
|
||||
<R00>-0.827154875</R00>
|
||||
<R01>-0.234011233</R01>
|
||||
<R02>0.510933936</R02>
|
||||
<X>-18.8116379</X>
|
||||
<Y>12.8512745</Y>
|
||||
<Z>1557.479</Z>
|
||||
<R00>-0.579209983</R00>
|
||||
<R01>0.231809437</R01>
|
||||
<R02>-0.78152436</R02>
|
||||
<R10>-0</R10>
|
||||
<R11>0.909177184</R11>
|
||||
<R12>0.416409373</R12>
|
||||
<R20>-0.561973989</R20>
|
||||
<R21>0.344435036</R21>
|
||||
<R22>-0.752030373</R22>
|
||||
<R11>0.958715796</R11>
|
||||
<R12>0.284366518</R12>
|
||||
<R20>0.815178394</R20>
|
||||
<R21>0.164707929</R21>
|
||||
<R22>-0.555297673</R22>
|
||||
</CoordinateFrame>
|
||||
<Ref name="CameraSubject">null</Ref>
|
||||
<token name="CameraType">0</token>
|
||||
<float name="FieldOfView">70</float>
|
||||
<token name="FieldOfViewMode">0</token>
|
||||
<CoordinateFrame name="Focus">
|
||||
<X>19.2781429</X>
|
||||
<Y>30.337122</Y>
|
||||
<Z>1533.14844</Z>
|
||||
<X>-17.2485886</X>
|
||||
<Y>12.2825413</Y>
|
||||
<Z>1558.5896</Z>
|
||||
<R00>1</R00>
|
||||
<R01>0</R01>
|
||||
<R02>0</R02>
|
||||
@@ -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 },
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user