This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 8064ba84d8
commit 73479cff9e
7338 changed files with 1718883 additions and 14 deletions

View File

@@ -0,0 +1,46 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
function test.Run(done)
local function find_part_in_entities(part)
for k,v in pairs(ents.GetAll()) do
if v.PACPart == part then
return v.PACPart
end
end
end
for _, part in pairs(pac.GetLocalParts()) do
part:Remove()
end
assert(table.Count(pac.GetLocalParts()) == 0)
local part = pac.CreatePart("group")
local model = part:CreatePart("model")
assert(table.Count(pac.GetLocalParts()) == 2)
model:SetModel("models/props_combine/breenchair.mdl")
assert(find_part_in_entities(model) == model)
assert(model:GetOwner():GetModel() == model:GetOwner():GetModel())
model:Remove()
assert(table.Count(pac.GetLocalParts()) == 1)
part:Remove()
assert(table.Count(pac.GetLocalParts()) == 0)
done()
end