26 lines
911 B
Lua
26 lines
911 B
Lua
-- (любой режим) что стоит прямо в FishingMap и Workspace в прямоугольнике X1..X2, Z1..Z2 (правьте числа)
|
|
local X1, X2, Z1, Z2 = __BOX__
|
|
local out = {}
|
|
local function scan(root)
|
|
for _, c in ipairs(root:GetChildren()) do
|
|
local p, s
|
|
if c:IsA("Model") then
|
|
local cf
|
|
cf, s = c:GetBoundingBox()
|
|
p = cf.Position
|
|
elseif c:IsA("BasePart") then
|
|
p, s = c.Position, c.Size
|
|
end
|
|
if p and p.X >= X1 and p.X <= X2 and p.Z >= Z1 and p.Z <= Z2 and s.Magnitude < 80 then
|
|
local tags = {}
|
|
for k, v in pairs(c:GetAttributes()) do
|
|
table.insert(tags, k .. "=" .. tostring(v):sub(1, 20))
|
|
end
|
|
table.insert(out, ("%s %s @(%.1f,%.1f,%.1f) size(%.1f,%.1f,%.1f) %s"):format(c.ClassName, c:GetFullName(), p.X, p.Y, p.Z, s.X, s.Y, s.Z, table.concat(tags, " ")))
|
|
end
|
|
end
|
|
end
|
|
scan(workspace.FishingMap)
|
|
scan(workspace)
|
|
return table.concat(out, "\n")
|