Created
May 7, 2018 22:46
-
-
Save Henningstone/0bb1f6b1914750c24c7f5534eb4ef711 to your computer and use it in GitHub Desktop.
Apply this to a teeworlds 0.6 source to get bam 0.5 support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From ea85a6406deabaad98a81ebd2c9ce7bfb521b949 Mon Sep 17 00:00:00 2001 | |
From: Henningstone <[email protected]> | |
Date: Mon, 24 Oct 2016 01:40:00 +0200 | |
Subject: [PATCH] bam 0.5 support | |
--- | |
bam.lua | 2 +- | |
configure.lua | 5 ++--- | |
2 files changed, 3 insertions(+), 4 deletions(-) | |
diff --git a/bam.lua b/bam.lua | |
index 3ac85f3f..50022f06 100644 | |
--- a/bam.lua | |
+++ b/bam.lua | |
@@ -1,4 +1,4 @@ | |
-CheckVersion("0.4") | |
+CheckVersion("0.5") | |
Import("configure.lua") | |
Import("other/sdl/sdl.lua") | |
diff --git a/configure.lua b/configure.lua | |
index 2db70cc4..6458546b 100644 | |
--- a/configure.lua | |
+++ b/configure.lua | |
@@ -72,13 +72,13 @@ function NewConfig(on_configured_callback) | |
end | |
config.Load = function(self, filename) | |
- local options_func = loadfile(filename) | |
local options_table = {} | |
+ local options_func = loadfile(filename, nil, options_table) | |
if not options_func then | |
print("auto configuration") | |
self:Config(filename) | |
- options_func = loadfile(filename) | |
+ options_func = loadfile(filename, nil, options_table) | |
end | |
if options_func then | |
@@ -86,7 +86,6 @@ function NewConfig(on_configured_callback) | |
for k,v in pairs(self.options) do | |
options_table[v.name] = {} | |
end | |
- setfenv(options_func, options_table) | |
-- this is to make sure that we get nice error messages when | |
-- someone sets an option that isn't valid. | |
-- | |
2.15.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment