This commit is contained in:
heyshawtyy committed 2026-11-06 12:34:01 +05:00
1 parent 73a2db8bb8
commit 44cf31ce6b
231 files changed
+3396887 -1109081

No files matched your search

+81
View File
@@ -0,0 +1,81 @@
-- Новые арки порталов лобби из Blockbench вокруг старых проёмов (node tools/lobby-portals.js <out.lua>, выполнить в Studio, Ctrl+S).
-- Старая модель портала (PortalModel_WorldN) остаётся на месте: светящийся проём «Portal», подставка-звезда и все
-- частицы работают как раньше, а видимые камни старой арки прячутся (Transparency = 1, сквозь них можно пройти).
-- Копия старой модели — в ServerStorage.Backup.LobbyPortals. Триггер телепорта Portal_WorldN не трогается.
-- Собственная «плёнка» проёма у новой арки (группа PortalPlane) удаляется — светится старый проём.
-- Повторный запуск пересобирает новые арки.
local ServerStorage = game:GetService("ServerStorage")
local map = workspace.FishingMap
local MODELS = { World1 = BUILD.lake, World2 = BUILD.tropics, World3 = BUILD.ice, World4 = BUILD.volcano }
local backup = ServerStorage:FindFirstChild("Backup") or Instance.new("Folder")
backup.Name = "Backup"
backup.Parent = ServerStorage
local store = backup:FindFirstChild("LobbyPortals")
local first = store == nil
if first then
store = Instance.new("Folder")
store.Name = "LobbyPortals"
store.Parent = backup
end
local report = {}
for id, build in pairs(MODELS) do
local old = map:FindFirstChild("PortalModel_" .. id)
local plane = old and old:FindFirstChild("Portal")
if not plane then
table.insert(report, id .. ": нет старого проёма, пропуск")
continue
end
-- подставка-звезда старой модели: широкие детали внизу
local baseTop = plane.Position.Y - plane.Size.Y / 2
if first then
local copy = old:Clone()
copy.Parent = store
for _, p in ipairs(old:GetDescendants()) do
if p:IsA("BasePart") and p ~= plane and not (p.Size.X > 11 and p.Size.Z > 11) then
p:SetAttribute("PortalsOrigT", p.Transparency)
p.Transparency = 1
p.CanCollide = false
p.CastShadow = false
end
end
end
for _, p in ipairs(old:GetDescendants()) do
if p:IsA("BasePart") and p.Size.X > 11 and p.Size.Z > 11 then
baseTop = math.max(baseTop, p.Position.Y + p.Size.Y / 2)
end
end
local name = "PortalArch_" .. id
local prev = map:FindFirstChild(name)
if prev then
prev:Destroy()
end
local arch = build(map)
arch.Name = name
local pp = arch:FindFirstChild("PortalPlane")
if pp then
pp:Destroy()
end
local at = Vector3.new(plane.Position.X, baseTop, plane.Position.Z)
local look = Vector3.new(plane.CFrame.LookVector.X, 0, plane.CFrame.LookVector.Z).Unit
arch:PivotTo(CFrame.lookAt(at, at + look))
for _, p in ipairs(arch:GetDescendants()) do
if p:IsA("BasePart") then
p.Anchored = true
end
end
-- фонари арки: тёплый свет; кристаллы-светляки — неон
for _, p in ipairs(arch:GetDescendants()) do
if p:IsA("BasePart") and p.Name:find("Glow") then
p.Material = Enum.Material.Neon
if p.Name:find("Lantern") and not p:FindFirstChildOfClass("PointLight") then
local l = Instance.new("PointLight")
l.Color, l.Range, l.Brightness = Color3.fromRGB(255, 190, 120), 10, 1
l.Parent = p
end
end
end
table.insert(report, ("%s: арка на Y=%.2f"):format(id, baseTop))
end
return table.concat(report, "\n")