Re-organized the code. All polygon-related calculations go to polygons.lua.

This commit is contained in:
Gael-de-Sailly
2020-04-14 21:11:54 +02:00
parent 43211fc31b
commit 55725ad94b
5 changed files with 185 additions and 171 deletions

View File

@ -1,5 +1,7 @@
local worldpath = minetest.get_worldpath() .. "/"
local function load_map(filename, bytes, signed, size)
local file = io.open(filename, 'r')
local file = io.open(worldpath .. filename, 'r')
local data = file:read('*all')
if #data < bytes*size then
data = minetest.decompress(data)