mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-22 21:02:22 +01:00
Variable localizations
This commit is contained in:
parent
e73b8c82f9
commit
7df1bbc190
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
old_is_protected = minetest.is_protected
|
local old_is_protected = minetest.is_protected
|
||||||
function minetest.is_protected(pos, name)
|
function minetest.is_protected(pos, name)
|
||||||
if not areas:canInteract(pos, name) then
|
if not areas:canInteract(pos, name) then
|
||||||
return true
|
return true
|
||||||
|
@ -5,7 +5,7 @@ end
|
|||||||
|
|
||||||
-- Save the areas table to a file
|
-- Save the areas table to a file
|
||||||
function areas:save()
|
function areas:save()
|
||||||
file, err = io.open(self.filename, "w")
|
local file, err = io.open(self.filename, "w")
|
||||||
if err then
|
if err then
|
||||||
return err
|
return err
|
||||||
end
|
end
|
||||||
@ -15,7 +15,7 @@ end
|
|||||||
|
|
||||||
-- Load the areas table from the save file
|
-- Load the areas table from the save file
|
||||||
function areas:load()
|
function areas:load()
|
||||||
file, err = io.open(self.filename, "r")
|
local file, err = io.open(self.filename, "r")
|
||||||
if err then
|
if err then
|
||||||
self.areas = self.areas or {}
|
self.areas = self.areas or {}
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user