билборды

This commit is contained in:
listik committed 2026-11-04 15:30:52 +03:00
1 parent 0972c05e3d
commit 15c64d9eb2
9 files changed
+1759 -83

No files matched your search

+39 -7
View File
@@ -1352,13 +1352,17 @@ local function feed(kind, info)
remote:FireAllClients("Feed", kind, info)
end
pcall(function()
MessagingService:SubscribeAsync(FEED_TOPIC, function(msg)
local d = msg.Data
if type(d) == "table" and d.jobId ~= game.JobId then
d.remote = true -- улов на другом сервере
feed("catch", d)
end
-- подписка — в фоне: SubscribeAsync ждёт ответа сервиса (в неопубликованном плейсе — долго),
-- а скрипт должен сразу дойти до загрузки игроков, телепортов и остального
task.spawn(function()
pcall(function()
MessagingService:SubscribeAsync(FEED_TOPIC, function(msg)
local d = msg.Data
if type(d) == "table" and d.jobId ~= game.JobId then
d.remote = true -- улов на другом сервере
feed("catch", d)
end
end)
end)
end)
@@ -1642,6 +1646,9 @@ local function updateStats(player)
player:SetAttribute("BoostLeft", math.max(0, data.boostUntil - os.time()))
player:SetAttribute("TotalCaught", data.totalCaught)
player:SetAttribute("CoinsEarned", data.coinsEarned)
-- когда откроется следующая ежедневная награда (0 — уже доступна); по ней сундук в лобби прыгает только для тех,
-- кому есть что забрать
player:SetAttribute("DailyNextAt", data.daily.last >= today() and (data.daily.last + 1) * 86400 or 0)
player:SetAttribute("RobuxSpent", data.robuxSpent)
-- шаг обучения (линия-подсказка); у старых игроков без поля, уже ловивших рыбу, обучение пройдено
player:SetAttribute("Tutorial", data.tutorial or (data.totalCaught > 0 and Config.TutorialDone or 0))
@@ -6148,6 +6155,7 @@ local function spawnNpc(spot, parent)
return nil
end
rig.Name = name
rig:SetAttribute("Npc", true) -- по нему клиент находит NPC (взгляд на игрока, приветствие), сервер — включает idle
local hum = rig:FindFirstChildOfClass("Humanoid")
hum.DisplayName = name
hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
@@ -6194,6 +6202,12 @@ local function spawnNpc(spot, parent)
elderPart(V(1.0, 0.75, 0.35), CFrame.new(0, -0.55, -0.5), colors.hat)
elderPart(V(0.32, 0.3, 0.08), CFrame.new(0.22, 0.12, -0.6), Color3.fromRGB(20, 20, 22))
elderPart(V(1.24, 0.08, 1.24), CFrame.new(0, 0.18, 0) * CFrame.Angles(0, 0, math.rad(-12)), Color3.fromRGB(20, 20, 22))
elseif spot:GetAttribute("Look") == "Scarf" then
-- платок (цвет HatColor): макушка и узелок сзади
local s = hatPart(V(1.3, 0.5, 1.3), CFrame.new(0, 0.42, 0.05), Enum.PartType.Block)
s.Material = Enum.Material.SmoothPlastic
local k = hatPart(V(0.4, 0.4, 0.3), CFrame.new(0, 0.05, 0.62), Enum.PartType.Block)
k.Material = Enum.Material.SmoothPlastic
else
hatPart(V(0.15, 2.0, 2.0), CFrame.new(0, 0.55, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
hatPart(V(0.6, 1.35, 1.35), CFrame.new(0, 0.85, 0) * CFrame.Angles(0, 0, math.rad(90)), Enum.PartType.Cylinder)
@@ -6205,6 +6219,7 @@ local function spawnNpc(spot, parent)
end
return rig
end
Builder.spawnNpc = spawnNpc -- жители лобби (LobbyLife.server.lua) создаются так же
-- NPC встают на свои детали-места, доски «кто водится» получают актуальный список рыб
function Builder.prepareRuntime(root)
@@ -6222,6 +6237,23 @@ function Builder.prepareRuntime(root)
spot.Transparency = 1
spawnNpc(spot, root)
end
-- порталы лобби двигают в Studio за модель (PortalModel_WorldN); невидимый якорь с подсказкой и подписью
-- (Portal_WorldN) и маркер стрелки обучения (GuidePortal, перед порталом в мир 1) встают к модели
for _, model in ipairs(root:GetChildren()) do
local id = model.Name:match("^PortalModel_(World%d)$")
local anchor = id and root:FindFirstChild("Portal_" .. id)
if model:IsA("Model") and anchor then
local cf, size = model:GetBoundingBox()
anchor.CFrame = CFrame.new(cf.Position.X, cf.Position.Y - size.Y / 2 + 10, cf.Position.Z) * (anchor.CFrame - anchor.Position)
local marker = id == "World1" and root:FindFirstChild("GuidePortal", true)
if marker then
local flat = V(cf.Position.X, 0, cf.Position.Z)
local outward = flat.Magnitude > 0.1 and flat.Unit or V(0, 0, 1)
local p = flat + outward * 5.7
marker.CFrame = CFrame.new(p.X, marker.Position.Y, p.Z) * (marker.CFrame - marker.Position)
end
end
end
for _, board in ipairs(boards) do
writeBestiary(board)
end