summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2013-12-17 20:31:11 -0500
committerShadowNinja <shadowninja@minetest.net>2013-12-17 20:31:11 -0500
commit7df1bbc190a62968d750e876d7064c3e97f91f40 (patch)
tree97bec9a9ced6f823d52fb60ff1d1acc48e8e03d2
parente73b8c82f9852c0e3f3d4e2f12eb258ce7d1b3d4 (diff)
Variable localizations
-rw-r--r--interact.lua2
-rw-r--r--internal.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/interact.lua b/interact.lua
index b4f7164..2e54800 100644
--- a/interact.lua
+++ b/interact.lua
@@ -1,5 +1,5 @@
-old_is_protected = minetest.is_protected
+local old_is_protected = minetest.is_protected
function minetest.is_protected(pos, name)
if not areas:canInteract(pos, name) then
return true
diff --git a/internal.lua b/internal.lua
index f52b954..83ae3d5 100644
--- a/internal.lua
+++ b/internal.lua
@@ -5,7 +5,7 @@ end
-- Save the areas table to a file
function areas:save()
- file, err = io.open(self.filename, "w")
+ local file, err = io.open(self.filename, "w")
if err then
return err
end
@@ -15,7 +15,7 @@ end
-- Load the areas table from the save file
function areas:load()
- file, err = io.open(self.filename, "r")
+ local file, err = io.open(self.filename, "r")
if err then
self.areas = self.areas or {}
return err