Skip to content
Closed
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: 1 addition & 1 deletion lua/weapons/gmod_tool/stools/advdupe2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
WireMotor = true,
WireHydraulic = true
}
--Orders constraints so that the dupe uses as little constraint systems as possible
--Orders constraints so that the dupe uses as few constraint systems as possible
local function GroupConstraintOrder( ply, constraints )
--First separate the nocollides, sorted, and unsorted constraints
local sorted, unsorted = {}, {}
Expand All @@ -52,17 +52,17 @@
for _, target in pairs(system) do
for x = 1, 4 do
if v.Entity[x] then
for y = 1, 4 do
if target.Entity[y] and v.Entity[x].Index == target.Entity[y].Index then
system[#system + 1] = v
if #system == 100 then
fullSystems[#fullSystems + 1] = system
table.remove(sortingSystems, systemi)
end
input[k] = nil
goto super_loopbreak
end
end

Check warning on line 65 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Scope depth"

Are you Egyptian? What's with these fucking scope pyramids!?
end
end
end
Expand Down Expand Up @@ -472,10 +472,10 @@
local min
local max
if(not delay) then
delay = tonumber(GetConVarString("AdvDupe2_MinContraptionSpawnDelay")) or 0.2

Check warning on line 475 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
else
if(not game.SinglePlayer()) then
min = tonumber(GetConVarString("AdvDupe2_MinContraptionSpawnDelay")) or 0.2

Check warning on line 478 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
if (delay < min) then
delay = min
end
Expand All @@ -485,11 +485,11 @@
end

if(not undo_delay) then
undo_delay = tonumber(GetConVarString("AdvDupe2_MinContraptionUndoDelay"))

Check warning on line 488 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
else
if(not game.SinglePlayer()) then
min = tonumber(GetConVarString("AdvDupe2_MinContraptionUndoDelay")) or 0.1

Check warning on line 491 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
max = tonumber(GetConVarString("AdvDupe2_MaxContraptionUndoDelay")) or 60

Check warning on line 492 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
if(undo_delay < min) then
undo_delay = min
elseif(undo_delay > max) then
Expand Down Expand Up @@ -579,12 +579,12 @@
if not ply:CheckLimit("gmod_contr_spawners") then return nil end

if(not game.SinglePlayer()) then
if(table.Count(EntityTable)>tonumber(GetConVarString("AdvDupe2_MaxContraptionEntities"))) then

Check warning on line 582 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
AdvDupe2.Notify(ply,"Contraption Spawner exceeds the maximum amount of "..GetConVarString("AdvDupe2_MaxContraptionEntities").." entities for a spawner!",NOTIFY_ERROR)

Check warning on line 583 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
return false
end
if(#ConstraintTable>tonumber(GetConVarString("AdvDupe2_MaxContraptionConstraints"))) then

Check warning on line 586 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
AdvDupe2.Notify(ply,"Contraption Spawner exceeds the maximum amount of "..GetConVarString("AdvDupe2_MaxContraptionConstraints").." constraints for a spawner!",NOTIFY_ERROR)

Check warning on line 587 in lua/weapons/gmod_tool/stools/advdupe2.lua

View workflow job for this annotation

GitHub Actions / lint

"Deprecated"

Deprecated: Use ConVar objects instead
return false
end
end
Expand Down
Loading