Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lua/advdupe2/sv_clipboard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
if (Tab.ModelScale == 1) then Tab.ModelScale = nil end

if(Tab.Class == "gmod_cameraprop")then
Tab.key = Ent:GetNetworkedInt("key")

Check warning on line 190 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use :GetNWInt instead
end

-- Allow the entity to override the class
Expand Down Expand Up @@ -464,7 +464,7 @@
]]
function AdvDupe2.duplicator.AreaCopy(ply, Entities, Offset, CopyOutside)
local Constraints, EntTable, ConstraintTable = {}, {}, {}
local index, add, AddEnts, AddConstrs, ConstTable, EntTab

Check warning on line 467 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: AddConstrs

Check warning on line 467 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: AddEnts

for _, Ent in pairs(Entities) do
index = Ent:EntIndex()
Expand Down Expand Up @@ -727,7 +727,7 @@
end

if (Ent and Ent.length) then
Ent.length = Constraint["length"]

Check warning on line 730 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'single quoted strings' and 'double quoted strings'
end -- Fix for weird bug with ropes

return Ent
Expand All @@ -746,20 +746,20 @@
local ok, err = pcall(ModFunction, Player, Ent, Data)
if (not ok) then
if (Player) then
Player:ChatPrint('Error applying entity modifer, "' .. tostring(Type) .. '". ERROR: ' .. err)

Check warning on line 749 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'single quoted strings' and 'double quoted strings'
else
print('Error applying entity modifer, "' .. tostring(Type) .. '". ERROR: ' .. err)

Check warning on line 751 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'double quoted strings' and 'single quoted strings'
end
end
end
end
if (Ent.EntityMods["mass"] and duplicator.EntityModifiers["mass"]) then

Check warning on line 756 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'double quoted strings' and 'single quoted strings'
local ok, err = pcall(duplicator.EntityModifiers["mass"], Player, Ent, Ent.EntityMods["mass"])

Check warning on line 757 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'single quoted strings' and 'double quoted strings'
if (not ok) then
if (Player) then
Player:ChatPrint('Error applying entity modifer, "mass". ERROR: ' .. err)

Check warning on line 760 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'single quoted strings' and 'double quoted strings'
else
print('Error applying entity modifer, "' .. tostring(Type) .. '". ERROR: ' .. err)

Check warning on line 762 in lua/advdupe2/sv_clipboard.lua

View workflow job for this annotation

GitHub Actions / lint

"Syntax inconsistency"

Inconsistent use of 'double quoted strings' and 'single quoted strings'
end
end
end
Expand Down Expand Up @@ -1190,6 +1190,7 @@
Ent.EntityMods = table.Copy(v.EntityMods)
Ent.PhysicsObjects = table.Copy(v.PhysicsObjects)
if (v.CollisionGroup) then Ent:SetCollisionGroup(v.CollisionGroup) end
hook.Run("OnDuplicated", Ent, v)
if (Ent.OnDuplicated) then Ent:OnDuplicated(v) end
ApplyEntityModifiers(Player, Ent)
ApplyBoneModifiers(Player, Ent)
Expand Down Expand Up @@ -1362,6 +1363,7 @@
if (IsValid(Phys)) then Phys:EnableMotion(false) end
if (not Queue.DisableProtection) then Ent:SetNotSolid(true) end
if (v.CollisionGroup) then Ent:SetCollisionGroup(v.CollisionGroup) end
hook.Run("OnDuplicated", Ent, v)
if (Ent.OnDuplicated) then Ent:OnDuplicated(v) end
elseif (Ent == false) then
Ent = nil
Expand Down
Loading