Skip to content

Commit

Permalink
Merge pull request #1034 from NimbusBP1729/remove_level_hack
Browse files Browse the repository at this point in the history
removed ugly hack
  • Loading branch information
NimbusBP1729 committed Mar 19, 2013
2 parents fa8b18c + 0120a93 commit 2069e37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 0 additions & 4 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if correctVersion then
local mixpanel = require 'vendor/mixpanel'

local debugger = require 'debugger'
local Level = require 'level'
local camera = require 'camera'
local fonts = require 'fonts'
local window = require 'window'
Expand All @@ -22,9 +21,6 @@ if correctVersion then
local character = require 'character'
local cheat = require 'cheat'
local player = require 'player'

-- XXX Hack for level loading
Gamestate.Level = Level

math.randomseed( os.time() )

Expand Down
5 changes: 1 addition & 4 deletions src/vendor/gamestate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ function GS.new()
}
end

GS.Level = nil

function GS.get(name)
if love.filesystem.exists("maps/" .. name .. ".lua") then
-- ugly hack to get around circular import
return GS.Level.new(name)
return require("level").new(name)
else
return require(name)
end
Expand Down

0 comments on commit 2069e37

Please sign in to comment.