Skip to content

Commit c1ab687

Browse files
committed
Changed some namespace names to pascal case
1 parent e140a60 commit c1ab687

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

lua/cfw/classes/contraption_sv.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Contraptions are an object to refer to a collection of connected entities
22

3-
CFW.contraptions = {}
4-
CFW.classes.contraption = {}
3+
CFW.Contraptions = {}
4+
CFW.Classes.Contraption = {}
55

66
function CFW.createContraption()
77
local con = {
@@ -10,7 +10,7 @@ function CFW.createContraption()
1010
color = ColorRand(50, 255)
1111
}
1212

13-
setmetatable(con, CFW.classes.contraption)
13+
setmetatable(con, CFW.Classes.Contraption)
1414

1515
con:Init()
1616

@@ -26,12 +26,12 @@ do -- Contraption getters and setters
2626
end
2727

2828
do -- Class def
29-
local CLASS = CFW.classes.contraption
29+
local CLASS = CFW.Classes.Contraption
3030

3131
CLASS.__index = CLASS
3232

3333
function CLASS:Init()
34-
CFW.contraptions[self] = true
34+
CFW.Contraptions[self] = true
3535
hook.Run("cfw.contraption.created", self)
3636
end
3737

@@ -72,7 +72,7 @@ do -- Class def
7272
hook.Run("cfw.contraption.removed", self)
7373
end
7474

75-
CFW.contraptions[self] = nil
75+
CFW.Contraptions[self] = nil
7676
end
7777

7878
function CLASS:Defuse()

lua/cfw/classes/family_sv.lua

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
-- Families are collections of parented entities, you know, parents... children...
22

3-
CFW.classes.family = {}
4-
CFW.families = {}
3+
CFW.Classes.Family = {}
4+
CFW.Families = {}
55

6-
function CFW.classes.family.create(ancestor)
6+
function CFW.Classes.Family.create(ancestor)
77
local fam = {
88
count = 0,
99
ents = {},
1010
ancestor = ancestor,
1111
color = ColorRand()
1212
}
1313

14-
setmetatable(fam, CFW.classes.family)
14+
setmetatable(fam, CFW.Classes.Family)
1515

1616
fam:Init()
1717
fam:Add(ancestor)
@@ -20,10 +20,10 @@ function CFW.classes.family.create(ancestor)
2020
end
2121

2222
do -- Class def
23-
local CLASS = CFW.classes.family; CLASS.__index = CLASS
23+
local CLASS = CFW.Classes.Family; CLASS.__index = CLASS
2424

2525
function CLASS:Init()
26-
CFW.families[self] = true
26+
CFW.Families[self] = true
2727

2828
hook.Run("cfw.family.created", self)
2929
end
@@ -37,7 +37,7 @@ do -- Class def
3737

3838
hook.Run("cfw.family.deleted", self)
3939

40-
CFW.families[self] = nil
40+
CFW.Families[self] = nil
4141
end
4242

4343
function CLASS:Add(entity)
@@ -102,7 +102,7 @@ do
102102
end
103103

104104
if not newFamily and next(self:GetChildren()) then
105-
CFW.classes.family.create(self)
105+
CFW.Classes.Family.create(self)
106106
end
107107
end
108108

lua/cfw/classes/link_sv.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- These are used to keep track of the number of connections between two entities
33
-- In graph theory these are edges
44

5-
CFW.classes.link = {}
5+
CFW.Classes.Link = {}
66

77
function CFW.createLink(a, b)
88
local indexA, indexB = a:EntIndex(), b:EntIndex()
@@ -22,13 +22,13 @@ function CFW.createLink(a, b)
2222
a._links[indexB] = link
2323
b._links[indexA] = link
2424

25-
setmetatable(link, CFW.classes.link)
25+
setmetatable(link, CFW.Classes.Link)
2626

2727
return link:Init()
2828
end
2929

3030
do -- Class def
31-
local CLASS = CFW.classes.link
31+
local CLASS = CFW.Classes.Link
3232

3333
CLASS.__index = CLASS -- why?
3434

lua/cfw/core/parenting_sv.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ hook.Add("Initialize", "CFW", function()
6969
if newParent._family then
7070
self:SetFamily(newParent._family)
7171
else
72-
CFW.classes.family.create(newParent)
72+
CFW.Classes.Family.create(newParent)
7373
end
7474
else
7575
self:SetFamily(nil)

lua/cfw/extensions/position_sv.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
local CLASS = CFW.classes.contraption
1+
local CLASS = CFW.Classes.Contraption
22
local VEC_0 = Vector(0, 0, 0)
33
local HUGE = math.huge
44

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
E2Lib.RegisterExtension("contraption", true, "Enables interaction with Contraption Framework")
22

33
local function isValidContraption(c)
4-
return CFW.contraptions[c] or false
4+
return CFW.Contraptions[c] or false
55
end
66

77
do -- Datatype and operator

0 commit comments

Comments
 (0)