Lobby
This commit is contained in:
1 parent
73a2db8bb8
commit
44cf31ce6b
231 files changed
+3396887
-1109081
No files matched your search
@@ -0,0 +1,42 @@
|
||||
-- Откат tools/widen-lobby.lua: всё, что сдвинуто, возвращается на прежние места и размеры,
|
||||
-- украшения торгового ряда удаляются. Запуск в Studio в режиме редактирования, потом Ctrl+S.
|
||||
local TAG = "LobbyWide"
|
||||
local map = workspace.FishingMap
|
||||
local n = 0
|
||||
local function restore(o)
|
||||
local cf = o:GetAttribute(TAG .. "Orig")
|
||||
if typeof(cf) ~= "CFrame" then
|
||||
return
|
||||
end
|
||||
if o:IsA("Model") then
|
||||
local s = o:GetAttribute(TAG .. "Scale")
|
||||
if s then
|
||||
o:ScaleTo(s)
|
||||
end
|
||||
o:PivotTo(cf)
|
||||
elseif o:IsA("BasePart") then
|
||||
local size = o:GetAttribute(TAG .. "Size")
|
||||
if size then
|
||||
o.Size = size
|
||||
end
|
||||
o.CFrame = cf
|
||||
end
|
||||
for _, a in ipairs({ "Orig", "Scale", "Size" }) do
|
||||
o:SetAttribute(TAG .. a, nil)
|
||||
end
|
||||
n += 1
|
||||
end
|
||||
for _, root in ipairs({ map, workspace }) do
|
||||
for _, o in ipairs(root == map and map:GetDescendants() or workspace:GetChildren()) do
|
||||
if (o:IsA("Model") or o:IsA("BasePart")) and o:GetAttribute(TAG .. "Orig") ~= nil then
|
||||
restore(o)
|
||||
end
|
||||
end
|
||||
end
|
||||
local decor = map:FindFirstChild("LobbyMarketDecor")
|
||||
if decor then
|
||||
decor:Destroy()
|
||||
end
|
||||
map:SetAttribute(TAG, nil)
|
||||
map:SetAttribute(TAG .. "Market", nil)
|
||||
return "возвращено объектов: " .. n
|
||||
Reference in new issue
Block a user