Skip to content

Commit 10c67de

Browse files
committed
Replace GetContraption w/ CFW_GetContraption
I manually did all of these, hopefully should all work
1 parent b5c01d5 commit 10c67de

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

lua/cfw/classes/family_sv.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ do -- Class def
3030
function CLASS:Init()
3131
CFW.Families[self] = true
3232

33-
local con = self.ancestor:GetContraption()
33+
local con = self.ancestor:CFW_GetContraption()
3434
if con then con.families[self] = true end
3535

3636
hook.Run("cfw.family.created", self)
@@ -43,7 +43,7 @@ do -- Class def
4343
function CLASS:Delete()
4444
self:Sub(self.ancestor, true)
4545

46-
local con = self.ancestor:GetContraption()
46+
local con = self.ancestor:CFW_GetContraption()
4747
if con then con.families[self] = nil end
4848

4949
hook.Run("cfw.family.deleted", self)

lua/cfw/classes/link_sv.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ do -- Class def
6060
if not next(entA._links) then
6161
-- It's important that the entity is removed from the family first, then the contraption in that order
6262
entA:SetFamily(nil)
63-
entA:GetContraption():Sub(entA)
63+
entA:CFW_GetContraption():Sub(entA)
6464

6565
contraptionPopped = true
6666
end
@@ -73,7 +73,7 @@ do -- Class def
7373

7474
if not next(entB._links) then
7575
entB:SetFamily(nil)
76-
entB:GetContraption():Sub(entB)
76+
entB:CFW_GetContraption():Sub(entB)
7777

7878
contraptionPopped = true
7979
end

lua/cfw/core/connectivity_sv.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function CFW.connect(a, b)
3939
CFW.createLink(a, b)
4040

4141
-- Resolve contraption states
42-
local ac, bc = a:GetContraption(), b:GetContraption()
42+
local ac, bc = a:CFW_GetContraption(), b:CFW_GetContraption()
4343

4444
if ac and bc then
4545
if ac ~= bc then -- Two DIFFERENT contraptions
@@ -85,7 +85,7 @@ function CFW.disconnect(entA, indexB)
8585
-- Create a new contraption and move the cut-off ents to it
8686
-- The child contraption will always be the smaller of the two
8787

88-
local parentContraption, childContraption = entA:GetContraption(), CFW.createContraption()
88+
local parentContraption, childContraption = entA:CFW_GetContraption(), CFW.createContraption()
8989

9090
if parentContraption.count < floodedCount then parentContraption, childContraption = childContraption, parentContraption end
9191

lua/cfw/core/constraints_sv.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ hook.Add("PreUndo", "cfw.undo", function(undo)
5454
local alreadyRemoved = {}
5555

5656
for _, ent in ipairs(undo.Entities) do
57-
local contraption = ent:GetContraption()
57+
local contraption = ent:CFW_GetContraption()
5858

5959
if contraption and not alreadyRemoved[contraption] then
6060
for ent in pairs(contraption.ents) do

lua/cfw/extensions/mass_sv.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function PHYS:SetMass(newMass)
1111

1212
setMass(self, newMass)
1313

14-
local con = ent:GetContraption()
14+
local con = ent:CFW_GetContraption()
1515

1616
if con then
1717
con.totalMass = con.totalMass + (newMass - oldMass)

lua/entities/gmod_wire_expression2/core/custom/cfw.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ e2function number contraption:isValid()
3939
end
4040

4141
e2function contraption entity:getContraption()
42-
return this:GetContraption()
42+
return this:CFW_GetContraption()
4343
end
4444

4545
e2function number contraption:count()

0 commit comments

Comments
 (0)