summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/coords.lua4
-rw-r--r--common/map.lua4
2 files changed, 6 insertions, 2 deletions
diff --git a/common/coords.lua b/common/coords.lua
index f0ca877..111429a 100644
--- a/common/coords.lua
+++ b/common/coords.lua
@@ -136,6 +136,10 @@ function ChunkPos.extents(self)
local brq,brr = (self.u+1)*CHUNK_SIZE -1, (self.v+1)*CHUNK_SIZE -1
return Hex:make(tlq,tlr), Hex:make(brq,brr)
end
+function ChunkPos.filename(self)
+ -- filename of chunk with that cp
+ return "world/c_"..self.u.."_"..self.v..".dat"
+end
diff --git a/common/map.lua b/common/map.lua
index d32cbf3..8161f11 100644
--- a/common/map.lua
+++ b/common/map.lua
@@ -29,8 +29,8 @@ function Map.mark_chunk_loading(self,cp)
print("marking chunk as loading",cp)
self:_set_chunk(cp,false)
end
-function Map.unload_chunk(self,cp)
- print("unloading chunk",cp)
+function Map.remove_chunk(self,cp)
+ print("removing chunk",cp)
if not self.chunks[cp.u] then return end
self.chunks[cp.u][cp.v] = nil
-- remove list if empty