Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed ugly hack #1034

Merged
Merged
Show file tree
Hide file tree
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
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