Skip to content

Commit

Permalink
Ammo should now work with MiddleClass 2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ebens committed Aug 14, 2012
1 parent d227aab commit 1f8f168
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/middleclass"]
path = lib/middleclass
url = git://github.com/BlackBulletIV/middleclass.git
url = git://github.com/kikito/middleclass.git
2 changes: 1 addition & 1 deletion core/Entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Entity = class("Entity")
Entity._mt = {}

function Entity._mt:__index(key)
local result = rawget(self, "_" .. key) or self.class.__classDict[key]
local result = rawget(self, "_" .. key) or self.class.__instanceDict[key]

if result then
return result
Expand Down
2 changes: 1 addition & 1 deletion core/LinkedList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LinkedList = class("LinkedList")
local mt = {}

function mt:__index(key)
return rawget(self, "_" .. key) or LinkedList.__classDict[key]
return rawget(self, "_" .. key) or LinkedList.__instanceDict[key]
end

function LinkedList:initialize(nextProp, prevProp, ...)
Expand Down
2 changes: 1 addition & 1 deletion core/Sound.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Sound = class("Sound")
Sound._mt = {}

function Sound._mt:__index(key)
return rawget(self, "_" .. key) or self.class.__classDict[key]
return rawget(self, "_" .. key) or self.class.__instanceDict[key]
end

Sound:enableAccessors()
Expand Down
2 changes: 1 addition & 1 deletion core/World.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function World._mt:__index(key)
elseif key == "all" then
return self._updates:getAll()
else
return self.class.__classDict[key]
return self.class.__instanceDict[key]
end
end

Expand Down
2 changes: 1 addition & 1 deletion core/extensions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function Object:enableAccessors()
if not self._mt then self._mt = {} end

for _, v in pairs(Object.__metamethods) do
self._mt[v] = self.__classDict[v]
self._mt[v] = self.__instanceDict[v]
end

local super = self.super
Expand Down
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ammo = {}
ammo.path = ({...})[1]:gsub("%.init", "")

require(ammo.path .. ".lib.middleclass")
require(ammo.path .. ".lib.middleclass.middleclass")
require(ammo.path .. ".core.init")

0 comments on commit 1f8f168

Please sign in to comment.